Use the new readline function.
[platform/upstream/evolution-data-server.git] / camel / ChangeLog
1 2002-05-24  Jeffrey Stedfast  <fejj@ximian.com>
2
3         * providers/imap/camel-imap-command.c (imap_read_untagged): Use
4         the new readline function.
5
6         * providers/imap/camel-imap-store.c (connect_to_server): Use the
7         new camel_imap_store_readline() function which doesn't suck quite
8         as bad as the original camel_remote_store_recv_line() function.
9         (camel_imap_store_readline): New function to replace
10         camel_remote_store_recv_line(). This function is at least safe
11         with embedded nul chars. Not that any of our callers use it
12         *sigh*.
13
14 2002-05-24  Jeffrey Stedfast  <fejj@ximian.com>
15
16         * providers/imap/camel-imap-store.c (connect_to_server): Added
17         some NULL protection fixes.
18
19 2002-05-22  Jeffrey Stedfast  <fejj@ximian.com>
20
21         * camel-remote-store.c: Removed from the build. Glory glory
22         hallelujah.
23
24         * camel-disco-store.c: Updated to inherit from
25         CamelStore rather than CamelRemoteStore.
26
27         * providers/imap/camel-imap-command.c (imap_command_start): Don't
28         use the camel-remote-store shit to send a string. Just use
29         camel_stream_printf for chrissakes.
30
31         * providers/imap/camel-imap-store.c: Updated to not depend on
32         CamelRemoteStore and to handle STARTTLS.
33         (imap_disconnect_online): Unref the streams.
34         (imap_keepalive): Removed.
35         (camel_imap_store_connected): New function to replace
36         camel_remote_store_connected().
37         (camel_imap_store_finalize): Unref the streams.
38         (camel_imap_store_recv_line): New function to replace
39         camel_remote_store_recv_line().
40         (imap_get_capability): Renamed from connect_to_server
41         (connect_to_server): New function to try and connect to the
42         server.
43         (connect_to_server_wrapper): New wrapper function around
44         connect_to_server that takes the ssl modes into consideration.
45         (query_auth_types): Don't bother calling our parent's
46         implementation of query_auth_types() since CamelDiscoStore doesn't
47         have any anyway.
48         (imap_get_name): New method to implement CamelService::get_name
49
50 2002-05-18  Not Zed  <NotZed@Ximian.com>
51
52         * camel-search-private.c (camel_utf8_getc): If we get an invalid
53         start char, just ignore it and goto the next character.
54
55 2002-05-16  Jeffrey Stedfast  <fejj@ximian.com>
56
57         * providers/imap/camel-imap-store.c (get_folder_offline): Don't
58         call some retarded function to simply set an exception.
59
60         * camel-filter-search.c (get_label): New e-sexp callback function
61         to get a user_tag label value.
62
63 2002-05-15  Jeffrey Stedfast  <fejj@ximian.com>
64
65         * providers/imap/camel-imap-utils.c
66         (imap_parse_namespace_response): New function to parse a NAMESPACE
67         response properly.
68         (imap_namespaces_destroy): New function to destroy the returned
69         structure from the above function.
70
71 2002-05-15  Jeffrey Stedfast  <fejj@ximian.com>
72
73         * camel-service.c (service_setv): Only reconnect if we are already
74         connected, if we are in a disconnected state then no need to
75         reconnect.
76
77         * providers/imap/camel-imap-folder.c (get_content): If the
78         part_spec is an empty string for a leaft part, use "1" since we
79         don't actually want to get the raw message headers too.
80
81 2002-05-15  Not Zed  <NotZed@Ximian.com>
82
83         * providers/imap/camel-imap-store.c (refresh_folder_info): removed.
84         (imap_store_refresh_folders): Copy the folders first, then refresh
85         them, outside of the cache_lock, which could cause deadlocks
86         because of a workaround for crappo exchange.
87         (imap_disconnect_online): Dont pass an exception to LOGOUT
88         command.  The required response 'BYE' always sets an exception
89         when we call LOGOUT.  This also interfered with a lot of other
90         processing causing partial failures and messed up offline/online
91         state.
92
93         * camel-disco-folder.c (disco_prepare_for_offline): Do progress
94         reporting.
95
96 2002-05-14  Jeffrey Stedfast  <fejj@ximian.com>
97
98         Fixes bug #24136.
99
100         * providers/imap/camel-imap-folder.c (content_info_get_part_spec):
101         New function to take a CamelMessageContentInfo and generate a
102         part-specification string.
103         (get_content): Stop passing around part_spec strings and use
104         content_info_get_part_spec instead.
105
106         * camel-folder-summary.c (camel_content_info_dump): Made this into
107         a public debugging function.
108
109         * providers/imap/camel-imap-utils.c (imap_parse_body): Make sure
110         to set the parent of any message/rfc822 subparts.
111
112 2002-05-13  Jeffrey Stedfast  <fejj@ximian.com>
113
114         * providers/imap/camel-imap-folder.c (imap_get_message): Previous
115         fix reverted.
116
117 2002-05-13  Jeffrey Stedfast  <fejj@ximian.com>
118
119         * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
120         Overload the setv/getv CamelObject virtual methods.
121         (imap_setv): Implemented.
122         (imap_getv): Implemented.
123
124 2002-05-13  Dan Winship  <danw@ximian.com>
125
126         * camel-folder.c (camel_folder_append_message): Add a "char
127         **appended_uid" argument, for the caller to optionally pass in a
128         variable to receive the UID of the appended message (if the
129         provider knows it).
130         (camel_folder_transfer_messages_to): Likewise, add "GPtrArray
131         **transferred_uids"
132         (transfer_messages_to): Update default implementation to handle
133         transferred_uids.
134
135         * camel-disco-folder.c (disco_append_message,
136         disco_transfer_messages_to): Update for API changes.
137
138         * camel-disco-diary.c (camel_disco_diary_replay): Update the
139         diary's temporary uid->real uid map when replaying appends and
140         transfers.
141
142         * providers/imap/camel-imap-folder.c (imap_append_offline,
143         imap_append_online, imap_transfer_offline): Pass back the new
144         UIDs, when requested and available.
145         (imap_append_resyncing): Pass back the new UIDs when requested and
146         available. Remove the diary uidmap managing code since
147         CamelDiscoDiary can handle that itself now.
148         (imap_transfer_online, imap_transfer_resyncing): Update for new
149         APIs, but don't actually pass back the new UIDs yet. (It's tricky
150         since the COPYUID response may not be in the same order as the
151         input uids.)
152         
153         * providers/local/camel-maildir-folder.c (maildir_append_message):
154         Pass back the new UID if requested.
155
156         * providers/local/camel-mbox-folder.c (mbox_append_message):
157         Likewise.
158
159         * providers/local/camel-mh-folder.c (mh_append_message): Likewise.
160
161         * providers/local/camel-spool-folder.c (spool_append_message):
162         Likewise.
163
164         * camel-digest-folder.c (digest_append_message,
165         digest_transfer_messages_to): Update for API changes.
166
167         * camel-filter-driver.c (camel_filter_driver_filter_message,
168         do_copy, do_move): Update for API changes.
169
170         * camel-vee-folder.c (vee_append_message,
171         vee_transfer_messages_to): Likewise.
172
173         * camel-vtrash-folder.c (vtrash_append_message,
174         vtrash_transfer_messages_to): Likewise. 
175
176 2002-05-13  Not Zed  <NotZed@Ximian.com>
177
178         * camel-folder-thread.c
179         (camel_folder_thread_messages_new_summary):
180         (camel_folder_thread_messages_new): Since the fix for #3357 uses
181         'order=0' to indicate tree structure nodes, make sure we dont
182         actually set order=0 for valid messages, otherwise we silently
183         lose duplicates of the first message (i==0).  Fixes #19920.
184
185 2002-05-10  Jeffrey Stedfast  <fejj@ximian.com>
186
187         * providers/imap/camel-imap-folder.c (imap_get_message): Fetch the
188         BODYSTRUCTURE rather than BODY since BODY seems to be lacking some
189         of the data we need. This fixes bug #24136.
190
191         * camel-transport.c (camel_transport_get_type): Might help if we
192         called camel_transport_class_init.
193
194 2002-05-10  Dan Winship  <danw@ximian.com>
195
196         * camel-folder.c (camel_folder_transfer_messages_to): Replace
197         copy_messages_to and move_messages_to with a single function that
198         just takes a "delete_originals" flag. Also, use the vtrash
199         implementation if *either* folder is a vtrash.
200         (transfer_messages_to): Make this use camel_operation_progress
201         (previously move_messages_to did but copy_messages_to didn't), and
202         freeze/thaw the folder(s) if doing multiple messages.
203
204         * camel-vtrash-folder.c (vtrash_transfer_messages_to): Update for
205         move/copy merge. Move the "move messages into vtrash" code here
206         from mail-ops.c. Now all of the vtrash move/copy special casing is
207         in camel instead of half of it being here and half in mail/. (This
208         should also make it so that "Move to Trash" will work in filter
209         rules.)
210
211         * camel-vee-folder.c (vee_transfer_messages_to): Make this just
212         return an exception, since it will only be called when trying to
213         move/copy messages from one vfolder to another.
214         (vee_append_message): Add this too so we get a nicer error message
215         than the default "unimplemented" one in camel-folder.c.
216
217         * camel-digest-folder.c: Replace copy_messages_to and
218         move_messages_to with transfer_messages_to.
219
220         * camel-disco-folder.c: Likewise
221
222         * camel-disco-diary.c (camel_disco_diary_log,
223         camel_disco_diary_replay): replace MOVE/COPY with TRANSFER.
224
225         * providers/imap/camel-imap-folder.c (imap_transfer_offline,
226         imap_transfer_online, imap_transfer_resyncing): Update for
227         changes. (This ends up being a bit more complicated than it was
228         before for now, but later disconnected operation changes should
229         resimplify it.)
230
231         * camel-filter-driver.c (camel_filter_driver_filter_message,
232         do_copy, do_move): Use transfer_messages_to instead of copy.
233
234 2002-05-09  Jeffrey Stedfast  <fejj@ximian.com>
235
236         * camel-filter-search.c (shell_exec): New filter function to pipe
237         a message to another program.
238         (run_command): Fixed some bugs to make this work.
239
240 2002-05-09  Not Zed  <NotZed@Ximian.com>
241
242         * camel-service.c (camel_service_disconnect): Instead of testing
243         for SERVICE_CONNECTED, we need to also handle SERVICE_CONNECTING
244         too, as it will often have setup some details before it failed.
245         Make it !DISCONNECTED (and !DISCONNECTING for recursive calls,
246         which happen).  Fixes #23782, and maybe also #21604 and many other
247         random crashes.
248
249 2002-05-08  Jeffrey Stedfast  <fejj@ximian.com>
250
251         * camel-digest-store.c (digest_setv): Implemented.
252         (digest_getv): Implemented.
253
254         * camel-disco-store.c (disco_setv): Implemented.
255         (disco_getv): Implemented.
256
257         * camel-remote-store.c (remote_store_setv): Implemented.
258         (remote_store_getv): Implemented.
259
260         * camel-transport.c (camel_transport_class_init): Implemented.
261         (transport_setv): Implemented.
262         (transport_getv): Implemented.
263
264         * camel-store.c (store_setv): Implemented.
265         (store_getv): Implemented.
266
267         * camel-service.c (service_setv): Implemented.
268         (service_getv): Implemented.
269
270         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
271         camel_pop3_engine_iterate doesn't return the state, it returns -1
272         on fail, 0 when finished processing request or >0 if more ops are
273         in the queue, so don't check status against CAMEL_POP3_STATE_OK,
274         instead check pcp->state against that.
275
276 2002-05-07  Jeffrey Stedfast  <fejj@ximian.com>
277
278         * camel-object.h: s/class/klass for arguments so that c++
279         developers don't complain later.
280
281 2002-05-07  Dan Winship  <danw@ximian.com>
282
283         * camel-object.c (camel_object_class_cast): Fix a crash in a
284         g_warning.
285
286 2002-05-07  Not Zed  <NotZed@Ximian.com>
287
288         * camel-remote-store.c (remote_send_string): Check for LOGIN xxxx
289         as well if debug is on, so we dont print passwords to evolution
290         logs.
291
292         * providers/imap/camel-imap-utils.c (imap_is_atom_char): This was
293         really broken.  1. isprint() is locale dependent, and 2. it looked
294         up an 8 bit value in a 7 bit table without truncating it.  I've
295         removed the isprint() stuff and just put it directly into the
296         special table, which i've expanded to the right size too.
297
298         * providers/imap/*: Applied patch from Preston Elder
299         <prez@magick.tm> to make camel only use literals if it needs to
300         for simple strings.  Changed slightly to use imap_is_atom() and
301         more consistent formatting.
302         providers/imap/camel-imap-utils.c (imap_is_atom): Chagned from
303         imap_needs_quoting().
304
305         ** Merged in camel-object2 branch.  Simpler camelobject
306         implementation + object args interface.
307
308         * camel.c (camel_init): Call camel_object_get_type() to make sure
309         camel_object_type is initialised.
310
311         * camel-object.h (CAMEL_OBJECT_TYPE): Changed to return global
312         camel_object_type pointer, not call camel_object_get_type.
313         
314 2002-05-06  Jeffrey Stedfast  <fejj@ximian.com>
315
316         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): If
317         the pop3 command status is -1, then we probably have a TCP error
318         (?) so set a SYSTEM exception so our caller can distinguish
319         between a "bad password" and a "tcp error".
320         (pop3_connect): Only uncache the password on "bad password"
321         errors.
322
323         * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Use
324         CamelMimeFilterBestenc to get a more appropriate encoding rather
325         than just blindling assigning QP.
326
327         * providers/imap/camel-imap-folder.c (do_append): Call
328         camel_mime_message_encode_8bit_parts() which fixes bug #10885.
329
330         * camel-tcp-stream-raw.c (socket_connect): Don't bother with
331         counting down the timeout.
332
333 2002-05-02  Jeffrey Stedfast  <fejj@ximian.com>
334
335         * camel-stream-fs.c (stream_read): Same fix as the tcp stream.
336         (stream_write): Again here. Just like tcp stream's stream_write(),
337         also make sure to save errno before calling fcntl to restore the
338         fd flags.
339
340         * camel-tcp-stream-raw.c (stream_read): Handle EINTR errors for
341         select().
342         (stream_write): Same and also preserve errno when setting the fd
343         flags back. If w == -1, return -1.
344
345 2002-05-02  Jeffrey Stedfast  <fejj@ximian.com>
346
347         * camel-mime-utils.c (header_decode_mailbox): Fixed the fix for
348         stupidly-broken-mailer bug #5 to work when multiple unescaped
349         characters were in a row. Fixes bug #24140.
350
351         * camel-tcp-stream-raw.c (socket_connect): Check select() for
352         EINTR errors.
353
354         * camel-pgp-context.c (crypto_exec_with_passwd): Change the order
355         of some code so that we check if the select() failed before we
356         check for user-cancellation.
357
358         * camel-service.c (camel_gethostbyname): Check for EINTR when
359         select()ing.
360         (camel_gethostbyaddr): Same.
361
362 2002-04-29  Jeffrey Stedfast  <fejj@ximian.com>
363
364         * camel-provider.c (camel_provider_auto_detect): Now takes a
365         CamelURL argument rather than a GHashTable *settings argument.
366
367 2002-04-29  Not Zed  <NotZed@Ximian.com>
368
369         * providers/local/camel-spool-store.c (get_folder_info): We want
370         to set unread_count to get_unread_message_count, not
371         get_message_count().  Might fix #17174.  Also removed FIXME: as it
372         was fixed.
373
374 2002-04-26  Jeffrey Stedfast  <fejj@ximian.com>
375
376         * providers/local/Makefile.am: Don't link to libibex.a anymore.
377
378         * providers/nntp/Makefile.am: Same.
379
380         * providers/imap/Makefile.am: And again here.
381
382         * camel-store-summary.h: No longer want to #include
383         <libibex/ibex.h>
384
385         * camel-provider.c (camel_provider_auto_detect): New function to
386         auto-detect configuration settings.
387
388 2002-04-26  Not Zed  <NotZed@Ximian.com>
389
390         * camel-block-file.c (block_file_validate_root): Remove the
391         excessive \n's, after printfs.
392
393         * camel-text-index.c (text_index_compress_nosync): @!#$@#$!@$#!.
394         Since the rename op was fixed, this broke compression's rename,
395         resulting in the index 'vanishing' after every compress
396         (i.e. after every reindex).  Fix this code to account for the
397         fixed rename operation.
398
399 2002-04-25  Jeffrey Stedfast  <fejj@ximian.com>
400
401         * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't put a
402         space between the "RCPT TO:" and the "<recipient>" strings -
403         rfc0821 was not clear on this but it seems rfc2821 defines a
404         grammar excluding that SP.
405         (smtp_mail): Same.
406
407 2002-04-24  Jeffrey Stedfast  <fejj@ximian.com>
408
409         * providers/local/camel-local-provider.c
410         (camel_provider_module_init): Configure the default paths for mh,
411         mbox, maildir, spools, etc.
412
413         * camel-provider.h: Add a CAMEL_PROVIDER_CONF_LABEL enum and
414         define some default CamelProviderConfEntry macros.
415
416 2002-04-19  Jeffrey Stedfast  <fejj@ximian.com>
417
418         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Free the
419         LIST pop3 command.
420
421         * camel-data-cache.c (data_cache_finalise): Free the cdc->path.
422
423         * camel-multipart.c (write_to_stream): Don't g_return_val_if_fail
424         here if the boundary is an empty string. See bug #23676 for
425         details. The way I see it, we have 2 options: 1) leave this fix
426         the way it is, thus allowing multipart boundaries to be
427         empty-strings; or 2) make camel_multipart_get_boundary() change
428         the boundary to something legal if the boundary is an
429         empty-string. Since the parser should be able to handle an
430         empty-string boundary *and* more importantly because we want to
431         keep the same boundaries as the original raw message so as to be
432         able to verify multipart/signed parts, I vote for solution #1.
433
434 2002-04-19  Not Zed  <NotZed@Ximian.com>
435
436         * devel-docs/camel-index.txt: Start of a white-paperish document
437         describing camel-index and older libibex.
438
439 2002-04-18  Not Zed  <NotZed@Ximian.com>
440
441         * providers/local/camel-local-store.c (rename_folder): If we get a
442         failure, make sure we set an exception.
443
444         * camel-text-index.c (camel_text_index_rename): If the file
445         doesn't exist, just assume it never did, dont return failure.
446         (text_index_rename): Add '.index' to the path name we're using,
447         since we dont get it passed in.
448
449         * camel-folder-search.c (check_header): When doing a contains
450         match, split the words and perform an and on it.
451         (match_words_messages): If we have an index, but were forced to do
452         a full search, first lookup a subset of messages using
453         the index and a simplified word set.  Only do a manual search of
454         this subset.
455
456 2002-04-17  Not Zed  <NotZed@Ximian.com>
457
458         * camel-folder-search.c (match_message_index): Changed to take a
459         utf8 string not a regex pattern.
460         (match_words_index): Matches against a camel_search_words list.
461         (match_words_1message): Matches a single message against a
462         camel_search_words list.
463         (match_words_message): Same, but gets the message from the folder
464         for you.
465         (match_words_messages): Matches a list of messages against a words
466         list.
467         (search_body_contains): Rewritten to handle multiple word
468         searches.  For #23371.
469
470         * providers/imap/camel-imap-search.c (sync_match): Split words
471         when searching, to support multiple search words.  Also, try
472         searching specifying charset of utf8 if we can, if that fails,
473         fall back to not specifying charset.  TODO: It should translate
474         the strings into the locale default charset?
475
476         * providers/imap/camel-imap-store.c (connect_to_server): Added new
477         cap - utf8_search, if set, we tell the server we're searching
478         using utf8, otherwise we dont (incorrectly, since we always use
479         utf8 to search).
480
481         * camel-search-private.c (camel_ustrstrcase): Make this class public.
482         (camel_search_words_split): Split a word into multiple words based
483         on whitespace, and keep track of whether the word is simple
484         (indexable directly), or not.
485         (camel_search_words_free): Free 'em.
486
487 2002-04-17  Jeffrey Stedfast  <fejj@ximian.com>
488
489         * camel-vee-folder.c (vee_search_by_expression): If the vee-folder
490         is the unmatched, we don't have our own expression so we cannot
491         merge them. Instead, just use the expression passed in. This fixes
492         a Null-Pointer-Read crash on Solaris systems at least.
493
494 2002-04-16  Jeffrey Stedfast  <fejj@ximian.com>
495
496         * camel-filter-driver.c (camel_filter_driver_filter_folder): Get
497         rid of an unused variable.
498
499         * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
500         camel_gethostbyaddr since gethostbyaddr is not reentrant.
501
502         * camel-http-stream.c (http_connect): Updated after the rename of
503         camel_get_host_byname.
504
505         * camel-service.c (camel_gethostbyname): Renamed.
506         (camel_gethostbyaddr): New cancellable/reentrant version of
507         gethostbyaddr.
508
509 2002-04-14  Jeffrey Stedfast  <fejj@ximian.com>
510
511         * providers/local/camel-spoold-store.c: Added #include
512         <sys/types.h> for dirent.h which needs it on MacOS X.
513
514         * providers/local/camel-maildir-store.c: Same.
515
516         * providers/nntp/camel-nntp-store.c: Same.
517
518         * providers/imap/camel-imap-message-cache.c: Same.
519
520         * camel-provider.c: Same.
521
522         * camel-data-cache.c: Same.
523
524 2002-04-12  Jeffrey Stedfast  <fejj@ximian.com>
525
526         * broken-date-parser.c (datetok): Treat commas as token
527         delimeters.
528         (WEEKDAY_CHARS): Use full weekday names in case the broken mailer
529         used the full names.
530         (MONTH_CHARS): Same as above but for months.
531
532 2002-04-15  Not Zed  <NotZed@Ximian.com>
533
534         * *.c: Fix callers for api changes to camel-object, mainly
535         declare_event->add_event, and classfuncs->klass, and a couple
536         of missing #include <config.h>'s
537
538         * camel-arg.[ch], Makefile.am: New support code for
539         camel_object_get/set arg.
540
541         * *.h: Fixed all uses of get_type to return a CamelType rather
542         than a guint (now a pointer).
543
544         * camel-object.[ch]: Major cleanup of object implementation.  Also
545         added a get/set interface, and some debugging options.
546
547 2002-04-11  Not Zed  <NotZed@Ximian.com>
548
549         * providers/local/camel-spool-summary.c (spool_summary_sync_full):
550         If the last message(s) were deleted, and we had any messages
551         output, account for the lost \n of the following From line by
552         adding an extra \n. fix for #8214.
553
554 2002-04-10  Not Zed  <NotZed@Ximian.com>
555
556         * camel-mime-part-utils.c (convert_buffer): If we get a 0 length
557         input, return a 0 lenght output as valid - fixes bugs with some
558         iconv impl and its simpler anyway.
559
560 2002-04-11  Jeffrey Stedfast  <fejj@ximian.com>
561
562         * providers/imap/camel-imap-folder.c: Set the UID_SET_LIMIT value
563         to 4096. I ran into an issue tonight where apparently the IMAP
564         server changed the UIDVALIDITY and so Evo needed to re-fetch all
565         headers and it was trying to send a uid set of some 25k (yes, I
566         have a very large INBOX). Anyways, it was set to unlimited
567         before. Courier IMAPd can safely handle up to ~16k per token, but
568         UW IMAPd can only handle 8k per command-line, so I set it to 4k
569         just to be safe.
570
571 2002-04-10  Jeffrey Stedfast  <fejj@ximian.com>
572
573         * camel-mime-part-utils.c (convert_buffer): Fixed a bug that would
574         miscalculate how much data to copy into the GByteArray (negative
575         value) thus causing a segfault. Also optimized it while I was at
576         it.
577
578 2002-04-09  Jeffrey Stedfast  <fejj@ximian.com>
579
580         * camel-store.c (camel_store_init): Make the folder_lock
581         recursive. See bug #22363 for details. Basically,
582         get_folder_info() is requesting a diary folder which in turn
583         connects which requests then calls get_folder() but deadlocks
584         because get_folder_info already holds the lock.
585
586         * camel-mime-message.c (camel_mime_message_set_date): Don't adjust
587         the timezone offset if we used tm.tm_gmtoff because it is already
588         adjusted.
589
590 2002-04-09  Not Zed  <NotZed@Ximian.com>
591
592         * camel-mime-part.c (construct_from_parser): If we get multiple
593         Content-Type header values, change subsequent headers to
594         X-Invalid-Content-Type so it doesn't wreck processing.  This fixes
595         the reported case in #18929, but i dont know if it fixes the
596         original posters problems.
597
598 2002-04-08  Not Zed  <NotZed@Ximian.com>
599
600         * camel-vtrash-folder.c (vtrash_move_messages_to): If we find
601         we're moving from the vtrash to another folder, we need to convert
602         the uid from a vfolder uid to the source uid (+8).  Fix for
603         #20886.  Also changed to batch multiple moves to different folders
604         so they are done as efficiently as possible rather than one at a
605         time.
606
607         * camel-mime-utils.c (base64_decode_step): If we only get passed
608         '=', we back track only if we actually output any data.  Fix for
609         #21716.
610         (quoted_decode): Pass out size_t instead of int, and use 0 instead
611         of -1 for error since its not signed.  This will fix similar bug
612         to above in different circumstances since the result is taken as
613         unsigned.  This is only an internal func.
614         (quoted_encode): Return size_t just for consistency.
615
616         * camel-block-file.c (block_file_validate_root): Comment out the
617         debug and move it into a warning when the validation fails.
618
619 2002-04-08  Jeffrey Stedfast  <fejj@ximian.com>
620
621         * camel-mime-utils.c (uuencode_close): Don't count our filler when
622         encoding our line-length octet.
623
624 2002-04-05  Jeffrey Stedfast  <fejj@ximian.com>
625
626         * camel-http-stream.c (http_get_headers): Don't get the statuscode
627         here anymore.
628         (http_method_invoke): Use a User-Agent header and do basic proxy
629         authentication.
630         (stream_read): Handle redirects.
631         (camel_http_stream_set_user_agent): New function to allow client
632         to set the User-Agent string.
633         (camel_http_stream_set_proxy): New function for setting the proxy
634         server.
635         (camel_http_stream_set_proxy_authrealm): New function for setting
636         the proxy auth realm.
637         (camel_http_stream_set_proxy_authpass): New function for setting
638         the proxy auth password.
639
640 2002-04-04  Jeffrey Stedfast  <fejj@ximian.com>
641
642         * camel-folder-summary.c (message_info_new): Simplified since we
643         can now decode in-reply-to without getting extra cruft. Get rid of
644         the FIXME about having to check scan->id because of the
645         possibility of it being NULL, this can no longer happen.
646
647         * camel-mime-utils.c (header_references_inreplyto_decode): New
648         function to decode in-reply-to headers. Only grabs the first thing
649         that looks like a message-id and then returns.
650         (header_references_decode): Loop calling
651         header_references_decode_single (a new internal function).
652
653 2002-04-04  Not Zed  <NotZed@Ximian.com>
654
655         * providers/imap/camel-imap-search.c (imap_body_contains): If
656         (body-contains) is not passed any arguments, return empty/false.
657         Fixes a crash exposed by #15001.
658
659         * camel-remote-store.c (remote_connect): Reset the keepalive
660         timeout to 10 minutes rather than the 30 seconds I was using for
661         testing.
662
663 2002-04-03  Dan Winship  <danw@ximian.com>
664
665         * camel-provider.h (CamelProvider): make service_cache be an array
666         of CAMEL_NUM_PROVIDER_TYPES elements so you can have a single
667         provider offer both stores and transports. (Eg, Exchange, NNTP)
668
669         * providers/imap/camel-imap-provider.c: Don't initialize
670         service_cache here. (The session code can do it itself since the
671         url_hash and url_equal functions are stored as part of the
672         provider.)
673
674         * providers/nntp/camel-nntp-provider.c: Likewise.
675
676         * providers/local/camel-local-provider.c: Likewise.
677
678         * providers/pop3/camel-pop3-provider.c: Likewise.
679
680         * providers/sendmail/camel-sendmail-provider.c: Likewise.
681
682         * providers/smtp/camel-smtp-provider.c: Likewise.
683
684         * camel-session.c (register_provider): Initialize the provider's
685         service cache(s) here.
686         (camel_session_class_init): Don't initialize.
687         vee_provider.service_cache here.
688         (camel_session_destroy_provider): Update to destroy multiple
689         service_caches.
690         (service_cache_remove, get_service): Tweak these a bit to deal
691         with multiple service_caches.
692
693 2002-04-02  Jeffrey Stedfast  <fejj@ximian.com>
694
695         * camel-tcp-stream-ssl.c (set_errno): Handle a ton more nspr i/o
696         errno's.
697         (stream_connect): Act as if we are doing a non-blocking
698         connect. This is to try and work around bug #15120 where users get
699         an EINPROGRESS error. Maybe importing a PRFileDesc into SSL mode
700         automagically makes it non-blocking? I dunno.
701
702 2002-04-01  Jeffrey Stedfast  <fejj@ximian.com>
703
704         * camel-folder-summary.c (message_info_new): Updated the
705         construction of the references to match JWZ's updated algorithm
706         initialization (ie, append any In-Reply-To reference onto any
707         References header and never take more than a single message-id
708         from the In-Reply-To header since anything after the first will
709         probably just be email addresses). Fixes bug #1336.
710
711 2002-04-03  Not Zed  <NotZed@Ximian.com>
712
713         * providers/local/camel-local-folder.c
714         (camel_local_folder_construct): Turn indexing back on, fingers
715         crossed ...
716
717         * camel-block-file.c (sync_nolock): #!@$@$#@~#$
718         DF@#$!Q@$#!@$#!#%.  Well it helps if we're iterating a list to
719         iterate the node pointer ...
720
721         * camel-text-index.c (text_index_sync): Sync the key tables
722         explcitly.
723         (text_index_sync): Debug out frag info.
724         (camel_text_index_dump): Added a (rather large, but optional) raw
725         dumping mode for debugging purposes.
726
727         * camel-partition-table.c (camel_key_table_finalise): Sync root
728         block when done.
729         (camel_key_table_sync): New function, sync key table (root) explicitly.
730         (camel_partition_table_sync): Method to explicitly sync the
731         partition table.
732
733 2002-04-02  Not Zed  <NotZed@Ximian.com>
734
735         * camel-block-file.c (camel_block_file_free_block): Mark root
736         block dirty when we change it (this function isn't used yet
737         anyway).
738
739         * camel-text-index.c (text_index_add_name_to_word): Touch the root
740         block when we modify the counts.  Also, abort processing on any
741         errors.
742         (text_index_sync): Fix typo in comments.  Sync the block file
743         inside the lock.
744         (text_index_compress_nosync): Lock the old index while we're
745         compressing.
746         (text_index_compress_nosync): Remove the bogus while() at the end
747         of the while() loops!  Also plug a memleak - records weren't
748         freed.
749         (text_index_rename): Lock around rename op.
750         (text_index_add_name): More typos.
751         (text_index_sync): Touch root when changing it.
752         (text_index_add_name): "
753         (text_index_delete_name): "
754         (camel_text_index_new): Touch root if we change it.
755         (text_index_cursor_reset): Make sure we NULL pointers after we
756         free them (nothing uses this yet).
757
758         * camel-partition-table.c (hash_key): Remove some debug
759         accidentally left in.
760         (camel_partition_table_add): When linking in the next block list,
761         set the right previous pointer.
762         (camel_key_table_add): Simplify the 'left' calculation (it was
763         already ok though).
764         (camel_key_table_next): Initialise returns before processing.
765         Broaden the lock slightly, and simplify validity calculations.
766
767         * providers/imap/camel-imap-store.c (imap_keepalive): Put back in
768         the exception setup stuff i disabled for debugging.
769
770         * providers/local/camel-local-folder.c
771         (camel_local_folder_construct): Temporarily disable indexing.
772
773 2002-03-28  Not Zed  <NotZed@Ximian.com>
774
775         * camel-partition-table.c (camel_key_table_lookup): Change range
776         checking assert to a warning.
777
778         * providers/pop3/camel-pop3-folder.c (pop3_finalize): Make sure we
779         flush out all outstanding commands before finalising, stops being
780         finalised while outsanding requests are processed by the store
781         finalise.
782         (pop3_get_message): Instead of pre-fetching all messages, just
783         pre-fetch a maxiumum number at any one time, stops us running out
784         of cache fd's.
785         
786         * providers/nntp/camel-nntp-folder.c (nntp_folder_init/finalise):
787         Setup priv data + locks, & free.
788
789         * providers/imap/camel-imap-folder.c (imap_rescan): Batch all
790         message_chagned events into a single folder_changed event
791         (otherwise updates can be >>> expensive, like >5 hours for 80K
792         messages changing!).  Alternately it could use folder
793         freeze/unfreeze perhaps.
794
795 2002-03-27  Not Zed  <NotZed@Ximian.com>
796
797         * providers/imap/camel-imap-store.c (imap_keepalive): Pass an
798         exception to called code so it behaves properly since it uses the
799         passed exception to check returns.
800
801 2002-04-01  Dan Winship  <danw@ximian.com>
802
803         * providers/imap/Makefile.am (libcamelimap_la_LDFLAGS): Use
804         -avoid-version instead of -version-info 0:0:0, and specify
805         -module. (From Max Horn <max@quendi.de>).
806
807         * providers/local/Makefile.am (libcamellocal_la_LDFLAGS): Likewise.
808
809         * providers/nntp/Makefile.am (libcamelnntp_la_LDFLAGS): Likewise.
810
811         * providers/sendmail/Makefile.am (libcamelsendmail_la_LDFLAGS):
812         Likewise.
813
814         * providers/smtp/Makefile.am (libcamelsmtp_la_LDFLAGS): Likewise.
815
816         * providers/pop3/Makefile.am (libcamelpop3_la_LDFLAGS): Likewise.
817         Also remove $(KRB4_LDFLAGS) since KPOP is gone.
818         (INCLUDES): and $(KRB4_CFLAGS)
819
820 2002-03-28  Jeffrey Stedfast  <fejj@ximian.com>
821
822         * camel-filter-driver.c (do_copy): We now have to check to make
823         sure that p->message is non-NULL because we only load the message
824         when we have to.
825         (do_move): Same here.
826
827 2002-03-28  Dan Winship  <danw@ximian.com>
828
829         * camel-transport.c (camel_transport_send_to): Change the message
830         arg to a CamelMimeMessage instead of a CamelMedium. Even the NNTP
831         provider returns CamelMimeMessages, and we're never going to
832         support anything more exotic than that. Also do a few more
833         g_return_if_fails here instead of in the providers.
834         (camel_transport_can_send): No longer needed.
835         (camel_transport_send): Remove this too. It wasn't being used any
836         more, and it doesn't behave exactly the same in sendmail and smtp.
837
838         * providers/smtp/camel-smtp-transport.c (smtp_send,
839         smtp_can_send): Gone.
840         (smtp_send_to): Update for arg change.
841         (smtp_data): Make this take a CamelMimeMessage too.
842
843         * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
844         sendmail_can_send): Gone.
845         (sendmail_send_to): Update for arg change, and merge in the part
846         that used to be shared with sendmail_send.
847
848 2002-03-27  Jeffrey Stedfast  <fejj@ximian.com>
849
850         * camel-filter-driver.c (camel_filter_driver_filter_folder):
851         Construct the source_url the right way. The previous way was
852         generating urls like pop://fejj@ximian.com;keep_on_server/inbox
853         which is wrong.
854
855 2002-03-26  Not Zed  <NotZed@Ximian.com>
856
857         * camel-text-index.c (text_index_normalise): Changed to use just
858         g_utf8_strdown instead of utf8_normalise, to match the indexing
859         code.  utf8_normalise is just far too expensive (saves approx 25%
860         total processing).
861
862 2002-03-25  Not Zed  <NotZed@Ximian.com>
863
864         * camel-text-index.c (text_index_add_name): When we add a new
865         name, up all of the cache limits, because we're probably going to
866         be adding more.
867         (text_index_sync): Drop the cache limits back down again, we dont
868         need them when looking words up.
869
870         ** MERGE camel_index branch.
871
872         * camel-text-index.[ch]: Added files i forgot to add (eep nearly
873         lost all this work!)
874
875         * camel-block-file.c (sync_nolock): Fix an infinite loop in syncing.
876
877 2002-03-21  Jeffrey Stedfast  <fejj@ximian.com>
878
879         * camel-folder-summary.c (camel_message_info_new_from_header): Use
880         the date in the received header for the received_date.
881
882 2002-03-22  Not Zed  <NotZed@Ximian.com>
883
884         * providers/local/camel-local-folder.c
885         (camel_local_folder_construct): Use the right option to remove the
886         index file and reset the index file on creation.
887         (camel_local_folder_construct): Remove any existing '.ibex' files
888         - these are the old format index files.
889
890         * camel-block-file.c (camel_block_file_rename): Lock io lock while
891         renaming.
892         (camel_key_file_rename): Lock around rename.
893         (block_file_validate_root): Implement sync flag checking.
894         (camel_block_file_touch_block): Turn off the sync flag if we're
895         touching any non-root block and write it to disk.  Shoudl this
896         fsync()?
897         (sync_nolock): sync the root block only if we need to.
898
899         * providers/local/camel-local-store.c (rename_folder): Re-enable
900         index rename code.  Not sure how race-free it is though.
901         (delete_folder): Delete the index file properly.
902
903         * camel-partition-table.c (camel_key_table_lookup): Initialise
904         output values to 0 before doing anything.
905         (camel_key_table_add): Do some range-checking on values.
906
907         * camel-text-index.c (text_index_compress): Changed to call sync here.
908         (text_index_compress_nolock): and not here - stops a recursive
909         sync call when sync performs a compress also.
910         (text_index_compress_nolock): Change to _nosync, since the locking
911         is irrelevent (recursive lock).  Fixed callers.
912         (text_index_add_name_to_word): If we get a failure with key table
913         ops, fail immediately.
914         (text_index_compress_nosync): Likewise.
915         (text_index_write_name): If the nameid is 0, do nothing.
916         (text_index_add_name): If we can't get a keyid, dont add it to the
917         partition table.
918         (camel_text_index_remove): Function to delete an index file.
919         (text_index_compress_nosync): Clean up temp files when done.
920
921         * camel-folder-search.c (match_messages_index): New function,
922         split from body_contains, matches a regex against all words in an
923         index.
924         (match_message_index): Similar to above but matches against an
925         individual message.
926         (search_body_contains): Changed to use above functions for
927         matching - substring matches should now work on indexed data.
928
929 2002-03-21  Not Zed  <NotZed@Ximian.com>
930
931         * camel-index.c (camel_index_words/names): New virtual
932         methods/stubs to get a cursor of all words and names.
933
934         * camel-text-index.c (text_index_compress_nolock): Split from
935         text_index_compress, so we can call the compressor while locked
936         also, removed lock calls.
937         (text_index_compress): Changed to stub which calls
938         text_index_compress_nolock.
939         (camel_text_index_key_cursor_new): New object to iterate through
940         a key table.
941         (text_index_words, text_index_names): Implement virtual functions
942         for iterating through all words or names.
943
944         * camel-block-file.c: Turn off some debug.
945
946 2002-03-20  Not Zed  <NotZed@Ximian.com>
947
948         ** New body index implementation.
949
950         * camel-index*: Code for camel index, a new class to replace ibex.
951
952         * camel-block-file.[ch]: block-based and link based
953         filesystem-in-a-file classes.
954
955         * camel-partition-table.[ch]: An implementation of a partition
956         table (automatically extending on-disk hash-table using ideal
957         hash), and a key-table, a key<>name mapping table.  Used by
958         camelindex.
959
960         * providers/local/*, camel-folder-summary.[ch]: Changed to use
961         camel-index interface rather than ibex.
962
963 2002-03-05  Not Zed  <NotZed@Ximian.com>
964
965         * providers/local/camel-maildir-summary.c (maildir_summary_check):
966         Do progress reporting of operations.
967         (maildir_summary_sync): Same here.
968
969 2002-03-04  Not Zed  <NotZed@Ximian.com>
970
971         * providers/local/camel-spoold-store.c (scan_dir): Kill a warning
972         with a cast.
973
974         * providers/local/camel-*.c: Changed for ibex->camelindex.
975
976         * camel-folder-search.c (camel_folder_search_set_summary): Init
977         summary_hash to point to 'static' uid strings.
978         (search_body_contains): Use the static uid memory to return
979         results rather than the values from the index library.
980
981         * camel-folder-search.[ch]: Changed to use camelindex object.
982
983         * camel-folder-summary.c (summary_build_content_info_message):
984         Use a stream to index content, also filter html mail first.
985         (camel_folder_summary_info_new_from_message): Use a stream
986         filtered to index content.
987         (main): Removed the test main code.  Added headers for open call
988         (ibex must've had them before).
989
990         * camel-folder-summary.[ch]: Changed from ibex to CamelIndex.
991
992         * camel-mime-filter-index.c (camel_mime_filter_index_finalize):
993         Unref index.
994
995         * camel-mime-filter-index.[ch]: Changed from ibex to CamelIndex.
996
997 2002-03-19  Jeffrey Stedfast  <fejj@ximian.com>
998
999         * camel-mime-utils.c (header_encode_param): Fix this to work
1000         right. We need to convert the input buffer to the charset we claim
1001         in the encoded param (duh).
1002
1003 2002-03-18  Jeffrey Stedfast  <fejj@ximian.com>
1004
1005         * providers/smtp/camel-smtp-transport.c
1006         (connect_to_server_wrapper): Updated to use the same logic as the
1007         POP code.
1008
1009         * providers/pop3/camel-pop3-store.c (connect_to_server): No longer
1010         takes a stls_supported argument since we no longer need it with
1011         the new logic.
1012         (connect_to_server_wrapper): New logic: First try connecting to
1013         the SSL port (995 by default), if that fails with
1014         SERVICE_UNAVAILABLE, then we attempt to connect (to port 110 by
1015         default) and try to use STARTTLS.
1016
1017 2002-03-15  Jeffrey Stedfast  <fejj@ximian.com>
1018
1019         * camel-folder.h: 
1020
1021         * camel-private.h: Don't allow any empty structs. If
1022         !ENABLE_THREADS, provide a gpointer dummy member. Fixes bug #6382.
1023
1024 2002-03-13  Jeffrey Stedfast  <fejj@ximian.com>
1025
1026         * providers/smtp/camel-smtp-transport.c (smtp_auth): Added a
1027         work-around for SMTP servers that can't read the RFCs and thus
1028         implement SASL incorrectly. Oh well, that's life in the world of
1029         mail clients I guess.
1030
1031 2002-03-12  Jeffrey Stedfast  <fejj@ximian.com>
1032
1033         * camel-digest-store.c (camel_digest_store_new): Now takes a url
1034         argument.
1035
1036         * camel-digest-folder.c (digest_add_multipart): Fixed some memory
1037         corruption and also modified to use CAMEL_IS_MIME_MESSAGE() rather
1038         than comparing content-type strings.
1039         (digest_get_message): Fixed a logic blooper.
1040
1041         * camel-folder-summary.c (camel_message_info_new_from_header): Set
1042         the date fields of the CamelMessageInfo as well. This may even fix
1043         some filter-related bugs where the user was trying to compare
1044         dates.
1045
1046 2002-03-11  Jeffrey Stedfast  <fejj@ximian.com>
1047
1048         * camel-digest-store.c: A pretty empty store implementation to be
1049         the parent store of a CamelDigestFolder.
1050
1051         * camel-digest-folder.c: Updated to reference it's parent store.
1052
1053 2002-03-11  Jeffrey Stedfast  <fejj@ximian.com>
1054
1055         * camel-digest-folder.c (camel_digest_folder_new): Allow any leaf
1056         part to be a message/rfc822 part.
1057         (digest_get_uids): Recurse the mime structure and add all
1058         message/rfc822 parts and use a uid scheme similar to IMAP's mime
1059         part naming convention.
1060         (digest_get_message): Decode the uid to get the correct mime part.
1061
1062 2002-03-11  Ettore Perazzoli  <ettore@ximian.com>
1063
1064         * camel-mime-utils.c: Change the order of the mailing list magic
1065         patterns so that the more mailing-list specific ones are on the
1066         top.
1067
1068 2002-03-11  Jeffrey Stedfast  <fejj@ximian.com>
1069
1070         These fixes should fix bug #21737.
1071
1072         * providers/smtp/camel-smtp-transport.c
1073         (connect_to_server_wrapper): Same as with the POP code.
1074
1075         * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper):
1076         Slight restructuring of the if-statements for the USE_SSL_ALWAYS
1077         case so that we can't possibly return TRUE unless we really did
1078         connect successfully.
1079
1080 2002-03-10  Dan Winship  <danw@ximian.com>
1081
1082         Rename the OpenSSL implementation of things to match the NSS
1083         implementation so that callers don't need to care which one is
1084         being used.
1085
1086         * camel-tcp-stream-openssl.c: Implement CamelTcpStreamSSL, not
1087         CamelTcpStreamOpenSSL. Rename methods as well. Replace the
1088         camel-tcp-stream-openssl.h include with camel-tcp-stream-ssl.h.
1089
1090         * camel-tcp-stream-openssl.h: Gone.
1091
1092         * camel-tcp-stream-ssl.c: Add a note explaining that this
1093         implementation is only used for NSS, and that OpenSSL's
1094         implementation is in another file. (Should probably do some CVS
1095         renaming magic at some point.)
1096
1097         * camel-http-stream.c (http_connect): Remove OpenSSL refs; the
1098         previously-NSS-specific code works for both now.
1099
1100         * camel-remote-store.c: Likewise.
1101
1102         * providers/smtp/camel-smtp-transport.c: Likewise.
1103
1104         * providers/pop3/camel-pop3-store.c: Likewise.
1105
1106         * Makefile.am (libcamelinclude_HEADERS): Remove
1107         camel-tcp-stream-openssl.h
1108
1109 2002-03-10  Dan Winship  <danw@ximian.com>
1110
1111         * camel-tcp-stream.c (camel_tcp_stream_get_socket): Remove this:
1112         it couldn't be generically used, because different subclasses
1113         returned entirely different types of data.
1114         (camel_tcp_stream_get_local_address,
1115         camel_tcp_stream_get_remote_address): Add these to replace what
1116         get_socket was being used for.
1117         (camel_tcp_address_new, camel_tcp_address_free): Utility functions
1118         for get_{local,remote}_address.
1119
1120         * providers/smtp/camel-smtp-transport.c: Change localaddr to a
1121         CamelTcpAddress *.
1122         (connect_to_server): Call camel_tcp_stream_get_local_address to
1123         get the local IP address.
1124         (smtp_disconnect): free localaddr.
1125         (smtp_helo): Update for localaddr change.
1126
1127         * camel-tcp-stream-raw.c (stream_get_socket): Remove
1128         (stream_get_local_address, stream_get_remote_address): Implement.
1129
1130         * camel-tcp-stream-ssl.c (stream_get_socket): Remove
1131         (stream_get_local_address, stream_get_remote_address): Implement.
1132
1133         * camel-tcp-stream-openssl.c (stream_get_socket): Remove
1134         (stream_get_local_address, stream_get_remote_address): Implement.
1135
1136 2002-03-08  Jeffrey Stedfast  <fejj@ximian.com>
1137
1138         * providers/pop3/camel-pop3-provider.c
1139         (camel_provider_module_init): Don't call
1140         camel_remote_store_get_authtypes since we no longer subclass
1141         camel-remote-store.
1142
1143         * providers/pop3/camel-pop3-engine.c: Added STARTTLS to the
1144         capabilities to look for.
1145         (camel_pop3_engine_reget_capabilities): New function to re-get
1146         capabilities.
1147
1148         * providers/pop3/camel-pop3-store.c: Updated to not subclass
1149         CamelRemoteStore.
1150         (connect_to_server): Rewritten to not depend on CamelRemoteStore's
1151         connect implementation. Also added support for STLS (aka
1152         STARTTLS).
1153
1154 2002-03-07  Jeffrey Stedfast  <fejj@ximian.com>
1155
1156         * camel-pgp-mime.c (camel_pgp_mime_part_sign): Add support for
1157         hash type RIPEMD160.
1158
1159         * camel-cipher-context.h: Add RIPEMD160 hash type.
1160
1161         * camel-pgp-context.c (pgp_sign): Updated to consider hash
1162         function for pgp5 and pgp6.
1163         (pgp_clearsign): Same.
1164
1165         * camel-tcp-stream-openssl.c (stream_read): Add a timeout on the
1166         select.
1167         (stream_write): Same.
1168
1169 2002-03-06  Jeffrey Stedfast  <fejj@ximian.com>
1170
1171         * providers/smtp/camel-smtp-transport.c (connect_to_server): Fix
1172         to work with OpenSSL.
1173
1174         * camel-tcp-stream-openssl.c: compile fixes.
1175         (camel_tcp_stream_openssl_enable_ssl): Check to make sure that the
1176         sockfd != -1, it's not enough to check that it is non-zero. Also
1177         set the sockfd to -1 on fail (open_ssl_connection will close the
1178         sockfd on fail).
1179
1180 2002-03-06  Dan Winship  <danw@ximian.com>
1181
1182         * providers/smtp/camel-smtp-transport.c (smtp_construct): Make
1183         this compile.
1184
1185 2002-03-05  Jeffrey Stedfast  <fejj@ximian.com>
1186
1187         * camel-tcp-stream-ssl.c (save_ssl_cert): Removed. Glory glory
1188         hallelujah!
1189         (ssl_bad_cert): No longer calls ssl_save_cert or
1190         ssl_cert_is_saved.
1191
1192 2002-03-05  Jeffrey Stedfast  <fejj@ximian.com>
1193
1194         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_new_raw):
1195         Start the ssl stream off in non-ssl mode (useful for STARTTLS).
1196         (camel_tcp_stream_openssl_enable_ssl): New function to toggle an
1197         ssl stream into ssl mode.
1198         (open_ssl_connection): Close the sockfd on fail so our caller
1199         doesn't have to - this also allows us to save the original errno.
1200         (stream_connect): If we want ssl mode, do our ssl stuff.
1201         (camel_tcp_stream_openssl_class_init): Init some SSL stuff here
1202         instead of in open_ssl_connection since these only ever need to be
1203         called once.
1204         (stream_read): Only use SSL_read if we are in ssl mode.
1205         (stream_write): Only use SSL_write if we are in ssl mode.
1206
1207         * providers/smtp/camel-smtp-transport.c (smtp_helo): Check for the
1208         STARTTLS extension.
1209         (connect_to_server): Try to use STARTTLS whenever possible rather
1210         than the old way of doing things.
1211         (connect_to_server_wrapper): Wrapper around connect_to_server() to
1212         first try STARTTLS and then attempt normal SSL mode if we can't
1213         connect via STARTTLS.
1214
1215         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): New
1216         function to toggle an ssl stream into ssl mode.
1217         (camel_tcp_stream_ssl_new_raw): Start the ssl stream off in
1218         non-ssl mode (useful for STARTTLS).
1219         (stream_connect): Only connect in SSL mode if required.
1220
1221 2002-03-01  Jeffrey Stedfast  <fejj@ximian.com>
1222
1223         * camel-vtrash-folder.h: 
1224         * camel-vee-store.h: 
1225         * camel-vee-folder.h: 
1226         * camel-stream-null.h: 
1227         * camel-stream-filter.h: 
1228         * camel-store-summary.h: 
1229         * camel-news-address.h: 
1230         * camel-mime-utils.h: 
1231         * camel-mime-parser.h: 
1232         * camel-mime-filter-save.h: 
1233         * camel-mime-filter-linewrap.h: 
1234         * camel-mime-filter-index.h: 
1235         * camel-mime-filter-html.h: 
1236         * camel-mime-filter.h: 
1237         * camel-mime-filter-from.h: 
1238         * camel-mime-filter-crlf.h: 
1239         * camel-mime-filter-chomp.h: 
1240         * camel-mime-filter-charset.h: 
1241         * camel-mime-filter-bestenc.h: 
1242         * camel-mime-filter-basic.h: 
1243         * camel-internet-address.h: 
1244         * camel-folder-thread.h: 
1245         * camel-folder-summary.h: 
1246         * camel-folder-search.h: 
1247         * camel-filter-driver.h: 
1248         * camel-charset-map.h: 
1249         * camel-address.h: Add c++ armoring.
1250
1251         * camel-object.h: s/class/klass
1252
1253 2002-03-01  Jeffrey Stedfast  <fejj@ximian.com>
1254
1255         * camel-mime-part-utils.c
1256         (camel_mime_part_construct_content_from_parser): Reverted my
1257         pgp/mime fixes here too.
1258
1259         * camel-mime-part.c (write_to_stream): Removed my pgp/mime raw
1260         stream hack, this is causing problems such as some messages to not
1261         displaying, view->source not working at all, etc.
1262
1263 2002-02-28  Jeffrey Stedfast  <fejj@ximian.com>
1264
1265         * camel-mime-parser.c: Changed offset variables from int's to
1266         off_t's since the system may support large files.
1267
1268         * camel-mime-part-utils.c
1269         (camel_mime_part_construct_content_from_parser): Rearrange the
1270         save filter stuff so that we save raw streams for all mime
1271         parts. If the mime part turns out to be a multupart, then don't
1272         bother saving the raw stream, we only need to save the raw stream
1273         for leaf parts.
1274
1275 2002-02-27  Jeffrey Stedfast  <fejj@ximian.com>
1276
1277         * camel-folder-summary.h: Don't #include camel-mime-filter-save.h,
1278         we don't use it.
1279
1280         * camel-file-utils.c: Fixed a few 'might be used uninitialized'
1281         warnings which were real problems.
1282
1283         * camel-mime-part-utils.c
1284         (camel_mime_part_construct_content_from_parser): Save the raw mime
1285         stream for any/all signed parts.
1286
1287         * camel-mime-part.c (camel_mime_part_init): Initialize our raw
1288         stream to NULL.
1289         (camel_mime_part_finalize): Unref our raw stream, if we have one.
1290         (write_to_stream): If we have a raw stream, write that out instead
1291         of re-encoding.
1292
1293         * camel-mime-filter-save.[c,h]: Rewritten to save to a stream
1294         rather than a file.
1295
1296 2002-02-28  Not Zed  <NotZed@Ximian.com>
1297
1298         * camel-mime-utils.c (header_fold): Use the FOLD_SIZE as a
1299         recommended folding size, but add a new FOLD_MAX_SIZE (=998, the
1300         smtp max line size) as the hard limit for any output.
1301
1302 2002-02-27  Jeffrey Stedfast  <fejj@ximian.com>
1303
1304         * camel-mime-filter-chomp.c (camel_mime_filter_chomp_new): New
1305         stream filter that chomps excess trailing whitespace from the end
1306         of the stream. This is needed to update the PGP/MIME code to
1307         comply with rfc3156.
1308
1309         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Don't attach a
1310         from filter, if it ain't from-filtered already, then we'll just be
1311         breaking stuff. To become rfc3156 compliant, add a chomp filter
1312         here.
1313         (camel_pgp_mime_part_sign): Add a chomp filter here too.
1314
1315 2002-02-27  Not Zed  <NotZed@Ximian.com>
1316
1317         * camel-mime-part.c (init_header_name_table): Changed header
1318         formatted table to contain a pointer to an output function, and
1319         added in-reply-to and references headers.
1320         (write_references): New function to write out references header,
1321         folded properly.  It only approximates based on the last >, but it
1322         should be adequate and will also handle invalid headers.
1323         (write_fold): Function to write out headers folded.  Since this is
1324         the default it isn't required.
1325         (write_raw): Write out an already formatted header, e.g. most of
1326         the rest.
1327         (write_to_stream): Lookup header output function, if we have one,
1328         use that, otherwise fold header using basic (dumb) function.
1329
1330         This is all for #14779.  A better fix is probably do have the
1331         headers always stored formatted, but that can wait.
1332
1333 2002-02-25  Jeffrey Stedfast  <fejj@ximian.com>
1334
1335         * camel-digest-folder.c (camel_digest_folder_new): Allow all
1336         multiparts that contain message/rfc822 attachments.
1337         (digest_get_uids): Only assign uids to message parts.
1338
1339 2002-02-22  Jeffrey Stedfast  <fejj@ximian.com>
1340
1341         * camel-mime-part.c (camel_mime_part_set_filename): Set the 'name'
1342         parameter on the Content-Type too. Fixes bug #20779.
1343
1344 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
1345
1346         * camel-pgp-context.c (pgp_sign): Pass --always-trust to gpg
1347         (requested by users).
1348         (pgp_clearsign): Same.
1349         (pgp_encrypt): Here too.
1350
1351 2002-02-12  Jeffrey Stedfast  <fejj@ximian.com>
1352
1353         * providers/smtp/camel-smtp-transport.c (smtp_helo): Since the
1354         AUTH token sometimes uses '=' instead of whitespace, don't use
1355         smtp_token_next here.
1356
1357 2002-02-09  Not Zed  <NotZed@Ximian.com>
1358
1359         * providers/pop3/camel-pop3-engine.c (get_capabilities): Duh, when
1360         we grab the apop stamp it needs to include the <> as well, I even
1361         read the rfc, silly me.
1362
1363         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Doh,
1364         when iterating the authtype list, it helps to goto the next node.
1365         Found with help from miles.
1366
1367 2002-02-08  Not Zed  <NotZed@Ximian.com>
1368
1369         * providers/local/camel-spool-summary.c
1370         (camel_spool_summary_build_from): The day number has to be 2 chars
1371         wide, space filled to work properly with pine, etc.
1372
1373         * providers/local/camel-spoold-store.[ch]: new type of provider
1374         'spool directory', which lets you view external mbox dirs without
1375         adding any extra cruft.  Perhaps it should use . files to store
1376         summaries?  Still a bit experimental, there's a warning when you
1377         select it in the account editor.  Finished off most of #1185.
1378         Can't rename or move folders.
1379
1380         * camel-mime-utils.c (header_decode_date): If the date is
1381         100->1900 then we actually want to use it as the year in the tm
1382         struct, not year+100.  e.g. year 102 -> 2002, not 2102.
1383
1384 2002-02-07  Not Zed  <NotZed@Ximian.com>
1385
1386         * providers/local/camel-spool-store.c (get_folder): Pass path into
1387         spool_folder_new.
1388
1389         * providers/local/camel-spool-folder.c (camel_spool_folder_new): 
1390         (camel_spool_folder_construct): Take the full path to the folder
1391         and use that as the file path, independent of the full_name we
1392         use.
1393
1394 2002-02-07  Not Zed  <NotZed@Ximian.com>
1395
1396         * providers/local/camel-local-provider.c: Added new type, spoold
1397         provider, spoold: for local directories.
1398
1399         * providers/imap/camel-imap-store.c (get_one_folder_offline):
1400         Create offline uri's in a compatible manner to online ones.
1401
1402 2002-02-07  Dan Winship  <danw@ximian.com>
1403
1404         * camel-sasl-ntlm.c: Implementation of NTLM (aka "Secure Password
1405         Authentication") auth, taken from soup.
1406
1407         * Makefile.am (libcamel_la_SOURCES, libcamel_la_HEADERS): Add
1408         camel-sasl-ntlm.
1409
1410         * camel-sasl.c: Add refs to camel-sasl-ntlm.
1411
1412         * providers/imap/camel-imap-store.c (try_auth): Use
1413         imap_next_word() to skip over the "+ " of the continuation rather
1414         than just "resp + 2" since Exchange (incorrectly) returns "+"
1415         instead of "+ " for an empty continuation response.
1416
1417 2002-02-06  Jeffrey Stedfast  <fejj@ximian.com>
1418
1419         * camel-folder-summary.h: Remove the CAMEL_MESSAGE_NEEDS_REPLY
1420         flag, we no longer will be using this.
1421
1422 2002-02-04  Jeffrey Stedfast  <fejj@ximian.com>
1423
1424         * camel-http-stream.c (stream_read): Use camel_mime_parser_read to
1425         read internal parser data.
1426         (camel_http_stream_get_content_type): Implemented.
1427         (http_method_invoke): Use HTTP/1.0 instead of 1.1
1428
1429         * camel-mime-utils.c (header_decode_int): Made public.
1430
1431         * camel-http-stream.[c,h]: Added. New stream for HTTP requests
1432         (currently supported are GET and HEAD).
1433
1434         * camel-tcp-stream-ssl.c (stream_connect): Call set_errno
1435         appropriately.
1436
1437 2002-01-31  Not Zed  <NotZed@Ximian.com>
1438
1439         * camel-mime-utils.c (header_decode_domain): Oops, this was
1440         converting foo@[blah] to foo@[ blah ], fixed.
1441
1442 2002-01-30  Jeffrey Stedfast  <fejj@ximian.com>
1443
1444         * providers/pop3/camel-pop3-provider.c: Use "pop" instead of
1445         "pop3" so current configurations continue to work.
1446
1447 2002-01-30  Not Zed  <NotZed@Ximian.com>
1448
1449         * camel-sasl-login.c: Changed name from "NT Login" to simply
1450         "Login".
1451
1452         * providers/pop3/*: Entirely new pop implmentation, supporting
1453         pipelining.
1454
1455 2002-01-29  Not Zed  <NotZed@Ximian.com>
1456
1457         * camel-data-cache.c (free_busy): We dont want to unref the
1458         stream, instead, stop listening to the finalised events, and free
1459         the path only.
1460
1461 2002-01-25  Not Zed  <NotZed@Ximian.com>
1462
1463         * camel-data-cache.c (stream_finalised): Remove the object from
1464         the busy_stream hashtable, not the busy_path hashtable.
1465
1466 2002-01-29  Jeffrey Stedfast  <fejj@ximian.com>
1467
1468         * providers/imap/camel-imap-folder.c (imap_update_summary): Added
1469         more kludge to an existing Exchange IMAP 5.5 kludge to work around
1470         it returning multiple messages with the same UIDs.
1471
1472 2002-01-28  Jeffrey Stedfast  <fejj@ximian.com>
1473
1474         * camel-mime-message.c (process_header): Handle Resent headers
1475         too.
1476
1477         * camel-mime-message.h: Added Resent-* #defines.
1478
1479         * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
1480         Use while (node->next) instead of while (node)
1481
1482         * providers/smtp/camel-smtp-transport.c (smtp_decode_status_code):
1483         New function to decode an enhanced status code.
1484         (smtp_set_exception): Sets an exception based on the
1485         Enhanced-Status-Code.
1486         (esmtp_get_authtypes): Don't diplicate the key in the hash since
1487         the key and value are the same.
1488         (smtp_rcpt): Include the failed recipient in the error message to
1489         be more helpful to the user.
1490
1491         * camel-mime-utils.c (hex_decode): Make sure to allocate enough
1492         for the NUL byte.
1493
1494 2002-01-28  Jeffrey Stedfast  <fejj@ximian.com>
1495
1496         * providers/smtp/camel-smtp-transport.c (smtp_construct):
1497         (connect_to_server): Use flags rather than a bunch of gboolean
1498         variables.
1499         (smtp_connect): Same.
1500         (smtp_mail): Here too. Use the enhanced status codes if available.
1501         (smtp_data): And again here.
1502         (smtp_helo): Finally here. Also detect the ENHANCEDSTATUSCODES
1503         extension.
1504         (smtp_rcpt): Use the enhanced status codes if available.
1505         (smtp_rset): Here too.
1506         (smtp_quit): And finally here.
1507
1508         * camel-transport.h: Removed gboolean supports_8bit since this is
1509         pretty local to only SMTP for now.
1510
1511 2002-01-24  Ettore Perazzoli  <ettore@ximian.com>
1512
1513         * Makefile.am: Remove some old cruft.
1514
1515 2002-01-24  Ettore Perazzoli  <ettore@ximian.com>
1516
1517         * tests/folder/Makefile.am: s/MAILER_LIBS/EVOLUTION_MAIL_LIBS/.
1518         * tests/message/Makefile.am: Likewise.
1519         * tests/mime-filter/Makefile.am: Likewise.
1520         * tests/misc/Makefile.am: Likewise.
1521         * tests/smime/Makefile.am: Likewise.
1522         * tests/stream/Makefile.am: Likewise.
1523
1524 2002-01-24  Jeffrey Stedfast  <fejj@ximian.com>
1525
1526         * camel-filter-driver.c (do_beep): Call the beep callback
1527         function.
1528         (camel_filter_driver_set_system_beep_func): New function to set
1529         the beep callback.
1530
1531 2002-01-22  Jeffrey Stedfast  <fejj@ximian.com>
1532
1533         * camel-filter-driver.c (camel_filter_driver_remove_rule_by_name):
1534         New function to remove a filter rule by name.
1535
1536 2002-01-21  Jeffrey Stedfast  <fejj@ximian.com>
1537
1538         * camel-filter-driver.c (do_beep): As a temporary solution, just
1539         printf ("\a"); to make a beep :-)
1540
1541         * providers/imap/camel-imap-command.c
1542         (imap_command_strdup_vprintf): Encode the mailbox to UTF-7 here.
1543
1544         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
1545         Decode the mailbox name as we parse the list response.
1546         (imap_mailbox_decode): It's only an illegal mailbox name if it
1547         didn't switch back to US-ASCII mode.
1548
1549 2002-01-18  Jeffrey Stedfast  <fejj@ximian.com>
1550
1551         * providers/imap/camel-imap-utils.c (imap_mailbox_decode): New
1552         function to decode an IMAP mailbox name from modified UTF-7
1553         encoding to UTF-8.
1554         (imap_mailbox_encode): New function to convert a mailbox name from
1555         UTF-8 to IMAP's modified UTF-7 encoding.
1556
1557 2002-01-17  Jeffrey Stedfast  <fejj@ximian.com>
1558
1559         * camel-mime-filter-basic.c (filter): Stop uudecoding once the
1560         CAMEL_UUDECODE_STATE_END state bit gets set. Set the
1561         CAMEL_UUDECODE_STATE_BEGIN state bit once we find the begin line.
1562         (reset): No longer have uu_begin or uulen state variables, these
1563         are now stuffed into a single state variable.
1564
1565         * camel-mime-utils.c (uudecode_step): No longer needs a uulen
1566         argument and also keeps track of whether or not the end of the
1567         encoded data has been found in 'state'.
1568         (uuencode_step): Now stuffs uulen into state so that the uulen
1569         argument is no longer needed.
1570         (uuencode_close): Same.
1571
1572 2002-01-16  Jeffrey Stedfast  <fejj@ximian.com>
1573
1574         * camel-mime-filter-basic.c (filter): If we don't want to corrupt
1575         the uuencoded data by overwriting it with base64 decoded data
1576         afterward, we need to add a break statement!
1577
1578         * camel-folder-summary.c (summary_build_content_info): Add code to
1579         add a uu filter.
1580         (camel_folder_summary_finalize): Unref the uuencode filter.
1581
1582 2002-01-16  Jeffrey Stedfast  <fejj@ximian.com>
1583
1584         * camel-mime-filter-basic.c (filter): Fixed slight logic error to
1585         find the uuencode begin line. Fixes bug #18754.
1586
1587 2002-01-15  Jeffrey Stedfast  <fejj@ximian.com>
1588
1589         * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
1590         match the new send_to API.
1591         (smtp_send): Get the from address and pass that along to
1592         smtp_send_to().
1593
1594         * providers/sendmail/camel-sendmail-transport.c
1595         (sendmail_send_to): Updated to match the new send_to API.
1596
1597         * camel-transport.c (camel_transport_send_to): Now takes a from
1598         argument too.
1599
1600         * providers/imap/camel-imap-folder.c (imap_update_summary): Sort
1601         the needheaders UID array and fixed to respect the
1602         UID_SET_LIMIT. This should now finish the fixification of bug
1603         #2529. There's still the possible issue that a command-line (The
1604         only command-line I can think of that can still be too long is a
1605         SEARCH command, but this can't possibly be fixed until we rewrite
1606         the imap code to use Zucchi's ImapEngine idea).
1607
1608 2002-01-14  Jeffrey Stedfast  <fejj@ximian.com>
1609
1610         * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
1611         Move the command-lock outside the loop.
1612
1613 2002-01-14  Jeffrey Stedfast  <fejj@ximian.com>
1614
1615         * providers/imap/camel-imap-folder.c (imap_expunge_uids_online):
1616         Updated to use the new imap_uid_array_to_set() interface.
1617         (imap_expunge_uids_resyncing): Same.
1618         (do_copy): Here too.
1619         (imap_update_summary): Added a FIXME comment to rewrite allowing
1620         for a uid-set limitation.
1621         (get_matching): Copy some of the logic over from
1622         imap_uid_adday_to_set() to limit the length of the uid-set string.
1623         (imap_sync_online): Added a comment to explain what is going on
1624         with get_matching() since the behavior has changed slightly.
1625
1626         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
1627         Modify the interface so that we can limit the size of the uid set
1628         string returned.
1629
1630 2002-01-14  Not Zed  <NotZed@Ximian.com>
1631
1632         * providers/imap/camel-imap-search.c (imap_body_contains):
1633         Rewritten to use a cache for body searches when online.  Will need
1634         some heavy testing but so far seems to be beneficial.
1635
1636         * providers/imap/camel-imap-folder.c (imap_search_by_expression,
1637         search_by_uids): dont initialise search object here.
1638         (camel_imap_folder_new): Setup search object here with pointer to
1639         cache dir.
1640
1641 2001-12-01  Not Zed  <NotZed@Ximian.com>
1642
1643         * camel-store-summary.[ch]: New class to store a store's folder
1644         list in.  Not yet completed.
1645
1646 2002-01-11  Jeffrey Stedfast  <fejj@ximian.com>
1647
1648         * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
1649         around a bug in Exchange 5.5 that reports 2 messages with the same
1650         UID. Fixes bug #17694. Replaces the fix from yesterday.
1651
1652 2002-01-10  Jeffrey Stedfast  <fejj@ximian.com>
1653
1654         * providers/local/camel-local-folder.c: If PATH_MAX doesn't exist,
1655         use _POSIX_PATH_MAX.
1656
1657         * providers/imap/camel-imap-folder.c (imap_update_summary): If mi
1658         is NULL, don't bother updating it. Should fix bug #17694.
1659
1660 2002-01-10  Jeffrey Stedfast  <fejj@ximian.com>
1661
1662         * camel.h: #include camel-mime-filter-tohtml.h
1663
1664         * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
1665         around Microsoft Exchange 5.5 (bug #5348) by forgetting our
1666         currently selected folder and re-SELECTing it so that the Exchange
1667         server has a chance to realise it has new messages.
1668
1669 2002-01-09  Jeffrey Stedfast  <fejj@ximian.com>
1670
1671         * providers/local/camel-local-folder.c
1672         (camel_local_folder_construct): If the mbox file is a symlink,
1673         follow the symlink and get the One True Path so that we can
1674         rewrite the mbox later without worrying about clobbering the
1675         symlink.
1676
1677 2002-01-08  Jeffrey Stedfast  <fejj@ximian.com>
1678
1679         * camel-filter-search.c (TODO): There are a few sexp callbacks
1680         that could be modified to use fms->info rather than using a
1681         message object (like date and possibly mlist stuff) but *only* if
1682         the date exists on the CamelMessageInfo object (since it may be
1683         blank except for message flags).
1684         (camel_filter_search_get_message): New internal convenience
1685         function to make sure that the FilterMessageSearch has loaded the
1686         message (and to load the message if this isn't the case).
1687         (check_header): Call camel_filter_search_get_message().
1688         (header_exists): Same.
1689         (header_regex): Here too.
1690         (header_full_regex): And here.
1691         (body_contains): Again here.
1692         (body_regex): Here too.
1693         (get_sent_date): Here also.
1694         (get_received_date): Same.
1695         (get_source): Here if we need to.
1696         (camel_filter_search_match): Now takes a callback function/data
1697         pair for on-demand message loading so that we don't necessarily
1698         have to load the message if the defined filter rules don't require
1699         it.
1700
1701         * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
1702         bother fetching the message here, let
1703         camel_filter_driver_filter_message() worry about this.
1704         (get_message_cb): New utility callback to fetch a message.
1705         (camel_filter_driver_filter_message): Only fetch the message if we
1706         absolutely need it to get a CamelMessageInfo. Instead of passing a
1707         message object to camel_filter_search_match(), pass get_message_cb
1708         and some user_data so that the matching code can fetch the message
1709         on demand.
1710
1711 2002-01-07  Jeffrey Stedfast  <fejj@ximian.com>
1712
1713         * camel-folder.c (filter_filter): Flush the only-once actions.
1714
1715         * camel-filter-driver.c (camel_filter_driver_filter_message):
1716         Don't increment a filtered_count here any longer.
1717         (camel_filter_driver_reset_filtered_count): Removed.
1718         (camel_filter_driver_get_filtered_count): Removed.
1719         (do_beep): New action.
1720         (play_sound): New action to play a sound
1721         (do_only_once): Another new action.
1722         (camel_filter_driver_finalise): Free the only_once hash if the
1723         driver has not been "flushed".
1724         (camel_filter_driver_flush): Flush all of the only-once actions.
1725
1726         * camel-charset-map.c: Moved windows-1251 to the end of the list
1727         since it contains the euro and we'd prefer to use iso-8859-15 when
1728         the euro is requested than a windows charset if possible.
1729
1730         * camel-charset-map-private.h: Regenerated.
1731
1732 2001-12-12  Jeffrey Stedfast  <fejj@ximian.com>
1733
1734         * camel-folder-summary.c (content_info_load): Don't try setting a
1735         content-type parameter if either the name or value is NULL.
1736
1737         * camel-mime-utils.c (header_set_param): NULL-protection.
1738
1739 2002-01-02  Jeffrey Stedfast  <fejj@ximian.com>
1740
1741         * camel-tcp-stream-ssl.c (ssl_bad_cert): Do more like what mutt
1742         does so hopefully this'll fix bug #16363 and #16300.
1743
1744 2001-12-21  Jeffrey Stedfast  <fejj@ximian.com>
1745
1746         * broken-date-parser.c (parse_broken_date): Completely
1747         rewritten. It is now a load faster and a heck of a lot more
1748         accurate, also now returns a time_t and sets the saveoffset
1749         variable rather than returning a new char* buffer for the normal
1750         camel date parser to re-parse. This saves a fair number of cpu
1751         cycles :-)
1752
1753         * camel-mime-utils.c (header_decode_date): Cleanup the broken date
1754         parsing code.
1755
1756 2001-12-20  Jeffrey Stedfast  <fejj@ximian.com>
1757
1758         * camel-address.h: Change the prototype for camel_address_get_type
1759         to return a CamelType (since internally this is what it returns
1760         and also in case we decide to write a replacement for the current
1761         CamelObject it'd be easier to drop in).
1762
1763         * camel-internet-address.h: Same but for
1764         camel_internet_address_get_type()
1765
1766         * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to
1767         use a CamelAddress of recipients.
1768         (smtp_send): Since smtp_send_to now takes a CamelAddress
1769         recipients argument, our lives have been simplified and we can now
1770         just concat To/Cc/Bcc into a recipients addr and send away.
1771
1772         * providers/sendmail/camel-sendmail-transport.c
1773         (sendmail_send_to): Updated to use a CamelAddress of recipients.
1774
1775         * camel-transport.c (camel_transport_send_to): Now takes a
1776         CamelAddress argument for the recipient list rather than a GList.
1777
1778 2001-12-19  Jeffrey Stedfast  <fejj@ximian.com>
1779
1780         * providers/smtp/Makefile.am: Remove the providerdir variable.
1781
1782         * providers/sendmail/Makefile.am: Same.
1783
1784 2001-12-17  Jeffrey Stedfast  <fejj@ximian.com>
1785
1786         * camel-charset-map.c (camel_charset_iso_to_windows): New function
1787         to map ISO charsets to the Windows charsets.
1788
1789         * camel-mime-part-utils.c (broken_windows_charset): Detect Windows
1790         charsets.
1791         (simple_data_wrapper_construct_from_parser): Simplify a tad and
1792         also check for iso-8859-* charsets that are really Windows
1793         charsets. Fixes bug #12631.
1794
1795 2001-12-17  Dan Winship  <danw@ximian.com>
1796
1797         * Makefile.am (INCLUDES): define CAMEL_PROVIDERDIR to be the
1798         configure.in-defined camel_providerdir.
1799
1800         * providers/Makefile.am: Remove some outdated comments
1801
1802         * providers/imap/Makefile.am (camel_provider_LTLIBRARIES,
1803         camel_provider_DATA): renamed from provider_LTLIBRARIES,
1804         provider_DATA.  
1805
1806         * providers/local/Makefile.am: Likewise 
1807
1808         * providers/nntp/Makefile.am: Likewise 
1809
1810         * providers/pop3/Makefile.am: Likewise 
1811
1812         * providers/sendmail/Makefile.am: Likewise 
1813
1814         * providers/smtp/Makefile.am: Likewise
1815
1816 2001-12-16  Jeffrey Stedfast  <fejj@ximian.com>
1817
1818         * providers/imap/camel-imap-folder.c (get_content): Reverted my
1819         previous changes here since it doesn't actually work afterall.
1820
1821         * providers/imap/camel-imap-wrapper.c (imap_wrapper_hydrate):
1822         Update to do uudecoding when appropriate.
1823
1824 2001-12-16  Jeffrey Stedfast  <fejj@ximian.com>
1825
1826         * providers/imap/camel-imap-folder.c (get_content): Try to use the
1827         original boundary so luis will stop bugging me about "data
1828         corruption". Also preserve other params in the multipart
1829         content-type by dumping it to a string and setting it on the mime
1830         part.
1831
1832 2001-12-14  Jeffrey Stedfast  <fejj@ximian.com>
1833
1834         * camel-filter-driver.c
1835         (camel_filter_driver_reset_filtered_count): Reset the
1836         filtered_count to zero.
1837         (camel_filter_driver_get_filtered_count): Return the private
1838         filtered_count value.
1839         (camel_filter_driver_filter_message): Increment the
1840         filtered_count.
1841         (camel_filter_driver_set_shell_exec_func): New function to set the
1842         shell-exec func.
1843         (shell_exec): New ESExp filter action callback.
1844
1845 2001-12-14  Jeffrey Stedfast  <fejj@ximian.com>
1846
1847         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Removed
1848         x-inline-pgp-hack kludge because it doesn't work.
1849         (camel_pgp_mime_part_decrypt): Same.
1850
1851 2001-12-13  Chris Toshok  <toshok@ximian.com>
1852
1853         * camel-data-cache.c: include stdlib.h (for alloca on freebsd) and
1854         only include alloca.h if HAVE_ALLOCA_H is defined.
1855
1856 2001-12-11  Zbigniew Chyla  <cyba@gnome.pl>
1857
1858         Fixes #17085
1859
1860         * camel-charset-map.c: Added #include <errno.h>.
1861
1862         * camel-charset-map-private.h:
1863         Recreated (following instructions from camel-charset-map.c)
1864
1865 2001-12-11  Jeffrey Stedfast  <fejj@ximian.com>
1866
1867         * camel-object.c (camel_type_register): Keep a name-to-type hash
1868         so that we can make sure that the type has not yet been registered
1869         (prevents a race condition such as the one in bug #16559).
1870
1871         * camel-service.c (camel_service_connect): Make sure that the
1872         connect_op is non-NULL before unregistering/unreffing it.
1873
1874 2001-12-04  Jeffrey Stedfast  <fejj@ximian.com>
1875
1876         * camel-mime-utils.c (header_content_type_simple): Protect against
1877         either of the types being NULL.
1878
1879 2001-12-05  Jeffrey Stedfast  <fejj@ximian.com>
1880
1881         * camel-mime-filter-basic.c (filter): If complete() allocates
1882         len+2 bytes for the out buffer, so should this. See bug #16371 for
1883         an example case.
1884
1885 2001-12-05  Jeffrey Stedfast  <fejj@ximian.com>
1886
1887         * camel-sasl-digest-md5.c: iconv() returns a size_t, not an int.
1888
1889         * camel-pgp-context.c: The return value of iconv() is a size_t,
1890         not an int.
1891
1892         * camel-mime-part-utils.c (convert_buffer): Always use size_t args
1893         for iconv().
1894
1895         * camel-mime-filter-charset.c (complete): Always use size_t args
1896         for iconv().
1897         (filter): Same.
1898
1899         * camel-mime-utils.c (header_address_fold): Make headerlen a
1900         size_t instead of an int.
1901         (header_fold): Same.
1902         (base64_encode_close): We should be returning a size_t and inlen
1903         should also be a size_t.
1904         (base64_encode_step): Same here.
1905         (base64_decode_step): Here too.
1906         (base64_encode_simple): And here...
1907         (base64_decode_simple): Same.
1908         (uuencode_close): We should also use size_t's here...
1909         (uuencode_step): And here too.
1910         (uudecode_step): And also here.
1911         (quoted_encode_close): Same idea here.
1912         (quoted_encode_step): Again here.
1913         (quoted_decode_step): Here too.
1914         (quoted_encode): Input length should be a size_t.
1915         (rfc2047_decode_word): Same.
1916         (g_string_append_len): Here too.
1917         (append_8bit): "
1918         (rfc2047_encode_word): "
1919         (quote_word): "
1920         (hex_decode): "
1921         (rfc2184_decode): Use size_t's with iconv().
1922         (header_decode_param): Same.
1923
1924 2001-12-09  Jon Trowbridge  <trow@ximian.com>
1925
1926         * camel-folder-summary.c: Add "NeedsReply" to the flag_names array
1927         for CAMEL_MESSAGE_NEEDS_REPLY.
1928
1929         * camel-folder-summary.h: Added CAMEL_MESSAGE_NEEDS_REPLY flag.
1930
1931 2001-12-07  Dan Winship  <danw@ximian.com>
1932
1933         * camel-mime-message.c (camel_mime_message_set_date): Fix the
1934         tm_gmtoff case (its sign is the opposite of "timezone"). Fixes
1935         #14678
1936
1937 2001-11-29  Jeffrey Stedfast  <fejj@ximian.com>
1938
1939         * camel-folder-search.c (search_body_contains): Don't use regex
1940         matching. Fixes bug #16227.
1941
1942         * camel-mime-message.c (best_encoding): Check the content-object's
1943         mime type, not the mime part types. Should fix bug #15843.
1944
1945 2001-11-27  Jeffrey Stedfast  <fejj@ximian.com>
1946
1947         * providers/imap/camel-imap-folder.c (get_content): Return NULL if
1948         construct_from_stream fails.
1949         (get_message): Same.
1950         (get_message_simple): Here too.
1951         (add_message_from_data): And here.
1952
1953 2001-11-14    <NotZed@Ximian.com>
1954
1955         * camel-vee-folder.c (folder_changed_remove_uid): Use the uid
1956         rather than vuid for unmatched.  Also add the uid to unmatched if
1957         it wasn't in the unmatched_uids table at all.
1958         (folder_changed_change): If checking for added, if the new ones
1959         dont match, then try to add them to unmatched.  Fixes #6893.
1960
1961         * camel-folder-summary.c (camel_folder_summary_index): Change lock
1962         order, always summary_lock before ref_lock.
1963         (camel_folder_summary_array): "
1964         (camel_folder_summary_uid): "
1965         (camel_folder_summary_remove_uid): " Fixes a deadlock.
1966
1967 2001-11-30  Not Zed  <NotZed@Ximian.com>
1968   
1969         * providers/nntp/camel-nntp-*.c: Completely new implementation of
1970         NNTP.
1971         
1972         Doesn't support subscriptions yet (lists all folders), but should
1973         be more reliable (faster?), and has an integrated cache.
1974
1975         * camel-exception.c (camel_exception_new): Use e_memchunks for
1976         exception blocks.
1977         (camel_exception_free): Same.
1978
1979         * camel-data-cache.[ch]: New object for managing on-disk caches of
1980         anything that can be stored in a camel-stream.
1981
1982         * camel-file-utils.c (camel_file_util_mkdir): New function, just a
1983         nicer place to put this (than camel-store), should be removed from
1984         camel-store.
1985         (camel_file_util_safe_filename): New function to url-encode a
1986         filename.
1987
1988         * camel-mime-parser.c (drop_states): New func to drop the parser
1989         state to initial state.
1990         (folder_scan_init_with_fd): 
1991         (folder_scan_init_with_stream): Call above func to reset state if
1992         the stream is changed on us so we can change streams to reuse a
1993         parser object.
1994
1995 2001-11-25  Not Zed  <NotZed@Ximian.com>
1996
1997         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message): If
1998         the uid doesn't have a ',' in it, fail to crash.
1999
2000         * providers/nntp/camel-nntp-newsrc.c
2001         (camel_nntp_newsrc_article_is_read): check group != NULL before
2002         scanning.
2003         (camel_nntp_newsrc_get_highest_article_read): "
2004         (camel_nntp_newsrc_get_num_articles_read): "
2005         (camel_nntp_newsrc_mark_range_read): "
2006
2007         * providers/nntp/camel-nntp-store.c
2008         (camel_nntp_store_get_overview_fmt): IF we dont have
2009         nntp_list_follows, dont try and get a list response.
2010         (nntp_store_get_folder_info): Set path part of folderinfo.
2011
2012 2001-11-20  Jeffrey Stedfast  <fejj@ximian.com>
2013
2014         * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
2015         Check to see that errno is non-zero before returning
2016         g_strerror. If it's 0, then we have an unknown error.
2017
2018 2001-11-26  Jeffrey Stedfast  <fejj@ximian.com>
2019
2020         * camel-mime-filter-basic.c: For the uudecoding mode, garble up
2021         the "begin <mode> <filename>" line before decoding.
2022
2023         * camel-mime-part-utils.c
2024         (simple_data_wrapper_construct_from_parser): Add a uudecoder if
2025         the transfer encoding is x-uuencode.
2026
2027         * camel-mime-part.c (write_to_stream): Handle x-uuencoded content
2028         too.
2029
2030 2001-11-19  Jeffrey Stedfast  <fejj@ximian.com>
2031
2032         * camel-tcp-stream-ssl.c (stream_read): Added a check to see if
2033         the operation has been cancelled.
2034         (stream_write): Same.
2035
2036 2001-11-19  Jeffrey Stedfast  <fejj@ximian.com>
2037
2038         Updates for compliance with rfc2231
2039
2040         * camel-mime-utils.c (header_encode_param):
2041         camel_mime_special_table[c] & IS_ESAFE should have been
2042         !(camel_mime_special_table[c] & IS_ESAFE). Also added a few
2043         comments for how to improve the code at some future date.
2044         (header_decode_param): Now takes an argument rfc2184_part so our
2045         caller can get this information as well.
2046         (header_decode_param_list): Pass an rfc2184_part argument to
2047         header_decode_param and also added a few comments on where to
2048         improve on rfc2184/rfc2231 compliance.
2049         (rfc2047_decode_word): Updated to respect the updated ABNF syntax
2050         of rfc2047 encoded words, yay.
2051
2052 2001-11-16  Jeffrey Stedfast  <fejj@ximian.com>
2053
2054         * providers/imap/camel-imap-utils.c (imap_parse_body): Abort if
2055         body == NULL.
2056
2057         * camel-mime-filter-tohtml.c (camel_mime_filter_tohtml_new): New
2058         mime filter to convert plain text to html.
2059
2060 2001-11-16  Jeffrey Stedfast  <fejj@ximian.com>
2061
2062         Since some mail clients like Outlook are broken, we need to set a
2063         name parameter on pgp signed and encrypted parts.
2064
2065         * camel-pgp-mime.c (camel_pgp_mime_part_encrypt): Set a name
2066         parameter.
2067         (camel_pgp_mime_part_sign): Same.
2068
2069 2001-11-14  Jeffrey Stedfast  <fejj@ximian.com>
2070
2071         * providers/imap/camel-imap-command.c
2072         (camel_imap_command_response): If we get a BYE response, call
2073         camel_service_disconnect() and set an exception. Also do the check
2074         for "* BYE" first instead of passing it off imap_read_untagged()
2075         since we'll just waste time in there mallocing left and right only
2076         to arrive at the single response line "* BYE" again :-)
2077
2078 2001-11-13    <NotZed@Ximian.com>
2079
2080         * camel-filter-search.c (get_source): If we have no source string,
2081         then use undefined, which should always evaluate to FALSE.  Fix
2082         for #15267.
2083
2084 2001-11-12  Jeffrey Stedfast  <fejj@ximian.com>
2085
2086         * camel-store.c (camel_store_get_folder): Added a
2087         g_return_val_if_fail for folder_name != NULL.
2088
2089 2001-11-08  Jeffrey Stedfast  <fejj@ximian.com>
2090
2091         * camel-pgp-context.c (crypto_exec_with_passwd): If any of the
2092         pipe()'s fail, clean up any pipes that may have succeeded. Also
2093         close the password fds.
2094
2095 2001-11-09    <NotZed@Ximian.com>
2096
2097         * providers/imap/camel-imap-store.c (imap_auth_loop): If we get a
2098         user cancel and that causes us to fail to authenticate, abort
2099         rather than loop forever.  Fix for #14951.
2100
2101 2001-11-06  Jeffrey Stedfast  <fejj@ximian.com>
2102
2103         * providers/imap/camel-imap-command.c
2104         (camel_imap_command_continuation): Now takes a command-length
2105         argument so we can 1) avoid duping the command string yet again,
2106         yay. 2) we now don't have to worry about embedded nul-chars
2107         screwing us over (we still need to avoid allowing them into the
2108         string but at least now it won't mess us up).
2109
2110         * providers/imap/camel-imap-folder.c (do_append): Instead of
2111         appending a nul char to the end of the byte array and then passing
2112         that off as if it were a string to
2113         camel_imap_command_continuation, instead pass the byte-array
2114         length since that function now takes a length argument. Yay.  Also
2115         encode any 8bit parts to avoid the possibility of sending embedded
2116         nul chars to the imap server.
2117
2118         * providers/imap/camel-imap-store.c (try_auth): Updated to pass a
2119         command-length argument to camel_imap_command_continuation().
2120
2121 2001-11-07  Jeffrey Stedfast  <fejj@ximian.com>
2122
2123         * camel-tcp-stream-ssl.c (save_ssl_cert): Oops, pass a mode
2124         argument to the open() call.
2125
2126         * camel-tcp-stream-openssl.c (save_ssl_cert): Oops, pass a mode
2127         argument to the open() call.
2128
2129 2001-11-07  Jeffrey Stedfast  <fejj@ximian.com>
2130
2131         * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): Add code to
2132         kludge around any x-inline-pgp-hacks by prepending some content
2133         headers to the decrypted data.
2134
2135 2001-11-02  Jeffrey Stedfast  <fejj@ximian.com>
2136
2137         * camel-data-wrapper.c (camel_data_wrapper_init): Initialize our
2138         private mutex.
2139         (camel_data_wrapper_finalize): Destroy our private mutex.
2140         (write_to_stream): Lock around camel_stream_write_to_stream() so
2141         that we don't get 2 threads trying to read from our stream at the
2142         same time.
2143
2144 2001-11-01    <NotZed@Ximian.com>
2145
2146         * camel-vee-folder.c (folder_changed_change): Move all searching
2147         operations outside of any locks except subfolder lock, same as
2148         build_folder.  Fix for #14294.
2149
2150 2001-10-31    <NotZed@Ximian.com>
2151
2152         * providers/local/camel-spool-folder.c (spool_get_message): Same
2153         as below.
2154
2155         * providers/local/camel-maildir-folder.c (maildir_get_message):
2156         Same as below.
2157
2158         * providers/local/camel-mbox-folder.c (mbox_get_message): Set
2159         USER_CANCEL if failed due to EINTR.
2160
2161         * camel-filter-driver.c (camel_filter_driver_filter_mbox): If
2162         construct from parser fails due to user cancel, set USER_CANCEL on
2163         exception.
2164
2165         * camel-mime-part.c (construct_from_parser): Return error if the
2166         parser had an io error.
2167
2168         * camel-mime-message.c (construct_from_parser): Check error on
2169         parser/return error.
2170
2171         * camel-mime-parser.c (folder_scan_init): Init error number.
2172         (camel_mime_parser_errno): New function, return errno of any io
2173         failures.
2174         (folder_read): Set errno if a failure occured.
2175         (folder_seek): Same.
2176         (folder_scan_init_with_fd): Setup errno depeding on ok/failure.
2177         (folder_scan_init_with_stream): Same.
2178
2179 2001-10-30    <NotZed@Ximian.com>
2180
2181         * camel-operation.c (camel_operation_new): Dont setup cancel_fd.
2182         (camel_operation_cancel_fd): If cancel_fd not created, set it up.
2183         (camel_operation_cancel): Set cancel flag before sending message.
2184         (cancel_thread): Same.
2185
2186         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Make
2187         sure we unref the mimeparse when we're done (successfully).  This
2188         was leaking an fd every get-mail! :(
2189
2190         * camel-lock-client.c (camel_lock_helper_init): Close all fd's
2191         above 2.
2192
2193         * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
2194         the X-Evolution header before anyone else gets to see this private
2195         thing.  Shoudl fix 11676 since we were inheriting flags from
2196         X-Evolution headers we didn't want to.
2197
2198         * camel-folder-search.c (match_message): If we can't retrieve the
2199         message, ignore it, it can't match.
2200
2201         * providers/imap/camel-imap-search.c
2202         (camel_imap_search_class_init): Setup parent class pointer.
2203         (imap_body_contains): If offline, just use the parent
2204         body_contains method which will get the messages and search them
2205         manually.
2206
2207         * providers/imap/camel-imap-folder.c (imap_search_by_expression,
2208         imap_search_by_uids): Remove offline check.
2209
2210 2001-10-30  Dan Winship  <danw@ximian.com>
2211
2212         * camel-mime-part.c (free_headers): Fix this to match get_headers.
2213
2214 2001-10-30    <NotZed@Ximian.com>
2215
2216         * providers/local/camel-local-store.c (rename_folder): Dont try to
2217         move ibex if we have none.
2218
2219         * camel-tcp-stream-openssl.c (stream_write): Fixed compilation
2220         errors.
2221
2222 2001-10-29  Jeffrey Stedfast  <fejj@ximian.com>
2223
2224         * camel-mime-utils.c (camel_mime_utils_init): Removed unused
2225         variable.
2226
2227 2001-10-30    <NotZed@Ximian.com>
2228
2229         * camel-mime-utils.c (header_decode_mailbox): w(x) out some warnings.
2230
2231         * providers/local/camel-local-summary.c
2232         (camel_local_summary_load): Remove the warning about not loading
2233         summary file - its a valid case for new folders.
2234
2235 2001-10-29  Jeffrey Stedfast  <fejj@ximian.com>
2236
2237         * camel-tcp-stream-openssl.c (my_SSL_write): Removed.
2238         (stream_write): Keep looping (non-blocking case) if errno is
2239         EAGAIN, EINTR or EWOULDBLOCK. For NONBLOCKing I/O, sync up with
2240         CamelTcpStreamRaw. As with CamelTcpStreamRaw/SSL - make sure to
2241         write out everything before returning.
2242         (my_SSL_read): Removed.
2243         (stream_read): Just call ssl_error_to_errno() and check the errno
2244         values that we care about so we can keep the general look of all
2245         this stream code the same. Also when checking the return value of
2246         SSL_read, check for <0 instead of ==-1 since the man page for
2247         SSL_read doesn't say it will return -1 on fail, it just says <0.
2248         (stream_flush): Don't fsync() since syncing on a socket is a Bad
2249         Thing (tm).
2250
2251         * camel-tcp-stream-ssl.c (stream_write): Make sure we write out
2252         everything just like in camel-tcp-stream-raw.c.
2253
2254         * camel-stream-buffer.c (camel_stream_buffer_gets): If
2255         camel_stream_read() returns -1, don't necessarily return -1 to our
2256         caller since it's possible that we did actually "read" some data
2257         (ie, we copied some pre-buffered data into the out buffer).
2258
2259         * camel-stream-buffer.h: Removed CAMEL_STREAM_BUFFER_NEWLINE since
2260         it never got used anywhere and it isn't supported anyway.
2261
2262 2001-10-30    <NotZed@Ximian.com>
2263
2264         * providers/imap/camel-imap-store.c
2265         (parse_list_response_as_folder_info): If we get an empty name,
2266         then mark that as NoSelect.  Workaround fix for #13239.
2267
2268 2001-10-29  Dan Winship  <danw@ximian.com>
2269
2270         * providers/imap/camel-imap-folder.c (get_message_simple, 
2271         imap_get_message): Set an X-Evolution-Source header on the
2272         returned message so replies come from the right identity.
2273
2274 2001-10-29    <NotZed@Ximian.com>
2275
2276         * camel-vee-folder.c (folder_changed_change): If we're not going
2277         to search on a changed uid, make sure we change out copy still.
2278         Fixes #13916.
2279
2280 2001-10-29  Jeffrey Stedfast  <fejj@ximian.com>
2281
2282         * providers/imap/camel-imap-store.c (subscribe_folder): Don't emit
2283         a folder_subscribed signal if we are in the process of renaming
2284         folders.
2285         (unsubscribe_folder): Same here but for the unsubscribe signal.
2286         (rename_folder): Unsubscribe from the folder being renamed and any
2287         subfolders it may have before actually renaming. Once the folder
2288         has been renamed, re-subscribe to it and it's subfolders with the
2289         new name.
2290
2291         * camel-store.c (camel_folder_info_build): Sort the folder info's
2292         before constructing the tree.
2293
2294         * camel-mime-utils.c (header_decode_param): Minor fix - should
2295         have been using a strNcmp when checking if it was an rfc2047
2296         encoded word.
2297
2298         * camel-pgp-context.c (pgp_sign): Notify the user that PGP 2.6.x
2299         is no longer supported and use camel_exception_set() instead of
2300         setv() where appropriate.
2301         (pgp_clearsign): Same.
2302         (pgp_verify): And again here.
2303         (pgp_encrypt): Here too.
2304         (pgp_decrypt): And finally here.
2305
2306 2001-10-29  Dan Winship  <danw@ximian.com>
2307
2308         * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
2309         free the hash table key if the folder wasn't found in the hash
2310         table. I'm not sure where the bug is/was that made it possible to
2311         add a folder to the tree after creating it failed, but now if that
2312         happens, it won't crash if you try to delete it again. (#11492)
2313
2314         * camel-disco-store.c (camel_disco_store_status): if the service
2315         is being connected and thinks it's online, but the session is
2316         offline, then mark the service offline as well. Fixes 13683.
2317
2318 2001-10-29    <NotZed@Ximian.com>
2319
2320         * camel-mime-utils.c: Turn off w() -> warnings.
2321
2322         * providers/imap/camel-imap-store.c (rename_folder): Also rename
2323         the message cache.
2324         (rename_folder): Fix subscribed folders table with rename(s).
2325
2326         * providers/imap/camel-imap-folder.c (imap_rename): Implement,
2327         rename the cache dir pointer.
2328
2329         * providers/imap/camel-imap-message-cache.c
2330         (camel_imap_message_cache_set_path): New method to set the path
2331         used by a message cache.
2332
2333         * camel-vee-store.c (build_info): Fix the 'is this a matching
2334         subfolder or subfolder' logic to match camel-store
2335         get_subfolders'.
2336
2337         * camel-store.c (get_subfolders): Fix the 'is this a matching
2338         folder or subfolder' logic.
2339
2340 2001-10-28    <NotZed@Ximian.com>
2341
2342         * providers/local/camel-local-store.c (rename_folder): Changed to
2343         call ibex_move to rename it internally.
2344
2345         * camel-store.c (camel_store_rename_folder): Use the right
2346         variable, not info.
2347
2348 2001-10-28  Jeffrey Stedfast  <fejj@ximian.com>
2349
2350         * camel-stream-buffer.c (camel_stream_buffer_read_line): Make sure
2351         we've actually read data before checking if p[-] is '\r' or not.
2352
2353         * camel-tcp-stream-raw.c (stream_write): Same.
2354
2355         * camel-stream-fs.c (stream_write): If errno isn't EAGAIN, just
2356         exit with -1 and instead of using continue (which doesn't go to
2357         the top of the do-while thus making our logic suck), just set w to
2358         0. Still seems to be a bug in select() if it's telling us the
2359         socket is ready for data when it really isn't but oh well.
2360
2361 2001-10-28    <NotZed@Ximian.com>
2362
2363         * providers/local/camel-local-folder.c
2364         (camel_local_folder_construct): Use path not protocol as the path
2365         part of the uri of the folder_created event.
2366
2367         * providers/local/camel-maildir-store.c (scan_dir): If FAST is
2368         set, dont try and scan for unread counts.
2369
2370         * providers/local/camel-local-store.c (create_folder): Implement,
2371         just return the folderinfo of the folder matched, not all of it.
2372
2373         * camel-store.c (camel_store_rename_folder): Rename the
2374         camelfolders before emitting the folderchanged event (otherwise
2375         vstore fails to pick up change.
2376
2377 2001-10-27    <NotZed@Ximian.com>
2378
2379         * camel-store.c (camel_store_init): Always use a default dir_sep
2380         of '/'.
2381
2382         * camel-store.h (struct _CamelStore): Added a dir_sep to the base
2383         store so rename and whatnot can work, temporary fix for mixed dir
2384         separator in folder name api's.
2385
2386         * providers/imap/camel-imap-store.c (rename_folder): Finished
2387         implementation.
2388         (imap_connect_online): Also set the store's dir_sep here.
2389         (imap_connect_offline): "
2390
2391         * providers/local/camel-local-folder.c (local_rename): Implement
2392         local rename of folder objects.
2393
2394 2001-10-26    <NotZed@Ximian.com>
2395
2396         * camel-vee-folder.c (camel_vee_folder_class_init): Hook into
2397         rename function.
2398         (vee_rename): Implement the veefolder rename function.
2399         (camel_vee_folder_class_init): 
2400         (folder_changed_change): Kill a warning with a cast.
2401
2402         * camel-vee-store.c (vee_rename_folder): Emit a folder_renamed
2403         event properly, also call parent to do some rename stuff.
2404
2405         * camel-store.h: Added a CamelRenameInfo for the rename event.
2406
2407         * camel-folder.c (camel_folder_rename): New function to rename a
2408         folder object.
2409         (camel_folder_class_init): Added a renamed event.
2410         (folder_rename): Default impl, set full_name, and set name
2411         assuming the dir separator is '/'.
2412
2413         * camel-store.c (camel_store_class_init): Added folder_renamed
2414         event.
2415         (camel_store_rename_folder): Rename an active folder object if we
2416         have one, and update the folder table.
2417         (rename_folder): Make a default implementation that handles
2418         updating the folder tree.
2419
2420 2001-10-26  Jeffrey Stedfast  <fejj@ximian.com>
2421
2422         * providers/imap/camel-imap-store.c (delete_folder): Don't bother
2423         checking ex since we can rely on the response being NULL on error.
2424         (rename_folder): Implemented.
2425
2426 2001-10-26  Jeffrey Stedfast  <fejj@ximian.com>
2427
2428         * providers/imap/camel-imap-folder.c (imap_get_message): Check to
2429         make sure that the dataset is non-NULL before using and/or
2430         freeing.
2431
2432         * camel-tcp-stream-raw.c (stream_write): Check for EWOULDBLOCK
2433         too?
2434         (stream_read): Same.
2435         (stream_flush): Return 0 always, fsync() and tcp sockets don't
2436         play nice :-)
2437
2438         * providers/imap/camel-imap-message-cache.c
2439         (camel_imap_message_cache_get): Lets try putting a
2440         camel_stream_reset() here. Logic being that the stream may have
2441         been read from since it was cached and thus our caller may try
2442         reading from it and get no data from it since it is already at the
2443         EOS. This may fix bug #12943.
2444
2445 2001-10-25    <NotZed@Ximian.com>
2446
2447         * camel-search-private.c (utf8_get): Remove the stupid warning
2448         that should never have been there in the first place.
2449
2450         * camel-sasl-digest-md5.c (digest_response): s/iconv/e_iconv/
2451
2452         * camel-pgp-context.c (pgp_verify): "
2453
2454         * camel-mime-utils.c (rfc2047_decode_word, rfc2047_decode_word,
2455         append_8bit, rfc2047_encode_word, rfc2184_decode,
2456         header_decode_param): "
2457
2458         * camel-mime-part-utils.c (convert_buffer, convert_buffer): "
2459
2460         * camel-mime-filter-charset.c (reset, complete, filter): "
2461
2462 2001-10-24    <NotZed@Ximian.com>
2463
2464         * camel-mime-filter-basic.c (complete): For qp decoding, if the
2465         data isn't really qp encoded, we could possible grow the buffer by
2466         upto 2 bytes above the input size, fix allocations/assertions
2467         appropraitely.
2468
2469         * camel-vee-folder.c (folder_changed_change): If we're not
2470         autoupdate, only search for new matches against changed uid's that
2471         we dont already have.
2472
2473 2001-10-24  Dan Winship  <danw@ximian.com>
2474
2475         * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't
2476         let fi->name be NULL.
2477
2478 2001-10-24  Jeffrey Stedfast  <fejj@ximian.com>
2479
2480         * camel-stream-fs.c (stream_read): Same as in the TcpStreamRaw code.
2481         (stream_write): And again here...
2482
2483         * camel-tcp-stream-raw.c (stream_read): Handle the EAGAIN error
2484         case as well.
2485         (stream_write): Same here, this might fix the SMTP truncation
2486         thing? I hope?
2487
2488 2001-10-23  Dan Winship  <danw@ximian.com>
2489
2490         * camel-mime-utils.c (mail_list_magic): Remove an extra * in one
2491         of the regexps that glibc apparently doesn't mind but bsd does.
2492
2493 2001-10-23    <NotZed@Ximian.com>
2494
2495         * providers/local/camel-mbox-summary.c: made d(x) x recompile again.
2496
2497 2001-10-22    <NotZed@Ximian.com>
2498
2499         * providers/local/camel-spool-summary.c (summary_rebuild): No, use
2500         Storing, as the other code does :p
2501         (spool_summary_check): Check for consistency.
2502
2503 2001-10-22  Jon Trowbridge  <trow@ximian.com>
2504
2505         * providers/local/camel-spool-summary.c (summary_rebuild):
2506         s/summarising/summarizing/.
2507         (spool_summary_check): s/summarise/summarize/.
2508
2509 2001-10-22  Jeffrey Stedfast  <fejj@ximian.com>
2510
2511         * camel-pgp-mime.c (camel_pgp_mime_part_verify): If we are
2512         kludging around a inline-pgp signed part, do some charset
2513         conversion to protect any 8bit text.
2514
2515 2001-10-22    <NotZed@Ximian.com>
2516
2517         * camel-filter-search.c, camel-folder-search.c (check_header): Use
2518         search_type_mlist for mailing list searches.
2519
2520         * camel.c (camel_init): call camel-mime-utils-init func.
2521
2522         * camel-mime-utils.c: Changed mail mail_list_magic to include a
2523         domain part, also pre-compile all the patterns.  They are all
2524         backward compatible except List-Id: which now uses the
2525         mail-address-like <list-name.host.name> part rather than the
2526         plain-text part (which might've been blank anyway).
2527         (camel_mime_utils_init): Initialisation function to setup any
2528         static data required by camel-mime-utils at run-time.  We now
2529         setup the base64/charset class tables here, so it doesn't need to
2530         be done statically.
2531         (camel_mime_special_table, camel_mime_base64_rank): No longer
2532         statically initialise these.
2533         (main): Removed + the tests at the end of the file.
2534         (header_raw_check_mailing_list): Dont compile regex's here,
2535         already compiled in utils_init.  Use the regex patterns to remove
2536         leading <'s from addresses.  Also, if there is a domain part
2537         matched, add that after a '@' is added.
2538
2539         * camel-search-private.c (camel_search_header_match): Match check
2540         against all addresses in a multiple address match.  Should fix
2541         #13051.
2542         (camel_search_header_match): Oops, missing i=0.
2543         (camel_search_header_match): Added SEARCH_TYPE_MLIST for mlist
2544         search types.  It ignores the domain part if either (but not both)
2545         of the values dont have it.
2546
2547 2001-10-22  Dan Winship  <danw@ximian.com>
2548
2549         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Add a hack: if
2550         the multipart/signed part has a "x-inline-pgp-hack" parameter in
2551         its Content-Type, don't pass the MIME headers as part of the data
2552         to be verified.
2553
2554 2001-10-22  Rodrigo Moya <rodrigo@ximian.com>
2555
2556         * Makefile.am: added $GNOME_INCLUDEDIR to INCLUDES, needed for latest
2557         libgnome, which install headers in $(prefix)/gnome-1.0
2558
2559 2001-10-21  Jeffrey Stedfast  <fejj@ximian.com>
2560
2561         * camel-mime-part-utils.c
2562         (simple_data_wrapper_construct_from_parser): Only do the rawtext
2563         checks if the part is a text part, otherwise don't bother wasting
2564         cpu cycles.
2565
2566         * camel-store.c (camel_folder_info_build): Updated comments to
2567         make the code a bit more clear.
2568
2569 2001-10-21    <NotZed@Ximian.com>
2570
2571         * camel-store.c (CS_CLASS): Dont do the macro stuff - basically so
2572         you can actually debug calls.
2573         (camel_store_uri_cmp): New function to compare store objects.
2574
2575         * camel-vee-folder.c (vee_folder_add_info): oops, dont free the
2576         vuid, since its alloca'd now.
2577         (folder_changed_change): Kill a compile warning.
2578
2579 2001-10-20    <NotZed@Ximian.com>
2580
2581         * camel-folder.c (move_messages_to): If no exception supplied, use
2582         a local one.
2583         (move_message_to): Set the seen flag also when we delete it.
2584
2585 2001-10-19  Jeffrey Stedfast  <fejj@ximian.com>
2586
2587         * camel-vtrash-folder.c (vtrash_move_messages_to): If the
2588         destination folder is the vfolder source folder, then
2589         set_message_flags on it.
2590
2591 2001-10-19    <NotZed@Ximian.com>
2592
2593         * camel-session.c (register_provider): When registering provider,
2594         translate all strings.
2595
2596         * camel-vee-folder.c (camel_vee_folder_remove_folder): Lock the
2597         right lock for unmatched subfolder list stuff.  If the sub folder
2598         is deleted & part of unmatched, or the last ref to the sub folder
2599         is gone from unmatched, blow it away completely from unmatched,
2600         but only do it once.
2601         (vee_folder_remove_folder): Added arg to kill unmatched
2602         unconditionally.  Also handle deleted folders, always remove
2603         stuff.
2604         (folder_changed_change): Lock subfolder lock for entirety of
2605         operation, and also check to see if the subfolder is still there
2606         before doing any fancy work (incase it got removed while we were
2607         waiting to execute).
2608         (folder_changed_change_uid): Use alloca for vuid, and not
2609         sprintf(".lengths")
2610         (vee_search_by_expression): Dont use sprintf for vuid.
2611         (vee_search_by_uids): "
2612         (vee_folder_add_info): "
2613         (folder_changed_remove_uid): "
2614         (folder_changed_change): "
2615         (folder_changed_change_uid): Also check folder_unmatched for
2616         changed uid's so we properly update/propagate unmatched changes.
2617         (folder_changed_change): Ok, so dont hold the subfolder lock for
2618         the whole duration of the changed event, although we probably
2619         should, requires a recursive mutex.
2620         (folder_changed_change): Change logic, we always add changed stuff
2621         if it now matches, but dont remove it unless its auto-remove, only
2622         propagate changes for it.
2623         (vee_set_message_flags): Call parent method after doing our work.
2624         (vee_set_message_user_flag): Same here.
2625
2626 2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>
2627
2628         * camel-mime-part-utils.c
2629         (simple_data_wrapper_construct_from_parser): If a charset isn't
2630         specified or claims to be utf-8, check the validity of the text
2631         and if it's invalid, set the rawtext bit to TRUE. If the charset
2632         is x-unknown or some other x- charset, always set the rawtext bit
2633         to TRUE.
2634
2635 2001-10-18    <NotZed@Ximian.com>
2636
2637         * camel-store.c (camel_store_unsubscribe_folder): If we are
2638         unsubscribing from a folder we have loaded, set the folder
2639         deleted, as with the delete_folder case.
2640
2641         * providers/(imap|local|pop3|sendmail|smtp)/Makefile.am: Added
2642         CAMEL_CFLAGS so we get the right iconv stuff, patch from Yanko
2643         Kaneti <yaneti@declera.com>
2644
2645 2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>
2646
2647         * camel-pgp-context.c (crypto_exec_with_passwd): Make sure the
2648         cancel_fd isn't -1.
2649
2650 2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>
2651
2652         * providers/imap/camel-imap-message-cache.c (insert_finish): Flush
2653         the stream here, not sure it really matters but it might
2654         (hopefully) fix bug #12943.
2655
2656         * camel-pgp-context.c (crypto_exec_with_passwd): Make
2657         user-cancellable.
2658
2659         * providers/local/camel-local-provider.c: String cleanup for bug
2660         #6640.
2661
2662         * providers/imap/camel-imap-folder.c (imap_sync_online): Fix my
2663         Cyrus imapd workaround...instead of checking to see if info->flags
2664         == FLAGGED, just check to see if it contains any IMAP flags.
2665
2666 2001-10-17    <NotZed@Ximian.com>
2667
2668         * providers/local/camel-maildir-folder.c
2669         (camel_maildir_folder_new): Use '.' as the inbox name for filter
2670         new messages test.
2671
2672         * camel-store.c (camel_folder_info_clone): New function to clone a
2673         folderinfo tree.
2674
2675 2001-10-17  Jeffrey Stedfast  <fejj@ximian.com>
2676
2677         * providers/local/camel-mh-folder.c (mh_append_message): Same as
2678         maildir and mbox append-message.
2679
2680         * providers/local/camel-maildir-folder.c (maildir_append_message):
2681         Same as mbox append.
2682
2683         * camel-exception.c (camel_exception_set): Make sure the new
2684         description isn't the same as the old description pointer before
2685         freeing the old one.
2686         (camel_exception_setv): Don't free the old description until we
2687         set the new one this way we can reuse the old description in the
2688         new description.
2689
2690         * providers/local/camel-mbox-folder.c (mbox_append_message): If
2691         errno == EINTR, then we got a user-cancel so set the exception
2692         appropriately so that we don't make the user shit his pants.
2693
2694         * camel-filter-driver.c (do_copy): Add an optimization for when
2695         destination folder is the same as the source folder.
2696
2697 2001-10-17    <NotZed@Ximian.com>
2698
2699         * providers/imap/camel-imap-store.c (get_folder_info_online):
2700         (parse_list_response_as_folder_info): Patch from Danw, Use unread
2701         count of -1 to mark unflagged messages.  Make sure any folder we
2702         dont lookup explicitly is marked as -1.  Should fix #9947 and
2703         friends.
2704
2705         * providers/local/camel-mbox-summary.c (mbox_summary_sync): Only
2706         touch the summary if the timestamp or size changed.
2707
2708 2001-10-17  Jeffrey Stedfast  <fejj@ximian.com>
2709
2710         * camel-filter-driver.c (camel_filter_driver_filter_message): Set
2711         the DELETED flag on directly on the info if the source folder
2712         doesn't have summary capability.
2713
2714 2001-10-17  Not Zed  <NotZed@Ximian.com>
2715
2716         * camel-tcp-stream-raw.c (stream_write): As below.
2717
2718         * camel-stream-fs.c (stream_write): If not checking cancellation,
2719         make sure we write out everything asked of us.
2720
2721 2001-10-16  Jeffrey Stedfast  <fejj@ximian.com>
2722
2723         * camel-pgp-context.c (pgp_verify): Rearange the order of the gpg
2724         options slightly otherwise it might try to use "--no-tty" as the
2725         filename to verify :-)
2726
2727         * camel-object.[c,h]: If CAMEL_DEBUG is defined, print some useful
2728         ref/unref info.
2729
2730         * providers/imap/camel-imap-store.c (delete_folder): Fixed an
2731         assignment warning.
2732
2733         * camel-uid-cache.c (camel_uid_cache_new): Make sure that the
2734         parent directory exists before trying to open the filename, if it
2735         doesn't, create it.
2736
2737 2001-10-16    <NotZed@Ximian.com>
2738
2739         * camel-mime-utils.c (header_address_decode): If no content, dont
2740         try and decode further and spit meaningless warnings.
2741
2742 2001-10-16  Jeffrey Stedfast  <fejj@ximian.com>
2743
2744         * camel-filter-driver.c (do_flag): Only perform the operation on
2745         the folder if the folder has summary capability, else just poke
2746         the info directly. Fixes the "Filters don't work" bug.
2747         (do_score): Same.
2748         (do_colour): And here too.
2749
2750 2001-10-15  Jeffrey Stedfast  <fejj@ximian.com>
2751
2752         * camel-stream-fs.c (stream_read): Save the errno before calling
2753         fcntl so fcntl doesn't overwrite errno in case of a previous
2754         error.
2755         (stream_write): Same.
2756
2757 2001-10-13  Jeffrey Stedfast  <fejj@ximian.com>
2758
2759         * providers/smtp/camel-smtp-transport.c (smtp_data): Replace the
2760         Bcc headers in a single location and don't flush the data unless
2761         the write was successful.
2762
2763 2001-10-12  Jeffrey Stedfast  <fejj@ximian.com>
2764
2765         * Makefile.am: Remove the stripheader filter from the build.
2766
2767         * camel-mime-filter-stripheader.[c,h]: Removed.
2768
2769         * providers/smtp/camel-smtp-transport.c (smtp_data): Check the
2770         return value of camel_stream_flush to make sure it flushed the
2771         data successfully before continuing. Don't use the stripheader
2772         filter, it was completely broken - instead remove the header and
2773         set it again after we send.
2774
2775 2001-10-12    <NotZed@Ximian.com>
2776
2777         * camel-vee-folder.c (camel_vee_folder_remove_folder): Unhook from
2778         all events before removing folder.
2779         (camel_vee_folder_add_folder): Hook onto delete event.
2780         (camel_vee_folder_finalise): Unhook from deleted event for suibfolder.
2781         (subfolder_deleted): When the folder is deleted, remove it from
2782         the vfolder automagically.
2783
2784 2001-10-11    <NotZed@Ximian.com>
2785
2786         * camel-vee-folder.c (vee_search_by_uids): convert the uids list
2787         to a subset appropriate for each subfolder before trying to search
2788         on it.
2789
2790         * camel-charset-map.[ch]: Removed charset/locale charset lookup
2791         and iconv_open/close functions, moved to gal.  Fixed all callers.
2792
2793 2001-10-11  Jeffrey Stedfast  <fejj@ximian.com>
2794
2795         * camel-tcp-stream-ssl.c (ssl_cert_is_saved): Same.
2796
2797         * camel-tcp-stream-openssl.c (ssl_cert_is_saved): Instead of
2798         opening the file, stat it and make sure that it belongs to us.
2799
2800 2001-10-10  Jeffrey Stedfast  <fejj@ximian.com>
2801
2802         * camel-tcp-stream-openssl.c (ssl_verify): Same hack as below.
2803
2804         * camel-tcp-stream-ssl.c (ssl_bad_cert): Hack around the fact that
2805         adding a cert to nss's certdb seems to not work.
2806
2807 2001-10-10    <NotZed@Ximian.com>
2808
2809         * camel-vee-folder.c (vee_sync): Only re-build the folder if we're
2810         expunging.  Also only clear out the changed folders list if we're
2811         expungung and everything worked.
2812
2813 2001-10-10  Jeffrey Stedfast  <fejj@ximian.com>
2814
2815         * camel-charset-map.c (camel_charset_map_init): Added a hack for
2816         Solaris systems.
2817
2818 2001-10-10    <NotZed@Ximian.com>
2819
2820         * providers/local/camel-maildir-store.c (scan_dir): oops, we want
2821         get_unread_message_count, not get_message_count!
2822
2823 2001-10-09    <NotZed@Ximian.com>
2824
2825         * camel-service.c (camel_service_disconnect): Duplicate connect
2826         code that unregisters a cancel op if we created one.
2827
2828         * camel-operation.c (camel_operation_progress): Another go at
2829         getting the logic right again.  Make transients only update after
2830         5 seconds (CAMEL_OPERATION_TRANSIENT_DELAY)
2831         (camel_operation_end): Likewise.
2832
2833         * providers/local/camel-spool-folder.c (spool_search_by_uids):
2834         Implement.
2835
2836         * providers/imap/camel-imap-search.c (imap_body_contains): If
2837         searching a sub-set of the total message count, then use a UID
2838         range to search only specific messages.
2839
2840         * camel-vee-folder.c (vee_folder_change_match): Removed.
2841         (folder_changed_add_uid): Helper func for changed code.
2842         (folder_changed_remove_uid): "
2843         (folder_changed_change_uid): "
2844         (folder_changed): Rewritten.  Supports proper auto-updating of
2845         changes, but not removals till a sync occurs.
2846         (vee_search_by_uids): Implement.
2847         (folder_changed): Changed to call an async threaded function to do
2848         the actual folder updating.
2849
2850         * camel-folder-summary.c (camel_flag_list_copy): New func to copy
2851         a whole list of flags.
2852         (camel_tag_list_copy): New func to copy a whole list of flags.
2853
2854         * providers/imap/camel-imap-folder.c (imap_search_by_uids):
2855         Implement.
2856
2857         * providers/local/camel-local-folder.c (local_search_by_uids):
2858         Implement.
2859
2860         * camel-folder.c (camel_folder_search_by_uids): New function,
2861         search a subset of uid's.
2862         (search_by_uids): Default impl, return error.
2863
2864 2001-10-08  Dan Winship  <danw@ximian.com>
2865
2866         * camel-folder.h (struct _CamelFolder): replace the ever-growing
2867         list of gbooleans with a single guint32 for flags.
2868
2869         * camel-folder.c: Update folder flag setting/checking.
2870
2871         * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_init):
2872         * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): 
2873         * providers/local/camel-spool-folder.c (spool_init,
2874         camel_spool_folder_new): 
2875         * providers/local/camel-maildir-folder.c (camel_maildir_folder_new): 
2876         * providers/local/camel-local-folder.c (local_init): 
2877         * providers/imap/camel-imap-folder.c (camel_imap_folder_init,
2878         camel_imap_folder_new): 
2879         * camel-vtrash-folder.c (camel_vtrash_folder_init): 
2880         * camel-vee-folder.c (camel_vee_folder_init): 
2881         * camel-digest-folder.c (camel_digest_folder_init): update folder
2882         flag setting.
2883
2884 2001-10-07  Dan Winship  <danw@ximian.com>
2885
2886         * providers/imap/camel-imap-store.c (get_folder_online): Unlock
2887         the store before returning error. (noted by NotZed)
2888
2889 2001-10-06  Jeffrey Stedfast  <fejj@ximian.com>
2890
2891         * camel-mime-utils.c (header_decode_text): Fix a slight error in
2892         logic. Just because the last word was an encoded word doesn't mean
2893         we ignore the lwsp padding, we only ignore it if the last word and
2894         *this* word are encoded.
2895
2896 2001-10-06  Jeffrey Stedfast  <fejj@ximian.com>
2897
2898         * camel-mime-filter-basic.c (filter): Implemented uuencoding and
2899         decoding.
2900         (complete): Implemented uuencoding and decoding.
2901
2902         * camel-mime-utils.c (uuencode_close): New function to flush the
2903         uu encoder.
2904         (uuencode_step): New function to uuencode a block of data.
2905
2906 2001-10-05    <NotZed@Ximian.com>
2907
2908         * providers/imap/camel-imap-store.c (subscribe_folder): Use a
2909         folder_subscribed event rather than a folder_created one.
2910         (unsubscribe_folder): Similarly for unsubscribed/deleted.
2911         (create_folder): Emit a folder_created event on the folders we
2912         added.  Not sure hsould probably check which ones are new and
2913         which ones are just existing ones?
2914         (delete_folder): Emit a folder_deletd event when we've deleted the
2915         folder.  Part of fix for #11831.
2916
2917         * camel-store.c (camel_store_class_init): Added
2918         folder_subscribed/unsubscribed events.
2919
2920 2001-10-05  Jeffrey Stedfast  <fejj@ximian.com>
2921
2922         * camel-service.c (camel_service_finalize): Turn off warnings.
2923         (get_name): Same.
2924
2925         * camel-sasl.c (sasl_challenge): Turn off warnings.
2926
2927         * camel-tcp-stream.c (tcp_connect): Turn off warnings.
2928         (tcp_getsockopt): Same.
2929         (tcp_setsockopt): Here too.
2930         (tcp_get_socket): And here.
2931
2932         * camel-folder.c (folder_sync): Turn off warnings.
2933         (expunge): Same.
2934         (append_message): Here too.
2935         (get_message): And here.
2936         (search_by_expression): And again here.
2937         (folder_changed): Here too.
2938
2939         * camel-store.c (get_folder): Set an exception and turn off
2940         debugging g_warnings.
2941         (create_folder): Same.
2942         (delete_folder): Here too.
2943         (rename_folder): And here.
2944         (get_trash): And here.
2945         (get_folder_info): Same.
2946         (free_folder_info): And again here.
2947         (camel_folder_info_build): Here too.
2948         (folder_subscribed): Same.
2949         (subscribe_folder): Here too.
2950         (unsubscribe_folder): And here.
2951
2952 2001-10-05    <NotZed@Ximian.com>
2953
2954         * camel-mime-utils.c (header_decode_mailbox): Try harder to get
2955         broken names out of addresses.  Unencoded ,'s in names will still
2956         break it, but well what can you do eh?
2957         (header_decode_mailbox): Always add .'s into address we've scanned
2958         past a '.', even if we can't decode the next part.  Fix for some
2959         annoying bug #.
2960
2961 2001-10-04    <NotZed@Ximian.com>
2962
2963         * camel-store.c (camel_store_delete_folder): Change the order of
2964         execution slightly.  We delete the folder first, then call the
2965         classes delete folder, then cleanup the hashtable afterwards.
2966         This is so deletes of vfolders work, since vee-store uses the
2967         folder hashtable to store all of is vfolders :-/
2968
2969 2001-10-04  Jeffrey Stedfast  <fejj@ximian.com>
2970
2971         * camel-service.c (camel_service_connect): Unregister the
2972         operation before unreffing it.
2973
2974 2001-10-03    <NotZed@Ximian.com>
2975
2976         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
2977         Remove now unused 'recents' array/freeing func.
2978
2979         * camel-object.c (camel_object_trigger_event): Oops, always run
2980         the prep function, even if we have no hooks listening.  Causes
2981         incoming imap recents to get ignored bythe camel-folder filter
2982         inbox code.
2983
2984         * providers/local/camel-local-folder.c (local_sync): Dont
2985         explicitly save metadata, its saved in summary_sync.
2986
2987         * providers/local/camel-mh-summary.c: Call superclass.
2988         (mh_summary_check): Dont save ibex.
2989
2990         * providers/local/camel-maildir-summary.c: Call superclass method.
2991         (maildir_summary_check): Dont save ibex explictly.
2992
2993         * providers/local/camel-mbox-summary.c: Call super-class sync when
2994         done, saves summary/ibex, etc.
2995         (mbox_summary_check): Dont save ibex.
2996         (mbox_summary_sync): Call summary_check rather than trying to
2997         update from our known position.
2998
2999         * providers/local/camel-local-summary.c
3000         (camel_local_summary_check): Dont save the summary or index here.
3001         (local_summary_sync): Save the summary/index here.
3002
3003         * camel-search-private.c (camel_search_build_match_regex): Added
3004         MATCH_NEWLINE flag, -> REG_NEWLINE.
3005
3006         * camel-lock-helper.c: Include <string.h> to kill some warnings.
3007
3008         * camel-filter-search.c (get_full_header): Put \n's between each
3009         line we generate.
3010         (header_full_regex): Dont drop the first argument to the command
3011         -> empty matches!
3012         (header_full_regex): Set match_newline for building regex.
3013         (body_regex): And here too.  These all fix #9877.
3014
3015 2001-10-03  Jeffrey Stedfast  <fejj@ximian.com>
3016
3017         * camel-store.c (camel_store_delete_folder): Call
3018         camel_folder_delete() on the folder if it's "alive".
3019
3020         * camel-folder.c (camel_folder_delete): Mark the folder as
3021         deleted, perform any folder specific cleanup and emit the deleted
3022         event.
3023         (camel_folder_sync): Only sync the folder if it hasn't been
3024         deleted.
3025         (camel_folder_expunge): Same.
3026
3027 2001-10-03  Dan Winship  <danw@ximian.com>
3028
3029         * providers/local/camel-local-provider.c (local_url_equal):
3030         Strange are the ways of alloca. Fixes 11543.
3031
3032 2001-10-02  Jeffrey Stedfast  <fejj@ximian.com>
3033
3034         * camel-tcp-stream-ssl.c (ssl_bad_cert): Import the certificate if
3035         the user accepts it.
3036
3037 2001-10-02    <NotZed@Ximian.com>
3038
3039         * providers/local/camel-local-provider.c (local_url_hash,
3040         local_url_equal): for hashing/comparing local url's, we ignore
3041         trailing /'s in paths (maybe shuld handle multiple /'s too).
3042         (camel_provider_module_init): Use local_url_hash/equal for all
3043         functions.
3044
3045         * camel-sasl-digest-md5.c (digest_response): Change to
3046         camel_charset_iconv_open/close.
3047
3048         * camel-pgp-context.c (pgp_verify): Change to
3049         camel_charset_iconv_open/close.
3050
3051         * camel-mime-part-utils.c (convert_buffer): Change to
3052         camel_charset_iconv_open().
3053
3054         * camel-mime-filter-charset.c
3055         (camel_mime_filter_charset_new_convert, finalise): Change to
3056         camel_charset_iconv_open, etc.
3057
3058         * camel-mime-utils.c: Use the camel_charset_iconv_open/close()
3059         functions to open/close it.
3060
3061         * camel-charset-map.c (camel_charset_iconv_open): New function,
3062         wrap iconv_open, so we can cache ic's.
3063         (camel_charset_iconv_close): Likewise for close.
3064         (camel_charset_map_init,shutdown): Init/free iconv cache.
3065
3066 2001-10-02  Jeffrey Stedfast  <fejj@ximian.com>
3067
3068         * camel-charset-map.c (camel_charset_to_iconv): Revert my
3069         x-unknown special-case hack - this may mask other problems.
3070
3071         * camel-mime-utils.c (rfc2047_decode_word): If the iconv
3072         conversion fails, for whatever reason, retry using the user's
3073         locale charset.
3074
3075 2001-10-02    <NotZed@Ximian.com>
3076
3077         * providers/local/camel-maildir-store.c (get_folder_info): Go back
3078         to using the store url's path, not the toplevel_dir thing.
3079
3080         * camel-operation.c (camel_operation_progress): Fix the progress
3081         logic, so we dont update too often.
3082
3083         * camel-object.c (camel_object_get_hooks): Change the lock to a
3084         recursive e-mutex.
3085         (camel_object_hook_event): Maintain list length of hook list.
3086         (camel_object_unhook_event): "
3087         (camel_object_unhook_event): If we are in an event, just mark the
3088         pair as removed, without removing it.
3089         (camel_object_trigger_event): Before running events, copy the
3090         list, and also ignore 'removed' events.  After running events, if
3091         we're all out of events, then free up any pending-removed events.
3092         (camel_object_free_hooks): Add some new assertions on the state of
3093         the hook structure.
3094         Removed the #error if threads not defined.  It _should_ actually
3095         work without threads.
3096         (camel_object_free_hooks): Free mutex when done.
3097
3098 2001-10-01  Jeffrey Stedfast  <fejj@ximian.com>
3099
3100         * providers/imap/camel-imap-store.c (delete_folder): Remove any
3101         cached messages that belonged to the deleted folder.
3102         (subscribe_folder): Don't ever let the info->name be NULL and
3103         don't use the stupid concat kludge to generate the URL, just use a
3104         CamelURL to do it. This way we don't risk breaking stuff by having
3105         a url like imap://fejj@imap//folder
3106
3107         * camel-charset-map.c (camel_charset_to_iconv): If the charset is
3108         x-unknown, return the locale_charset.
3109
3110 2001-10-01  Dan Winship  <danw@ximian.com>
3111
3112         * camel-provider.h: Fix up the provider flags to specify things
3113         more completely so we don't have to hardcode provider names in the
3114         mailer.
3115
3116         * providers/local/camel-local-provider.c: MH, mbox, and Maildir
3117         are LOCAL. MH and mbox are no longer STORAGE by the new
3118         definition.
3119
3120         * camel-session.c (vee_provider): The vfolder store is a STORAGE.
3121
3122 2001-10-01  Dan Winship  <danw@ximian.com>
3123
3124         * providers/local/camel-local-store.c (construct): Don't munge the
3125         URL; CamelSession's caching relies on it not changing. Instead,
3126         add a toplevel_dir field to CamelLocalStore, and set that to the
3127         path, but always ending with /.
3128         (camel_local_store_finalize): Free toplevel_dir
3129         (camel_local_store_get_toplevel_dir): Return toplevel_dir rather
3130         than url->path.
3131
3132         * providers/local/*: Lots of s/url->path/toplevel_dir/
3133
3134         * providers/local/camel-spool-store.c (construct): Likewise, don't
3135         try to strip a trailing / from url->path here, but I didn't make
3136         the corresponding toplevel_dir change, because there's no good
3137         reason someone should expect "/var/spool/mail/danw/" to work since
3138         that's not a directory.
3139
3140         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): if STAT
3141         returns 0, don't bother sending UIDL. Speeds things up slightly
3142         and also works around a bug in a particular random POP server.
3143         (ximian bug 11369).
3144
3145 2001-09-29  Jeffrey Stedfast  <fejj@ximian.com>
3146
3147         * camel-pgp-context.c (pgp_sign): Add --no-secmem-warning and
3148         --no-greeting to the gpg command-line options.
3149         (pgp_clearsign): Same.
3150         (pgp_verify): Here too.
3151         (pgp_encrypt): And here.
3152         (pgp_decrypt): And finally here.
3153
3154 2001-09-28  Jeffrey Stedfast  <fejj@ximian.com>
3155
3156         * camel-filter-search.c (get_source): Same here.
3157
3158         * camel-mime-message.c (camel_mime_message_set_source): Don't use
3159         the e_url_shroud hack, use CamelURL functions instead.
3160
3161 2001-09-28  Jeffrey Stedfast  <fejj@ximian.com>
3162
3163         * providers/nntp/camel-nntp-provider.c
3164         (camel_provider_module_init): Init the nntp url hash and url_equal
3165         functions.
3166
3167         * providers/sendmail/camel-sendmail-provider.c
3168         (camel_provider_module_init): Init the sendmail url hash and
3169         url_equal functions.
3170
3171         * providers/smtp/camel-smtp-provider.c
3172         (camel_provider_module_init): Init the smtp url hash and url_equal
3173         functions.
3174
3175         * providers/pop3/camel-pop3-provider.c
3176         (camel_provider_module_init): Init the pop3 url hash and url_equal
3177         functions.
3178
3179         * providers/imap/camel-imap-provider.c
3180         (camel_provider_module_init): Init the imap url hash and url_equal
3181         functions.
3182
3183         * providers/local/camel-local-provider.c
3184         (camel_provider_module_init): Init the local url hash and
3185         url_equal functions.
3186
3187         * camel-session.c (camel_session_class_init): Init the vfolder url
3188         hash and url_equal functions.
3189
3190         * camel-provider.h: Added url_hash and url_equal function pointers
3191         to the structure.
3192
3193         * camel-vtrash-folder.c (vtrash_move_messages_to): Oops, a
3194         CamelFolder is not a CamelFolderClass.
3195
3196 2001-09-28  Dan Winship  <danw@ximian.com>
3197
3198         * camel-tcp-stream-openssl.c (ssl_error_to_errno): Make this take
3199         an SSL * instead of a CamelTcpStreamSSL *, since it can get called
3200         from open_ssl_connection, when the CamelTcpStreamSSL isn't set up
3201         right yet. Fixes a crash on connection failure.
3202
3203 2001-09-27  Dan Winship  <danw@ximian.com>
3204
3205         * providers/imap/camel-imap-folder.c
3206         (camel_imap_folder_fetch_data): Grab the store's command_lock
3207         before grabbing the folder's cache_lock to prevent deadlock if
3208         another thread is processing an EXPUNGE response.
3209
3210         * providers/imap/camel-imap-folder.c
3211         (imap_expunge_uids_resyncing): Fix a compiler warning that might
3212         point out a real bug...
3213
3214         * providers/imap/camel-imap-folder.c (get_content): and one that
3215         doesn't
3216
3217 2001-09-27    <NotZed@Ximian.com>
3218
3219         * camel-service.c (camel_service_connect): Dont re-register the
3220         connect_op if we got it by calling 'operation_registered', which
3221         returns an already-registered one.
3222         (camel_service_disconnect): Likewise here.  This removes all the
3223         re-registered warnings.
3224
3225         * camel-object.c (camel_object_unref): Fill the finalised data
3226         with nonsense, rather than 0's - more easily detect bad data.
3227         (camel_object_new): Clear instance data when we retrieve it off
3228         the list.
3229
3230         * camel-object.h (_CamelObject): Added an event lock pointer for
3231         uh, locking event stuff.  Also change the hooklist hashtable into
3232         a list.  Changed all the code to handle it.  Result: thread-safe
3233         events, event-hooks, and save memory too, and SHOULD FINALLY FIX
3234         THAT UNREAD COUNT PROBLEM.
3235
3236 2001-09-27  Jeffrey Stedfast  <fejj@ximian.com>
3237
3238         * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): CRLF decode the
3239         stream before parsing it into a MIME part. This fixes bug #10521.
3240
3241         * camel-store.c: Remove the old folder from the vTrash folder.
3242
3243 2001-09-27  Dan Winship  <danw@ximian.com>
3244
3245         * camel-service.c: Change "gboolean connected" to
3246         "CamelServiceConnectionStatus status", which can be disconnected,
3247         connecting, connected, or disconnecting.
3248         (camel_service_init, camel_service_finalize): create/destroy the
3249         connect_op_lock. Refer to service->status rather than
3250         service->connected.
3251         (camel_service_connect): When connecting, note the current
3252         operation (and create a new one if there's none registered) and
3253         mark the connection "connecting" until we succeed or fail.
3254         (camel_service_disconnect): Likewise in reverse.
3255         (camel_service_cancel_connect): New function to cancel a
3256         connection attempt.
3257         (cancel_connect): Default implementation: Call
3258         camel_operation_cancel on the connect_op.
3259
3260         * camel-disco-store.c (disco_connect): Only call
3261         CamelRemoteStore's connect func if we're online.
3262         (disco_cancel_connect): Fall back to offline if a connection gets
3263         cancelled.
3264         (disco_get_folder_info): Kludge: call connect explicitly before
3265         deciding whether to do the online or offline version, so if the
3266         connect fails, we fall back correctly.
3267
3268         * camel-session.c (camel_session_get_service_connected):
3269         s/svc->connected/svc->status/
3270
3271         * camel-remote-store.c (camel_remote_store_finalise):
3272         Change service->connected check to service->status check.
3273         (remote_connect): Don't set service->connected here:
3274         camel_service_connect() itself does that.
3275
3276         * camel-operation.c (camel_operation_registered): Deal with the
3277         possibility that there's no registered op.
3278
3279 2001-09-26    <NotZed@Ximian.com>
3280
3281         * camel-filter-driver.c (camel_filter_driver_filter_message): If
3282         we get a search error, just abort, dont try and fall back and copy
3283         to inbox.
3284         (camel_filter_driver_filter_message): Make sure we ALWAYS use
3285         exceptions for important things - like moving messages to inbox!
3286         (camel_filter_driver_filter_message): If we have the source
3287         folder, use camel_folder_set_message_flags rather then poking the
3288         info directly, which skips changed events.  This means filtering
3289         immediate doesn't lose changed events.
3290         (do_flag): Same here.
3291         (do_colour): Same thing but using set_tag.
3292         (do_score): Same again.
3293         (camel_filter_driver_filter_folder): Use ~0 as the 'set' arg to
3294         set_flags, just saves typing.
3295         (open_folder): We cache folders that we couldn't open as well as
3296         those ones we could.  Use magic token FOLDER_INVALID =
3297         (void *)~0 as the marker.
3298         (close_folder): Handle FOLDER_INVALID case properly.
3299
3300 2001-09-26  Jeffrey Stedfast  <fejj@ximian.com>
3301
3302         * camel-mime-message.c
3303         (camel_mime_message_get_part_by_content_id): New function to
3304         convenience Larry ;-)
3305         (check_content_id): Oops, return !found instead of found. This
3306         callback has to return whether or not to keep searching, not
3307         whether or not it found what it's looking for. Do'h!
3308
3309         * camel-pgp-mime.c (camel_pgp_mime_is_rfc2015_signed): block out
3310         some code if ENABLE_PEDANTIC_PGPMIME is not defined.
3311
3312 2001-09-26    <NotZed@Ximian.com>
3313
3314         * camel-vee-store.c: Emptied VeeStorePrivate, member wasn't used.
3315
3316         * camel-vee-folder.c (camel_vee_folder_set_expression): Lock
3317         changed list separately.
3318         (camel_vee_folder_remove_folder): "
3319         (camel_vee_folder_set_folders): Use changed_lock for changed list.
3320         (vee_refresh_info): Use changed_lock, also just grab the list,
3321         reset it in the lock, and do the work unlocked.
3322         (vee_sync): Use changed lock for changed list.
3323         (folder_changed): ".  All this kills a deadlock with sync/expunge.
3324         
3325         * camel-private.h (CamelVeeFolderPrivate): Added a new lock for
3326         the folders-changed list.
3327         (CamelVeeStorePrivate): Removed, defined in camel-vee-store.c,
3328         thanks to a pedantic.
3329
3330 2001-09-26  Jeffrey Stedfast  <fejj@ximian.com>
3331
3332         * Makefile.am: Fix Ettore's fix.
3333
3334 2001-09-25  Jeffrey Stedfast  <fejj@ximian.com>
3335
3336         * camel-pgp-context.c (camel_pgp_context_new): No longer takes a
3337         remember argument.
3338         (pgp_sign): Only uncache the passphrase on failure.
3339         (pgp_clearsign): Same.
3340         (pgp_encrypt): Here too.
3341         (pgp_decrypt): And here.
3342         (pass_free): New function to zero the passphrase before freeing
3343         it.
3344
3345 2001-09-25  Ettore Perazzoli  <ettore@ximian.com>
3346
3347         [Patch for Automake 1.5 compatibility pointed out by Richard
3348         Boulton <richard@tartarus.org>, as per #9258.]
3349
3350         * providers/nntp/Makefile.am: Remove some commented parts that
3351         make Automake 1.5 choke.
3352
3353         * Makefile.am (camel-lock-helper): Add $(EXEEXT) for Automake 1.5
3354         compatibility.
3355
3356 2001-09-25    <NotZed@Ximian.com>
3357
3358         * camel-folder.c (get_unread_message_count): Only unref info if we
3359         got it.
3360
3361         * camel-operation.c (camel_operation_unref): Fix for !threads
3362         enabled not ccompiling.
3363         (camel_operation_ref): Assert refcount > 0.
3364         (struct _CamelOperation): Removed the lock.  On further
3365         investigation, I dont think this will always work, the
3366         registration operations assume that a lookup in the
3367         operation_active table will return a ref, that will remain valid
3368         until we ref it, which needn't be the case.  So now i'm using a
3369         single global lock, since we'd need to do that for unref anyway,
3370         and every operation is fast & memory-bound.  Changed all the code
3371         to handle this.
3372         (camel_operation_progress_count): Since the code is identical,
3373         just call progress() for now.
3374         (camel_operation_register): No longer refcount, use unref to
3375         check/clear the active table.
3376         (camel_operation_unregister): Same here.
3377         (camel_operation_unref): Check if operation is in active table, if
3378         so, warn, remove.
3379
3380 2001-09-25  Dan Winship  <danw@ximian.com>
3381
3382         * camel-tcp-stream-openssl.c (my_SSL_read, my_SSL_write): call
3383         SSL_read/write, looping on SSL_ERROR_WANT_READ/WRITE. I'm sure
3384         there's a perfectly good reason that the API works this way. No,
3385         really.
3386         (stream_read, stream_write): use my_SSL_read and my_SSL_write.
3387         Fixes at least ximian 8593, and probably 6024 and maybe 10366,
3388         at least for OpenSSL. There may be a parallel NSS bug?
3389
3390 2001-09-25    <NotZed@Ximian.com>
3391
3392         * camel-stream-buffer.c (stream_write_all): A "safe write"
3393         function that always writes out all data asked of it, till
3394         finished.
3395         (stream_write): Rewritten.  What was i on when i wrote that
3396         originally, how did it ever work with tcp streams ...
3397
3398 2001-09-24    <NotZed@Ximian.com>
3399
3400         * camel-folder.c (append_message): Set the exception to
3401         FOLDER_INVALID rather than making out it worked.  A fix for #7025.
3402         (search_by_expression): Here too.
3403
3404         * providers/imap/camel-imap-folder.c (imap_update_summary): In the
3405         'lose' case, free messages, not fetch_data twice!
3406
3407         * camel-filter-search.c (check_header): If the type is encoded,
3408         get the fallback charset from the message content-type.
3409
3410         * camel-mime-part-utils.c (check_html_charset): Dont check for
3411         charset==null before calling charset_to_iconv.
3412         (simple_data_wrapper_construct_from_parser): "
3413
3414         * camel-mime-message.c (process_header): Try use content-type
3415         charset param as the fallback charset.
3416
3417         * camel-charset-map.c (camel_charset_to_iconv): Handle name ==
3418         NULL, return NULL.
3419
3420         * camel-folder-summary.c (camel_folder_summary_format_address):
3421         (camel_folder_summary_format_string): Made private again, removed
3422         #warning about it.  Renamed to s/camel_folder//.
3423         (summary_format_string): Take default charset param.
3424         (camel_message_info_new_from_header, message_info_new): Decode
3425         content-type field to get the charset parameter to use as the
3426         default charset for decoding strings.
3427
3428         * camel-search-private.c (camel_search_header_match): Pass NULL as
3429         the charset, the locale charset is always tried.
3430         (camel_search_header_match): Supply a default_charset parameter to
3431         be used with TYPE_ENCODED params.
3432
3433         * camel-mime-utils.c
3434         (header_param): get rid of the g_strcasecmp crap.
3435         (header_set_param): Same here.
3436         (header_decode_param_list): And here.
3437         (header_decode_text): Totally rewritten.  30% of its size.  If the
3438         word is not rfc2047 encoded, always try default_charset if
3439         supplied, if that fails, try locale charset if it exists, if that
3440         fails then assume latin1/7 bit ascii.
3441         (append_8bit): Changed to return FALSE if we can't convert for
3442         whatever reason, and dont append anything.
3443
3444         * camel-mime-part.h (struct _CamelMimePart): Move content_type and
3445         headers out of the 'private' section.
3446
3447         * camel-mime-part.c (get_headers): Dont do any conversion on the
3448         header.
3449         (process_header): Get the content-type charset as the fallback
3450         charset for decode_string.
3451         (construct_from_parser): IF we have a content-type header, process
3452         it before doing anything else, so we have access to a fallback
3453         charset for invalid headers.
3454
3455 2001-09-23  Jeffrey Stedfast  <fejj@ximian.com>
3456
3457         * camel-tcp-stream-openssl.c (ssl_verify): Don't even try to alert
3458         the user if the session isn't interactive.
3459         (errlib_error_to_errno): Make the default errno EINTR so that we
3460         act just like CamelTcpStreamSSL.
3461
3462         * camel-pgp-context.c (pgp_sign): When the password is not
3463         provided, set the exception to USER_CANCEL.
3464         (pgp_clearsign): Same.
3465         (pgp_encrypt): And here.
3466         (pgp_decrypt): Here too.
3467
3468 2001-09-21    <NotZed@Ximian.com>
3469
3470         * camel-store.c (create_folder): Set the exception if
3471         create_folder isn't implemented.
3472
3473 2001-09-21  Jeffrey Stedfast  <fejj@ximian.com>
3474
3475         * providers/imap/camel-imap-store.c (create_folder): Go back to
3476         not using camel_folder_info_build() here because this seems to
3477         break folder creation (returning nodes from the root path when it
3478         shouldn't be?).
3479
3480 2001-09-21    <NotZed@Ximian.com>
3481
3482         * camel-vee-store.c (vee_get_folder_info): Force a refresh of
3483         vfolders before storing their count.  This essentially makes
3484         'get_folderinfo' refresh all vfolders, so that get-mail works as
3485         expected.
3486
3487         * camel-vee-folder.c (camel_vee_folder_finalise): Clear lists.
3488         (folder_changed): If we're not autoupdating the folder, then
3489         add this folder to the list of 'changed' folders for this vfolder.
3490         (camel_vee_folder_set_expression): Reset the folders_changed list.
3491         (camel_vee_folder_remove_folder): Remove the folder from the
3492         folders_changed list.
3493         (camel_vee_folder_set_folders): If we have a folder already, but
3494         its changed, use this opportunity to update it.
3495         (vee_sync): Remove any synced folders from the folders_changed
3496         list.
3497         (vee_refresh_info): Refresh folder, re-run queries on any changed
3498         folders.
3499
3500 2001-09-20    <NotZed@Ximian.com>
3501
3502         * camel-folder-summary.c (camel_folder_summary_header_load): New
3503         function to just load the summary.  Not much use yet, until unread
3504         counts are stored in the summary (which now looks like too much
3505         work!).
3506
3507         * camel-mime-utils.c (header_decode_mailbox): Crappy fix for
3508         stupid mailers.  If we get 'name b. name <foo>' then treat it as
3509         '"name b. name" <foo>'.  See 8147.
3510         (header_decode_mailbox): Another fix for really broken mailers
3511         that have things that look like addresses followed by <address>
3512         bits.
3513         (rfc2047_encode_word): Escape ??= to avoid some bizarre warning
3514         about trigraphs.
3515
3516         * providers/local/camel-local-folder.c
3517         (camel_local_folder_construct): Setup unread count properly, and
3518         also setup the url properly.
3519
3520         * providers/local/camel-maildir-store.c (camel_folder_info_new):
3521         Build the path on the folderinfo.
3522         (scan_dir): Dont include empty host part in url for folder.
3523         (scan_dir): Lookup folder counts for any folders we currenty have
3524         open.
3525         (scan_dir): If we dont have the folder open, then scan the 'new'
3526         and 'cur' folders for new and unread messages to count instead.
3527
3528         * providers/local/camel-spool-store.c (get_folder_info): If we
3529         have this folder open, then set unread from the folder itself.
3530         (get_folder_info): Change the INBOX path to not include the
3531         leading /.
3532
3533         * providers/local/camel-spool-folder.c
3534         (camel_spool_folder_construct): Fix path.
3535         (camel_spool_folder_construct): Properly setup the url field when
3536         we say we've got a new folder created.
3537
3538         * providers/imap/camel-imap-store.c (unsubscribe_folder): Build
3539         path on folderinfo.
3540
3541         * camel-store.c (camel_folder_info_build_path): Prepend / to path.
3542
3543         * camel-vee-folder.c (camel_vee_folder_construct): Use macro for
3544         unmatched folder name.
3545         (camel_vee_folder_new): "
3546
3547         * camel-vee-store.c (vee_get_folder_info): Use macro for unmatched
3548         folder name.
3549         (vee_delete_folder): "
3550         (vee_rename_folder): "
3551         (vee_get_folder): Prepend / onto path.
3552         (vee_delete_folder): Setup path in folderinfo.
3553         (vee_get_folder_info): Fix path in folderinfo.
3554
3555         * camel-vee-folder.h (CAMEL_UNMATCHED_NAME): New define for
3556         unmatched (internal) name.
3557
3558 2001-09-20  Jeffrey Stedfast  <fejj@ximian.com>
3559
3560         * providers/local/camel-spool-folder.c
3561         (camel_spool_folder_construct): And finally here.
3562
3563         * providers/local/camel-local-folder.c
3564         (camel_local_folder_construct): And here.
3565
3566         * camel-vee-store.c (vee_get_folder): ANd here too.
3567         (vee_get_folder_info): And here.
3568
3569         * providers/imap/camel-imap-store.c (create_folder): Use
3570         camel_folder_info_build() and do better error checking.
3571         (subscribe_folder): Set the path on the folder info.
3572
3573         * camel-store.c (camel_folder_info_build): Set the folder-info
3574         path if it hasn't already been set by the caller.
3575         (camel_folder_info_free): Free the path.
3576
3577         * camel-store.h: Added a path member to the FolderInfo type.
3578
3579 2001-09-20  Dan Winship  <danw@ximian.com>
3580
3581         * camel-charset-map.c (camel_charset_to_iconv): Nuke debug warning.
3582
3583 2001-09-19  Jeffrey Stedfast  <fejj@ximian.com>
3584
3585         * camel-pgp-context.c: Updated exception strings to be more clear.
3586
3587         * camel-pgp-mime.c (pgp_mime_part_sign_restore_part): Stupid
3588         mistake, fixes bug #9975.
3589
3590         * camel-tcp-stream-ssl.c (ssl_bad_cert): Oops, don't fail if
3591         `data' isn't a CamelService...cuz it's not supposed to be! It's a
3592         CamelTcpStreamSSL object...doh!
3593
3594 2001-09-19    <NotZed@Ximian.com>
3595
3596         * General cleanup of camel debug printfs.
3597         
3598         * camel-lock.c (camel_lock_fcntl): Changed to return 'success' if
3599         the error indicates file locking isn't supported on this
3600         filesystem.  Still return a warning just incase (if its the first
3601         time).  Might fix a lot of reported bugs.
3602
3603         * providers/local/camel-spool-store.c (get_folder_info): Dont
3604         include the empty // host part in the uri.  This 'breaks' the
3605         service lookup.
3606
3607 2001-09-18  Jeffrey Stedfast  <fejj@ximian.com>
3608
3609         * camel-mime-utils.c: Match mailing-list header List-Owner.
3610
3611 2001-09-18    <NotZed@Ximian.com>
3612
3613         * camel-vee-store.c (vee_get_folder): Fix the uri genereated for
3614         the folderinfo for the folder_created event.
3615
3616         * camel-store.h: Added 'total' to CamelFolderInfo.
3617
3618 2000-09-18    <NotZed@Ximian.com>
3619
3620         * providers/local/camel-maildir-folder.c
3621         (camel_maildir_folder_new): If filter inbox is set on the store,
3622         and we're opening inbox '', then enable filtering on new messages.
3623
3624         * providers/local/camel-local-folder.c
3625         (camel_local_folder_construct): After loading the summary, check
3626         it, and only abort if that fails.  Also maintain the changes
3627         count.
3628
3629         * providers/local/camel-local-summary.c
3630         (camel_local_summary_load): Remove summary_check code from here.
3631         (camel_local_summary_check): Sync index/summary here, if we were
3632         successful.
3633
3634         * providers/local/camel-spool-folder.c
3635         (camel_spool_folder_new): If we have filter-new-messages-on-inbox
3636         set and we just opened inbox, turn on filtering on this folder.
3637         (camel_spool_folder_construct): Keep track of changes for the
3638         folder, so that filter-new-messages works right (?)
3639
3640         * providers/local/camel-spool-store.c (get_folder): Pass 'INBOX'
3641         as the folder name, not the path.
3642
3643         * camel-folder-search.c (search_not): Modified patch from
3644         <peterw@ximian.com> since the summary is messageinfo's, not
3645         strings.
3646
3647         ** Ok so the problem with the stuff below is that maildir/spool
3648         'summary_load' throws away all events, including recents, joy eh?
3649         
3650         * providers/local/camel-maildir-summary.c (maildir_summary_check):
3651         Add new messages to the recent changeinfo.
3652
3653         * providers/local/camel-spool-summary.c: Mark 'new' message as
3654         recent, for later processing if required (i.e. 'filter new
3655         messages').
3656
3657         * camel-store.c (construct): new function, cascade up construct
3658         method and check for 'filter' param, and set accordingly for any
3659         one that might want it.
3660
3661         * providers/imap/camel-imap-store.c (construct): map the
3662         param_filter_inbox flag to the store->flags as
3663         CAMEL_STORE_FILTER_INBOX.
3664
3665         * camel-store.h (CAMEL_STORE_FILTER_INBOX): new flag to tell it to
3666         filter inbox.
3667
3668         * providers/imap/camel-imap-folder.h: Removed do_filtering flag
3669         from CamelImapFolder.
3670
3671         * providers/imap/camel-imap-folder.c (imap_update_summary): Remove
3672         the 'recents' parameter, use the 'changes' parameter instead to
3673         convey this info.
3674         (camel_imap_folder_changed): Changed for update_summary api
3675         change.  Now always just emit the changed event if we have any
3676         changes to report, filtering code removed, handled upstream.
3677         (filter_proc): 
3678         (filter_free): Removed old filtering code.
3679         (camel_imap_folder_new): Set the filter_recent flag on the folder
3680         if we're the inbox and filtering of inbox is enabled.
3681
3682         * camel-folder.c (folder_changed): If we have 'recent' messages,
3683         and are set to filter recents, then freeze the folder and launch a
3684         thread to do the processing (or similar if threading not enabled).
3685         (thaw): Make sure we emit the changed signal outside of owning the
3686         lock and if things have changed.  Also, no longer bother
3687         downgrading folder_changed events to message_changed events.
3688
3689         * camel-folder.h (struct _CamelFolder): Added filter_recent flag
3690         -> signifies all recent messages in folder should be filtered.
3691
3692         * camel-session.c: (camel_session_thread_msg_new,
3693         camel_session_thread_msg_free, camel_session_thread_queue,
3694         camel_session_thread_wait): code to handle async operations as
3695         part of camel processing.
3696         (camel_session_finalise): free thread_lock, destroy thread, active
3697         hash, etc.
3698         (camel_session_init): init thread, active hash, etc.
3699         (camel_session_class_init): Init virtual functions.
3700         (session_thread_msg_new, session_thread_msg_free,
3701         session_thread_destroy, session_thread_received,
3702         session_thread_queue, session_thread_wait): default implementation
3703         of session threads stuff.
3704
3705 2001-09-17    <NotZed@Ximian.com>
3706
3707         * camel-folder.c (camel_folder_change_info_recent_uid): New
3708         function to add a 'recent' uid to the change info.
3709         (camel_folder_change_info_clear): Clear recent list.
3710         (camel_folder_change_info_free): Free recent list.
3711         (camel_folder_change_info_new): Setup recent list.
3712
3713         * camel-folder.h: Added a uid_recent item to the folder_changed
3714         event data.
3715
3716         * providers/local/camel-maildir-store.c (scan_dir): Free new in
3717         the right block.
3718
3719         * providers/local/camel-local-provider.c: Add local config entries
3720         to filter on new messages in spool and maildir provider.
3721
3722         * camel-vee-folder.c (vee_folder_construct): Remove the assertion
3723         which stops ? in names from being allowed.
3724
3725 2001-09-18  Dan Winship  <danw@ximian.com>
3726
3727         * camel-data-wrapper.c (camel_data_wrapper_is_offline): Virtualize
3728         this.
3729
3730         * camel-medium.c (is_offline): A medium is offline if its content
3731         object is offline.
3732
3733         * camel-multipart.c (is_offline): A multipart is offline if any of
3734         its subparts are offline.
3735
3736 2001-09-18  Jeffrey Stedfast  <fejj@ximian.com>
3737
3738         * camel-charset-map.c: Added korean charset conversion.
3739
3740 2001-09-17  Jeffrey Stedfast  <fejj@ximian.com>
3741
3742         * providers/imap/camel-imap-store.c (delete_folder): Don't process
3743         the ImapResponse data, we don't want to block forever on data we
3744         don't care about...
3745         (create_folder): Use get_folders_online() instead of
3746         get_folder_info_online().
3747
3748         * camel-folder.c: Reverted previous changes.
3749
3750 2001-09-17  JP Rosevear  <jpr@ximian.com>
3751
3752         * Makefile.am: Helpful install-exec-hook debugging output
3753
3754 2001-09-16  Jeffrey Stedfast  <fejj@ximian.com>
3755
3756         * camel-folder.c (camel_folder_get_uri): New function to get the
3757         URI of a folder.
3758         (get_uri): Default implementation.
3759
3760 2001-09-14    <NotZed@Ximian.com>
3761
3762         * camel-vee-folder.c (camel_vee_folder_set_folders): New function,
3763         set the complete list of folders on a vfolder, all at once.
3764         (camel_vee_folder_set_expression): If we set the query to be the
3765         same thing, dont do anything.
3766
3767         * camel-vee-store.c (camel_vee_store_init): Turn off vtrash for
3768         this store.
3769
3770         * camel-store.c (camel_store_init): Enable vtrash by default via
3771         flags.
3772         (camel_store_get_trash): REturn NULL if the store doesn't support
3773         vtrash.
3774         (init_trash): Dont init if store doesn't support vtrash.
3775
3776         * camel-store.h: Add a new flags CAMEL_STORE_VTRASH -> store
3777         supports vtrash.
3778
3779 2001-09-13    <NotZed@Ximian.com>
3780
3781         * camel-vee-store.c (vee_get_folder_info): Implement.
3782         (build_info): Used to build a folder record from the folders
3783         hashtable.
3784         (vee_delete_folder): Implemented, remove folder from hashtable.
3785         (vee_rename_folder): Implemented, remove old folder from
3786         hashtable, add new one and rename its guts too.
3787
3788         * camel-store.c (camel_store_rename_folder): Do nothing if we're
3789         not asked to actually change names.  Also dont do the renamed
3790         cache check till after we've called the subclass.
3791         (camel_store_delete_folder): Call the subclass delete firs,t then
3792         make sure the cache is right.
3793
3794         * camel-vee-folder.c (vee_folder_construct): Remove support for
3795         name?query syntax to setup vfolder.  Abort if such syntax is used.
3796         (camel_vee_folder_new): Removed code that handles ? syntax, etc.
3797         (vee_folder_build_folder): Handle unset expression, treat it as an
3798         empty search.
3799         (camel_vee_folder_set_expression): Oops, actually set the
3800         expression.
3801
3802         * camel-vtrash-folder.c (camel_vtrash_folder_new): Dont use
3803         name?query syntax to setup vfolder, but set the expression
3804         directly.  Also fixes a small memleak.
3805
3806 2001-09-12    <NotZed@Ximian.com>
3807
3808         * camel-store.c (camel_store_delete_folder): Fixed warnings with a
3809         cast.
3810         (camel_store_rename_folder): "
3811
3812 2001-09-14  Jeffrey Stedfast  <fejj@ximian.com>
3813
3814         * camel-url.c (camel_url_set_param): Use g_datalist_set_data_full
3815         so that the data will be free'd when we clear the list.
3816
3817 2001-09-14  Dan Winship  <danw@ximian.com>
3818
3819         * camel-file-utils.c (camel_file_util_encode_string,
3820         camel_file_util_decode_string): Don't claim failure when
3821         reading/writing the empty string.
3822
3823 2001-09-14  JP Rosevear  <jpr@ximian.com>
3824
3825         * Makefile.am: use install hook instead of install rule to
3826         guarantee we run after installation
3827
3828 2001-09-13  Jeffrey Stedfast  <fejj@ximian.com>
3829
3830         * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't
3831         reuse the exception if it has already been set.
3832         (camel_filter_driver_filter_message): Same here. Also use the new
3833         return value from camel_filter_search_match().
3834
3835         * camel-filter-search.c (camel_filter_search_match): Return an
3836         integer (matched, no-match, or error).
3837
3838         * providers/local/camel-mbox-folder.c (mbox_append_message): Do
3839         error-checking based on function return values rather than
3840         exceptions as it's possible for them to be NULL.
3841         (mbox_get_message): Same.
3842
3843         * providers/imap/camel-imap-folder.c (imap_append_offline): Pass
3844         an exception to the cache.
3845         (imap_append_online): Same.
3846         (imap_append_resyncing): Here too.
3847         (imap_copy_offline): And here.
3848         (handle_copyuid): Pass NULL as the exception here...
3849         (parse_fetch_response): And finally here.
3850
3851         * providers/imap/camel-imap-message-cache.c
3852         (camel_imap_message_cache_insert):
3853         (insert_setup):
3854         (camel_imap_message_cache_insert_stream):
3855         (camel_imap_message_cache_insert_wrapper):
3856         (camel_imap_message_cache_copy): Take an exception argument and
3857         set it on error.
3858
3859         * camel-mime-part-utils.c
3860         (simple_data_wrapper_construct_from_parser): Convert the charset
3861         to the iconv-friendly name.
3862
3863         * camel-charset-map.c (camel_charset_to_iconv): Add code to
3864         convert windows-[cp]#### charsets to their iconv-friendly format
3865         of cp####.
3866
3867         * camel-pgp-context.c (crypto_exec_with_passwd): Return -1 on
3868         failure.
3869
3870 2001-09-12  Larry Ewing  <lewing@ximian.com>
3871
3872         * camel-filter-driver.c (camel_filter_driver_filter_mbox): free
3873         the source url in the nonfailure case.
3874
3875 2001-09-12    <NotZed@Ximian.com>
3876
3877         * camel-folder-search.h: Change the 'not' virtual method from an
3878         immediate e-sexp function to a non-immediate one, which is what it
3879         should be.
3880
3881         * camel-folder-search.c (search_not): Implement a 'not' function
3882         ourselves.  If 'not' on a vector value, then not over all items
3883         in the summary.
3884         (builtings[]): Change the 'not' builtin to be a non-immediate
3885         function.
3886
3887 2001-09-12  Jeffrey Stedfast  <fejj@ximian.com>
3888
3889         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Unref
3890         the message info.
3891
3892 2001-09-10    <NotZed@Ximian.com>
3893
3894         * providers/local/camel-maildir-store.c (get_folder_info): Pass in
3895         a hashtalbe used for finding visited nodes.
3896         (inode_hash): 
3897         (inode_equal): 
3898         (inode_free): Helper functions for visited node checks, hashes on
3899         inode + device number.
3900         (scan_dir): Dont re-visited directories we've already visited, use
3901         inodes + device number.
3902         Also, if the folder doesn't contain cur/tmp/new, mark it as
3903         noselect, but continue to recurse folders, if asked.
3904
3905         * camel-folder.c (move_messages_to): Progress reporting while
3906         moving messages.
3907
3908         * camel-store.c (camel_store_delete_folder): Make sure we remove
3909         the folder from our vtrash, if we have it in our opened set, and
3910         also remove it from our hashtable.
3911         (camel_store_rename_folder): Remove the old folder name from the
3912         folder cahce, if it is there.
3913
3914 2001-09-10  Jeffrey Stedfast  <fejj@ximian.com>
3915
3916         * camel-charset-map.c (camel_charset_to_iconv): Get rid of the
3917         g_warning, we no longer really need that.
3918
3919 2001-09-10    <NotZed@Ximian.com>
3920
3921         * providers/imap/camel-imap-store.c (camel_imap_msg_new): Forgot
3922         to return the newly allocated msg.
3923
3924 2001-09-08  Not Zed  <NotZed@Ximian.com>
3925
3926         * providers/local/camel-spool-summary.c (spool_summary_sync_full):
3927         Likewise.
3928
3929         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3930         Fix the wording.
3931
3932         * camel-tcp-stream-raw.c (stream_read): Save errno around fcntl
3933         call in cancellable read case.  Also, loop while we get EINTR.
3934         This might fix some weird reconnect behaviour with pop.
3935         (stream_write): "
3936
3937 2001-09-07  Jeffrey Stedfast  <fejj@ximian.com>
3938
3939         * camel-tcp-stream-ssl.c (ssl_bad_cert): #if 0 out the code that
3940         was hopefully going to fix bug #5325 because the functions I used
3941         seem to have been deprecated. *sigh*.
3942
3943         * camel-remote-store.c (camel_remote_store_finalise): Disconnect
3944         from the service here otherwise the locks will be destroyed and by
3945         the time CamelService finalizes we'll crash or hang.
3946
3947         * providers/smtp/camel-smtp-transport.c (smtp_data): Make sure to
3948         unref the mime filters when we finish with them.
3949
3950 2001-09-07  Ettore Perazzoli  <ettore@ximian.com>
3951
3952         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
3953         s/Synchronising/Synchronizing/.
3954         (mbox_summary_sync_quick): Likewise.
3955         (summary_rebuild): s/Summarising/Summarizing/.
3956
3957 2001-09-07  Jeffrey Stedfast  <fejj@ximian.com>
3958
3959         * camel-multipart.c (camel_multipart_set_boundary): Take a const
3960         char * instead of a char *.
3961
3962         * camel-mime-part-utils.c
3963         (camel_mime_part_construct_content_from_parser): Reuse the
3964         original boundary instead of generating our own.
3965
3966 2001-09-06    <NotZed@Ximian.com>
3967
3968         * providers/imap/camel-imap-folder.c (filter_proc): Thread
3969         function to perform filtering.
3970         (filter_free): Free the filter object.
3971         (camel_imap_folder_changed): If we have threads enabled, then
3972         queue up a request to perform filtering.  For bug #4422.
3973
3974         * providers/imap/camel-imap-store.c (camel_imap_msg_new): Create a
3975         new 'imap msg'.
3976         (camel_imap_msg_queue): Queue an 'imap msg'.
3977         (async_received): Handle receiving of imap msg in async thread.
3978         (async_destroy): Handle destroying of imap msg.
3979         (camel_imap_store_finalize): Destroy thread when done.
3980         (camel_imap_store_init): Setup thread.
3981
3982         * providers/imap/camel-imap-store.h: Added an ethread to the
3983         store, for async processing.
3984
3985 2001-09-06  Jeffrey Stedfast  <fejj@ximian.com>
3986
3987         * camel-remote-store.c (remote_recv_line): Use
3988         camel_stream_buffer_read_line() instead of duplicationing the
3989         functionality. Also, the previous way was broken anyway. What if a
3990         line was the same length as our buffer? Then we'd go and read a
3991         second line and a third and so on until they weren't the same
3992         length, leaving \r's in the middle of the buffer.
3993
3994 2001-09-06  Dan Winship  <danw@ximian.com>
3995
3996         * providers/pop3/camel-pop3-store.c (pop3_get_response): Fix this
3997         to always set an exception if it returns POP3_FAIL, as documented.
3998
3999         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4000         Revert.
4001
4002 2001-09-06  Jeffrey Stedfast  <fejj@ximian.com>
4003
4004         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4005         Set an exception on POP3_FAIL as well.
4006
4007 2001-09-06  Dan Winship  <danw@ximian.com>
4008
4009         * providers/pop3/camel-pop3-provider.c: #ifdef out the "delete
4010         after N days" option in pop3_conf_entries, since it won't be done
4011         for 1.0.
4012
4013 2001-09-04  Jeffrey Stedfast  <fejj@ximian.com>
4014
4015         * camel-remote-store.c (remote_disconnect): Too late to sync the
4016         folders here... if this is gonna happen at all it should be done
4017         in the provider.
4018
4019         * camel-service.c (camel_service_finalize): Do a clean disconnect.
4020
4021 2001-08-30  Jeffrey Stedfast  <fejj@ximian.com>
4022
4023         * providers/local/camel-spool-store.c (get_inbox): Return the
4024         default folder (ie. INBOX) rather than saying we don't support an
4025         inbox.
4026
4027         * camel-tcp-stream-ssl.c: #include pk11func.h.
4028         (ssl_bad_cert): Use CERT_GetDefaultCertDB.
4029
4030 2001-08-29  Jeffrey Stedfast  <fejj@ximian.com>
4031
4032         * camel-smime-context.c (smime_sign_prepare): Do the same here as
4033         what we did in the pgp code a moment ago.
4034         (smime_sign_restore): And again here.
4035         (smime_sign): And update thise code to pass in the address of the
4036         encodings list when restoring parts.
4037
4038         * camel-pgp-mime.c (pgp_mime_part_sign_prepare_part): Special-case
4039         message/rfc822 mime parts - don't set an encoding on these,
4040         instead traverse into their subparts and set the encodings for
4041         those.
4042         (pgp_mime_part_sign_restore_part): Reverse any operations done to
4043         message/rfc822 parts in the above prepare_part() function and also
4044         take a pointer to a GSList of encodings instead of just a GSList
4045         so we can properly keep track of which encoding we are on.
4046         (camel_pgp_mime_part_sign): Pass in the address to the encodings
4047         list when restoring parts.
4048
4049 2001-08-29  Not Zed  <NotZed@Ximian.com>
4050
4051         * providers/pop3/camel-pop3-folder.c (pop3_sync): Add progress
4052         reporting to deleting messages.  Dont change the calculation to a
4053         bloody float.  Bug #6189.
4054
4055 2001-08-28  Jeffrey Stedfast  <fejj@ximian.com>
4056
4057         * camel-pgp-context.c (crypto_exec_with_passwd): Initialize buf
4058         and diag_buf to NULL, hopefully this fixes the crash if the
4059         select() times out.
4060         (pgp_encrypt): Argh. What was I thinking? Don't use "-r recipient"
4061         as an argument, instead use "-r" and "recipient" as 2 separate
4062         arguments to pgp. This might fix the "gpg only encrypts to my
4063         private key" bug?
4064
4065 2001-08-28  Peter Williams  <peterw@ximian.com>
4066
4067         * providers/imap/camel-imap-store.c (create_folder): Whoops.
4068         Double-free and FMR = bad.
4069
4070         * camel-remote-store.c (remote_send_string): Don't reveal the
4071         user's IMAP password if their server supports LITERALPLUS. Also
4072         add some more dashes to make it line up nicely :-)
4073
4074 2001-08-28  Jeffrey Stedfast  <fejj@ximian.com>
4075
4076         * camel-tcp-stream-ssl.c (ssl_bad_cert): If the user accepts the
4077         certificate, add it to the database as a trusted CA.
4078
4079 2001-08-28  Peter Williams  <peterw@ximian.com>
4080
4081         * camel-object.c (camel_object_unref): Make the locking more
4082         fine-grained on destruction; specifically, don't hold the
4083         type lock while calling the finalize functions.
4084
4085 2001-08-27  Jeffrey Stedfast  <fejj@ximian.com>
4086
4087         * providers/local/camel-local-provider.c: Changed the
4088         description/names of some of the local providers to try and
4089         clarify the meanings.
4090
4091         * providers/pop3/camel-pop3-provider.c: Simplify the POP
4092         description - we want short but sweet.
4093
4094         * providers/imap/camel-imap-provider.c: s/IMAPv4/IMAP
4095
4096 2001-08-27  Not Zed  <NotZed@Ximian.com>
4097
4098         * camel-mime-part-utils.c (convert_buffer): re-read the iconv man
4099         page, and treat the return value properly.  It returns the number
4100         of non-reversible conversions performed, not the number of output
4101         characters, sigh.
4102         (check_html_charset): Changed to just take a buffer of data, and
4103         not the mime parser.
4104         (simple_data_wrapper_construct_from_parser): Since we dont need
4105         the charset till we have all the data, search for the charset
4106         after we've read the data, if we have html data with no charset in
4107         the header.
4108         (simple_data_wrapper_construct_from_parser): Remove the
4109         seekable_source stuff.
4110
4111         * Re-apply patches from before.
4112
4113 2001-08-25  Not Zed  <NotZed@Ximian.com>
4114
4115         ["Summarising" and "Synchronising" are spelt with a "s" in
4116         ENGLISH]
4117
4118         * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
4119         s/Synchronizing/Synchronising/.
4120
4121         * providers/local/camel-mbox-summary.c (summary_rebuild):
4122         s/Summarizing/Summarising/
4123
4124 2001-08-24  Jeffrey Stedfast  <fejj@ximian.com>
4125
4126         * camel-disco-diary.c (camel_disco_diary_replay): Use fseek
4127         instead of fseeko since we want to be portable and use ftell
4128         rather than ftello for the same reason.
4129         (camel_disco_diary_empty): Same here.
4130
4131 2001-08-24  Peter Williams  <peterw@ximian.com>
4132
4133         * Revert Not Zed's previous commits as they apparently can cause
4134         serious data loss for POP3 users.
4135         
4136 2001-08-24  Ettore Perazzoli  <ettore@ximian.com>
4137
4138         ["Summarizing" and "Synchronizing" are spelt with a "z" in the
4139         default locale, that happens to be "en_US".]
4140
4141         * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
4142         s/Synchronising/Synchronizing/.
4143
4144         * providers/local/camel-mbox-summary.c (summary_rebuild):
4145         s/Summarising/Summarizing/
4146
4147 2001-08-24  Not Zed  <NotZed@Ximian.com>
4148
4149         * camel-mime-part-utils.c (convert_buffer): Limit the maximum
4150         output buffer size.  iconv bugs?  returns E2BIG forever on some
4151         (valid) data?
4152
4153         * providers/local/camel-spool-summary.c (summary_rebuild):
4154         Likewise.
4155
4156         * providers/local/camel-mbox-summary.c (summary_rebuild):
4157         Summarising is spelt with an s.
4158
4159 2001-08-23  Not Zed  <NotZed@Ximian.com>
4160
4161         * camel-mime-part.c (write_to_stream): If we have rawtext, then
4162         dont do any charset conversion, only encoding/crlf conversion.
4163
4164         * camel-data-wrapper.h (struct _CamelDataWrapper): Added 'rawtext'
4165         member, says the character encoding is raw, not utf8.
4166
4167         * providers/local/camel-spool-summary.c
4168         (spool_summary_sync_quick): Synchronising is spelt with an s, not
4169         a z.
4170         (spool_summary_sync_full): "
4171
4172         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4173         No, synchronising is spelt with an s.
4174         (mbox_summary_sync_quick): "
4175
4176         * camel-mime-part-utils.c
4177         (camel_mime_part_construct_content_from_parser): Remove the
4178         warnings which aren't going anywhere fast.
4179         (convert_buffer): Function to convert a bytearray of textual
4180         content from one charset to another.  If the charset doesn't exist
4181         or fails, then do no conversion.
4182         (simple_data_wrapper_construct_from_parser): First, read in data,
4183         then try and convert it using the specified charset if supplied.
4184         If that fails, then dont do any conversion, and leave as raw.
4185         Also, if we have any x-* charsets, then dont do any processing.
4186
4187 2001-08-23  Peter Williams  <peterw@ximian.com>
4188
4189         * providers/local/camel-mbox-summary.c (summary_rebuild): Add a
4190         missing \n to the end of a printf.
4191
4192         * providers/local/camel-spool-summary.c (summary_rebuild): Same.
4193
4194 2001-08-22  Jeffrey Stedfast  <fejj@ximian.com>
4195
4196         * providers/pop3/camel-pop3-folder.c (pop3_generate_uids):
4197         Oops. Fixed a mis-use of GPtrArray. If we set_size, then using
4198         g_ptr_array_add will assume `size' elements have already been
4199         initialized and will start appending on to the end.
4200
4201 2001-08-21  Jeffrey Stedfast  <fejj@ximian.com>
4202
4203         * camel-pgp-context.c (pgp_verify): Turn on --batch and reenable
4204         gpg keyserver lookups.
4205         (pgp_decrypt): Disable keyserver lookups if we are disconnected.
4206
4207 2001-08-21  Dan Winship  <danw@ximian.com>
4208
4209         * camel-folder-thread.c
4210         (camel_folder_thread_messages_new_summary): Fix the duplicate
4211         message check so it doesn't mess up threading when a reply appears
4212         in the folder before the message it's a reply to. Fixes bug #3357.
4213         (camel_folder_thread_messages_new): Likewise, although I don't
4214         think this function is used any more.
4215
4216 2001-08-20  JP Rosevear  <jpr@ximian.com>
4217
4218         * Makefile.am: build a static camel for the addressbook conduit
4219
4220 2001-08-20  Ettore Perazzoli  <ettore@ximian.com>
4221
4222         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4223         s/Synchronising/Synchronizing/.
4224         (mbox_summary_sync_quick): Likewise.  *
4225         providers/local/camel-spool-summary.c (spool_summary_sync_full):
4226         Likewise.
4227         (spool_summary_sync_quick): Likewise.
4228
4229 2001-08-20  Jeffrey Stedfast  <fejj@ximian.com>
4230
4231         * providers/imap/camel-imap-store.c (create_folder): Get the
4232         entire directory structure for the folder we just created, meaning
4233         if we created a folder named "test.mailbox" where test didn't
4234         previously exist, get the listing for "test" and "test.mailbox".
4235
4236         * providers/imap/camel-imap-utils.c (imap_parse_folder_name): New
4237         function.
4238
4239 2001-08-19  Chris Toshok  <toshok@ximian.com>
4240
4241         * camel-store.h: #include <sys/types.h> for mode_t on freebsd.
4242
4243 2001-08-19  Jeffrey Stedfast  <fejj@ximian.com>
4244
4245         * providers/pop3/camel-pop3-folder.c (pop3_generate_uids): Make
4246         sure the generated UID is non-NULL before appending it to the
4247         array of UIDs. How would this even happen? I have no clue...
4248
4249 2001-08-17  Jeffrey Stedfast  <fejj@ximian.com>
4250
4251         * providers/imap/camel-imap-folder.c (imap_update_summary): Start
4252         scanning new messages at maxuid + 1 rather than uidval + 1? Maybe
4253         I'm missing the logic, but anyways...this might fix bug #5348.
4254
4255 2001-08-16  Jeffrey Stedfast  <fejj@ximian.com>
4256
4257         * providers/imap/camel-imap-store.c (imap_keepalive): If we are
4258         online and message flags have changed in the current folder, sync
4259         the flags else do a NOOP. This fixes bug #4666. Also lock around
4260         the NOOP command.
4261
4262         * providers/imap/camel-imap-folder.c (imap_sync_online): Don't
4263         ever send "STORE FLAGS.SILENT ()" since Cyrus imapd doesn't like
4264         this (and maybe others too?) so what we'll do instead is to send
4265         "STORE -FLAGS.SILENT (\Seen \Answered \Deleted \Marked)" to clear
4266         all the flags (since this is in essence what we want to do
4267         anyway).
4268
4269 2001-08-16  Peter Williams  <peterw@ximian.com>
4270
4271         * providers/imap/camel-imap-store.c (imap_connect_online): Fix
4272         this again. Sigh. Problem of namespace = "" may not yet be
4273         completely solved.
4274
4275 2001-08-15  Peter Williams  <peterw@ximian.com>
4276
4277         * camel-tcp-stream-openssl.c (ssl_error_to_errno): New
4278         function. Try to approximate the SSL error into errno.
4279         (errlib_error_to_errno): New function, try to approximate
4280         OpenSSl's error library's error (ERR_*) into errno.
4281         (stream_read): Try to set errno using ssl_error_to_errno.
4282         (stream_write): Same.
4283         (open_ssl_connection): Same.
4284
4285         * providers/imap/camel-imap-store.c (imap_connect_online): Oh
4286         crap, huge killer typo.
4287
4288 2001-08-14  Peter Williams  <peterw@ximian.com>
4289
4290         * providers/imap/camel-imap-store.c (imap_connect_online):
4291         Canonicalize store->namespace to end in store->dir_sep, once both
4292         values are known. The %F-related code makes this
4293         assumption. Probably fixes a bug reported on the mailing list.
4294
4295 2001-08-13  Jeffrey Stedfast  <fejj@ximian.com>
4296
4297         * camel-store.c (camel_store_get_folder): After talking to NotZed,
4298         it turns out I was wrong after all.
4299         (store_sync): Create a copy of the folder-cache that owns a ref on
4300         each of the folders so that if one of the folders get's finalized
4301         inside store_sync(), we don't run into any locking issues. This is
4302         mostly meant to solve a problem in IMAP (#6089).
4303
4304 2001-08-13  Peter Williams  <peterw@ximian.com>
4305
4306         * providers/imap/camel-imap-store.c (delete_folder): Fix a leak.
4307
4308         * providers/imap/camel-imap-utils.c (imap_namespace_concat): Bleah,
4309         handle when namespace = NULL (can happen upon initial open of mailbox.)
4310
4311         * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): 
4312         Don't crash when %F'ing with an empty folder name and NULL namespace.
4313
4314 2001-08-13  Jeffrey Stedfast  <fejj@ximian.com>
4315
4316         * camel-store.c (camel_store_get_folder): We need to be ref'ing
4317         the folder if/when we add it to the hash. This may fix bug #6089?
4318         (camel_store_get_folder): Nevermind, reverted the fix.
4319         (camel_store_get_folder): No, I wasn't on crack before after
4320         all...if we don't ref here, then we're open to a race condition
4321         later.
4322
4323 2001-08-11  Ettore Perazzoli  <ettore@ximian.com>
4324
4325         * providers/local/camel-spool-summary.c (summary_rebuild):
4326         s/summarising/summarizing/.
4327         (summary_rebuild): Likewise.
4328
4329         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
4330         s/summarise/summarize/.
4331         (mbox_summary_sync_quick): Likewise.
4332         (summary_rebuild): Likewise.
4333         (mbox_summary_check): Likewise.
4334
4335 2001-08-10  Jeffrey Stedfast  <fejj@ximian.com>
4336
4337         * providers/imap/camel-imap-utils.c (imap_quote_string): Added an
4338         assert - at this point a backtrace would be more useful than a
4339         transaction log for debugging.
4340
4341         * providers/imap/camel-imap-command.c (imap_command_start): Return
4342         FALSE here, not NULL.
4343         
4344         * providers/imap/camel-imap-folder.c (imap_rescan): Don't
4345         g_strdup() the uid into the trigger_event call.
4346
4347         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4348         Set the total bytes expected to 0 if the response is empty too.
4349         (pop3_refresh_info): Return of there was an error generating pop3
4350         uids.
4351
4352         * camel-mime-utils.c (header_raw_check_mailing_list): regfree the
4353         pattern before continue'ing. This was showing up quite a bit under
4354         purify.
4355
4356 2001-08-09  Jeffrey Stedfast  <fejj@ximian.com>
4357
4358         * providers/imap/camel-imap-utils.c (imap_parse_string_generic): A
4359         quoted string cannot contain \n's so check for those as well.
4360         (imap_atom_specials): Update this to fix bug #6553.
4361
4362 2001-08-08  Jon Trowbridge  <trow@ximian.com>
4363
4364         * camel-filter-search.c (get_source): Remove trailing stuff from
4365         URLs before returning.  (Done in an evil way, not in the good way
4366         suggested by fejj. :)) (Bug #4876)
4367
4368 2001-08-08  jacob berkman  <jacob@ximian.com>
4369
4370         * camel-search-private.c (camel_search_header_match): check for
4371         NULL name and addr (fixes a bug i was about to report)
4372
4373 2001-08-08  Not Zed  <NotZed@Ximian.com>
4374
4375         * camel-filter-search.c (check_header): Properly determine match
4376         type to pass to header_match.
4377         (address_matches_exactly): Removed, effectively added to
4378         camel_search_header_match.
4379
4380         * camel-folder-search.c (check_header): Properly determine the
4381         match type to pass to header_match.
4382
4383         * camel-search-private.c (camel_search_header_match): Add a new
4384         parameter 'type' which is the type of header we're matching
4385         against.  ASIS means utf8 format, ADDRESS means an internet
4386         address ('formatted'), ADDRESS_ENCODED means a raw address header,
4387         ENCODED means rfc 2047 encoded text.
4388         (header_match): Move original logic here, have search_header_match
4389         call it as appropriate for the 'type' of match.
4390
4391 2001-08-07  Not Zed  <NotZed@Ximian.com>
4392
4393         * camel-session.c (camel_session_class_init): Only init the vee
4394         provider struct once (if we're subclassed this will get called
4395         multiple times).
4396
4397         * camel-object.c (obj_finalize): Removed a bit of a debug that
4398         crept in with jacob's poolv patch (?).
4399
4400 2001-08-07  Jeffrey Stedfast  <fejj@ximian.com>
4401
4402         * camel-filter-search.c (address_matches_exactly): New function to
4403         do danw's address "is" comparison (as specified in bug #5886.
4404         (check_header): Special-case address-type headers when we are
4405         doing an exact match to use the address_matches_exactly function.
4406
4407 2001-08-06  Jeffrey Stedfast  <fejj@ximian.com>
4408
4409         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4410         Modify to take a headers_only argument which will then only fetch
4411         message headers.
4412         (pop3_generate_uids): Pass in TRUE for headers_only.
4413         (pop3_get_message): Pass in FALSE for headers_only and move the
4414         camel_operation() stuff out of get_message_stream and in to here
4415         instead.
4416         (pop3_generate_uids): We also need to be using i+ 1 as the id
4417         since we are starting at 0.
4418
4419 2001-08-06  Jeffrey Stedfast  <fejj@ximian.com>
4420
4421         * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream):
4422         New internal function to get a message stream by message sequence
4423         id (so that we can share code between pop3_get_message and
4424         pop3_generate_uids).
4425         (pop3_get_message): Use pop3_get_message_stream.
4426         (pop3_generate_uids): New function to generate UIDs based on the
4427         message - this fixes bug #1256.
4428         (pop3_refresh_info): If the server doesn't support UIDL, call
4429         pop3_generate_uids to get our list of UIDs.
4430
4431         * providers/imap/camel-imap-store.c (get_folder_info_online):
4432         Don't strstr for noselect=yes, that's just plain broken.
4433
4434 2001-08-06  Dan Winship  <danw@ximian.com>
4435
4436         * providers/imap/camel-imap-folder.c (imap_rescan): Fix off-by-one
4437         error in cleaning up deleted messages at the end of the folder.
4438         Fixes bug #5585 and maybe others.
4439
4440         * providers/imap/camel-imap-store.c (get_folder_info_online): Do a
4441         refresh_info on the selected folder before looking at its unread
4442         count. Should fix bug #4944.
4443
4444 2001-08-06  Peter Williams  <peterw@ximian.com>
4445
4446         Completely hide the namespace from everything external to the IMAP
4447         code, which Dan W says is the way it should be.
4448         
4449         * providers/imap/camel-imap-command.c
4450         (imap_command_strdup_vprintf): Add a new %F argument, which is like
4451         %S but will add the namespace (for folder names).
4452         (camel_imap_command): Use %F here.
4453
4454         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
4455         Changed to strip out the namespec when returning *folder. In order
4456         to do this we need to be passed the CamelImapStore.
4457         (imap_concat): Move to here from camel-imap-store.c, un-static
4458         (imap_namespace_concat): New function, adds the namespace to the 
4459         folder name, unless it's INBOX.
4460         
4461         * providers/imap/camel-imap-utils.h: Prototypes.
4462
4463         * providers/imap/camel-imap-store.c (imap_connect_online): Extra
4464         arg to imap_parse_list_response.
4465         (imap_connect_offline): Here too.
4466         (get_folder_status): Use %F.
4467         (get_folder_online): Here too.
4468         (delete_folder): Here too.
4469         (create_folder): Here too, and arg to imap_parse_list_response.
4470         (parse_list_response_as_folder_info): Arg to i_p_l_r.
4471         (get_subscribed_folders_by_hand): Use %F.
4472         (get_folders_online): Here too.
4473         (get_folder_info_online): Instead of checking for NULL @name, check
4474         for name = NULL or "", and set to "" instead of namespace. Pass ""
4475         instead of namespace to camel_folder_info_build.
4476         (subscribe_folder): Use %F.
4477         (unsubscribe_folder): Here too.
4478
4479         * providers/imap/camel-imap-folder.c (imap_get_full_name): This
4480         now just returns folder->full_name.
4481         (do_append): Use %F
4482         (do_copy): Here too.
4483
4484 2001-08-06  Jeffrey Stedfast  <fejj@ximian.com>
4485
4486         * camel-pgp-context.c (pgp_verify): Always do --no-auto-key-retrieve.
4487
4488 2001-08-03  Jeffrey Stedfast  <fejj@ximian.com>
4489
4490         * camel-pgp-context.c (pgp_verify): Minor changes to the iconv
4491         code so that it does the check in the return value of iconv() just
4492         like the code in camel-mime-utils.c in case this fixes Bo Rosen's
4493         gpg bugs (but I doubt this will change anything?).
4494
4495 2001-08-03  Jeffrey Stedfast  <fejj@ximian.com>
4496
4497         * providers/smtp/camel-smtp-transport.c (smtp_connect): First
4498         check to make sure that service->url->authmech is non-NULL before
4499         passing it into strcmp to avoid a segfault.
4500
4501         * camel-pgp-context.c (pgp_decrypt): Sigh, if gpg returns '1' it
4502         means that the key is bad but it did succeede in decrypting the
4503         block so to make users happy (even though I find this a
4504         questionable action) we are going to ignore the error and show it
4505         to the user anyway. This fixes bug #6136.
4506
4507 2001-08-03  Not Zed  <NotZed@Ximian.com>
4508
4509         * providers/smtp/camel-smtp-transport.c (smtp_connect): special
4510         case popb4smtp auth before we try and connect, and do the magic
4511         here first.
4512
4513 2001-08-02  Not Zed  <NotZed@Ximian.com>
4514
4515         * providers/smtp/camel-smtp-transport.c (smtp_connect): Check for
4516         POPB4SMTP separate to the esmtp auth list.
4517         (smtp_auth): If creating the sasl object means it is
4518         already authenticated, then exit early.  Sort of 'clean hack' to
4519         help popb4smtp work.
4520         (smtp_auth): Unref the sasl object, clean up a memleak i think.
4521
4522         * providers/smtp/camel-smtp-provider.c
4523         (camel_provider_module_init): Added POPB4SMTP auth type.
4524
4525         * camel-sasl.c (camel_sasl_authtype): Added POPB4SMTP type.
4526
4527         * camel-sasl-popb4smtp.c: New file for pop before smtp
4528         'authentication'.
4529
4530         * Makefile.am (libcamel_la_SOURCES, HEADERS): Add
4531         camel-sasl-popb4smtp.[ch].
4532
4533 2001-08-01  Not Zed  <NotZed@Ximian.com>
4534
4535         * providers/local/camel-mbox-folder.c (mbox_lock): If we fail to
4536         get the lock, make sure we close our locking fd, and reset it.
4537         Fixes the crash part of 5095.
4538
4539         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4540         Slightly re-arranged filter/change notification logic.  If we;re
4541         filtering, freeze the folder till we're finished to smooth the ui
4542         for new mail.
4543
4544 2001-07-31  Not Zed  <NotZed@Ximian.com>
4545
4546         * camel-folder.c (camel_folder_init): Chagned mutexes to
4547         e_mutexes, folder lock recursive.  This fixes the imap filtering
4548         bug, or at least some cases of it.
4549         (camel_folder_finalize): Free mutexes.
4550
4551         * camel-private.h (CamelFolderPrivate): Changed mutexes to
4552         e_mutexes.
4553
4554 2001-07-25  Not Zed  <NotZed@Ximian.com>
4555
4556         * camel-folder.c (camel_folder_change_info_*): Change the
4557         return if fail's into asserts.
4558         (camel_folder_change_info_free): Don't let it accept a NULL
4559         argument.  This isn't g_lib so we dont have to.
4560
4561 2001-07-27  Jeffrey Stedfast  <fejj@ximian.com>
4562
4563         * camel-mime-utils.c (header_decode_param): Fix the fix that fixes
4564         broken mailer behavior. We want to make sure that the user's
4565         locale charset is non-NULL before we pass it off to
4566         iconv_open(). If it *is* NULL, we want to use iso-8859-1.
4567
4568 2001-07-26  Jeffrey Stedfast  <fejj@ximian.com>
4569
4570         * camel-url.c (camel_url_free): Allow the url to be NULL just like
4571         the libc free convention.
4572
4573 2001-07-26  Dan Winship  <danw@ximian.com>
4574
4575         * providers/imap/camel-imap-command.c (camel_imap_command_start):
4576         Send an IMAP command, but don't wait for responses.
4577         (camel_imap_command_response): Read a single line of response from
4578         the server.
4579         (camel_imap_command, etc): Reimplement in terms of the new code.
4580
4581         * providers/imap/camel-imap-folder.c (imap_rescan): Use
4582         camel_imap_command_start and camel_imap_command_response, and
4583         call camel_operation_progress after each line read from the
4584         server.
4585         (imap_update_summary): Likewise, although with more fudging on the
4586         precentages... Also, fix this so that if none of the new messages
4587         are cached, it only does a single FETCH, and if some of them are
4588         cached, it does two FETCHes (one to get the UIDs, FLAGS, and
4589         SIZEs, and another to get the bodies of all of the messages that
4590         aren't cached now that it knows the relevant UIDs). This should
4591         speed up startup a bunch (especially if you have high bandwidth
4592         but also high latency to the IMAP server).
4593
4594 2001-07-25  Dan Winship  <danw@ximian.com>
4595
4596         * camel-mime-utils.c (mail_mlist_magic): Add another Sender
4597         pattern.
4598
4599 2001-07-24  Not Zed  <NotZed@Ximian.com>
4600
4601         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4602         Change the break into a continue, we should process as many as we
4603         can find.
4604
4605         * camel-folder.c (camel_folder_move_messages_to): If we have no
4606         uid's to copy, exit here before going any further.  Some code
4607         internally [imap] assumes there are uids to copy otherwise it can
4608         segfault.
4609         (camel_folder_copy_messages_to): Same.
4610
4611 2001-07-24  Jeffrey Stedfast  <fejj@ximian.com>
4612
4613         * camel-mime-utils.c (header_decode_param): Handle broken mailers
4614         that send unencoded 8bit header params. And there was much
4615         rejoicing. Rah.
4616
4617         * camel-url.h (CAMEL_URL_HIDE_ALL): New #define, and there was
4618         much rejoicing. Rah.
4619
4620 2001-07-24  Not Zed  <NotZed@Ximian.com>
4621
4622         * camel-operation.c (camel_operation_register, unregister): Added
4623         some warnings for bad cases.
4624
4625 2001-07-23  Not Zed  <NotZed@Ximian.com>
4626
4627         * camel-operation.c (camel_operation_register): Only insert a hash
4628         entry if we haven't already.
4629         (camel_operation_unregister): Only remove the has entry if the id
4630         is a real thread.
4631
4632 2001-07-23  Jeffrey Stedfast  <fejj@ximian.com>
4633
4634         * camel-filter-driver.c (do_move): Slight fix for when source ==
4635         destination (we don't want to do this action because on-demand
4636         filtering would then delete the messages it supposedly "moved").
4637
4638 2001-07-23  Not Zed  <NotZed@Ximian.com>
4639
4640         * providers/smtp/camel-smtp-transport.c (smtp_auth, smtp_helo,
4641         send_to): Added some operation progress reporting.  Actual data
4642         transfer is 'tricky' because of the layers used.
4643         (smtp_auth): Instead of checking exception_is_set, use
4644         challenge==NULL to test if sasl_challenge_base64 failed.
4645
4646         * providers/local/camel-mbox-summary.c (mbox_summary_sync): Remove
4647         peters changes below and put in a better fix.  These functions
4648         already return -1 on error, just use that, and not worry about
4649         building our own exception redundantly.
4650
4651         * camel-service.c (camel_get_host_byname): Turn the progress into
4652         a transient event.
4653
4654 2001-07-20  Peter Williams  <peterw@ximian.com>
4655
4656         * providers/local/camel-mbox-summary.c (mbox_summary_sync): More
4657         usage fixes for CamelException. Check our own exception for
4658         summary_update and xfer it out if an error occurred.
4659
4660 2001-07-20  JP Rosevear  <jpr@ximian.com>
4661
4662         * Pull up test fixes to get them building again
4663
4664 2001-07-20  Not Zed  <NotZed@Ximian.com>
4665
4666         * camel-charset-map.c (camel_charset_get_iconv_friendly_name):
4667         renamed to camel_charset_to_iconv() to make it just a little more
4668         consistent and not so long & fixed callers.
4669
4670 2001-07-19  Jeffrey Stedfast  <fejj@ximian.com>
4671
4672         * camel-mime-filter-charset.c
4673         (camel_mime_filter_charset_new_convert): Convert to the
4674         iconv-friendly charset names.
4675
4676         * providers/imap/camel-imap-store.c (create_folder): Fixed a
4677         compiler warning about returning without a value in a non-void
4678         function. Blah.
4679
4680         * camel-mime-part.c (process_header): Pass the locale charset as
4681         the default_charset to header_decode_string().
4682
4683         * camel-folder-summary.c (camel_folder_summary_format_string):
4684         Pass the locale charset as the default_charset to
4685         header_decode_string().
4686         (content_info_new): Same.
4687
4688         * camel-mime-message.c (process_header): Pass the locale charset
4689         as the default_charset to header_decode_string().
4690
4691         * camel-mime-utils.c (append_8bit): New helper function who's
4692         purpose is similar to append_latin1() but for 8bit text that we
4693         are assuming is not latin1.
4694         (header_decode_text): Now takes a default_charset parameter and
4695         calls append_8bit when appropriate.
4696         (header_decode_string): Also takes a default_charset parameter
4697         now.
4698         (header_decode_mailbox): Pass NULL as the default_charset to
4699         header_decode_string().
4700
4701 2001-07-19  Jeffrey Stedfast  <fejj@ximian.com>
4702
4703         * camel-pgp-context.c (pgp_verify): Modified to treat the return
4704         value from camel_charset_locale_name() as a const char*.
4705
4706         * camel-sasl-digest-md5.c (digest_response): Modified to treat the
4707         return value from camel_charset_locale_name() as a const char*.
4708
4709         * camel-charset-map.c (camel_charset_locale_name): Modify to
4710         return const char* by returning the static locale_charset which is
4711         created inside of camel_charset_map_init().
4712         (camel_charset_map_init): Find the locale charset here and set the
4713         static variable.
4714
4715 2001-07-19  Peter Williams  <peterw@ximian.com>
4716
4717         Policy change: NULL url's are no longer allowed in
4718         CamelFolderInfos. They used to signify that the folder was, in
4719         IMAP jargon, NoSelect; now the same effect is achieved by adding a
4720         "noselect=yes" parameter to the end of the URL. As far as I know,
4721         IMAP is the only affected provider.
4722         
4723         * providers/imap/camel-imap-store.c (delete_folder): New
4724         function. Implement folder deletion.
4725         (camel_imap_store_class_init): Set the delete_folder class
4726         function here.
4727         (get_folder_status): New function. Utility wrapper around the
4728         STATUS command.
4729         (create_folder): If the parent folder is NoSelect but is empty,
4730         delete it and recreate it as a a subfolder-containing folder. If
4731         it is NoSelect but contains messages, set an exception.
4732         (parse_list_response_as_folder_info): Always set the FolderInfo's
4733         URL, but add a NoSelect parameter if it isn't selectable.
4734         (get_folder_info_online): Change logic of removing the namespace
4735         to reflect URL change. Same for logic of checking unread counts.
4736         (get_folder_info_online): Use get_folder_status to simplify this.
4737
4738         * camel-store.c (camel_folder_info_build): When creating dummy
4739         parents, copy the child's URL and set the NoSelect parameter.
4740
4741 2001-07-19  Jeffrey Stedfast  <fejj@ximian.com>
4742
4743         * camel-mime-part-utils.c
4744         (simple_data_wrapper_construct_from_parser): No need for
4745         `acharset' anymore.
4746         (check_html_charset): Return a const char* and also use
4747         camel_charset_get_iconv_friendly_name() internally.
4748
4749         * camel-mime-utils.c (rfc2047_decode_word): Remove my iso8859-1 ->
4750         iso-8859-1 hack and use camel_charset_get_iconv_friendly_name()
4751         instead.
4752         (rfc2184_decode): Use camel_charset_get_iconv_friendly_name()
4753
4754         * camel.c (camel_init): Call camel_charset_map_init().
4755
4756         * camel-charset-map.c (camel_charset_map_init): New function to
4757         initialize the charset-equivalent lookup table. To be called by
4758         camel_init().
4759         (camel_charset_get_iconv_friendly_name): New function to try and
4760         convert a charset into something that iconv is more likely to
4761         accept.
4762
4763 2001-07-19  Peter Williams  <peterw@ximian.com>
4764
4765         * Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's 
4766         request.
4767
4768 2001-07-17  Peter Williams  <peterw@ximian.com>
4769
4770         Clean up some exception misusage.
4771
4772         * providers/imap/camel-imap-command.c (camel_imap_command): Use
4773         our own internal exception for sending the string and transfer it
4774         to @ex if anything goes wrong.
4775         (imap_read_response): Use our own internal exception for reading
4776         the untagged responses and blah blah blah.
4777
4778         * camel-session.c (get_service): Use our own internal exception
4779         when constructing the service and transfer it to @ex if anything
4780         goes wrong.
4781
4782         * camel-remote-store.c (remote_recv_line): Instead of having
4783         gboolean exception, use our own internal exception and copy
4784         it to @ex if anything goes wrong.
4785
4786         * camel-store.c (store_sync): Create an internal exception
4787         because sync_folder() checks it for validity. Transfer it to
4788         @ex when done.
4789
4790         * camel-exception.c (camel_exception_get_description): If @ex is
4791         NULL, complain - passing NULL exceptions to Camel is okay, but
4792         there should be no circumstances under which they're then
4793         examined.
4794         (camel_exception_get_id): Same here,
4795         (camel_exception_xfer): NULL-protect and warn if transferring from
4796         a NULL exception.
4797         
4798 2001-07-17  Jeffrey Stedfast  <fejj@ximian.com>
4799
4800         * camel-store.c (init_trash): Use CAMEL_VTRASH_NAME.
4801
4802         * camel-vtrash-folder.h: #define CAMEL_VTRASH_NAME
4803
4804 2001-07-16  Dan Winship  <danw@ximian.com>
4805
4806         * providers/imap/camel-imap-command.c (camel_imap_response_free):
4807         Given:
4808                 * 4 EXISTS
4809                 * 1 EXPUNGE
4810         We have to pass 3, not 4 to camel_imap_folder_changed for the
4811         exists count. Fixes ximian bug #2112 (finally!).
4812
4813 2001-07-14  Jeffrey Stedfast  <fejj@ximian.com>
4814
4815         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
4816         If the message info for an expunged message is NULL, then just
4817         break out - maybe a message was expunged that we were never
4818         notified even existed?
4819
4820 2001-07-13  Jeffrey Stedfast  <fejj@ximian.com>
4821
4822         * camel-mime-utils.c (rfc2047_decode_word): Added a hack to
4823         convert charsets in the format iso8859-1 to iso-8859-1 because it
4824         seems to be more iconv friendly. It has been reported that on some
4825         systems, iconv doesn't know about iso8859-1 while it *does* know
4826         about iso-8859-1. See bug #4530.
4827
4828 2001-07-13  Peter Williams  <peterw@ximian.com>
4829
4830         * Makefile.am (install-exec-local): Let people install as
4831         non-root, but give them a bigass warning so they're not allowed to
4832         complain when it doesn't work right.
4833
4834         * camel-remote-store.c (sync_remote_folder): New function: hash
4835         table callback.
4836         (remote_disconnect): If cleanly disconnecting, sync our
4837         folders. Fixes deadlocks on exit (folders syncing after store
4838         disconnects) and also makes sense.
4839
4840 2001-07-13  Jeffrey Stedfast  <fejj@ximian.com>
4841
4842         * camel-uid-cache.c (camel_uid_cache_new): We now use a structure
4843         as the bucket data rather than just a cache level so set the save
4844         state to TRUE.
4845         (maybe_write_uid): We only save the uid if the cache levels are
4846         the same *and* if the save state is TRUE.
4847         (free_uid): Free the state value.
4848         (camel_uid_cache_get_new_uids): New uids that get added to the
4849         cache start with a save state of FALSE.
4850         (camel_uid_cache_save_uid): Set the save state of the uid to
4851         TRUE. What should we do if the uid isn't already in the cache?
4852         Currently I make it add the uid, but maybe it shouldn't?
4853
4854         * providers/imap/camel-imap-folder.c (imap_filter_timeout): Update
4855         to reflect CamelFilterDriver API changes.
4856
4857         * camel-filter-driver.c (camel_filter_driver_filter_folder): Take
4858         a cache argument so we can tell the cache whether or not the uid
4859         should be saved (meaning we have successfully filtered it).
4860
4861 2001-07-12  Jeffrey Stedfast  <fejj@ximian.com>
4862
4863         * camel-filter-driver.c (camel_filter_driver_filter_message):
4864         Okay, I've decided that that user is just on crack. We don't want
4865         to allow filtering of deleted messages or we could get some
4866         unexpected behavior.
4867         (do_move): Oops. My last fix needs to be after the if-statement,
4868         not inside it.
4869         (do_copy): And here too.
4870
4871 2001-07-12  Jeffrey Stedfast  <fejj@ximian.com>
4872
4873         * camel-filter-driver.c (do_move): Only set p->copied and
4874         p->deleted if the messages are copied without an exception.
4875         (do_copy): Same - but obviously we don't set the p->deleted here
4876         at all.
4877         (camel_filter_driver_filter_message): Since users complained that
4878         they couldn't filter deleted messages for "safe keeping" (WTF?
4879         safe keeping? why were they deleted in the first place then??), I
4880         have taken out the code that optimized filtering by not allowing
4881         deleted messages to be filtered. This fixes bug #4473.
4882
4883         Note: Users have a warped sense of logic.
4884
4885 2001-07-12  Not Zed  <NotZed@Ximian.com>
4886
4887         * camel-mime-part-utils.c (extract_metatag_charset): Removed.
4888         (check_html_charset): Replaced with this.
4889         (simple_data_wrapper_construct_from_parser): Call
4890         check_html_charset if we dont have a charset on the content-type,
4891         and we have text/html data.
4892         (check_html_charset): We also need to do qp/base64 decoding
4893         ourselves, sigh.
4894
4895         * camel-mime-utils.c (html_meta_param_list_decode): Removed.  This
4896         was very wrong, the rules for mail headers vastly different from
4897         rules for decoding html elements.
4898         (rfc2184_decode): Move the malloc inside the iconv_open worked,
4899         otherwise we have a memleak.
4900
4901         * camel-mime-filter-html.c (camel_mime_filter_html_finalize, init,
4902         run, reset): Changed to use camelhtmlparser, and fixed a tiny
4903         memleak.
4904
4905         * camel-html-parser.c: Made the html indexer tokeniser re-usable.
4906         ONLY TO BE USED INTERNAL TO CAMEL HOWEVER.
4907         (tokenise_step): Slight fix to non-quoted values.
4908
4909         * camel-folder-summary.c
4910         (camel_folder_summary_info_new_from_message): Removed some code i
4911         wasn't supposed to commit.
4912
4913         * providers/local/camel-local-summary.c (local_summary_add): Only
4914         set info->size if it is not zero.
4915         (local_summary_add): If we dont get a size from the info passed
4916         in, calculate it using a null stream write.  Should do #4392.
4917
4918 2001-07-11  Jeffrey Stedfast  <fejj@ximian.com>
4919
4920         * camel-mime-part-utils.c (extract_metatag_charset): New function
4921         to extract a meta-tag charset value if it exists.
4922         (simple_data_wrapper_construct_from_parser): Along the same lines
4923         as the code I previously ripped out, but this time use the
4924         mime-parser's seek ability to help us along. Currently I read up
4925         to a 2k buffer size - this is probably overkill, 1k is probably
4926         plenty.
4927
4928         * camel-mime-utils.c (html_meta_param_list_decode): When we get to
4929         an `=', we must skip past it before trying to grab the param
4930         value. duh.
4931
4932 2001-07-11  Jeffrey Stedfast  <fejj@ximian.com>
4933
4934         * camel-mime-part-utils.c
4935         (simple_data_wrapper_construct_from_parser): Ripped out my code
4936         since it was never being used since the mime parser is not using a
4937         seekable stream (ever?) which pretty much means my code needs to
4938         be done someplace else.
4939
4940 2001-07-11  Peter Williams  <peterw@ximian.com>
4941
4942         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): 
4943         Run the filter in its own thread to prevent locking issues.
4944         (imap_filter_timeout): New function that does the filtering called
4945         as a CamelSession timeout.
4946
4947 2001-07-11  Not Zed  <NotZed@Ximian.com>
4948
4949         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Create
4950         the messageinfo itself, so we can properly set the size.
4951
4952         * camel-movemail.c (camel_movemail_solaris): Write out the from
4953         line between each message.
4954
4955 2001-07-10  Not Zed  <NotZed@Ximian.com>
4956
4957         * providers/local/camel-local-summary.c (local_summary_add): Copy
4958         the size across from the source message info if supplied.
4959
4960         * camel-stream-null.c: Added a 'written' member which keeps track
4961         of how much has been written to the stream.
4962
4963         * camel-movemail.c (camel_movemail): If we have BROKEN_SPOOL
4964         defined, then use the solaris movemail to quote from lines that
4965         sendmail didn't.
4966         (camel_movemail_solaris): Compile this in if BROKEN_SPOOL defined.
4967
4968 2001-07-10  Jeffrey Stedfast  <fejj@ximian.com>
4969
4970         * camel-mime-utils.c (html_meta_param_list_decode): New function
4971         to parse an HTML meta-tag.
4972
4973         * camel-mime-part-utils.c
4974         (simple_data_wrapper_construct_from_parser): If the Content-Type
4975         did not contain a charset parameter and it's also a text/html
4976         part, we have 1 last place to look - in the META html tags. *sigh*
4977
4978         * camel-mime-message.c (camel_mime_message_get_source):
4979         s/gint/unsigned since that's what it should be.
4980
4981 2001-07-09  Jeffrey Stedfast  <fejj@ximian.com>
4982
4983         * camel-pgp-context.c (pgp_sign): Forget the passphrase if the
4984         user has set that option.
4985         (pgp_clearsign): Same.
4986         (pgp_encrypt): And here...
4987         (pgp_decrypt): And finally here.
4988         (camel_pgp_context_new): Take a `remember' argument.
4989
4990 2001-07-09  Not Zed  <NotZed@Ximian.com>
4991
4992         * providers/local/camel-maildir-summary.c (maildir_summary_sync):
4993         Oops, e_poolv_set free's it for us, so dont double-free here.
4994
4995 2001-07-06  Not Zed  <NotZed@Ximian.com>
4996
4997         * camel-vee-folder.c (camel_vee_folder_finalise): Changed so we
4998         dont have the list changing under us, just going to the next node
4999         before we call a function that might change the list is
5000         potentially dangerous (slight mod of peters fix).  Hmm, i think it
5001         would've double-unref'd it too(?)
5002
5003 2001-07-08  Chris Toshok  <toshok@ximian.com>
5004
5005         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
5006         openssl_table is gone.  we now store/get the stream from the
5007         SSL_CTX's app_data.
5008         (stream_read): rework the non-blocking case to account for SSL
5009         possibly buffering data (in which case select will block even
5010         though data is ready to be read), and to account for FreeBSD's
5011         strange behavior of returning -1/EAGAIN even though select said
5012         the fd was ready to be read.
5013         (ssl_verify): openssl_table is gone.
5014         (open_ssl_connection): set the SSL_CTX's app_data to be the
5015         stream, remove the openssl_table code.
5016
5017 2001-07-06  Jeffrey Stedfast  <fejj@ximian.com>
5018
5019         * camel-mime-utils.c (header_encode_param): Don't allow in to be
5020         NULL, so instead of doing if (in == NULL) return;, make it a
5021         g_return_val_if_fail and later we can make it an assert or
5022         something.
5023
5024         * providers/local/camel-maildir-store.c (get_inbox): Fixes bug
5025         #1138.
5026
5027         * providers/local/camel-mbox-summary.c
5028         (camel_mbox_summary_build_from): Make the `day-of-month' digit
5029         take up 2 chars by using "%2d". Fixes bug #3989 for lame mailers
5030         like Pine.
5031
5032         * camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's
5033         to nonblocking.
5034
5035 2001-07-06  Peter Williams  <peterw@ximian.com>
5036
5037         * camel-object.c (camel_object_unref): Make sure that after the
5038         finalization event has happened and the finalization functions
5039         have been called that the object still has a zero refcount.
5040
5041 2001-07-06  Joe Shaw  <joe@ximian.com>
5042
5043         * providers/nntp/camel-nntp-grouplist.c: Add locking to
5044         camel_nntp_get_grouplist_from_server().
5045
5046         * providers/nntp/camel-nntp-resp-codes.h: Added
5047         NNTP_EXTENSIONS_SUPPORTED (202).
5048
5049         * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions):
5050         Check for both NNTP_LIST_FOLLOWS and NNTP_EXTENSIONS_SUPPORTED from
5051         a LIST EXTENSIONS request. (Dunno if NNTP_LIST_FOLLOWS ever comes
5052         out of this, but that's what was already there...) Also, put some
5053         locking around it.
5054         (finalize): e_mutex_destroy() the command lock
5055         (camel_nntp_store_init): e_mutex_new() the command lock.
5056
5057         * providers/nntp/camel-nntp-store.h: Add locking macros.
5058
5059 2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>
5060
5061         * camel-folder-summary.c (camel_message_info_string): Added an
5062         assert to make sure that `mi' isn't NULL.
5063         (camel_message_info_set_string): Same.
5064
5065         * providers/imap/camel-imap-command.c (camel_imap_response_free):
5066         Create and use a temporary CamelException for use with
5067         camel_imap_folder_changed.
5068
5069 2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>
5070
5071         * camel-pgp-context.c (pgp_verify): Send the
5072         --no-auto-key-retrieve argument to gpg if we are in offline mode
5073         so that we don't have to worry about gpg hanging if it can't
5074         connect to the key servers, because now it shouldn't even attempt
5075         to.
5076
5077 2001-07-05  Chris Toshok  <toshok@ximian.com>
5078
5079         * camel-tcp-stream-openssl.c (ssl_verify): use
5080         X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the
5081         X509_STORE_CTX to look up our stream, since it's not what we used
5082         to insert our stream into the hashtable.
5083         (open_ssl_connection): insert the stream into the hashtable before
5084         calling SSL_connect, as this can cause ssl_verify to be called,
5085         and we need to look up the stream there.  remove the stream from
5086         the hashtable if there's an error connecting.
5087         (stream_connect): pass the CamelTcpStreamOpenSSL* to
5088         open_ssl_connection since it handles the hashtable stuff.  remove
5089         hashtable stuff from here.
5090
5091 2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>
5092
5093         * camel-folder.c (camel_folder_copy_messages_to): if source ==
5094         dest, just no-op.
5095
5096 2001-07-05  Peter Williams  <peterw@ximian.com>
5097
5098         * camel-vee-folder.c (camel_vee_folder_finalise): Move this before the
5099         camel_vee_folder_remove_folder because that function modifies p->folders
5100         messing up our iteration.
5101         (camel_vee_folder_finalise): Don't unref our summary; camel-folder now
5102         does this.
5103
5104         * camel-object.h (CamelObject): Add a 'destroying' flag to CamelObject.
5105
5106         * camel-object.c (obj_init): Clear 'destroying'.
5107         (camel_object_unref): If 'destroying' then do not send the finalize
5108         event and do not call finalize functions. Otherwise, set destroying
5109         so just in case we get refed (eg event code) we don't get doubly
5110         finalized.
5111
5112 2001-07-05  Not Zed  <NotZed@Ximian.com>
5113
5114         * camel-mime-filter-basic.c (filter): Fix the assertion slightly,
5115         if we have a little bit of input the output size could be larger,
5116         since we store upto 3 chars in the state.
5117
5118         * camel-folder-summary.c
5119         (camel_folder_summary_info_new_from_message): When indexing a new
5120         record, create a pseudo word 'ibexindexed' so we can always tell
5121         that a message has already been idnexed, even if it contains no
5122         words of its own.  Things like maildir use this check to see if
5123         its already been processed, and it matters if it is incorrect in
5124         this case (not just wasted cycles).
5125         (camel_message_info_dup_to): Assign the to->strings from the
5126         e_poolv_cpy() call, since it may allocaote a new poolv if the
5127         lengths do not match.
5128
5129         (camel_folder_summary_info_new_from_parser): And same here.
5130
5131         * providers/local/camel-maildir-summary.c (maildir_summary_sync):
5132         Changed the logicfor epoolv code to be different, we dont need to
5133         update hash references or any tricky stuff.
5134         (maildir_summary_check): Samehere.
5135
5136         * camel-folder-summary.h: Removed include of e-memory.h.
5137
5138 2001-07-03  Joe Shaw  <joe@ximian.com>
5139
5140         * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION
5141         (502) to the list of response codes.
5142
5143         * providers/nntp/camel-nntp-store.c (nntp_store_connect): If we
5144         receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying
5145         to reconnect, get extensions, etc. Just give up and return FALSE.
5146
5147 2001-07-03  Dan Winship  <danw@ximian.com>
5148
5149         * providers/imap/camel-imap-message-cache.c
5150         (camel_imap_message_cache_clear): Doh. Don't remove things from
5151         the hash table while foreach'ing it. (And can't use foreach_remove
5152         either because we have to remove them in a weird order). Fixes
5153         #3618.
5154
5155         * providers/imap/camel-imap-folder.c (imap_get_message): If the
5156         server returns OK from the FETCH BODY, but there's no parseable
5157         BODY response, it's probably because there's an UN-parseable BODY
5158         response, implying the message is badly formatted, MIMEwise. In
5159         that case, fall back to fetching the message as a single part.
5160
5161 2001-07-02  Sam Creasey <sammy@oh.verio.com>
5162
5163         * providers/nntp/camel-nntp-folder.c: Implemented
5164         nntp_folder_search_by_expression and
5165         nntp_folder_search_free.  Basic search functionality e.g. unread
5166         marking now works for NNTP folders.
5167
5168         * camel_filter_search.c (get_size): Added get-size sexp directive
5169         to get the size of a message for filters.
5170
5171         * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
5172         Always check with the NNTP server after summary load -- this
5173         function now always expires old summary entries and syncs with
5174         the news server.
5175
5176         * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
5177         Only fetch headers for articles not already logged in 
5178         the summary file.
5179         
5180         * providers/nntp/camel-nntp-grouplist.c 
5181         (camel_nntp_get_grouplist_from_*): change from g_list_append()
5182         to g_list_prepend() + g_list_reverse.  Traversing 40,000 
5183         element linked lists sucks.
5184
5185         * providers/nntp/camel-nntp-store.c (camel_nntp_command):
5186         Should the NNTP connection die with 
5187         CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry 
5188         attempt.  Timing out the NNTP link is less painful this way.
5189
5190 2001-07-02  Peter Williams  <peterw@ximian.com>
5191
5192         * README (Introduction): Add comment noting that Camel actually
5193         exists now :-)
5194
5195 2001-07-02  Dan Winship  <danw@ximian.com>
5196
5197         * camel-session.c (camel_session_get_filter_driver): new method to
5198         get an application-initialized filter driver.
5199
5200         * camel-filter-driver.c (camel_filter_driver_new): Remove the
5201         get_folder function and data args from here...
5202         (camel_filter_driver_set_folder_func): ...and add this function to
5203         set/change them.
5204
5205         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): If
5206         this folder is INBOX and we're filtering INBOX, set a flag on the
5207         folder for later.
5208         (imap_update_summary): Add another argument (GPtrArray *recents),
5209         and if it's non-NULL, add the uids of any \Recent new messages to
5210         it.
5211         (camel_imap_folder_changed): If doing filtering in this folder,
5212         create a recents array and pass it to imap_update_summary. Then
5213         get a filter driver and use it to filter the recent messages.
5214
5215         * providers/imap/camel-imap-summary.h: 
5216         * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Add
5217         support for the \Recent flag.
5218
5219         * providers/imap/camel-imap-provider.c (imap_conf_entries): enable
5220         the "filter" option.
5221
5222         * camel-types.h: add CamelFilterDriver typedef here
5223
5224 2001-07-02  Not Zed  <NotZed@Ximian.com>
5225
5226         * camel-lock-client.c (camel_lock_helper_init): properly return
5227         error if we can't create pipes.
5228
5229         * camel-folder-summary.c (summary_build_content_info): re-enable
5230         html indexing.
5231
5232         * camel-mime-filter-html.c: Completely re-implemented using a
5233         custom parser.
5234
5235 2001-07-02  Dan Winship  <danw@ximian.com>
5236
5237         * tests/misc/url.c (main): Change a camel_exception_clear to
5238         camel_exception_init to fix a sometimes-crash
5239
5240 2001-06-29  Jeffrey Stedfast  <fejj@ximian.com>
5241
5242         * camel-mime-utils.c: Added Originator: header as a header to look
5243         for when looking for the mailing list.
5244
5245         * tests/mime-filter/Makefile.am: Build the test-crlf test program.
5246
5247         * tests/mime-filter/test-crlf.c: New test suite for the crlf
5248         filter.
5249
5250         * camel-mime-filter-crlf.c (filter): Fixed to correctly encode and
5251         decode dots.
5252
5253 2001-06-28  Peter Williams  <peterw@ximian.com>
5254
5255         * camel-mime-filter-stripheader.c: New file. Filter that strips a
5256         header from mime output.
5257
5258         * camel-mime-filter-stripheader.h: New file. Header for the above.
5259
5260         * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
5261         stripheader filter to remove the "Bcc" header.
5262
5263         * Makefile.am: Add the stripheader files.
5264
5265         * tests/lib/Makefile.am (INCLUDES): Get this to compile again.
5266
5267         * tests/mime-filter/test-stripheader.c: New file. Test suite for
5268         the CamelMimeFilterStripHeader.
5269
5270         * tests/mime-filter/Makefile.am: New test section: mime filters.
5271
5272 2001-06-28  Jeffrey Stedfast  <fejj@ximian.com>
5273
5274         * camel-mime-utils.c (header_decode_param_list): Fix a memory
5275         leak. Also if the decoded value is NULL, that means it wasn't
5276         encoded so we don't want to toss the old value.
5277         (header_param_list_format_append): Correctly wrap long parameter
5278         values according to rfc2184.
5279
5280 2001-06-28  Dan Winship  <danw@ximian.com>
5281
5282         * providers/imap/camel-imap-folder.c (imap_refresh_info): If the
5283         folder is frozen, don't refresh, just record that we need to do it
5284         later.
5285         (imap_append_online): If the APPEND doesn't trigger an immediate
5286         EXISTS response (because the folder isn't the selected folder, or
5287         because the server doesn't do that until the next command), call
5288         imap_refresh_info on the folder.
5289         (imap_copy_online): Likewise. (Replacing the unconditional NOOP
5290         that was there before, which absolutely killed filter performance
5291         by forcing the IMAP provider to switch back and forth between
5292         folders after every copy or move.)
5293         (imap_thaw): If the folder needs a refresh, do it.
5294
5295         * camel-folder.c (camel_folder_is_frozen): New method
5296
5297 2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>
5298
5299         * camel-transport.c (camel_transport_init): Initialize the private
5300         send_lock.
5301         (camel_transport_finalize): Free the private send_lock.
5302         (camel_transport_get_type): Set the init and finalize functions.
5303         (camel_transport_send): Lock the transport.
5304         (camel_transport_send_to): Same.
5305
5306         * camel-private.h: Add CAMEL_TRANSPORT_(UN)LOCK macros.
5307
5308 2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>
5309
5310         * tests/folder/test9.c (main): Updated to match the current API.
5311
5312         * tests/folder/test3.c: #include <gtk/gtk.h> since we use
5313         gtk_init().
5314
5315         * camel-internet-address.c
5316         (camel_internet_address_encode_address): Use the new
5317         header_address_fold.
5318
5319         * camel-mime-utils.c: Removed some old #if 0'd code of mine.
5320         (rfc2047_encode_word): If enclen is 0, don't write an encoded word
5321         token (=?iso-8859-7?Q??= would be an invalid token).
5322         (header_address_fold): New function to wrap address headers -
5323         header_fold() was force-wrapping rfc2047 encoded words which was
5324         making the test suite fail. The *real* solution, however, is to
5325         not create rfc2047 encoded words longer than 72 chars.
5326
5327 2001-06-26  Jeffrey Stedfast  <fejj@ximian.com>
5328
5329         * camel-filter-driver.c (open_folder): Since we want an error
5330         opening a folder to result in the message being copied to Inbox
5331         (assuming no other filters get a chance to `move` it), don't
5332         record any exceptions that may occur in this function.
5333
5334 2001-06-26  Dan Winship  <danw@ximian.com>
5335
5336         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected,
5337         imap_append_offline, imap_append_online,
5338         camel_imap_folder_changed): lock the cache around accesses
5339
5340         * providers/imap/camel-imap-store.c (get_folder_online): ref the
5341         newly-created folder (as current_folder) before calling
5342         camel_imap_folder_selected, in case that needs to do something
5343         that causes another folder to become current...
5344
5345         * camel-service.c (camel_service_get_url): D'oh.
5346         s/FALSE/CAMEL_URL_HIDE_PASSWORD/
5347
5348 2001-06-25  Jeffrey Stedfast  <fejj@ximian.com>
5349
5350         * camel-filter-search.c (get_source): g_strdup() the message
5351         source here or we will have problems later when we go to free the
5352         result ;-)
5353
5354 2001-06-25  Dan Winship  <danw@ximian.com>
5355
5356         * providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP
5357         doesn't allow an extra argument to AUTHENTICATE to avoid a useless
5358         round trip like some other SASL bindings do.
5359
5360         * providers/imap/camel-imap-command.c (imap_read_response): Deal
5361         with IMAP servers that (incorrectly) return "+\r\n" rather than
5362         "+ \r\n" for an empty continuation response.
5363         (camel_imap_response_extract_continuation): Likewise.
5364
5365 2001-06-21  Jeffrey Stedfast  <fejj@ximian.com>
5366
5367         * camel-mime-utils.c (word_types_compatable): New function that
5368         decides if 2 word types are mergeable. An atom and a qstring are
5369         mergeable; 2 qstrings are mergeable; and 2 encoded words are
5370         mergeable.
5371         (header_encode_phrase_merge_words): If 2 words are merged, the new
5372         word type is the MAX of the combined types. This means that if we
5373         merge a qstring and an atom, the resulting word type is a
5374         qstring.
5375
5376         * camel-internet-address.c (internet_format):
5377         s/g_string_sprintfa/g_string_append since this makes more sense in
5378         this particular case.
5379         (internet_encode): Same here.
5380
5381 2001-06-21  Jeffrey Stedfast  <fejj@ximian.com>
5382
5383         * providers/smtp/camel-smtp-transport.c (smtp_send): Use
5384         camel_address_length() rather than casting and accessing data
5385         members.
5386
5387 2001-06-20  Jeffrey Stedfast  <fejj@ximian.com>
5388
5389         * camel-mime-utils.c (header_raw_check_mailing_list): If the first
5390         char of the mailing-list name is '<', chop it off to make Ettore
5391         happy. Fixes bug #2153.
5392
5393 2001-06-19  Not Zed  <NotZed@Ximian.com>
5394
5395         * camel-lock-helper.c (unlock_id): Fixed a bug when not running
5396         setuid it wouldn't unlock.
5397
5398         * camel-movemail.c (camel_movemail): use new
5399         locking daemon, also return an error code.
5400
5401 2001-06-18  Jeffrey Stedfast  <fejj@ximian.com>
5402
5403         Note: Except for the info_free(), the NULL checks are
5404         g_return's. I felt that since g_free() handles NULL that our
5405         _free() functions should also.
5406         
5407         * camel-folder.c (camel_folder_change_info_free): Check to make
5408         sure that the info pointer isn't NULL.
5409         (camel_folder_change_info_change_uid): Same.
5410         (camel_folder_change_info_changed): Same.
5411         (camel_folder_change_info_remove_uid): Same.
5412         (camel_folder_change_info_add_uid): Same.
5413         (camel_folder_change_info_build_diff): Same.
5414         (camel_folder_change_info_cat): Same.
5415         (camel_folder_change_info_add_source): Same.
5416         (camel_folder_change_info_add_source_list): Same.
5417         (camel_folder_change_info_add_update): Same.
5418         (camel_folder_change_info_add_update_list): Same.
5419
5420 2001-06-18  Dan Winship  <danw@ximian.com>
5421
5422         * tests/stream/Makefile.am (LDADD): 
5423         * tests/smime/Makefile.am (LDADD): 
5424         * tests/misc/Makefile.am (LDADD): 
5425         * tests/message/Makefile.am (LDADD): 
5426         * tests/folder/Makefile.am (LDADD): Remove DB3_LDADD
5427
5428         * Makefile.am (install-exec-local): Set camel-lock-help setgid or
5429         setuid as needed
5430
5431 2001-06-18  Not Zed  <NotZed@Ximian.com>
5432
5433         * camel-folder-summary.c
5434         (camel_folder_summary_info_new_from_parser): Only create a missing
5435         uid if we have indexing turned on.
5436
5437         * camel-lock-helper.c (setup_process): Function to setup
5438         process/sanity/security checks.  Change to the real uid as soon as
5439         we can.
5440         (lock_path): First try to lock as the real uid, if that fails, try
5441         the root uid.
5442         (unlock_id): Unlock as the uid we created the lock as.
5443
5444         * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper
5445         location.
5446
5447         * providers/local/camel-spool-folder.c (spool_lock): Implemented,
5448         using lock helper locking.  Need to work out if the locking
5449         requires a root created lock?
5450         (spool_unlock): Likewise.
5451
5452 2001-06-15  Not Zed  <NotZed@Ximian.com>
5453
5454         * camel-lock-helper.c: Setuid Lock helper process.  Creates and manages
5455         .locks, keeping them active, removing them, etc.  What real perms it
5456         needs is a little system dependent.
5457
5458 2001-06-14  Not Zed  <NotZed@Ximian.com>
5459
5460         * providers/local/camel-maildir-store.c (get_folder_info): Implement.
5461         (scan_dir): Does the work of scanning for maildir directories.
5462
5463 2001-06-13  Not Zed  <NotZed@Ximian.com>
5464
5465         * providers/local/camel-spool-store.c (get_folder_info):
5466         Implemented, just returns a hardcoded INBOX folder.
5467         (free_folder_info): implemented, free's the 1 possible level of
5468         folder info.
5469
5470         * providers/local/camel-spool-folder.c
5471         (camel_spool_folder_construct): Set the real unread message
5472         count on the folder_created thing.
5473
5474 2001-06-15  Dan Winship  <danw@ximian.com>
5475
5476         * providers/imap/camel-imap-message-cache.c
5477         (camel_imap_message_cache_max_uid): Return the largest real UID in
5478         the cache (as an integer). Eventually to be used for an
5479         optimization in the new-message fetch code.
5480         (cache_put): Keep track of max_uid.
5481
5482 2001-06-14  Jeffrey Stedfast  <fejj@ximian.com>
5483
5484         * camel-mime-utils.c: Added Mailing-List header regex so that we
5485         can do mlist magic on that header.
5486
5487 2001-05-28  Jeffrey Stedfast  <fejj@ximian.com>
5488
5489         * camel-mime-utils.c (header_decode_param): Properly handle
5490         correct and incorrect (for the common case, ie Outlook and
5491         Netscape/Mozilla) rfc2184 values.
5492         (header_decode_rfc2184_param): Get the param name and see if we
5493         should expect a rfc2184 parameter value.
5494         (rfc2184_decode): Decode a rfc2184 value.
5495         (hex_decode): hex decode a string.
5496         (header_decode_param_list): Handle rfc2184 encoded parameters (ie
5497         parameters that have been split and perhaps encoded).
5498         (header_param_list_format_append): Encode the value before seeing
5499         if it will fit on the line. If the value does get encoded, be sure
5500         to put a '*' before the equal-sign.
5501         (header_encode_param): New function to rfc2184 encode a parameter
5502         value (maybe it should be renamed?)
5503
5504 2001-06-14  Jeffrey Stedfast  <fejj@ximian.com>
5505
5506         * camel-mime-part.c (init_header_name_table): Don't try to format
5507         the Reply-To header - we don't want to wrap the reply-to address.
5508
5509 2001-06-12  Not Zed  <NotZed@Ximian.com>
5510
5511         * providers/local/camel-spool-*.[ch]: A new provider, for spool
5512         mailboxes.  Mostly a cut and paste of the mbox code, but not a
5513         subclass CamelLocal*.  Not tested a lot, doesn't lock yet, use
5514         with extreme caution.
5515
5516         * tests/lib/folders.c (test_folder_message_ops): Added spool arg,
5517         spool folders can't be deleted, renamed, etc.
5518         (test_folder_basic): Same.
5519
5520         * tests/folder/test2.c (main): Added checks for spool type.
5521
5522         * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD):
5523         Added db3 flags, so make check compiles, doesn't run though.
5524
5525 2001-05-24  Not Zed  <NotZed@Ximian.com>
5526
5527         * providers/local/camel-local-provider.c
5528         (camel_provider_module_init): Added spool provider.
5529
5530 2001-06-07  Jon Trowbridge  <trow@ximian.com>
5531
5532         * camel-filter-driver.c (camel_filter_driver_filter_folder): Add a
5533         separator between the service url and the folder name, if needed.
5534
5535         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Added
5536         an argument, so that the original source URI of the mbox can be
5537         passed in.  This is needed because this function is called
5538         post-movemail, so we are never reading from the original mbox
5539         anymore.  Without the original mbox URI, the X-Evolution-Source
5540         tag gets set incorrectly and filter-on-source will fail to work.
5541         (camel_filter_driver_filter_message): Also take an extra arg
5542         for the original source URI.  It is the original URI, not the
5543         source URI, that is used for filtering and for setting the
5544         X-Evolution-Source tag.
5545
5546 2001-06-05  Dan Winship  <danw@ximian.com>
5547
5548         * providers/imap/camel-imap-folder.c (imap_rescan): Don't fetch
5549         the UID and FLAGS of messages we don't know about yet, since
5550         they'll just get discarded.
5551
5552 2001-06-01  Jeffrey Stedfast  <fejj@ximian.com>
5553
5554         * tests/smime/pgp.c: Fix to not get into a recursive loop in
5555         get_type().
5556
5557         * tests/smime/pgp-mime.c: Same.
5558
5559 2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>
5560
5561         * camel-smime-context.c: Numerous fixes to get it to compile.
5562
5563         * camel.h: Added camel-cipher-context.h, camel-cms-context.h,
5564         camel-smime-context.h, and camel-smime-utils.h
5565
5566         * camel-cms-context.[c,h]: New virtual class for manipulating
5567         cryptographic message syntax messages (like S/MIME).
5568
5569         * camel-smime-context.[c,h]: Modified to inherit from the
5570         CamelCMSContext class rather than the CamelCipherContext class.
5571
5572         * camel-smime.[c,h]: Removed - just use camel-smime-context
5573         directly.
5574
5575         * camel-smime-utils.[c,h]: New source files. Moved the 2 useful
5576         functions from camel-smime.[c,h] into here.
5577
5578 2001-05-30  Dan Winship  <danw@ximian.com>
5579
5580         * camel-charset-map.c: Redo the BUILD_MAP code to not depend on
5581         libunicode. Now it only generates a map of "popular" 8bit
5582         encodings. (It's not worthwhile to support obscure encodings,
5583         because any mailer that supports them will support UTF8 too. And
5584         Chinese and Japanese use mostly the same UTF8 characters so you
5585         need to decide between those encodings based on the locale or
5586         the charset of the message you're replying to or the input
5587         method you used. So this is sufficient for camel_charset_best's
5588         use.)
5589
5590         * camel-charset-map-private.h: Regenerated.
5591
5592         * camel.c (camel_shutdown): Move #ifdefs around to prevent a
5593         warning.
5594
5595 2001-05-29  Dan Winship  <danw@ximian.com>
5596
5597         * camel-disco-diary.c: Code for logging and replaying offline
5598         operations.
5599
5600         * camel-disco-store.c (disco_construct): Set disco->status here
5601         (where we can base it on the session's offline status) rather than
5602         at init time.
5603         (disco_connect): If we connect online and have a non-empty diary,
5604         switch to RESYNCING mode and replay the diary to the server.
5605         (disco_get_folder, disco_get_folder_info): Add _resyncing
5606         variants.
5607
5608         * camel-disco-folder.c (disco_sync, disco_expunge_uids,
5609         disco_append_message, disco_copy_messages_to,
5610         disco_move_messages_to): Add _resyncing variants to switches.
5611         (disco_expunge_uids, disco_append_message, disco_copy_messages_to,
5612         disco_move_messages_to): Remove #ifdef'ed out diary code: let the
5613         provider do it.
5614         (disco_append_message): Redo the append methods to no longer
5615         return the UID, since we're no longer doing the logging from here.
5616
5617         * providers/imap/camel-imap-store.c (imap_connect_online,
5618         imap_connect_offline): Create a CamelDiscoDiary.
5619         (imap_disconnect_offline): And free it.
5620
5621         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
5622         If RESYNCING, don't do any sort of checking that the remote folder
5623         matches the summary, beyond making sure that the UIDVALIDITY is
5624         correct.
5625         (imap_rescan): Add a missing camel_folder_summary_info_free when
5626         removing a UID from the summary.
5627         (imap_expunge_uids_offline): Implement. Fairly simple.
5628         (imap_expunge_uids_resyncing): Implement. If the store supports
5629         UIDPLUS, we can just use imap_expunge_uids_online. If not, we need
5630         to temporarily undelete any messages marked deleted on the server
5631         that aren't supposed to get expunged.
5632         (imap_append_offline): Implement, using cache and summary
5633         operations, and triggering the folder_changed event by hand.
5634         (imap_append_resyncing): Implement. Redo imap_append_online a bit
5635         in the process to make them able to share more code.
5636         (imap_copy_offline): Implement.
5637         (imap_copy_online): Move parts of this out into a helper.
5638         (imap_copy_resyncing): Implement. In most cases this is just like
5639         imap_copy_online, but if you are copying a message that was itself
5640         copied or appended into the folder, and the server doesn't do
5641         UIDPLUS, it will be necessary to replace at least part of the copy
5642         operation with one or more appends.
5643
5644         * providers/imap/camel-imap-command.c (imap_read_response): Don't
5645         record the current folder in the response when in RESYNCING mode.
5646         (This means that EXISTS and EXPUNGE responses won't be processed,
5647         which is needed because the summary may not match the folder at
5648         this point.)
5649         (imap_read_response): On error, call
5650         camel_imap_response_free_without_processing, not
5651         camel_imap_response_free.
5652
5653         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Make
5654         this work better when operating on UIDs that aren't in the summary.
5655
5656         * providers/imap/camel-imap-summary.c
5657         (camel_imap_summary_add_offline): New routine used by
5658         imap_append_offline and imap_copy_offline to create new summary
5659         entries.
5660
5661 2001-05-28  Jeffrey Stedfast  <fejj@ximian.com>
5662
5663         * camel-mime-utils.c (header_set_param): Use g_strcasecmp()
5664         because some systems don't have strcasecmp(). Also, when removing
5665         a param, make sure to free the param->name too.
5666
5667 2001-05-27  Dan Winship  <danw@ximian.com>
5668
5669         * tests/lib/messages.c (test_message_read_file): Fix an fd leak
5670
5671         * tests/lib/session.c, tests/lib/session.h: a CamelSession
5672         subclass for the test programs.
5673
5674         * tests/lib/Makefile.am: include session.[ch]
5675
5676         * tests/folder/test*.c: Use a CamelTestSession from libcameltest
5677         instead of cut+pasting everywhere.
5678
5679         * tests/misc/url.c (main): Update for a camel_url_new change at
5680         some point.
5681
5682         * tests/*/.cvsignore: Add stuff.
5683
5684         * camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!=
5685         mixup.
5686
5687 2001-05-26  Dan Winship  <danw@ximian.com>
5688
5689         * providers/imap/camel-imap-folder.c: Add a "need_rescan" flag
5690         saying if we want to rescan the entire folder for flag changes
5691         next time it's selected.
5692         (camel_imap_folder_init): Set need_rescan TRUE.
5693         (camel_imap_folder_selected): If need_rescan is TRUE, call
5694         imap_rescan.
5695         (imap_refresh_info): Only do a full rescan if need_rescan is TRUE.
5696         Otherwise just do a NOOP, making this a MUCH more lightweight
5697         operation. Also, don't call imap_rescan directly if the folder
5698         isn't selected, since that could end up causing the folder to be
5699         scanned *twice* (imap_rescan -> camel_imap_command ->
5700         camel_imap_folder_selected -> imap_rescan).
5701         (imap_rescan): Set need_rescan FALSE.
5702         (imap_sync_online): Don't NOOP if no changes were pushed: the
5703         caller will call refresh_info if it wants to poll for changes.
5704         Fixes evolution-mail doing lots of unnecessary extra work at
5705         quit time.
5706
5707         * providers/imap/camel-imap-store.c (refresh_folder_info): Set
5708         need_rescan on each folder before calling refresh_info.
5709
5710 2001-05-25  Jeffrey Stedfast  <fejj@ximian.com>
5711
5712         * providers/smtp/camel-smtp-transport.c (smtp_auth): Oops. Use a
5713         strNcmp to make sure the response begins with a 334 code, not a
5714         strcmp. Duh.
5715
5716         * providers/local/camel-maildir-folder.c (maildir_append_message):
5717         remove the summary info so we are not out-of-sync with the maildir
5718         folder.
5719
5720         * providers/local/camel-mh-folder.c (mh_append_message): remove
5721         the summary info so we are not out-of-sync with the mh folder.
5722
5723         * providers/local/camel-mbox-folder.c (mbox_append_message):
5724         remove the summary info so we are not out-of-sync with the mbox.
5725
5726 2001-05-24  Jeffrey Stedfast  <fejj@ximian.com>
5727
5728         * camel-smime-context.c (camel_smime_context_new): Oops, I spelled
5729         the get-default-db function name wrong.
5730
5731 2001-05-23  Jeffrey Stedfast  <fejj@ximian.com>
5732
5733         * providers/local/camel-local-folder.c
5734         (camel_local_folder_construct): s/folder_deleted/folder_created -
5735         result of a bad copy/paste.
5736
5737         * providers/imap/camel-imap-search.c (imap_body_contains):
5738         Optimize the match "" case.
5739
5740 2001-05-21  Jeffrey Stedfast  <fejj@ximian.com>
5741
5742         * providers/imap/camel-imap-store.c (get_folder_info_online):
5743         Store the CamelFolderInfo tree that was returned from
5744         camel_folder_info_build() in a new variable, 'tree', rather than
5745         'fi' since we later use 'fi' when syncing folders. Not only does
5746         this fix a memory leak, but it also fixes the bug where the user
5747         would only see the last folder in the folder list and/or it's
5748         subfolders.
5749
5750 2001-05-16  Jeffrey Stedfast  <fejj@ximian.com>
5751
5752         * camel-session.c (camel_session_forget_password): The service can
5753         be NULL here too, thanks to Wayne Davis for pointing this out.
5754
5755         * camel-smime-context.c (camel_smime_context_new): We don't need
5756         to be passed the certdb path anymore.
5757
5758 2001-05-16  Dan Winship  <danw@ximian.com>
5759
5760         * camel-medium.c (camel_medium_get_headers): New function to
5761         return an array of all headers.
5762         (camel_medium_free_headers): And free them.
5763
5764         * camel-mime-part.c (get_headers, free_headers): Implement this
5765         for CamelMimePart. (Works for CamelMimeMessage too.)
5766
5767 2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>
5768
5769         * camel-smime-context.c (camel_smime_context_finalise): Don't
5770         close or free (it wasn't allocated) the certdb.
5771         (camel_smime_context_new): If we get a NULL certdb handle, then
5772         don't bother trying to create a new certdb handle since NSS_Init*
5773         should have done that.
5774
5775 2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>
5776
5777         * Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_*
5778         variables so we don't link in tons of extra cruft that we don't
5779         need.
5780
5781         * tests/smime/pkcs7.c: Added to the test suite - tests the S/MIME
5782         pkcs7 functions.
5783
5784 2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>
5785
5786         * camel-smime-context.c: Lots of fixes to get this to compile.
5787
5788         * camel-smime.c (camel_smime_part_verify): Updated to pass in a
5789         hash argument to camel_smime_verify().
5790
5791         * camel-pgp-mime.c (camel_pgp_mime_part_verify): Update according
5792         to the changes in the context API.
5793
5794         * camel-pgp-context.c (pgp_verify): Updated to take a
5795         CamelCipherHash argument.
5796
5797         * camel-cipher-context.c (camel_cipher_verify): Now takes a hash
5798         argument since the S/MIME code needs this.
5799
5800         * Makefile.am: Add camel-smime-context.[c,h] and camel-smime.[c,h]
5801         to the build.
5802         
5803         * camel-smime.[c,h]: New source files for manipulating S/MIME
5804         message parts.
5805
5806 2001-05-14  Jon Trowbridge  <trow@ximian.com>
5807
5808         * camel-search-private.c (utf8_get): Replicate the semantics of
5809         the libunicode utf8 functions by returning NULL in the arg
5810         on invalid utf8.
5811
5812         * camel-pgp-context.c (pgp_verify): Check for valid utf8,
5813         terminate loop if something looks wrong.
5814
5815         * camel-mime-utils.c (header_encode_phrase_get_words): Properly
5816         check for invalid utf8.
5817         (header_encode_string): Properly check for invalid utf8.
5818
5819         * camel-charset-map.c (camel_charset_step): Properly check for
5820         invalid utf8.
5821
5822 2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>
5823
5824         * tests/folder/test9.c: 
5825         * tests/folder/test8.c:
5826         * tests/folder/test7.c: 
5827         * tests/folder/test6.c: 
5828         * tests/folder/test5.c: 
5829         * tests/folder/test4.c:
5830         * tests/folder/test3.c: 
5831         * tests/folder/test2.c: 
5832         * tests/folder/test1.c: 
5833         * tests/smime/pgp-mime.c: 
5834         * tests/smime/pgp.c: Subclass CamelSession since we can no longer
5835         specify the passwd callback any other way and update code
5836         accordingly.
5837
5838 2001-05-11  Dan Winship  <danw@ximian.com>
5839
5840         * camel-mime-utils.c (header_location_decode): Decode
5841         Content-Location, either correctly or Netscape-generated-brokenly.
5842
5843         * camel-mime-part.c (camel_mime_part_set_content_location,
5844         camel_mime_part_get_content_location, etc): Deal with
5845         Content-Location header.
5846
5847 2001-05-11  Jeffrey Stedfast  <fejj@ximian.com>
5848
5849         * providers/smtp/camel-smtp-transport.c (smtp_auth): Don't check
5850         the initial auth response until we get into the while-loop
5851         otherwise we have problems if the SASL mechanism supported a
5852         client initiated challenge (like PLAIN and LOGIN do).
5853
5854 2001-05-11  Dan Winship  <danw@ximian.com>
5855
5856         * camel-stream-null.c (camel_stream_null_new): Make this return
5857         CamelStream * (like the other stream new functions) instead of
5858         CamelStreamNull *
5859
5860 2001-05-10  Chris Toshok  <toshok@ximian.com>
5861
5862         * camel-tcp-stream-ssl.c (stream_connect): call SSL_Enable after
5863         the SSL_ImportFD and before PR_Connect.  Otherwise, NSS aborts
5864         during the connect.
5865
5866 2001-05-10  Jeffrey Stedfast  <fejj@ximian.com>
5867
5868         * camel-session.c (camel_session_get_password): Don't abort if the
5869         Service is NULL, this is perfectly valid for cipher contexts.
5870
5871 2001-05-09  Peter Williams  <peterw@ximian.com>
5872
5873         * providers/imap/camel-imap-folder.c (imap_move_messages_to): Pass
5874         appropriate parameters to CF_CLASS and add comment explaining why
5875         my initial attempt at a solution didn't work.
5876
5877 2001-05-09  Dan Winship  <danw@ximian.com>
5878
5879         * camel-disco-store.c (camel_disco_set_status): Set the
5880         disconnected status.
5881         (camel_disco_store_can_work_offline): Return whether or not a
5882         given CamelDiscoStore can work offline or not.
5883
5884         * camel-disco-folder.c (camel_disco_folder_cache_message):
5885         Explicitly tell a folder to cache a message. (Better than using
5886         get_message, because for IMAP that doesn't guarantee you'll get
5887         all the message parts.)
5888         (camel_disco_folder_prepare_for_offline): Prepare a folder for
5889         offline use by caching all messages meeting given search criteria
5890         (and doing anything else the particular folder implementation
5891         needs).
5892
5893         * camel-session.c (camel_session_set_online,
5894         camel_session_is_online): A session-wide online/offline toggle.
5895         (camel_session_init): Set online to TRUE.
5896
5897         * providers/imap/camel-imap-store.c (can_work_offline):
5898         Implementation of CamelDiscoStore::can_work_offline. (Checks that
5899         the store has been used online at least once.)
5900         (imap_get_folder_online, imap_get_folder_offline): Deal with
5901         request for "inbox" properly. ("Don't you mean... 'INBOX'?").
5902
5903         * providers/imap/camel-imap-folder.c (imap_cache_message):
5904         Implementation of CamelDiscoFolder::cache_message.
5905
5906         * camel.h: Add camel-disco-store.h and camel-disco-folder.h
5907
5908 2001-05-09  Jeffrey Stedfast  <fejj@ximian.com>
5909
5910         * camel-mime-part.c (camel_mime_part_set_content_id): Wrap the
5911         content-id with <>'s.
5912
5913 2001-05-04  Jeffrey Stedfast  <fejj@ximian.com>
5914
5915         * providers/smtp/camel-smtp-transport.c (connect_to_server): Add
5916         support for using OpenSSL.
5917
5918         * camel-remote-store.c (remote_connect): Add support for using the
5919         OpenSSL implementation.
5920
5921         * camel-tcp-stream-ssl.c (ssl_bad_cert): Hmmmm, don't pass in a
5922         NULL as the last argument to alert_user - prototype doesn't take
5923         that argument anymore?
5924
5925         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
5926         (ssl_verify): Use a global hash table to try and lookup the
5927         CamelTcpStreamOpenSSL object given the ssl context since OpenSSL
5928         doesn't think one needs to pass data around, we should all be
5929         living in a world of global variables, duh!
5930
5931 2001-05-06  Dan Winship  <danw@ximian.com>
5932
5933         * Makefile.am (libcamelinclude_HEADERS): Fix another build
5934         problem. (Um, anyone else could have done this...)
5935
5936 2001-05-04  Dan Winship  <danw@ximian.com>
5937
5938         * providers/imap/camel-imap-store.c (get_folder_online): Fix up
5939         refcounting on current_folder.
5940
5941         * camel-disco-folder.c, camel-disco-store.h: Remove
5942         CamelDiscoDiary refs that weren't supposed to escape yet.
5943
5944 2001-05-03  Dan Winship  <danw@ximian.com>
5945
5946         * camel-disco-store.c: new abstract class for disconnectable
5947         remote stores
5948
5949         * camel-disco-folder.c: new abstract class for folders on
5950         disconnectable stores.
5951
5952         * Makefile.am: Add camel-disco-folder.[ch] and
5953         camel-disco-store.[ch].
5954
5955         * providers/imap/camel-imap-store.c: Make this a subclass of
5956         CamelDiscoStore, and fix up the offline interfaces for the changes
5957         since they were first written (particularly the fact that some
5958         IMAP stores don't just use subscribed folders).
5959
5960         * providers/imap/camel-imap-folder.c: Make this a subclass of
5961         CamelDiscoFolder, although most ops still fail in disconnected
5962         mode.
5963
5964         * camel-store.c (camel_store_get_folder_info): Change gboolean,
5965         gboolean, gboolean to guint32 in the prototype for this function.
5966
5967         * providers/local/camel-local-store.c (get_folder_info): Update
5968         for prototype change.
5969
5970 2001-05-02  Dan Winship  <danw@ximian.com>
5971
5972         * providers/imap/camel-imap-store.h: Clean this up a bit. Add a
5973         "tag_prefix" member. Move "useful_lsub" into capabilities.
5974
5975         * providers/imap/camel-imap-store.c (camel_imap_store_init):
5976         Initialize the tag_prefix, based on a static variable.
5977
5978         * providers/imap/camel-imap-command.c (camel_imap_command): Use
5979         the store's tag_prefix character rather than "A" at the start of
5980         the tag. Makes the verbose debug output easier to parse when
5981         connected to multiple IMAP servers. (Well, unless you're connected
5982         to more than 26 servers...)
5983
5984         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Fix
5985         this up... it was losing count in some cases and giving a more
5986         verbose answer than it needed to.
5987
5988         * providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit
5989         rot.
5990
5991 2001-05-01  Dan Winship  <danw@ximian.com>
5992
5993         * providers/imap/camel-imap-command.c (camel_imap_command): Redo
5994         command locking. Since command_lock is recursive, we can just get
5995         a lock here, and release it either on error, or when the caller
5996         frees the response data. (This simplifies a lot of stuff, and
5997         fixes some problems with camel_imap_folder_changed being called
5998         without the command_lock locked because of the 2001-03-22 change.)
5999
6000         (camel_imap_response_free): 
6001         (camel_imap_response_free_without_processing): 
6002         (camel_imap_response_extract): 
6003         (camel_imap_response_extract_continuation): These all take a
6004         CamelImapStore now as well, to deal with locking.
6005
6006         * providers/imap/camel-imap-private.h: Add
6007         CAMEL_IMAP_STORE_ASSERT_LOCKED, which defaults to a noop, but can
6008         be made to call e_mutex_assert_locked.
6009
6010         * providers/imap/camel-imap-folder.c, camel-imap-search.c,
6011         camel-imap-store.c: Simplify using new locking stuff. Add a few
6012         CAMEL_IMAP_STORE_ASSERT_LOCKED checks.
6013
6014 2001-05-01  Dan Winship  <danw@ximian.com>
6015
6016         Support the IMAP UIDPLUS extension (RFC 2359), which lets you
6017         resync after disconnected operation more efficiently, but also
6018         makes it possible to do appends and moves/copies more efficiently
6019         now.
6020
6021         * providers/imap/camel-imap-folder.c (imap_append_message): If the
6022         server supports UIDPLUS, grab the APPENDUID response and cache the
6023         message into the folder's message cache.
6024         (imap_copy_messages_to): Likewise, for COPYUID, copy any message
6025         parts we have cached between the source and destination folder
6026         caches.
6027         (imap_get_message): If the entire message is already in the cache,
6028         just return that rather than building it from parts.
6029         (imap_update_summary): Fetch just the "UID FLAGS RFC822.SIZE" of
6030         the new messages first, then only fetch the headers for messages
6031         where we don't already have the headers cached.
6032
6033         * providers/imap/camel-imap-message-cache.c: Add gtk-doc comments.
6034         (cache_put): Fix refcounting stuff here.
6035         (camel_imap_message_cache_insert_stream,
6036         camel_imap_message_cache_insert_wrapper): New.
6037         (camel_imap_message_cache_get): Fix a bug here so the memory
6038         caching actually works.
6039         (camel_imap_message_cache_copy): New routine, used by
6040         imap_copy_messages_to.
6041
6042         * providers/imap/camel-imap-utils.c (imap_uid_set_to_array):
6043         Inverse operation of imap_uid_array_to_set. Used to parse COPYUID
6044         response.
6045
6046 2001-04-30  Dan Winship  <danw@ximian.com>
6047
6048         * providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
6049         New-and-improved version of get_uid_set() from
6050         camel-imap-folder.c. Looks at the summary as it goes so that if
6051         you ask for messages 5, 6, 8, and 9, and there is no message 7,
6052         then you get "5:9" instead of "5:6,8:9"
6053
6054         * providers/imap/camel-imap-folder.c (imap_copy_messages_to): Use
6055         imap_uid_array_to_set() rather than get_uid_set().
6056         (get_uid_set): Gone
6057
6058 2001-04-27  Dan Winship  <danw@ximian.com>
6059
6060         * camel-session.c: Redo this a lot so that instead of having a
6061         class full of callbacks, we have a subclassable class. Also,
6062         replace the increasingly horrifying
6063         camel_session_query_authenticator with three new routines,
6064         camel_session_get_password, camel_session_forget_password, and
6065         camel_session_alert_user.
6066
6067         * camel-pgp-context.c:
6068         * camel-pkcs7-context.c:
6069         * camel-smime-context.c: 
6070         * providers/imap/camel-imap-store.c: 
6071         * providers/pop3/camel-pop3-store.c: 
6072         * providers/smtp/camel-smtp-transport.c: 
6073         Use camel_session_get_password / camel_session_forget_password.
6074
6075         * camel-tcp-stream-ssl.c (ssl_bad_cert): Use
6076         camel_session_alert_user.
6077
6078 2001-04-26  Jeffrey Stedfast  <fejj@ximian.com>
6079
6080         * camel.c (camel_init): Automagically call camel_shutdown()
6081         atexit() ;-)
6082         (camel_init): Also initialize NSS databases as read/write for
6083         S/MIME and if NSS fails to init, try initializing with volatile
6084         databases.
6085
6086         * camel-file-utils.h: #include <sys/types.h> for off_t.
6087
6088 2001-04-26  Dan Winship  <danw@ximian.com>
6089
6090         * camel-file-utils.c: New file, with the int, string, time_t, and
6091         off_t encode/decode routines from camel-folder-summary.c moved
6092         here and renamed, for the enjoyment of non-CamelFolderSummary
6093         subclasses.
6094
6095         * Makefile.am (libcamel_la_SOURCES): Add camel-file-utils.c
6096         (libcamelinclude_HEADERS): and camel-file-utils.h
6097
6098         * camel-folder-summary.c: Remove functions that were moved to
6099         camel-file-utils.c, update uses of them for the new names.
6100         (camel_folder_summary_{en,de}code_token are still here.)
6101
6102         * providers/local/camel-mbox-summary.c: Use camel_file_util_*
6103         names
6104
6105         * providers/imap/camel-imap-summary.c: Use camel_file_util_* names
6106
6107         * providers/imap/camel-imap-store.c (imap_store_setup_online,
6108         imap_store_setup_offline): Use camel_file_util_* names, which
6109         makes much more sense since this isn't folder summary stuff.
6110
6111 2001-04-26  Dan Winship  <danw@ximian.com>
6112
6113         * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other
6114         stuff that's redundant with EXTRA_GNOME_CFLAGS)
6115         (libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS.
6116
6117         * camel-search-private.c: 
6118         * camel-pgp-context.c: 
6119         * camel-mime-utils.c: Use gunicode interfaces rather than
6120         libunicode.
6121
6122         * camel-charset-map.c: Use gunicode rather than libunicode. (The
6123         charmap-regen code still depends on libunicode though.)
6124
6125         * camel-mime-filter-charset.h: 
6126         * tests/message/test2.c (convert): Use iconv rather than
6127         unicode_iconv.
6128
6129         * providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD): 
6130         * providers/pop3/Makefile.am (libcamelpop3_la_LIBADD): 
6131         * providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove
6132         UNICODE_LIBS.
6133
6134         * camel.c (camel_init): Remove call to unicode_init.
6135
6136         * camel-mime-parser.c: Remove unused unicode.h include.
6137
6138 2001-04-26  Dan Winship  <danw@ximian.com>
6139
6140         * camel-service.c (get_host): Use e_gethostbyname_r.
6141         (camel_service_gethost): Remove unused var.
6142
6143 2001-04-26  Not Zed  <NotZed@Ximian.com>
6144
6145         * Applied jacob's patches for e-poolv stuff.
6146
6147 2001-04-23  Jeffrey Stedfast  <fejj@ximian.com>
6148
6149         * camel.h: Add camel-vee-folder.h and camel-digest-folder.h
6150
6151         * camel-digest-folder.[c,h]: New class that can be used to browse
6152         a multipart/digest message as if it were a CamelFolder.
6153
6154 2001-04-22  Jeffrey Stedfast  <fejj@ximian.com>
6155
6156         * camel-pgp-context.c (pgp_verify): Oops, don't use the return
6157         value of iconv() as a string length, it only tells us the number
6158         of non-reversable character conversions. This fixes it so we
6159         actually see the gpg output in the message viewer.
6160
6161 2001-04-23  Mikael Hallendal  <micke@codefactory.se>
6162
6163         * providers/nntp/Makefile.am (INCLUDES): 
6164         Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.
6165
6166 2001-04-20  Jeffrey Stedfast  <fejj@ximian.com>
6167
6168         * camel-smime-context.c (smime_sign): Implemented using the
6169         secmime.h convenience functions.
6170         (smime_clearsign): We just error our here, there is no clearsign
6171         for smime.
6172         (smime_verify): Copied code over from the pkcs7 verify - same
6173         state, ugly and unknown :-)
6174         (smime_encrypt): Implemented using the secmime.h convenience
6175         functions.
6176         (smime_decrypt): Same as the code in pkcs7-context.
6177
6178 2001-04-19  Jeffrey Stedfast  <fejj@ximian.com>
6179
6180         * camel-pkcs7-context.c (pkcs7_sign): Implemented.
6181         (pkcs7_clearsign): Implemented.
6182         (get_zero_len_passwd): Convenience function to try a 0-length key
6183         on the certificate db - if this works then there is no need to
6184         prompt the user.
6185         (get_password): Callback to get the password.
6186         (camel_cipher_hash_to_nss): Convenience function to convert a
6187         CamelCipherHash to an NSS HASH_HashType.
6188         (nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag.
6189         (pkcs7_digest): Digest function for use with pkcs7_sign().
6190         (sign_encode_cb): Callback to write the signed data to the output
6191         stream.
6192         (pkcs7_verify): Hacked on a bit more but am still a bit on the
6193         confused side. This might work but I wouldn't hold my breath. The
6194         sign/clearsign should be close if not correct, but this one...god
6195         only knows.
6196         (pkcs7_decrypt): Implemented.
6197         (pkcs7_encrypt): Implemented (mostly, still need to handle when
6198         'sign' is TRUE).
6199
6200 2001-04-18  Dan Winship  <danw@ximian.com>
6201
6202         * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
6203         Free base_url and storage_path.
6204
6205         * providers/pop3/camel-pop3-store.c (finalize): Free the
6206         implementation string.
6207         (camel_pop3_command): Clarify documentation to mention that
6208         @ex isn't set (and *@ret is) on CAMEL_POP3_ERR.
6209         (connect_to_server): Set @ex properly on CAMEL_POP3_ERR.
6210
6211         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info,
6212         pop3_get_message): Set @ex properly on CAMEL_POP3_ERR.
6213
6214 2001-04-17  Jeffrey Stedfast  <fejj@ximian.com>
6215
6216         * camel-pkcs7-context.[c,h]: New source files to handle Pkcs7
6217         encryption, decryption, signing, and verifying. Not yet
6218         complete. I'm sensing this is going to take a while seeing as how
6219         NSS is just so well documented.
6220
6221 2001-04-17  Dan Winship  <danw@ximian.com>
6222
6223         * camel-filter-driver.c (camel_filter_driver_filter_message): Fix
6224         a memory leak in the error case.
6225
6226 2001-04-16  Jeffrey Stedfast  <fejj@ximian.com>
6227
6228         * providers/local/camel-mbox-summary.c (summary_rebuild): Don't we
6229         want to tell where we are by using the start of the message? I
6230         think this should be using camel_mime_parser_tell_start_from()
6231         instead. Also divide by the size *before* multiplying by 100 so
6232         that we don't overflow the int which was giving us negative values
6233         for our progress status (oops).
6234
6235 2001-04-16  Jeffrey Stedfast  <fejj@ximian.com>
6236
6237         * camel-operation.c: Added a prototype for stamp().
6238
6239         * camel-charset-map.c (camel_charset_locale_name): #include
6240         string.h so we don't get a warning about strchr being undefined
6241         and also init charset to NULL.
6242
6243         * camel-pgp-context.c (pgp_verify): Go back to doing the utf8
6244         conversion by hand so that we don't depend on gal.
6245
6246         * Makefile.am: Remove the EXTRA_GNOME_CFLAGS include.
6247
6248         * camel-store.c (camel_mkdir_hier): Convenience function that it
6249         seems a number of camel-store implementations used gal for.
6250
6251         * providers/nntp/camel-nntp-store.c (ensure_news_dir_exists): Lets
6252         not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier()
6253         instead.
6254
6255         * providers/nntp/camel-imap-store.c: Lets not depend on gal for
6256         just e_mkdir_hier() - use camel_mkdir_hier() instead.
6257
6258         * camel-session.c (camel_session_get_storage_path): Don't depend
6259         on e_mkdir_heir() anymore, use the CamelStore version.
6260
6261         * camel-folder-search.h: Removed gal dependency, why was this even
6262         there in the first place?
6263
6264         * providers/imap/camel-imap-folder.c: Don't need gal/util/e-util.h
6265         here, so remove it.
6266
6267         * string-utils.c (strstrcase): New function, well more like old
6268         function brought back to life so we don't have to depend on gal.
6269
6270         * providers/imap/camel-imap-store.c (imap_store_setup_online): Use
6271         strstrcase rather than e_strstrcase so we don't depend on gal.
6272         (get_unread_online): Same here.
6273
6274         * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
6275         strstrcase.
6276
6277 2001-04-15  Jeffrey Stedfast  <fejj@ximian.com>
6278
6279         * camel-mime-utils.c (header_raw_check_mailing_list): regex
6280         doesn't set errno and regcomp returns 0 on success and any other
6281         value for an error (so don't *just* check for -1).
6282
6283 2001-04-14  Jeffrey Stedfast  <fejj@ximian.com>
6284
6285         * camel-cipher-context.c: Check to make sure the context is a
6286         valid context in all the user functions.
6287
6288 2001-04-13  Jon Trowbridge  <trow@ximian.com>
6289
6290         * providers/imap/camel-imap-store.c (imap_disconnect):
6291         s/imap_store/store/, fixing a typo that was causing the build to
6292         fail.
6293
6294         * camel-filter-search.c (get_source): Make the (previously unused)
6295         get-source command actually do the right thing, properly shrouding
6296         any passed-in source and falling back to use the source attached
6297         to the mime message.
6298
6299 2001-04-13  Dan Winship  <danw@ximian.com>
6300
6301         * camel-object.c (camel_object_hook_event):
6302         * camel-uid-cache.c (camel_uid_cache_get_new_uids):
6303         * camel-url.c (camel_url_new_with_base): Plug leaks.
6304
6305         * camel-remote-store.c (camel_remote_store_init): Don't
6306         re-initialize the folders hash table.
6307
6308         * providers/imap/camel-imap-store.c (imap_disconnect): Free
6309         authtypes since they'll be re-read on re-connect.
6310         (get_folder_info): Free folderinfos that we're discarding from the
6311         list.
6312
6313 2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>
6314
6315         * camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not
6316         get into a recursive call here ;-)
6317
6318         * tests/smime/pgp.c: Updated to reflect changes to the PGP code.
6319
6320         * tests/smime/pgp-mime.c: Same.
6321
6322 2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>
6323
6324         * camel-pgp-mime.c: Updated to reflect the few changes made to the
6325         CamelPgpContext class.
6326
6327         * camel-pgp-context.c: Updated to subclass of CamelCipherContext.
6328
6329         * camel-cipher-context.[c,h]: New base class for
6330         CamelPgpContext. Also contains the replacement for
6331         CamelPgpValidity, CamelCipherValidity.
6332
6333 2001-04-12  Dan Winship  <danw@ximian.com>
6334
6335         * camel-mime-filter-crlf.c (filter): Fix a pair of array bounds
6336         reads noted by purify
6337
6338 2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>
6339
6340         * camel.h: #include the pgp stuff.
6341
6342 2001-04-12  Dan Winship  <danw@ximian.com>
6343
6344         * providers/imap/camel-imap-message-cache.c
6345         (camel_imap_message_cache_remove): 
6346         * camel-url.c (camel_url_to_string): Plug memory leaks.
6347
6348 2001-04-11  Dan Winship  <danw@ximian.com>
6349
6350         * providers/imap/camel-imap-utils.c (imap_parse_string_generic):
6351         Simplify peterw's imap_is_atom_char fix.
6352
6353 2001-04-11  Jeffrey Stedfast  <fejj@ximian.com>
6354
6355         * tests/smime/Makefile.am: Added pgp-mime.c to the tests.
6356
6357         * tests/smime/pgp-mime.c: Test suite for camel-pgp-mime.c functions.
6358
6359         * Makefile.am: Add camel-pgp-mime.[c,h] to the build.
6360
6361         * camel-pgp-mime.c: Made a number of fixes to get it to compile
6362         and also fixed a few logic errors (mostly forgetting to reset
6363         streams) so that it worked (thanks to the pgp-mime test program).
6364
6365 2001-04-11  JP Rosevear  <jpr@ximian.com>
6366
6367         * providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome
6368         files are included in the top level camel headers and the gtk
6369         include dir is now versioned and such
6370
6371         * providers/local/Makefile.am: ditto
6372
6373         * providers/pop3/Makefile.am: ditto
6374
6375         * providers/smtp/Makefile.am: ditto
6376
6377         * providers/sendmail/Makefile.am: ditto
6378
6379         * camel-service.c: use five arg version of gethostbyname_r if
6380         appropriate
6381         (camel_get_host_byname): check if msg->herr is non-zero instead of
6382         checking if msg->hp is null since we may not always have msg->hp
6383
6384 2001-04-11  Jeffrey Stedfast  <fejj@ximian.com>
6385
6386         * camel-sasl-digest-md5.c (digest_response): Use
6387         camel_charset_locale_name() to get the locale charset rather than
6388         checking the CHARSET environment variable. This is a much less
6389         ugly hack. Also: If we fail to be able to convert to UTF8, then
6390         disavow all knowledge of the charset parameter.
6391
6392         * camel-charset-map.c (camel_charset_locale_name): New function to
6393         return the locale charset (or NULL if US-ASCII).
6394
6395 2001-04-11  Jeffrey Stedfast  <fejj@ximian.com>
6396
6397         * camel-pgp-context.c (camel_pgp_verify): Use
6398         e_utf8_from_locale_string() rather than trying to do it manually
6399         since Lauris's version works much better.
6400
6401 2001-04-06  Jeffrey Stedfast  <fejj@ximian.com>
6402
6403         * Makefile.am: Added camel-pgp-context.[c,h] to the build. Also
6404         added tests/smime/pgp.c and Makefile.am
6405
6406         * tests/smime/pgp.c: New test suite for PGP functions.
6407
6408         * camel-pgp-context.c: Various fixes to get it to build.
6409
6410 2001-04-07  Peter Williams  <peterw@ximian.com>
6411
6412         * providers/imap/camel-imap-utils.c (imap_parse_string_generic): It
6413         would be a good idea to recognize '\0'. Before, this code was running
6414         off the ends of strings and intermittently coredumping (if it didn't
6415         hit an imap_atom_char first) -- whoops!
6416
6417 2001-04-05  Not Zed  <NotZed@Ximian.com>
6418
6419         * merge from evolution-0-10-branch to evolution-0-10-merge-0
6420
6421 2001-04-03  Jeffrey Stedfast  <fejj@ximian.com>
6422
6423         * Makefile.am: Added tests/ back in
6424
6425         * camel-mime-utils.c (header_decode_text): Ignore whitespace
6426         between encoded words (there were a few cases where it didn't
6427         before).
6428         (header_encode_string): Preserve whitespace between words that are
6429         to be encoded by encoding them too.
6430         (header_encode_phrase): Same here but with phrases.
6431
6432 2001-04-03  Dan Winship  <danw@ximian.com>
6433
6434         * providers/imap/camel-imap-folder.c (imap_sync): If we don't
6435         change any flags or expunge, send a NOOP to give the server a
6436         chance to send EXISTS, etc, messages.
6437         (imap_get_message): If the server_level < IMAP4rev1, always fetch
6438         messages all-at-once, since they don't support the [#.MIME]
6439         syntax.
6440         (imap_update_summary): When reading message flags, set the
6441         server_flags field as well, and don't overwrite any flags set by
6442         camel_folder_summary_info_new_from_message. Might help with some
6443         of the flag problems...
6444
6445 2001-04-02  Dan Winship  <danw@ximian.com>
6446
6447         * camel-service.h: Remove the "quick_login" member, which is
6448         unnecessary.
6449
6450         * providers/smtp/camel-smtp-transport.c (smtp_auth): Remove the
6451         references to quick_login and fix this to use the CamelSasl
6452         interfaces correctly to do the same thing.
6453         (connect_to_server): Split this out of smtp_connect
6454         (smtp_connect): Use connect_to_server. When re-EHLO'ing after
6455         auth, ignore errors.
6456         (query_auth_types): Use connect_to_server rather than
6457         smtp_connect, so it doesn't try to authenticate. Add LOGIN
6458         authtype to the list of authtypes to check for.
6459
6460         * providers/smtp/camel-smtp-provider.c
6461         (camel_provider_module_init): Add LOGIN authtype to the authtypes
6462         list explicitly.
6463
6464         * camel-sasl.c (camel_sasl_authtype_list): Don't list LOGIN here:
6465         it's not a real SASL authtype and is only used for SMTP.
6466         
6467         * camel-sasl-plain.c: 
6468         * camel-sasl-login.c: 
6469         * camel-sasl-kerberos4.c: 
6470         * camel-sasl-cram-md5.c: 
6471         * camel-sasl-anonymous.c: 
6472         * providers/pop3/camel-pop3-provider.c: Remove "quick_login"
6473         argument from authtypes.
6474
6475 2001-04-02  Gediminas Paulauskas <menesis@delfi.lt>
6476
6477         * camel-filter-driver.c: marked missing report status' for translation.
6478
6479 2001-04-02  Jeffrey Stedfast  <fejj@ximian.com>
6480
6481         * camel-pgp-context.c (camel_pgp_sign): mutex lock & unlock the
6482         context.
6483         (camel_pgp_clearsign): Same.
6484         (camel_pgp_verify): Same.
6485         (camel_pgp_encrypt): Same.
6486         (camel_pgp_decrypt): And finally here...
6487
6488         * camel-pgp-context.h: Update the function prototypes to match
6489         those found in camel-pgp-context.c.
6490
6491         * camel-pgp-context.c: Updated.
6492
6493         * camel-pgp-mime.c (camel_pgp_mime_part_sign): Implemented.
6494         (camel_pgp_mime_part_verify): Implemented.
6495         (camel_pgp_mime_part_encrypt): Implemented.
6496         (camel_pgp_mime_part_decrypt): Implemented.
6497
6498 2001-04-01  Jeffrey Stedfast  <fejj@ximian.com>
6499
6500         * camel-sasl-login.[c,h]: New files to handle the LOGIN SASL
6501         mechanism.
6502         
6503         * camel-sasl-plain.c: Removed the definition of
6504         camel_sasl_login_authtype.
6505
6506         * camel-sasl.c (camel_sasl_new): Oops. I thought LOGIN was an
6507         alias to PLAIN. I was wrong. These two SASL objects have to be
6508         separate.
6509
6510         * providers/smtp/camel-smtp-transport.c (smtp_auth): Updated to
6511         check for and use authmech->quick_login when available.
6512
6513 2001-04-01  Jeffrey Stedfast  <fejj@ximian.com>
6514
6515         * providers/pop3/camel-pop3-provider.c: Updated the authtypes here
6516         too.
6517
6518         * camel-sasl-plain.c: 
6519         * camel-sasl-anonymous.c: 
6520         * camel-sasl-digest-md5.c: 
6521         * camel-sasl-cram-md5.c: 
6522         * camel-sasl-kerberos4.c: Updated the authtype values.
6523
6524         * camel-service.h: Added another field to CamelServiceAuthType
6525         that specifies whether or not the mechanism supports "quick auth"
6526         which means that the client can send the initial challenge in the
6527         AUTH request.
6528
6529         * camel-sasl.c (camel_sasl_new): Add support for LOGIN.
6530         (camel_sasl_authtype_list): Here too.
6531         (camel_sasl_authtype): And finally here.
6532
6533         * camel-sasl-plain.c: Define camel_sasl_login_authtype.
6534
6535         * providers/smtp/camel-smtp-transport.c (smtp_auth): Only unref
6536         the SASL object if it exists.
6537
6538 2001-03-30  Dan Winship  <danw@ximian.com>
6539
6540         * providers/pop3/camel-pop3-store.c (connect_to_server,
6541         query_auth_types, pop3_connect): Move things around here to make
6542         this all work right again (so you don't get prompted for a
6543         password when checking the supported authtypes.)
6544
6545 2001-03-30  Jon Trowbridge  <trow@ximian.com>
6546
6547         * camel-mime-message.c (camel_mime_message_set_source): Shrould
6548         our source URL before putting it into X-Evolution-Source.
6549
6550 2001-03-29  Jeffrey Stedfast  <fejj@ximian.com>
6551
6552         * providers/imap/camel-imap-store.c (get_folder_info): Don't
6553         blindly append "/INBOX", construct a CamelURL and set the path
6554         that way.
6555         (parse_list_response_as_folder_info): Don't blindly append
6556         "/<foldername>", construct a CamelURL and set the path that way
6557         instead.
6558         (get_folders_offline): And again here.
6559
6560 2001-03-30  Not Zed  <NotZed@Ximian.com>
6561
6562         * camel-service.c (camel_get_host_byname): Dont overwrite an
6563         exception if we got one already.  Added camel_operation status to
6564         it, and comment out some debug.
6565
6566 2001-03-29  Not Zed  <NotZed@Ximian.com>
6567
6568         * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host
6569         name info when done ... blah blah.
6570
6571         * camel-sasl-kerberos4.c (krb4_challenge): Free host name info
6572         after we're done with it.
6573
6574         * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name
6575         info after we're done with it.
6576
6577         * camel-remote-store.c (remote_connect): Free the host name info
6578         from get_host after we're finished with it.
6579
6580         * camel-service.c (camel_get_host_byname): New function to
6581         lookup a name, and still be cancellable.
6582         (camel_free_host): And a function to free the structure
6583         returned.
6584         (camel_service_gethost): Call get_host_byname for this.
6585
6586 2001-03-29  Jon Trowbridge  <trow@ximian.com>
6587
6588         * camel-filter-driver.c (camel_filter_driver_filter_message): Save
6589         the source URL using camel_mime_message_set_source.
6590
6591         * camel-mime-message.c (camel_mime_message_set_source): Renamed
6592         camel_mime_message_set_identity to this.  Sets the X-Evolution-Source
6593         header.
6594         (camel_mime_message_get_source): Returns the X-Evolution-Source
6595         header.
6596
6597 2001-03-29  Kjartan Maraas  <kmaraas@gnome.org>
6598
6599         * broken-date-parser.c: #include <stdio.h>, <stdlib.h> and <string.h>
6600         * broken-date-parser.h: Remove all includes but <glib.h>
6601         * camel-address.h: Added #include <glib.h>
6602         * camel-data-wrapper.c: Move system includes to the top.
6603         * camel-data-wrapper.h: #include <glib.h>
6604         * camel-exception.c: #ifdef HAVE_CONFIG_H
6605         * camel-exception.h: Remove #include <glib.h>
6606         * camel-filter-driver.c: #ifdef HAVE_CONFIG_H and move system
6607         headers to top. Mark strings in camel_exception_set*() for i18n.
6608         * camel-filter-driver.h: #include <glib.h>
6609         * camel-filter-search.c: #ifdef HAVE_CONFIG_H
6610         * camel-folder-search.c: #include <config.h>
6611         * camel-folder-search.h: Header shuffling
6612         * camel-folder-summary.h: Same here
6613         * camel-folder-thread.c: #ifdef HAVE_CONFIG_H
6614         * camel-folder.c: Here too.
6615         * camel-folder.h: #include <glib.h>
6616         * camel-internet-address.c: Move system headers up
6617         * camel-lock.c: #ifdef HAVE_CONFIG_H
6618         * camel-medium.c: Same here
6619         * camel-mime-filter-bestenc.c: Move system headers up
6620         * camel-mime-filter-from.c: Same here
6621         * camel-mime-filter-linewrap.c: And here
6622         * camel-mime-filter.c: #include <string.h> to fix warnings from new gcc
6623         * camel-mime-filter.h: System headers moved up
6624         * camel-mime-message.c: Here too. #ifdef HAVE_CONFIG_H added
6625         * camel-mime-part-utils.c: #ifdef HAVE_CONFIG_H added
6626         * camel-mime-part.c: Here too, and shuffle headers
6627         * camel-mime-utils.c: #ifdef HAVE_CONFIG_H. Remove const from two
6628         variables to remove warning.
6629         * camel-mime-utils.h: Shuffle headers
6630         * camel-movemail.c: #ifdef HAVE_CONFIG_H. Mark string in camel_exception_set
6631         * camel-multipart.c: #ifdef HAVE_CONFIG_H. Added includes to remove
6632         warnings from new gcc
6633         * camel-object.c: #ifdef HAVE_CONFIG_H
6634         * camel-object.h: Shuffle headers
6635         * camel-operation.c: #ifdef HAVE_CONFIG_H
6636         * camel-provider.c: #ifdef HAVE_CONFIG_H. Shuffle headers. Mark a string
6637         * camel-remote-store.c: #ifdef HAVE_CONFIG_H
6638         * camel-sasl-anonymous.c: #ifdef HAVE_CONFIG_H. #include <string.h>
6639         * camel-sasl-cram-md5.c: #ifdef HAVE_CONFIG_H. #include <string.h> and
6640         <stdio.h> to remove warnings.
6641         * camel-sasl-digest-md5.c: #ifdef HAVE_CONFIG_H. shuffle headers
6642         * camel-sasl-digest-md5.h: Shuffle headers.
6643         * camel-sasl-kerberos4.c: #ifdef HAVE_CONFIG_H. Shuffle headers.
6644         * camel-sasl-kerberos4.h: Shuffle headers.
6645         * camel-sasl-plain.c: #ifdef HAVE_CONFIG_H. Shuffle
6646         * camel-sasl.c: #ifdef HAVE_CONFIG_H. #include <string.h>
6647         * camel-search-private.c: #include <config.h>
6648         * camel-seekable-stream.c: #ifdef HAVE_CONFIG_H
6649         * camel-seekable-stream.h: Shuffle
6650         * camel-seekable-substream.c: #ifdef HAVE_CONFIG_H
6651         * camel-service.c: Same
6652         * camel-service.h: Shuffle
6653         * camel-session.c: #ifdef HAVE_CONFIG_H
6654         * camel-store.c: Same
6655         * camel-stream-buffer.c: Here too
6656         * camel-stream-buffer.h: Shuffle
6657         * camel-stream-filter.c: #include <string.h>
6658         * camel-stream-fs.c: #ifdef HAVE_CONFIG_H
6659         * camel-stream-fs.h: Shuffle headers
6660         * camel-stream-mem.c: Same as above
6661         * camel-stream-mem.h: Here too
6662         * camel-stream-null.c: #ifdef HAVE_CONFIG_H
6663         * camel-stream.c: Here too
6664         * camel-stream.h: Shuffle
6665         * camel-tcp-stream-openssl.c: #ifdef HAVE_CONFIG_H
6666         * camel-tcp-stream-raw.c: Same here. and move local includes down
6667         * camel-tcp-stream-ssl.c: Same as above
6668         * camel-tcp-stream.c: #ifdef HAVE_CONFIG_H
6669         * camel-tcp-stream.h: move local include down
6670         * camel-transport.c: #ifdef HAVE_CONFIG_H
6671         * camel-transport.h: #include <glib.h>
6672         * camel-uid-cache.c: #ifdef HAVE_CONFIG_H. Shuffle headers
6673         * camel-uid-cache.h: Shuffle
6674         * camel-url.c: #ifdef HAVE_CONFIG_H
6675         * camel-vee-folder.c: #ifdef HAVE_CONFIG_H. Shuffle headers
6676         * camel-vee-folder.h: #include <glib.h>
6677         * camel-vee-store.h: Same here
6678         * camel.c: #ifdef HAVE_CONFIG_H
6679         * gstring-util.c: Here too
6680         * hash-table-utils.c: Remove #include <glib.h>
6681         * hash-table-utils.h: #include it here instead.
6682         * string-utils.c: #ifdef HAVE_CONFIG_H
6683         * providers/cache/camel-cache-map.c: #ifdef HAVE_CONFIG_H, shuffle
6684         headers and mark strings in camel_exception_set*()
6685         * providers/cache/camel-cache-provider.c: #ifdef HAVE_CONFIG_H
6686         * providers/cache/camel-cache-store.c: Same here, and mark a string.
6687         * providers/imap/camel-imap-command.c: #ifdef HAVE_CONFIG_H
6688         * providers/imap/camel-imap-command.h: Shuffle header
6689         * providers/imap/camel-imap-folder.c: #ifdef HAVE_CONFIG_H
6690         * providers/imap/camel-imap-message-cache.c: #ifdef HAVE_CONFIG_H
6691         * providers/imap/camel-imap-provider.c: #ifdef HAVE_CONFIG_H and
6692         #include <string.h>
6693         * providers/imap/camel-imap-search.c: #ifdef HAVE_CONFIG_H
6694         * providers/imap/camel-imap-store.c: #ifdef HAVE_CONFIG_H and mark
6695         a string.
6696         * providers/imap/camel-imap-summary.c: Shuffle headers
6697         * providers/imap/camel-imap-wrapper.c: #ifdef HAVE_CONFIG_H. Shuffle
6698         * providers/local/camel-local-folder.c: #ifdef HAVE_CONFIG_H
6699         * providers/local/camel-local-provider.c: #ifdef HAVE_CONFIG_H
6700         * providers/local/camel-local-store.c: Same here
6701         * providers/local/camel-local-summary.c: Here too, shuffle, mark a string
6702         * providers/local/camel-maildir-folder.c: #ifdef HAVE_CONFIG_H
6703         * providers/local/camel-maildir-store.c: Same
6704         * providers/local/camel-maildir-summary.c: Here too
6705         * providers/local/camel-mbox-summary.c: And here
6706         * providers/local/camel-mbox-store.c: And here
6707         * providers/local/camel-mbox-summary.c: #include <config.h>
6708         * providers/local/camel-mh-folder.c: #ifdef HAVE_CONFIG_H
6709         * providers/local/camel-mh-store.c: same
6710         * providers/local/camel-mh-summary.c: #ifdef HAVE_CONFIG_H, shuffle headers
6711         and mark a string for translation.
6712         * providers/nntp/camel-nntp-auth.c: #include <config.h>
6713         * providers/nntp/camel-nntp-store.c: Remove superfluous arg to 
6714         CAMEL_SERVICE_CLASS to make it compile
6715         * providers/pop3/camel-pop3-provider.c: #ifdef HAVE_CONFIG_H
6716         * providers/pop3/camel-pop3-store.c: Same here
6717         * providers/sendmail/camel-sendmail-provider.c: Here too
6718         * providers/sendmail/camel-sendmail-transport.c: Here too
6719         * providers/smtp/camel-smtp-provider.c: Same
6720         * providers/smtp/camel-smtp-transport.c: #ifdef HAVE_CONFIG_H, mark
6721         strings for translations.
6722         
6723 2001-03-29  Dan Winship  <danw@ximian.com>
6724
6725         * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
6726         to "guint32 flags".
6727
6728         * tests/misc/url.c (main): Update calls to camel_url_to_string
6729
6730         * providers/imap/camel-imap-store.c (construct): Call
6731         camel_url_to_string with flags to hide password, authtype, and
6732         params to create the base_url.
6733         (etc): Update for the fact that the base_url no longer has the "/"
6734         at the end.
6735
6736         * camel-service.c (construct): Update calls to camel_url_to_string
6737         (pass CAMEL_URL_HIDE_PASSWORD)
6738
6739 2001-04-03  Jeffrey Stedfast  <fejj@ximian.com>
6740
6741         * camel-mime-utils.c (header_decode_text): Ignore whitespace
6742         between encoded words (there were a few cases where it didn't
6743         before).
6744         (header_encode_string): Preserve whitespace between words that are
6745         to be encoded by encoding them too.
6746         (header_encode_phrase): Same here but with phrases.
6747
6748 2001-04-04  Kjartan Maraas  <kmaraas@gnome.org>
6749
6750         * camel-filter-driver.c: Added #include <config.h>. Marked
6751         a bunch of strings for translation.
6752         * camel-folder-search.c: Added #include <config.h>.
6753         * camel-folder-summary.c: Same here.
6754         * camel-movemail.c: Marked strings for translation.
6755         * camel-provider.c: Same here.
6756         * camel-search-private.c: #include <config.h>
6757         * camel-vee-folder.c: Mark string for translation.
6758         * providers/local/camel-mbox-summary.c: #include <config.h>
6759         
6760 2001-04-03  Dan Winship  <danw@ximian.com>
6761
6762         * providers/imap/camel-imap-folder.c (imap_sync): If we don't
6763         change any flags or expunge, send a NOOP to give the server a
6764         chance to send EXISTS, etc, messages.
6765         (imap_get_message): If the server_level < IMAP4rev1, always fetch
6766         messages all-at-once, since they don't support the [#.MIME]
6767         syntax.
6768
6769 2001-04-01  Jeffrey Stedfast  <fejj@ximian.com>
6770
6771         * providers/imap/camel-imap-store.c (get_folder_info): Don't
6772         blindly append "/INBOX", construct a CamelURL and set the path
6773         that way.
6774         (parse_list_response_as_folder_info): Don't blindly append
6775         "/<foldername>", construct a CamelURL and set the path that way
6776         instead.
6777         (get_folders_offline): And again here.
6778
6779 2001-03-31  Not Zed  <NotZed@Ximian.com>
6780
6781         * camel-operation.c (struct _status_stack): change stamp to
6782         unsigned to avoid overflow.
6783         (camel_operation_end):
6784         (camel_operation_progress_count):
6785         (camel_operation_progress): Double the delay before transient
6786         events start showing their own progress.
6787
6788 2001-03-30  Not Zed  <NotZed@Ximian.com>
6789
6790         * providers/pop3/camel-pop3-folder.c (pop3_get_message): Change
6791         the pop download into a transient event.
6792
6793         * camel-operation.c (stamp): Get a timestamp that changes 4x a
6794         second (or rather, arbitrarily more often than 1/second).
6795         (camel_operation_progress): Use stamp() for time updates.
6796         (camel_operation_progress_count): "
6797         (camel_operation_start): Store the status as a struct status_stack
6798         item.
6799         (camel_operation_start_transient): New function to start a
6800         transient event, which is only reported if it runs for too
6801         long/and is reset afterwards.
6802         (camel_operation_progress):
6803         (camel_operation_progress_count): Fix for status_stack changes,
6804         and account for transient updates. 
6805
6806         * camel-filter-driver.c (camel_filter_driver_filter_folder): When
6807         we remove things (set deleted), always set seen too, to mirror
6808         interface behaviour when you delete.
6809         (camel_filter_driver_filter_message): And same here too.
6810
6811 2001-03-30  Dan Winship  <danw@ximian.com>
6812
6813         * providers/pop3/camel-pop3-store.c (connect_to_server,
6814         query_auth_types, pop3_connect): Move things around here to make
6815         this all work right again (so you don't get prompted for a
6816         password when checking the supported authtypes.)
6817
6818 2001-03-29  Dan Winship  <danw@ximian.com>
6819
6820         * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
6821         to "guint32 flags".
6822
6823         * tests/misc/url.c (main): Update calls to camel_url_to_string
6824
6825         * providers/imap/camel-imap-store.c (construct): Call
6826         camel_url_to_string with flags to hide password, authtype, and
6827         params to create the base_url.
6828         (etc): Update for the fact that the base_url no longer has the "/"
6829         at the end.
6830
6831         * camel-service.c (construct): Update calls to camel_url_to_string
6832         (pass CAMEL_URL_HIDE_PASSWORD)
6833
6834 2001-03-28  Jeffrey Stedfast  <fejj@ximian.com>
6835
6836         * camel-pgp-context.[c,h]: New class for PGP encrypting,
6837         decrypting, signing and verifying. Next I'll be moving the
6838         contents of mail/mail-crypto into Camel. These files will
6839         basically replace mail/openpgp-utils.[c,h].
6840
6841 2001-03-29  Not Zed  <NotZed@Ximian.com>
6842
6843         * camel-folder-search.c (search_body_contains): Optimise the match
6844         "" case, just match everything in the folder (if we have it).
6845
6846         * camel-vtrash-folder.c (vtrash_move_messages_to): Access the
6847         folder directly from the message info.
6848         (vtrash_move_messages_to): I think we also need to call the real
6849         move_messages_to, and not try and bypass the lock, since we dont
6850         have the lock for that folder.
6851
6852         * camel-vee-folder.h: Move CamelVeeMessageInfo to public, so
6853         subclasses can get to it.
6854
6855         * camel-vee-folder.c (camel_vee_folder_add_folder): Dont let you
6856         add a vfolder to itself.
6857         (folder_changed): 
6858         (vee_folder_remove_folder): 
6859         (vee_folder_build_folder): Copy changes before triggering changed
6860         events, so we can do them outside of locks.
6861         (camel_vee_folder_get_message_folder): Removed function.
6862         (camel_vee_folder_hash_folder): Made public (renamed from
6863         hash_folder), simply for subclasses (probably not needed).
6864         (vee_expunge): Oops, call the class sync, not superclass sync.
6865         (vee_sync): Remove some accidental debug.
6866
6867 2001-03-27  Jeffrey Stedfast  <fejj@ximian.com>
6868
6869         * camel-service.c (get_path): Add the port (if user defined) to
6870         the path to fix bug #1996.
6871
6872         Danw: I'm iffy on the "fix" so I'd like you to comment.
6873
6874 2001-03-27  Jeffrey Stedfast  <fejj@ximian.com>
6875
6876         * providers/pop3/camel-pop3-folder.c (pop3_sync): If we aren't
6877         going to even check the resp/free buffer that gets returned from
6878         camel_pop3_command, don't even bother using it. Send in NULL
6879         instead.
6880         (pop3_get_message): Check to make sure that the `result' string is
6881         non-NULL. It's possible that some POP servers may return with
6882         "+OK\r\n<message>..." rather than the expected 
6883         "+OK ### octets\r\n<message>..."
6884
6885 2001-03-27  Not Zed  <NotZed@Ximian.com>
6886
6887         * camel-folder-summary.c (camel_folder_summary_finalize): Unref
6888         the html filter when done.
6889         (summary_build_content_info): Disable using the html parser to
6890         help index html mails until it gets sorted out.
6891
6892         * camel-vee-folder.c (folder_changed): Fix a cut n paste bug, we
6893         want uid_removed not uid_changed deref, fixes bug #1999.
6894
6895 2001-03-27  Dan Winship  <danw@ximian.com>
6896
6897         * camel-sasl.c (camel_sasl_authtype_list): add an argument to say
6898         whether or not you want "PLAIN" in the list (so you don't end up
6899         with "Password" twice in the config dialog).
6900
6901         * providers/imap/camel-imap-provider.c (camel_provider_module_init): 
6902         * providers/imap/camel-imap-store.c (query_auth_types): We don't
6903         want PLAIN.
6904
6905         * providers/smtp/camel-smtp-provider.c (camel_provider_module_init): 
6906         * providers/smtp/camel-smtp-transport.c (query_auth_types): But we
6907         do.
6908
6909 2001-03-27  Dan Winship  <danw@ximian.com>
6910
6911         * camel-provider.h: Add an "extra_conf" field to CamelProvider
6912         with structures and defines and stuff, for providers to specify
6913         additional configuration options that they want. Also add a
6914         "supports ssl" flag to the provider flags.
6915
6916         * camel-url.c (camel_url_new_with_base): Fix parsing of params.
6917         (output_param): And unparsing...
6918
6919         * camel-remote-store.c: add a "default_ssl_port" field.
6920         (remote_construct): If the URL has the "use_ssl" parameter, set
6921         the store's use_ssl flag.
6922         (remote_connect): If using SSL and no port specified, use the
6923         default_ssl_port rather than the default_port.
6924
6925         * providers/smtp/camel-smtp-provider.c (smtp_provider): add
6926         CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config
6927         gui code knows that the ALLOW_USER and ALLOW_AUTH go together.)
6928         (ssmtp_provider): gone
6929
6930         * providers/smtp/camel-smtp-transport.c (smtp_construct): Set a
6931         flag if "use_ssl" param is set.
6932         (smtp_connect): Check the CamelSmtpTransport use_ssl flag rather
6933         than checking if this is smtp or ssmtp.
6934
6935         * providers/imap/camel-imap-provider.c (imap_conf_entries): Add a
6936         bunch of IMAP-specific configuration options, like "check for new
6937         mail in all folders" (default TRUE), "show only subscribed
6938         folders" (default TRUE), "ignore server-supplied namespace", and
6939         "apply filters to INBOX" (not yet implemented).
6940         (imap_provider): We support SSL and we no longer allow a path in
6941         the URL. (namespace is handled via extra_conf)
6942         (simap_provider): Gone
6943
6944         * providers/imap/camel-imap-store.c (camel_imap_store_init): Set
6945         default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here
6946         (construct): remove simap stuff, deal with "use_lsub",
6947         "namespace", "check_all", and "filter" parameters. Set base_url
6948         to not include params.
6949         (imap_store_setup_online): Don't ask for the namespace if it was
6950         set explicitly. Don't get subscribed folders if !use_lsub.
6951         (imap_concat): Fix a bug.
6952         (get_folder_info): Support for not checking all folders.
6953
6954         * providers/imap/camel-imap-folder.c (imap_get_full_name): Rewrite
6955         to use imap_store->namespace, not service->url->path
6956
6957         * providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep
6958         on server" (currently still implemented by the mailer code, not
6959         here), "delete after N days" (not yet implemented).
6960         (pop3_provider): we support SSL
6961         (spop_provider): gone
6962
6963         * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set
6964         default_ssl_port
6965         (pop3_connect): Remove spop code
6966
6967 2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>
6968
6969         * camel-vee-folder.c (vee_folder_construct): Move all of the
6970         camel_vee_folder_construct() internals here.
6971         (camel_vee_folder_construct): This function basically becomes a
6972         wrapper for vee_folder_construct and also checks to make sure that
6973         the UNMATCHED vfodler is constructed otherwise constructs it.
6974         (camel_vee_folder_new): Call vee_folder_construct() instead so
6975         that we don't get into a dead-lock.
6976
6977 2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>
6978
6979         * camel-store.c (init_trash): Use camel_vtrash_folder_new() to
6980         create the vtrash folder now.
6981
6982         * camel-vtrash-folder.[c,h]: New subclass of CamelVeeFolder for
6983         our vTrash folders.
6984
6985         * camel-folder.c (camel_folder_copy_messages_to): Don't watch for
6986         vtrash folders anymore.
6987         (camel_folder_move_messages_to): Same.
6988
6989         * camel-vee-folder.c (camel_vee_folder_class_init): Update.
6990         (vee_move_messages_to): Rewrite to use the new move API.
6991
6992         * camel-filter-driver.c (do_copy): Updated to reflect
6993         copy_message_to changes. Create a temporary uid array and use
6994         that.
6995         (do_move): Same.
6996         (camel_filter_driver_filter_message): And again, here...
6997
6998         * providers/imap/camel-imap-folder.c (imap_copy_messages_to):
6999         Update to the new API.
7000         (imap_move_messages_to): Same.
7001         (get_uid_set): New function to create a `set' string based on an
7002         array of UIDs for use with imap_copy_messages_to.
7003
7004         * camel-folder.c (camel_folder_copy_messages_to): Replaces
7005         camel_folder_copy_message_to
7006         (camel_folder_move_message_to): Replaces
7007         camel_folder_move_message_to.
7008
7009 2001-03-27  Not Zed  <NotZed@Ximian.com>
7010
7011         * camel-vee-store.c (vee_get_folder): Added folder_created event
7012         here.
7013         
7014         * camel-vee-folder.c (unmatched_finalise): Removed, moved into
7015         main finalise code.
7016         (message_changed): Just create a new change entry and promote it
7017         to a folder_changed thing.
7018         (vee_sync): Always rebuild folder on sync, even when not expunge.
7019         (folder_changed): If not autoupdating, make sure we remove any
7020         removed entries.
7021         (vee_folder_build_folder):
7022         (vee_folder_remove_folder): NOP if we're called on
7023         folder_unmatched.
7024         (vee_search_by_expression): Only search each folder once.  Should
7025         we also order the result in summary order?
7026
7027 2001-03-20  Not Zed  <NotZed@Ximian.com>
7028
7029         * camel-store.c (init_trash): Fix calling for vee_folder_new().
7030
7031         * camel-folder-summary.c (camel_folder_summary_remove_index):
7032         Optimise slightly, use ptr_array_remove_index rather than have to
7033         search for the index by using summary_remove.
7034
7035         * camel-vee-folder.h: Removed local member from VeeFolder, since
7036         it was never used.
7037
7038         * camel-vee-store.c (camel_vee_store_finalise): Setup finalise
7039         function.
7040
7041         * camel-vee-folder.c (camel_vee_folder_set_expression): New
7042         function to set the query of an existing vfolder.
7043         (camel_vee_folder_construct): New function for
7044         convenience/subclasses.
7045         (camel_vee_folder_new): Removed exception parameter, no longer
7046         needed (since we dont search yet).
7047         (camel_vee_folder_new): Changed to use folder_construct, and no
7048         longer raise the folder created signal.
7049         (vee_folder_build_folder): Make it return error on exception, so
7050         we can work without exceptions.
7051         (vee_folder_remove_folder): Use remove index rather than
7052         remove_uid, this is ok since we have the summary locked for our
7053         own access.
7054         (camel_vee_folder_add_folder): Only add the folder to the
7055         unmatched private if it is not a private folder.
7056         (camel_vee_folder_remove_folder): Only remove the folder from
7057         unmatched if it is not private.
7058         (vee_expunge): Just call sync with expunge set.
7059         (vee_sync): If expunging, also refresh the search.
7060         (vee_folder_build_folder): We do our own locking now, removed from
7061         callers, also trigger changed events here too (within locks),
7062         fixed callers appropriately.
7063         (vee_folder_remove_folder): Do our own locking, and trigger
7064         changed events.
7065         (vee_folder_add_info): Renamed of vee_folder_add, we now take a
7066         hash of the folder name, rather than use the folders address.
7067         (hash_folder): Convert a folder name into an 8 character hash.
7068         (vee_get_message, vee_search_by_expression, vee_set_message_flags,
7069         vee_set_message_user_flag, vee_move_message_to): Changed the uid
7070         to be an 8 byte hash + original uid, with no ':' anymore.
7071
7072 2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>
7073
7074         * camel-mime-utils.c (header_decode_text): When writing the last
7075         token (if not rfc2047 encoded), don't use g_string_append_len, use
7076         append_latin1.
7077
7078         * camel-mime-message.c (write_to_stream): Don't spew a warning if
7079         the message-id wasn't set by the application, not a big deal since
7080         we create one right here.
7081
7082 2001-03-26  Dan Winship  <danw@ximian.com>
7083
7084         * providers/imap/camel-imap-command.c (camel_imap_command): keep a
7085         reference on the store's current_folder.
7086
7087         * providers/imap/camel-imap-store.c (camel_imap_store_finalize): 
7088         (imap_disconnect): unref the current_folder before clearing it.
7089
7090         * camel-url.c (camel_url_get_param): Add missing accessor.
7091
7092         * camel-session.c (camel_session_get_provider): New. Return
7093         the provider for a URL.
7094
7095 2001-03-25  Dan Winship  <danw@ximian.com>
7096
7097         * camel-url.c (camel_url_new_with_base): New URL parser with full
7098         RFC1808 relative URL support. Yum.
7099         (camel_url_new): Wrapper around camel_url_new_with_base now.
7100
7101         * tests/Makefile.am: add misc subdir
7102
7103         * tests/misc/url.c: relative URL test cases from RFC 1808
7104
7105 2001-03-25  Jeffrey Stedfast  <fejj@ximian.com>
7106
7107         * camel-filter-driver.c (do_copy): Don't use copy_to if the source
7108         folder doesn't support summary info's.
7109         (do_move): Same.
7110         (camel_filter_driver_filter_message): And again here.  I think
7111         this will fix the problem of "colour" tags not staying with the
7112         message when it's copied to a folder during the filter process.
7113
7114 2001-03-24  Jeffrey Stedfast  <fejj@ximian.com>
7115
7116         * camel-sasl-digest-md5.c (digest_response): Do charset conversion
7117         on the username param here if needed.
7118         (parse_server_challenge): Protect against possibly empty-string
7119         charset values.
7120
7121 2001-03-23  Jon Trowbridge  <trow@ximian.com>
7122
7123         * camel-filter-driver.c (camel_filter_driver_filter_message):
7124         Don't call camel_mime_message_set_identity.  (The call is
7125         commented out, left over from some earlier experimentation that I
7126         want to be able to remember later...)
7127
7128         * camel-mime-message.c (camel_mime_message_set_identity): Added.
7129         A function to set the X-Evolution-Identity header.
7130         
7131 2001-03-22  Dan Winship  <danw@ximian.com>
7132
7133         * providers/imap/camel-imap-command.c (imap_read_response): Don't
7134         look at untagged responses other than "* BYE"...
7135         (camel_imap_response_free): ...do it here instead...
7136         (camel_imap_response_free_without_processing): ...but not here.
7137
7138         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
7139         Remove the "EXISTS" line from the response so
7140         camel_imap_response_free won't try to process it.
7141         (camel_imap_folder_selected): If we get an EXISTS response mixed
7142         in with the FETCH responses, record the new EXISTS value.
7143         Use camel_imap_response_free_without_processing so that an EXISTS
7144         response won't cause a loop.
7145         (imap_rescan): Use camel_imap_response_free_without_processing.
7146         (imap_update_summary): Use
7147         camel_imap_response_free_without_processing. If an EXISTS response
7148         shows up, call imap_update_summary again to get the new messages.
7149         (imap_protocol_get_summary_specifier): Use BODY.PEEK[0], not
7150         RFC822.HEADER for prev IMAP4rev1, since the FETCH parser won't
7151         deal with RFC822.HEADER responses.
7152
7153         * providers/imap/camel-imap-store.c (get_folder_info): Fix an
7154         uninitialized variable
7155
7156 2001-03-21  Dan Winship  <danw@ximian.com>
7157
7158         * camel-provider.h: (CamelProvider) add a "GList *authtypes", so
7159         you can get the list of authtypes used by a provider without
7160         needing to have an actual CamelService object handy. (Will be
7161         needed by the new config druid.)
7162         (CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test
7163         the URL part stuff, since the way it works is too complicated and
7164         everyone always does it wrong.
7165
7166         * camel-service.c (camel_service_query_auth_types): Remove the
7167         @connected arg again: if you don't want to connect, you can just
7168         get the list of authtypes off the provider.
7169         (camel_service_free_auth_types): Remove this. All existing
7170         implementations do authtypes the same way, so just say the caller
7171         should "g_list_free" the list. (Oh, look, removing this function
7172         doesn't actually cause the mailer to not build. How 'bout that.)
7173         (construct, get_path): Use the new URL part macros.
7174
7175         * camel-remote-store.c (remote_query_auth_types): Update
7176         (remote_free_auth_types): Nuke
7177         (camel_remote_store_authtype_list): New function for use by
7178         subclasses.
7179
7180         * providers/imap/camel-imap-provider.c:
7181         * providers/pop3/camel-pop3-provider.c:
7182         * providers/smtp/camel-smtp-provider.c: Update CamelProvider
7183         structures.
7184         (camel_provider_module_init): Put all the SSL parts together so
7185         there's only 1 #ifdef. Set up the provider authtypes field using
7186         the SASL, CamelRemoteStore, and standard authtypes, as
7187         appropriate. Copy that from the normal provider to the SSL
7188         provider.
7189
7190         * providers/local/camel-local-provider.c:
7191         * providers/sendmail/camel-sendmail-provider.c:
7192         * camel-session.c: Update CamelProvider structures.
7193
7194         * providers/imap/camel-imap-store.c (query_auth_types):
7195         * providers/pop3/camel-pop3-store.c (query_auth_types): Update
7196
7197         * providers/smtp/camel-smtp-store.c (query_auth_types): Update.
7198         Remove the no_authtype, because that's what "ALLOW_AUTH" rather
7199         than "NEED_AUTH" means.
7200         (free_auth_types): Nuke.
7201
7202 2001-03-21  Jeffrey Stedfast  <fejj@ximian.com>
7203
7204         * camel-filter-driver.c (camel_filter_driver_filter_message):
7205         Return -1 on fail.
7206         (camel_filter_driver_filter_folder): Same.
7207         (camel_filter_driver_filter_mbox): Same.
7208         (camel_filter_driver_filter_folder): Return -1 if an exception was
7209         set as well.
7210
7211 2001-03-19  Jeffrey Stedfast  <fejj@ximian.com>
7212
7213         * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
7214         Free the expected host.
7215         (camel_tcp_stream_openssl_new): Now takes a Service and an
7216         expected_host. Set them.
7217
7218 2001-03-20  Dan Winship  <danw@ximian.com>
7219
7220         * providers/imap/camel-imap-store.c
7221         (camel_imap_store_check_online): Function to check if the store is
7222         online and set an exception if not. Currently controlled by an
7223         environment variable, but eventually there will be both a global
7224         (session-level) setting and a per-store setting.
7225         (construct): Set up storage_path and base_url here rather than at
7226         connect-time.
7227         (imap_auth_loop): Split out from imap_connect.
7228         (imap_setup_online): Split out from imap_connect. Do the
7229         post-authentication connection setup, and cache the results to
7230         disk.
7231         (imap_setup_offline): Set up a CamelImapStore with information
7232         saved from a previous imap_setup_online.
7233         (imap_connect): If online, do connect_to_server(),
7234         imap_auth_loop(), and imap_setup_online(). Otherwise, do
7235         imap_setup_offline().
7236         (get_folder, get_folder_info): Add offline support.
7237         (create_folder, subscribe_folder, unsubscribe_folder): Disable
7238         these when offline (for now).
7239
7240         * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
7241         Remove the sync'ing-with-server stuff... it's done by
7242         camel_imap_folder_selected now, which only gets called if the
7243         store is online.
7244         (camel_imap_folder_selected): add the code removed from
7245         camel_imap_folder_new. Besides simplifying the folder_new and
7246         summary_new code, this also means now that we'll DTRT if a
7247         folder's UIDVALIDITY changes while we're connected. Also, when
7248         that happens, clear the message cache explicitly.
7249         (imap_refresh_info, imap_sync): These are no-ops when offline.
7250         (imap_expunge, imap_append_message, imap_copy_message_to,
7251         imap_search_by_expression): These don't yet work offline.
7252         (imap_get_message, camel_imap_folder_fetch_data): Return an error
7253         when trying to fetch a non-cached body part when we're offline.
7254
7255         * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
7256         Rewrite to not check the validity here. (We'll do it from
7257         camel_imap_folder_selected instead.)
7258
7259         * providers/imap/camel-imap-command.c (camel_imap_command): Call
7260         camel_imap_folder_selected even when the selection is all we're
7261         doing, to match the changes in camel-imap-folder.c.
7262
7263         * providers/imap/camel-imap-message-cache.c
7264         (camel_imap_message_cache_clear): New function to clear out a
7265         message cache.
7266
7267 2001-03-19  Christopher James Lahey  <clahey@ximian.com>
7268
7269         * Makefile.am (INCLUDES): Added $(EXTRA_GNOME_CFLAGS)
7270
7271 2001-03-19  Jeffrey Stedfast  <fejj@ximian.com>
7272
7273         * providers/pop3/camel-pop3-store.c (pop3_connect): Set the errbuf
7274         to NULL after freeing it? I don't think this should fix bug #1801
7275         but I guess it can't hurt.
7276
7277 2001-03-18  Jeffrey Stedfast  <fejj@ximian.com>
7278
7279         * camel-remote-store.c (remote_recv_line): Protect against a
7280         possibly NULL exception.
7281
7282         * camel-filter-driver.c (camel_filter_driver_filter_message):
7283         Document and modify to return a boolean value denoting whether or
7284         not errors occured during processing.
7285         (camel_filter_driver_filter_mbox): Same as above and also modified
7286         to check return codes of filter_message rather than relying only
7287         on whether or not the exception was set (as it's possible to pass
7288         in NULL for the exception).
7289         (camel_filter_driver_filter_folder): Same as above.
7290
7291         * camel-mime-utils.c (header_param_list_format_append): Quote the
7292         param value if it contains whitespace as well.
7293
7294 2001-03-17  Jeffrey Stedfast <fejj@ximian.com>
7295
7296         * Makefile.am: Don't include system include dir.
7297
7298         * camel.c: Use quotes around the nss.h include so it doesn't try
7299         to use the systen nss.h file.
7300
7301         * camel-tcp-stream-ssl.c: Same here.
7302
7303 2001-03-17  Not Zed  <NotZed@Ximian.com>
7304
7305         * providers/local/camel-maildir-summary.c (maildir_summary_sync): 
7306         Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check
7307         the maildir directory for new/updated messages at sync time.
7308
7309         * camel-folder.c (camel_folder_ref_message_info): Implemented.
7310         (ref_message_info): And default implementation.
7311
7312         * camel-folder.h: Added ref_message_info virtual method.
7313
7314 2001-03-16  Not Zed  <NotZed@Ximian.com>
7315
7316         * camel-folder-thread.c
7317         (camel_folder_thread_messages_new_summary): New function to create
7318         a thread tree from a supplied summary array.
7319         (camel_folder_thread_messages_destroy): Handle thread trees
7320         generated by the above function properly.
7321
7322 2001-03-16  Jeffrey Stedfast  <fejj@ximian.com>
7323
7324         * camel-private.h: Same.
7325
7326         * camel-remote-store.h: Fixed #include to use <>'s instead of ""'s
7327
7328 2001-03-16  Jeffrey Stedfast  <fejj@ximian.com>
7329
7330         * camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the
7331         issuer of the certificate.
7332
7333         * providers/smtp/camel-smtp-transport.c (smtp_connect): Use
7334         camel_tcp_stream_get_socket().
7335
7336         * camel-tcp-stream-openssl.c (stream_get_socket): Implemented.
7337
7338         * camel-tcp-stream-ssl.c (stream_get_socket): Implemented.
7339
7340         * camel-tcp-stream-raw.c (stream_get_socket): Implemented.
7341
7342         * camel-tcp-stream.c (camel_tcp_stream_get_socket): New function.
7343
7344 2001-03-16  Kjartan Maraas  <kmaraas@gnome.org>
7345
7346         * providers/pop3/camel-pop3-folder.c: Added #include <config.h>
7347         
7348 2001-03-16  Dan Winship  <danw@ximian.com>
7349
7350         * camel-mime-utils.c (header_msgid_generate): Don't use
7351         getdomainname: it's NIS crap, not DNS.
7352
7353 2001-03-15  Jeffrey Stedfast  <fejj@ximian.com>
7354
7355         * camel.c (camel_init): Don't use the hardcoded cert db directory,
7356         use the one passed in.
7357
7358         * camel-tcp-stream-ssl.c (ssl_get_client_auth): Wrote the default
7359         implementation. Not that we'll use this though, since this is the
7360         default implementation provided by NSS anyway. This more or less
7361         serves as a reference in case we want to change anything.
7362         (ssl_auth_cert): Same.
7363         (ssl_bad_cert): Changed the prompt string and free it when we're
7364         done.
7365
7366 2001-03-15  Dan Winship  <danw@ximian.com>
7367
7368         First batch of disconnected IMAP-related stuff. This adds local
7369         caching of message parts, but NOT any actual disconnected support.
7370         (But it should speed up IMAP use.)
7371
7372         * providers/imap/camel-imap-message-cache.c: New class for caching
7373         message data to disk, and removing it when it's no longer
7374         relevant. Will eventually also support merging message parts
7375         together to save on files. Or maybe using a db instead of files?
7376
7377         * providers/imap/camel-imap-private.h: Add a cache_lock to
7378         CamelImapFolderPrivate. This lock must be recursive, so make both
7379         locks EMutexes rather than GMutex.
7380
7381         * providers/imap/camel-imap-folder.c (parse_fetch_response): "The
7382         only FETCH response parser you need!" Replaces the various
7383         almost-correct bits of code formerly scattered throughout this
7384         file with a single fully-correct function that can handle any
7385         FETCH response at any time, so we don't get confused by seeing a
7386         flags update when we were only expecting a message body, etc.
7387         (camel_imap_folder_fetch_data): FETCH a message body part either
7388         from the cache or the server
7389         (camel_imap_folder_changed): Remove expunged messages from the
7390         message cache.
7391         (camel_imap_folder_new): Change to take a directory instead of a
7392         summary file name. Create a CamelImapMessageCache for the folder.
7393         (imap_finalize): Unref the message cache.
7394         (camel_imap_folder_selected, imap_rescan, get_content,
7395         get_message, imap_get_message, imap_update_summary): Redone a
7396         bunch to use parse_fetch_data, CamelImapMessageCache, etc.
7397
7398         * providers/imap/camel-imap-store.c (get_folder): Pass directory
7399         name to camel_imap_folder_new, not summary filename. Use
7400         e_path_to_physical to generate a path with /subfolders/ inserted
7401         between directory components.
7402
7403         * providers/imap/camel-imap-wrapper.c (camel_imap_wrapper_new):
7404         Call camel_imap_folder_fetch_data (with cache_only TRUE) and if
7405         the data is cached, return an online datawrapper rather than an
7406         offline one.
7407         (write_to_stream): Use camel_imap_folder_fetch_data (with
7408         cache_only FALSE) here too
7409
7410         * providers/imap/camel-imap-utils.c (imap_skip_list): Renamed from
7411         skip_list and made non-static.
7412
7413 2001-03-15  Jeffrey Stedfast  <fejj@ximian.com>
7414
7415         * camel-tcp-stream-ssl.h: Uninclude prnetdb.h since it's not
7416         needed here.
7417
7418         * providers/smtp/camel-smtp-transport.c: #include prnetdb.h here
7419         instead of making camel-tcp-stream-ssl.h include it. Prevents some
7420         header bloat.
7421
7422         * providers/smtp/Makefile.am: Include the NSPR_CFLAGS and
7423         NSS_CFLAGS.
7424
7425 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7426
7427         * providers/smtp/camel-smtp-transport.c (smtp_connect): Update for
7428         using CamelTcpStreams and also for using SSL.
7429
7430         * providers/smtp/libcamelsmtp.urls: defined "ssmtp"
7431
7432         * providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP
7433         provider.
7434         (camel_provider_module_init): Register the Secure SMTP provider.
7435
7436 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7437
7438         * providers/imap/camel-imap-store.c (imap_connect): Check for
7439         "simap" instead of "imaps".
7440
7441         * providers/pop3/camel-pop3-store.c (pop3_connect): Change the
7442         port to be 995 for spop.
7443
7444         * providers/pop3/libcamelpop3.urls: Change to "spop".
7445
7446         * providers/imap/libcamelimap.urls: Change "imaps" to "simap" to
7447         correspond to /etc/services.
7448
7449 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7450
7451         * providers/pop3/camel-pop3-store.c (pop3_connect): Check to see
7452         if we are using "pops" and then set the appropriate SSL settings.
7453
7454         * providers/pop3/libcamelpop3.urls: Add "pops"
7455
7456         * providers/pop3/camel-pop3-provider.c: Defined the pops provider.
7457         (camel_provider_module_init): Register the pops provider.
7458
7459 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7460
7461         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_new): Ya know what?
7462         Lets not ref the service because otherwise we'll start having the
7463         same problems we had back with vtrash. Besides, since the store
7464         owns the stream, it's not like the store is going anywhere without
7465         the stream anyway.
7466         (camel_tcp_stream_ssl_finalize): No need to unref the service.
7467
7468 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7469
7470         * camel-remote-store.c (remote_connect): Pass the service into the
7471         SSL stream, not the session.
7472
7473         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_init): Set the
7474         service to NULL.
7475         (camel_tcp_stream_ssl_finalize): Unref the service.
7476         (camel_tcp_stream_ssl_new): Takes a CamelService arg now rather
7477         than a CamelSession arg.
7478
7479 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7480
7481         * camel.c (camel_init): So it turns out that NSS_Init *isn't*
7482         idempotent, so we have to protect against initializing it more
7483         than once(contrary to what their design specs suggest).
7484
7485         * camel-session.c (camel_session_get_service): Use
7486         camel_exception_is_set() - Makes no difference but it's more
7487         consistant with how we normally do it.
7488
7489         * camel-provider.h (CAMEL_URL_ALLOW_SSL): We don't need this.
7490
7491         * providers/imap/camel-imap-provider.c: Define the imaps provider.
7492         (camel_provider_module_init): Register the imaps provider.
7493
7494         * camel-provider.c (camel_provider_init): Only add the protocol to
7495         the hash table if it's non empty. Also, g_strdup() the filename
7496         into the hash table.
7497
7498         * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek!
7499         So the service's URL isn't set until after this is
7500         initialized. This means we can't check for SSL here.
7501         (imap_connect): Set the SSL options here instead.
7502
7503 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7504
7505         * camel-tcp-stream-ssl.c: Numerous fixes to get it to build
7506         correctly with NSS enabled.
7507
7508         * camel-remote-store.c (remote_connect): Pass in the session and
7509         expected host args, oops.
7510
7511         * camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined.
7512
7513         * providers/imap/camel-imap-store.c (camel_imap_store_init): Check
7514         to see if we are supposed to use SSL and set the options
7515         accordingly.
7516         (imap_connect): Return FALSE here instead of NULL.
7517
7518         * providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL.
7519
7520         * providers/imap/libcamelimap.urls: Add "imaps" which is the
7521         protocol for Secure IMAP.
7522
7523 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7524
7525         * camel-tcp-stream-openssl.[c,h]: Added
7526
7527         * Makefile.am: Added camel-tcp-stream-openssl.[c,h] to the build.
7528
7529         * camel-types.h: Added CamelTcpStreamSSL and CamelTcpStreamOpenSSL
7530
7531 2001-03-14  Not Zed  <NotZed@Ximian.com>
7532
7533         * camel-mime-filter-charset.c (filter, complete): re-constify
7534         inbuf, to remove a warning.
7535
7536         * camel-mime-parser.c (folder_scan_step): When we're out of data,
7537         run the filter_complete.  For some reason the logic that was there
7538         was never being run, always try it now, i think it was to work
7539         around a buggy filter, rather than fix it the right way.
7540
7541         * camel-folder-summary.c (summary_build_content_info): If indexing
7542         html parts, use the html filter to convert it to some indexable
7543         format.
7544         (summary_build_content_info): Reset the filters before adding them
7545         back to the stream, if they get re-used in a given instance
7546         (likely).
7547
7548         * Makefile.am (libcamelinclude_HEADERS): Added
7549         camel-mime-filter-html.[ch].
7550         (INCLUDES): Added xml clags
7551
7552 2001-03-05  Not Zed  <NotZed@Ximian.com>
7553
7554         * camel-folder-search.c (camel_folder_search_class_init): Setup a
7555         new function, "uid" which matches uids.
7556         (search_uid): Implement the "match uid" command.
7557
7558 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7559
7560         * camel-mime-utils.c: Check for a new type of mailing list header.
7561
7562 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7563
7564         * camel-tcp-stream-raw.c (stream_read): Made cancellable.
7565         (stream_write): Same.
7566         (stream_connect): Removed checks for DIVINE_INTERVENTION as the
7567         code worked fine.
7568
7569         * camel-tcp-stream-ssl.c (stream_write): get rid of 'w' as it
7570         wasn't really needed.
7571         (set_errno): New function to set errno based on the NSPR error
7572         code.
7573         (stream_read): If an error occured, call set_errno().
7574         (stream_write): Same.
7575
7576 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7577
7578         * Makefile.am: Added camel-tcp-stream-ssl to the build.
7579
7580         * camel-remote-store.h: Add a use_ssl member to the
7581         CamelRemoteStore object.
7582
7583 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7584
7585         * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type):
7586         Oops. Make this a subclass of CamelTcpStream, not CamelStream.
7587
7588         * camel-types.h: Add the defs for CamelTcpStream and
7589         CamelTcpStreamRaw
7590
7591         * Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to
7592         the build.
7593
7594         * camel-remote-store.c (remote_connect): Update to use
7595         CamelTcpStreams.
7596
7597         * camel-tcp-stream-raw.c (stream_connect): Made cancellable by
7598         copying the currently used code in camel-remote-store.c.
7599         (stream_setsockopt): Oops, flags = fcntl (..., GET_FL);
7600         (camel_tcp_stream_raw_get_type): Oops. Make this a subclass of
7601         CamelTcpStream, not CamelStream.
7602
7603 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7604
7605         * camel.c (camel_init): Since all of the Mozilla libs (including
7606         NSPR and NSS) correctly handle reinitializations, we might as well
7607         init both NSPR and NSS in camel_init so we can be sure of that
7608         these libs have been initialized.
7609         (camel_shutdown): New function to call the NSS cleanup stuff.
7610
7611 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7612
7613         * camel-folder.c (camel_folder_copy_message_to): Don't allow the
7614         user to copy a message to or from the vtrash folder. Set an
7615         exception if they try.
7616         (camel_folder_move_message_to): This one is a bit more
7617         complicated: 1) If the user tried to move a message from the
7618         vtrash into the original folder, just undelete the message. 2) If
7619         the user tries to move the message to the vtrash folder, then just
7620         mark the message as deleted. 3) If the user tries to move the
7621         message from the vTrash to a folder other than the original, use
7622         the original folder as the source. As another optimization, I've
7623         made it so that if the user tries to move a message to the same
7624         folder, just no-op.
7625         (move_message_to): Unset the deleted flag before moving (assuming
7626         it's there).
7627         (copy_message_to): Same.
7628
7629         * camel-vee-folder.c (camel_vee_folder_get_message_folder): New
7630         convenience function to get the folder from which the message uid
7631         is derived from.
7632
7633 2001-03-13  Dan Winship  <danw@ximian.com>
7634
7635         * providers/imap/camel-imap-store.c (imap_connect): When trying
7636         again after a failed password attempt, check if the connection got
7637         dropped (which Courier will do) and deal accordingly.
7638
7639         * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
7640         sendmail_send): More fixing for exim: It can't deal with "-tif",
7641         you need to say "-t -i -f".
7642
7643 2001-03-12  Jeffrey Stedfast  <fejj@ximian.com>
7644
7645         * camel-store.c (init_trash): Rename the folder to "Trash" and
7646         i18nify it.
7647
7648 2001-03-09  Jeffrey Stedfast  <fejj@ximian.com>
7649
7650         * camel-tcp-stream-ssl.h: Comment out everything unless HAVE_NSS
7651         is defined.
7652
7653         * camel-tcp-stream-ssl.c (stream_read): Don't use errno, use
7654         nspr's error code stuff.
7655         (stream_write): Same.
7656
7657 2001-03-09  Jeffrey Stedfast  <fejj@ximian.com>
7658
7659         * camel-session.c (camel_session_query_authenticator): Created a
7660         new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt to
7661         the user. This will be needed by the SSL/TLS code to come. Also
7662         changed the return value to a gpointer rather than a char* to
7663         allow the returning of TRUE/FALSE values.
7664
7665         * camel.c: Wrap stuff with HAVE_NSS
7666
7667 2001-03-09  Dan Winship  <danw@ximian.com>
7668
7669         * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
7670         sendmail_send_to): Remove the "-U" for now, because it breaks
7671         exim's "sendmail" wrapper. (And it doesn't actually do all that
7672         much to sendmail's behavior, and it was working fine before
7673         anyway.)
7674
7675         * camel-mime-utils.c (header_fold): Fix a bug that could make this
7676         walk off the end of a string. (The bug has been there since
7677         December... maybe this will fix some unreproduceable crashes?)
7678
7679 2001-03-08  Jeffrey Stedfast  <fejj@ximian.com>
7680
7681         * camel-store.c (camel_store_get_folder): Changes so that the
7682         folder gets added to the vtrash reguardless of whether or not the
7683         store is holding it's own folder lookup hash.
7684         (init_trash): Oops, lets try locking the cache before we go and
7685         add all the cached folders to the vtrash.
7686
7687 2001-03-08  Jeffrey Stedfast  <fejj@ximian.com>
7688         These fixes make it so that the CamelStore does not actually hold
7689         a ref on it's vTrash folder. The vTrash folder is now created ONLY
7690         when it is requested. This solves the problem of not being able to
7691         unref a Store and have it disconnect/finalize like we expect it to.
7692
7693         * camel-store.c (init_trash): When we create the vtrash, add all
7694         previously opened folders to it and hook on to the finalize event
7695         so that we can then set the store->vtrash to NULL.
7696         (get_trash): If a vtrash folder for the store doesn't exist,
7697         init_trash() and then try.
7698         (construct): No longer need this.
7699         (camel_store_class_init): Don't override the construct method.
7700         (camel_store_finalize): We no longer hold a ref on the vtrash so
7701         don't unref it.
7702
7703 2001-03-07  Jeffrey Stedfast  <fejj@ximian.com>
7704
7705         * providers/pop3/camel-pop3-store.c (init_trash): Implement.
7706         (get_trash): Implement.
7707         (camel_pop3_store_class_init): Override the default init_trash and
7708         get_trash virtual functions. Hopefully this should fix the problem
7709         of pop3 sotre's not disconnecting after the send&recv code
7710         finishes downloading mail.
7711
7712         Wonder if I should override the default implementation for the
7713         mbox, mh, and maildir too?
7714
7715 2001-03-07  Dan Winship  <danw@ximian.com>
7716
7717         * camel-remote-store.c (camel_remote_store_connected): Return the
7718         return value of camel_service_connect rather than returning
7719         !camel_exception_is_set(), since that will be wrong if ex==NULL...
7720         Fixes a crash in the IMAP keepalive code, but this same problem
7721         probably exists in other places too...
7722         (remote_recv_line): Fix another problem...
7723
7724         * providers/local/camel-mbox-provider.c:
7725         * providers/vee/.cvsignore:
7726         * providers/vee/libcamelvee.urls: Remove some unused stuff
7727         
7728 2001-03-06  Jeffrey Stedfast  <fejj@ximian.com>
7729
7730         * camel-sasl-digest-md5.c (compute_response): Redone so as to save
7731         on memory allocations and speed.
7732
7733 2001-03-05  Jeffrey Stedfast  <fejj@ximian.com>
7734
7735         * camel-sasl-plain.c (plain_challenge): Don't return NULL if the
7736         token is non-NULL. This is why:
7737
7738         sending : AUTH PLAIN
7739         received: 334 ok. go on.                 <-- this is why
7740         sending : ZGZPaQpAZ214Lm5ldBBnb29jYXI=
7741         received: 235 {mp005-rz3} go ahead
7742
7743         * camel-sasl.c (camel_sasl_authtype): Add the PLAIN type here.
7744         (camel_sasl_authtype_list): And here too.
7745
7746         * camel-sasl-plain.c: Initialize the camel_sasl_plain_authtype.
7747
7748         * camel-sasl-plain.h: extern the camel_sasl_plain_authtype.
7749
7750 2001-03-05  Jeffrey Stedfast  <fejj@ximian.com>
7751
7752         * providers/imap/camel-imap-store.c (imap_connect): i18n'd some
7753         strings in here.
7754
7755         * providers/smtp/camel-smtp-transport.c (smtp_connect): Keep
7756         trying to authenticate until either we succeed or until the user
7757         cancels.
7758
7759 2001-03-04  Jeffrey Stedfast  <fejj@ximian.com>
7760
7761         * camel-mime-utils.c: Wrote a new version of header_fold() that
7762         takes a 'force' option and uses another new function called
7763         header_fold_next_space() in place of strchr(inptr, ' ') to get the
7764         next whitespace char. The idea of header_fold_next_space() is to
7765         not treat spaces between a set of quotes as a space - this way it
7766         will be possible to fold (for example) the Content-Type MIME
7767         header without worrying about breaking up a boundary string.
7768         Note: This code is #if 0'd out until Zucchi approves of the patch.
7769         Another Note: We will probably still want to use the "don't fold
7770         this header" hash lookup for headers like the Message-Id and
7771         possibly a few others.
7772
7773 2001-03-04  Jeffrey Stedfast  <fejj@ximian.com>
7774
7775         * camel-internet-address.c
7776         (camel_internet_address_encode_address): Make sure there is a
7777         space between the name and the address tokens.
7778
7779         * camel-mime-utils.c (rfc2047_decode_word): encoded string
7780         segments need to be at least 8 chars (7 doesn't leave room for an
7781         ecoding value. To be more realistic, even 8 chars isn't enough as
7782         this assumes there is no charset nor any encoded text. If the
7783         encoding value is not 'Q' or 'B', then return NULL. This fixes bug
7784         #1689.
7785
7786 2001-03-03  Not Zed  <NotZed@Ximian.com>
7787
7788         * camel-vee-folder.c (vee_folder_remove_folder): New function to
7789         remove a folder from a vfolder.
7790         (camel_vee_folder_remove_folder): New public function to remove a
7791         folder from a vfolder.
7792
7793 2001-03-02  Jeffrey Stedfast  <fejj@ximian.com>
7794
7795         * providers/smtp/camel-smtp-provider.c: Doh! Set the
7796         CAMEL_URL_ALLOW_AUTH flag.
7797
7798         * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
7799         Updated with the extended AUTH return codes.
7800
7801 2001-03-02  Jeffrey Stedfast  <fejj@ximian.com>
7802         
7803         * providers/imap/camel-imap-store.c (try_auth): Don't forget to
7804         unref the SASL object.
7805
7806         * providers/smtp/camel-smtp-transport.c (query_auth_types):
7807         Implemented.
7808         (smtp_auth): Implemented.
7809         (smtp_helo): Don't bother parsing the authtypes if we already have
7810         them.
7811         (smtp_connect): call smtp_auth() here if we found any authtypes.
7812         (smtp_disconnect): Updated as I now use a hash table for the
7813         supported authtypes rather than a linked list.
7814         (esmtp_get_authtypes): modify to use a hash table instead of a
7815         linked list and also use isspace() rather than == ' '.
7816
7817 2001-03-02  Dan Winship  <danw@ximian.com>
7818
7819         * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
7820         sendmail_send): Use "-f" to set the envelope from address so
7821         bounces go to the right place. Also, pass "-U" since the man page
7822         says we're supposed to...
7823
7824 2001-03-01  Jeffrey Stedfast  <fejj@ximian.com>
7825         
7826         * camel-sasl.c: #include "camel-sasl-digest-md5.h"
7827         (camel_sasl_authtype_list): add DIGEST-MD5 stuff here.
7828         (camel_sasl_authtype): And here too.
7829         (camel_sasl_new): And here...
7830
7831         * camel-sasl-digest-md5.[c,h]: new SASL class for DIGEST-MD5 (has
7832         been tested and proven to work).
7833
7834 2001-03-01  Dan Winship  <danw@ximian.com>
7835
7836         * camel-sasl.c (camel_sasl_challenge): Take a GByteArray as input
7837         as well. Comment that you can pass %NULL for @token to get the
7838         initial auth data for mechanisms that are client-initiated.
7839         (camel_sasl_challenge_base64): Convenience function for protocols
7840         that use base64-encoded SASL.
7841         (camel_sasl_authenticated): Implement this... (it was prototyped
7842         already)
7843         (camel_sasl_new): Function to take a service name, a mechanism
7844         name, and a CamelService, and return a CamelSasl for it.
7845         (camel_sasl_authtype, camel_sasl_authtype_list): Functions to
7846         return CamelServiceAuthType information about SASL mechanisms, to
7847         allow providers to deal with them generically.
7848
7849         * camel-sasl-anonymous.c, camel-sasl-plain.c: Update/simplify for
7850         CamelSasl changes. Both of these are single-round
7851         (client-initiated) mechanisms, so they don't need to keep state.
7852         (camel_sasl_plain_new): Removed; use camel_sasl_new instead.
7853         (Can't get rid of camel_sasl_anonymous_new though...)
7854
7855         * camel-sasl-cram-md5.c: Update/simplify for CamelSasl changes.
7856         (camel_sasl_cram_md5_new): Removed; use camel_sasl_new instead.
7857         (cram_md5_challenge): Use md5_get_digest where possible, and
7858         various other minor simplifications. CRAM-MD5 only has a single
7859         round, so there's no need to keep track of state. This code is now
7860         tested (against Cyrus IMAPd) and known to work.
7861
7862         * camel-sasl-kerberos4.h: Update/simplify for CamelSasl changes.
7863         Make only a single #ifdef HAVE_KRB4. Remove stuff from priv that
7864         isn't needed between rounds.
7865         (camel_sasl_kerberos4_new): Removed; use camel_sasl_new instead
7866         (krb4_challenge): Fix up the logic I broke in my previous "at
7867         least make it compile" fixes, update to match other changes, and
7868         remove IMAP-isms that shouldn't be in the generic code. This still
7869         isn't tested, because we're stuck behind a NAT right now...
7870
7871         * providers/imap/camel-imap-store.c: Add an "authtypes" hash table
7872         to CamelImapStore recording the supported authtypes.
7873         (connect_to_server): Record supported authtypes in the authtypes
7874         hash rather than the capabilities bitmask, since now the IMAP code
7875         is no longer responsible for keeping track of which authtypes we
7876         support.
7877         (query_auth_types): Use camel_sasl_authtype_list to get the
7878         SASL-supported authtypes.
7879         (try_auth): New function to try a SASL auth mechanism. Sort of
7880         formerly imap_try_kerberos_v4_auth.
7881         (imap_connect): Get rid of the krb4-specific bits and genericize
7882         them for any SASL authtype.
7883
7884         * providers/imap/Makefile.am: Remove camel-imap-auth.[ch] (moved
7885         into camel-imap-store.c since it's now constant size) and the
7886         KRB4_CFLAGS and KRB4_LDFLAGS references.
7887
7888 2001-03-01  Jeffrey Stedfast  <fejj@ximian.com>
7889
7890         * camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the
7891         data, leave that up to the provider to do if it needs to. Also
7892         save on some memory allocations and stuff.
7893
7894         * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. Also get
7895         rid of the need for the temp buf as we can just write it to the
7896         GByteArray.
7897
7898 2001-03-02  Not Zed  <NotZed@Ximian.com>
7899
7900         * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word):
7901         Reconstify variables to match iconv.
7902
7903         * camel-search-private.c (camel_ustrstrcase): Change some
7904         assertions back into valid returns.
7905
7906 2001-03-01  Dan Winship  <danw@ximian.com>
7907
7908         * Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on
7909         krb4 now (where available), for camel-sasl-kerberos4.c
7910
7911         * camel-sasl-kerberos4.[ch]: Make this at least compile. Dunno if
7912         it works yet.
7913
7914 2001-03-01  Peter Williams  <peterw@ximian.com>
7915
7916         * camel-url.c (camel_url_new): Assert url_string != NULL.
7917
7918 2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>
7919
7920         * Makefile.am: Added camel-sasl-anonymous.[c,h] to the build.
7921
7922         * camel-sasl-anonymous.[c,h]: new SASL class for ANONYMOUS
7923
7924         * camel-sasl-plain.c (plain_challenge): Oops, have a state for
7925         setting sasl->authenticated = TRUE;
7926
7927         * camel-sasl-cram-md5.c (cram_md5_challenge): Same here.
7928
7929 2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>
7930
7931         * camel-mime-utils.c (header_decode_date): A fix for broken
7932         mailers that send 2-digit years (ie "Wed, 28 Feb 01
7933         04:59:41"). Fixes bug #1633.
7934
7935         * camel-filter-driver.c (camel_filter_driver_filter_folder): Check
7936         to make sure message isn't NULL.
7937
7938 2001-02-28  Dan Winship  <danw@ximian.com>
7939
7940         * camel-remote-store.c (remote_recv_line): If we get back 0 bytes
7941         from camel_stream_buffer_gets, that means the socket got
7942         disconnected, so set an exception. (Noticed because of a message
7943         that crashes our IMAP server when you try to look at it. :)
7944
7945 2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>
7946
7947         * Makefile.am: Added camel-sasl*.[c,h] to the build.
7948
7949         * camel-sasl.[c,h]: new "abstract" SASL class
7950
7951         * camel-sasl-kerberos4.[c,h]: new SASL class for KERBEROS_V4
7952
7953         * camel-sasl-cram-md5.[c,h]: new SASL class for CRAM-MD5
7954
7955         * camel-sasl-plain.[c,h]: new SASL class for PLAIN
7956
7957         * providers/imap/camel-imap-auth.c: Removed the base64 functions.
7958
7959         * camel-mime-utils.c (base64_encode_simple): Moved here from
7960         camel-imap-auth.c
7961         (base64_decode_simple): Same.
7962
7963 2001-02-26  Dan Winship  <danw@ximian.com>
7964
7965         * providers/imap/camel-imap-folder.c (imap_sync): Group messages
7966         into sets with the same flags and use the IMAP message set
7967         notation rather than doing a separate STORE FLAGS for each one.
7968         This cuts the network traffic down to just a handful of commands
7969         per sync rather than one per changed message. Removed the progress
7970         notification stuff since it's no longer meaningful and should
7971         hopefully be unnecessary.
7972         (imap_copy_message_to): move the former sync_message function
7973         into here, since it's no longer shared with imap_sync.
7974
7975 2001-02-26  Jeffrey Stedfast  <fejj@ximian.com>
7976
7977         * camel-mime-utils.c: Made thread-safe and moved to above the test
7978         code.
7979
7980         * camel-mime-message.c (camel_mime_message_init): Set the
7981         message_id to NULL.
7982         (camel_mime_message_finalize): Free the message_id.
7983         (camel_mime_message_set_message_id): New function to set the
7984         Message-Id.
7985         (camel_mime_message_get_message_id): New function to get the
7986         Message-Id.
7987         (process_header): Decode the message-id.
7988
7989 2001-02-24  Jeffrey Stedfast  <fejj@ximian.com>
7990
7991         * camel-store.c (construct): init the vTrash folder here instead
7992         of in store_init.
7993         (camel_store_class_init): init service_class->construct.
7994         (camel_store_finalize): We only need to unref the vtrash folder.
7995         (init_trash): don't create a vstore since we don't need it.
7996
7997 2001-02-23  Jeffrey Stedfast  <fejj@ximian.com>
7998
7999         * camel-store.c (camel_store_class_init): init get_trash and
8000         init_trash.
8001         (camel_store_init): call the virtual init_trash function.
8002         (camel_store_finalize): unref the vtrash folder/store if present.
8003         (camel_store_get_folder): Add the new folder to the vtrash
8004         vfolder.
8005         (init_trash): default implementation of init_trash.
8006         (get_trash): default implementation of get_trash.
8007
8008         * camel-vee-store.c (vee_init_trash): No-op.
8009         (vee_get_trash): return NULL
8010
8011 2001-02-23  Not Zed  <NotZed@Ximian.com>
8012
8013         * camel-folder-summary.c (camel_message_info_new_from_header):
8014         Doh, cut and paste problem, use mlist not cc.
8015
8016         * camel-folder.c (move_message_to): 
8017         (copy_message_to): If the source folder doesn't support a
8018         summary, dont try and get the message info from it.
8019
8020         * camel-filter-search.c (check_header): Implement a pseudo-header
8021         "x-camel-mlist" which just looks up in the message info for a
8022         match.
8023
8024         * camel-folder-search.c (check_header): Add pseudo-header
8025         "x-camel-mlist" which can be used to match on mailing list.
8026
8027         * providers/imap/camel-imap-folder.c (imap_sync): Add some
8028         internal progress reporting.
8029         (imap_rescan): Do some progress reporting.
8030
8031         * camel-mime-part.c (init_header_name_table): Add the message-id
8032         to the formatted table, so we dont try and wrap it, and break it.
8033
8034 2001-02-22  Jeffrey Stedfast  <fejj@ximian.com>
8035
8036         * camel-folder.h: Remove the 'FIXME: remove because this isn't
8037         required...' comment for copy_message_to since we now need and
8038         cherish its existance in the filter-driver code ;-)
8039
8040         * camel-filter-driver.c (camel_filter_driver_filter_message): Now
8041         takes a UID and CamelFolder arguments (which can be NULL) to allow
8042         for possible optimizations when copying messages between folders
8043         on the same store.
8044         (camel_filter_driver_filter_mbox): Updated (passes NULL for both
8045         since this case can't be optimized anyway).
8046         (camel_filter_driver_filter_folder): Updated to pass in the uid
8047         and folder of the message.
8048
8049 2001-02-22  Dan Winship  <danw@ximian.com>
8050
8051         * providers/imap/camel-imap-summary.h (CAMEL_IMAP_SERVER_FLAGS):
8052         #define this as the set of all IMAP system flags
8053
8054         * providers/imap/camel-imap-folder.c (sync_message): after syncing
8055         flags, set server_flags to (flags & CAMEL_IMAP_SERVER_FLAGS)
8056         rather than just "flags", since any other flags won't have been
8057         synced. Prevents the CAMEL_MESSAGE_ATTACHMENTS flag from getting
8058         lost.
8059
8060 2001-02-22  Not Zed  <NotZed@Ximian.com>
8061
8062         * providers/vee/*: Removed all files.
8063         
8064         * camel-private.h: Move camel-vee-private.h stuff into here.
8065
8066         * camel-session.c: Move the vee_provider here, and initialise it
8067         always as part of a session.  The vfolder provider is always
8068         available.
8069
8070         * providers/Makefile.am: Remove "vee" from the build list, now
8071         built as part of the main library.
8072
8073         * Makefile.am (libcamelinclude_HEADERS): 
8074         (libcamel_la_SOURCES): Added camel-vee-store.[ch],
8075         camel-vee-folder.[ch].
8076
8077         * providers/vee/camel-vee-folder.c (vee_folder_build): Removed,
8078         not used.
8079         (camel_vee_folder_new): Removed call to build_folder.
8080         (vee_get_message): Dont try and free the mi if we didn't get it.
8081
8082         * camel-folder.c (camel_folder_change_info_new): Added a hash
8083         table of what we have in the lists, plus moved private things into
8084         private pointer.
8085         (camel_folder_change_info_add_source): Fixed up private accesses.
8086         (camel_folder_change_info_add_uid): Changed to use a hashtable to
8087         see if we already have the uid, etc.
8088         (camel_folder_change_info_remove_uid): Similar.
8089         (change_info_remove): Likewise.
8090         (camel_folder_change_info_clear): Fixes for privatisations.
8091         (camel_folder_change_info_free): "
8092
8093 2001-02-21  Dan Winship  <danw@ximian.com>
8094
8095         * providers/imap/camel-imap-folder.c (fetch_medium): Fixes for
8096         IMAP4-pre-rev1 from Torsten Schulz.
8097
8098 2001-02-20  Not Zed  <NotZed@Ximian.com>
8099
8100         * camel-mime-utils.c (mail_list_magic): Take the ^Header: part out
8101         of the expression, since we look that up ourselves.
8102         (header_raw_check_mailing_list): When getting the match, get match
8103         1, not match 0, we dont want the full string match.
8104
8105         * camel-folder-summary.c (CAMEL_FOLDER_SUMMARY_VERSION): Bumped
8106         for summary change.
8107         (message_info_new): Extract the mlist info from the headers.
8108         (message_info_load): Load mlist from summary.
8109         (message_info_save): Save mlist to summary.
8110         (message_info_free): Save the mlist entry.
8111         (camel_message_info_new_from_header): Extract mailing list header.
8112         (camel_message_info_dup_to): Copy the mlist entry.
8113         (camel_message_info_free): Free mlist.
8114         (message_info_dump): Dump the mlist.
8115
8116         * camel-folder-summary.h: Add an mlist (mailing list) string to
8117         the summary.
8118
8119 2001-02-19  Not Zed  <NotZed@Ximian.com>
8120
8121         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Added
8122         flags argument.
8123         (message_changed): Add support for the auto-update flag, in which
8124         case we auto-match the content as it changes.
8125         (camel_vee_folder_init): Remoive "DYNAMIC" optionality
8126         (camel_vee_folder_finalise): "
8127         (vee_expunge): As we expunge folders, re-sync their content by
8128         rerunning the query.
8129
8130         * providers/vee/camel-vee-store.c (vee_get_folder): Pass flags to
8131         folder new.
8132
8133 2001-02-18  Not Zed  <NotZed@Ximian.com>
8134
8135         * providers/vee/Makefile.am (noinst_HEADERS): Added
8136         camel-vee-private.h.
8137
8138         * providers/vee/camel-vee-private.h: New file to add locking stuff
8139         for vee folders.
8140
8141         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Add
8142         locking around unmatched setup.
8143         (camel_vee_folder_init): Setup lock.
8144         (camel_vee_folder_finalise): Free locks.
8145         (folder_changed): Add locking.
8146         (unmatched_finalise): "
8147         (message_changed): "
8148         (vee_folder_build): "
8149
8150 2001-02-17  Not Zed  <NotZed@Ximian.com>
8151
8152         * providers/vee/camel-vee-folder.c (vee_folder_add): Check uid
8153         doesn't exist before adding it.
8154
8155 2001-02-16  Not Zed  <NotZed@Ximian.com>
8156
8157         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Create
8158         a new virtual virtual folder UNMATCHED, to store all messages that
8159         dont match other vfolders.
8160         (unmatched_folder_changed): When a vfolder issues a changed event,
8161         use its info to update the unmatched folder info.
8162         (unmatched_finalise): When a vfolder is finalised, remove any uids
8163         it has as if we had a removed event for it.
8164
8165 2001-02-16  Jeffrey Stedfast  <fejj@ximian.com>
8166
8167         * camel-filter-driver.c (camel_filter_driver_finalise): Thaw the
8168         defaultfolder.
8169         (camel_filter_driver_set_default_folder): Thaw the defaultfolder
8170         we're about to replace, and freeze the new defaultfolder.
8171
8172 2001-02-15  Jeffrey Stedfast  <fejj@ximian.com>
8173
8174         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Emit
8175         the folder_created signal here.
8176
8177         * providers/local/camel-local-folder.c
8178         (camel_local_folder_construct): Emit the folder_created signal.
8179
8180         * providers/local/camel-local-store.c (delete_folder): On error,
8181         free the 'name' string so we don't leak. Also emit the
8182         folder_deleted signal.
8183
8184         * providers/imap/camel-imap-store.c (subscribe_folder): Emit the
8185         folder_created signal.
8186         (unsubscribe_folder): Emit the folder_deleted signal.
8187
8188         * camel-store.c (camel_store_class_init): Added folder_created and
8189         folder_deleted signal defs.
8190
8191 2001-02-15  Dan Winship  <danw@ximian.com>
8192
8193         * camel-folder-thread.c (container_parent_child): Deal with
8194         out-of-order References headers so they don't cause messages to
8195         disappear in threaded view.
8196
8197         * providers/imap/camel-imap-folder.c (fetch_medium): IMAP4
8198         (pre-rev1) doesn't allow BODY.PEEK[], so use RFC822.PEEK instead
8199         in that case.
8200
8201 2001-02-14  Christopher James Lahey  <clahey@ximian.com>
8202
8203         * camel-mime-filter-charset.c (complete, filter),
8204         camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
8205         Changed this code to match the glibc iconv signature.
8206
8207 2001-02-14  Dan Winship  <danw@ximian.com>
8208
8209         * camel-store.c (camel_store_create_folder): New method to create
8210         a folder when you don't know its full name.
8211
8212         * providers/imap/camel-imap-store.c (create_folder): Implement.
8213         (create_folder): Oops, and fix bug involving namespaces
8214         
8215 2001-02-12  Not Zed  <NotZed@Ximian.com>
8216
8217         * camel-mime-part.c (init_header_name_table): Add address headers
8218         to list that we dont fold when writing.  The are properly
8219         formatted as we build them.
8220         (write_to_stream): DOH, lookup the header name in the formatted
8221         hash table, not the value, that would never have worked.
8222
8223         * camel-internet-address.c
8224         (camel_internet_address_encode_address): Changed to take a
8225         parameter saying how much we've printed so far.  We now fold the
8226         header as we format it.  We dont fold addresses, even if they are
8227         too long, we simply put them on another line by themselves: this
8228         should make the result more parsable by mailers that can't handle
8229         split up addresses (which are legal).
8230         (internet_encode): Fix for changes to above.
8231
8232 2001-02-12  Jeffrey Stedfast  <fejj@ximian.com>
8233
8234         * providers/local/camel-local-provider.c: mbox, mh, and maildir
8235         camel-url's need absolute paths.
8236
8237         * camel-provider.h (CAMEL_URL_PATH_IS_ABSOLUTE): New flaggy flag.
8238
8239 2001-02-08  Dan Winship  <danw@ximian.com>
8240
8241         * camel-store.c: Rewrite a bunch. Replace the existing folder
8242         cache stuff with much simpler code that still handles all the
8243         existing cases. Now the folder hash table is always created by the
8244         base class, using hash and compare functions provided by the class
8245         implementation. (If they are set to NULL, CamelStore won't cache
8246         folders.) lookup_folder, cache_folder, and uncache_folder are no
8247         longer class methods, and get_name is gone completely.
8248
8249         (camel_store_get_inbox): Renamed from
8250         camel_store_get_default_folder, since that wasn't being used, and
8251         this is what we actually need.
8252         (camel_store_get_root_folder): Removed, since it's not needed for
8253         anything given get_folder_info.
8254
8255         * camel-remote-store.c:
8256         * providers/local/camel-local-store.c:
8257         * providers/local/camel-mbox-store.c:
8258         * providers/local/camel-mh-store.c:
8259         * providers/local/camel-maildir-store.c:
8260         * providers/nntp/camel-nntp-store.c:
8261         * providers/pop3/camel-pop3-store.c:
8262         * providers/vee/camel-vee-store.c: Minor updates for CamelStore
8263         changes
8264
8265         * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
8266         Update for CamelStore changes.
8267         (hash_folder_name, compare_folder_name): treat INBOX
8268         case-insensitively, otherwise use g_str_hash and g_str_equal.
8269
8270         * camel-service.c (camel_service_construct): Remove
8271         camel_service_new and create camel_service_construct (as a class
8272         method) in its place.
8273
8274         * camel-session.c (camel_session_get_service): Use
8275         camel_object_new and camel_service_construct to replace
8276         camel_service_new.
8277
8278         * providers/local/camel-local-store.c (construct): Append a '/' to
8279         the URL path if it doesn't end with one
8280
8281 2001-01-31  Jeffrey Stedfast  <fejj@helixcode.com>
8282
8283         * camel-tcp-stream-ssl.c: Oops, include the camel-tcp-stream-ssl
8284         header instead of the raw one.
8285
8286 2001-02-07  Not Zed  <NotZed@Ximian.com>
8287
8288         * camel-operation.c (camel_operation_start): Changed to push the
8289         operation into a status stack.
8290         (camel_operation_progress): Changed to only accept % complete.
8291         (camel_operation_reset): Free status stack as well.
8292
8293         * providers/pop3/camel-pop3-folder.c (pop3_get_message): Get the
8294         octect count from the return line, and pass it to
8295         get_additional_data().
8296         (pop3_refresh_info): Added status stuff.
8297
8298         * providers/pop3/camel-pop3-store.c
8299         (camel_pop3_command_get_additional_data): Added a total bytes
8300         expected argument for progress reporting & fixed callers.
8301         (camel_pop3_command_get_additional_data): Added progress
8302         reporting.
8303
8304         * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
8305         (mbox_summary_sync_quick):
8306         (summary_rebuild): Added progress reporting stuff.
8307
8308 2001-02-07  Jeffrey Stedfast  <fejj@ximian.com>
8309
8310         * camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making
8311         comparisons easy.
8312         (camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for
8313         end-of-string before the utf-8 error check.
8314         (camel_ustrncasecmp): Same.
8315         (camel_search_header_match): Strip leading spaces before doing
8316         anything else. Also use vlen and mlen so as to not need to do 500
8317         strlen()'s.
8318         (camel_ustrcasecmp): Don't get_utf8() for the 2 strings in the
8319         comparison part of the loop because of short-circuit expression
8320         evaluation. (blame JPR if this is the wrong term!)
8321         (camel_ustrncasecmp): Same.
8322
8323 2001-02-06  Jeffrey Stedfast  <fejj@ximian.com>
8324
8325         * camel-search-private.c (utf8_get): Rewrote using unicode_get_utf8().
8326         (camel_ustrcasecmp): Use unicode_char_t
8327         (camel_ustrncasecmp): Same.
8328
8329 2001-02-06  Christopher James Lahey  <clahey@ximian.com>
8330
8331         * camel-mime-filter-charset.c (complete, filter),
8332         camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
8333         Made these pass char ** as the second parameter to iconv.
8334
8335 2001-02-06  Not Zed  <NotZed@Ximian.com>
8336
8337         * camel-session.c: Removed all the camel_cancel stuff.
8338
8339         * camel-stream-fs.c (stream_read): Change to use camel_operation.       
8340         (stream_write): "
8341
8342         * camel-remote-store.c (socket_connect): Change to use
8343         camel_operation rather than camel_cancel stuff.
8344         Removed gal include, WTF is that doing there anyway?
8345
8346         * Makefile.am (libcamel_la_SOURCES): 
8347         (libcamelinclude_HEADERS): Added camel-operation.[ch], stuff to
8348         handle notification and cancellation.
8349
8350         * camel-search-private.c: Removed unwanted header.  It was never
8351         put in for a reason.  Stop fixing irrelevant warnings.
8352         
8353         (camel_ustrstrcase): Our own strstrcase impl for utf8 strings.
8354         (camel_ustrcasecmp): Ditto for strcasecmp.
8355         (camel_ustrncasecmp): And strncasecmp.
8356         (utf8_get): Simpler interface to utf8 string processing.
8357         (camel_search_header_match): Use the new things.
8358
8359 2001-02-05  Not Zed  <NotZed@Ximian.com>
8360
8361         * camel-folder.c (get_summary): Removed some old variables/a small
8362         memleak.
8363         (free_summary): Removed old variables.
8364
8365         * camel-mime-utils.c (header_raw_check_mailing_list): New utility
8366         function to get the mailing list (if any) that a set of headers
8367         came from.
8368
8369 2001-02-05  Christopher James Lahey  <clahey@helixcode.com>
8370
8371         * camel-stream-fs.c: Added a missing #include.
8372
8373         * camel-search-private.c: Added a missing #include.
8374
8375 2001-02-05  Jeffrey Stedfast  <fejj@ximian.com>
8376
8377         * camel-remote-store.c (remote_query_auth_types): Oops. Change
8378         this too.
8379
8380         * providers/smtp/camel-smtp-transport.c (query_auth_types): Updated.
8381
8382         * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
8383         Updated.
8384
8385         * providers/pop3/camel-pop3-store.c (query_auth_types): Updated.
8386
8387         * providers/imap/camel-imap-store.c (query_auth_types): Updated.
8388
8389         * camel-service.c (camel_service_query_auth_types): Now takes a
8390         boolean value to specify whether or not to connect when
8391         constructing a supported authtype list.
8392
8393 2001-02-05  Not Zed  <NotZed@Ximian.com>
8394
8395         * camel-stream-filter.c (do_write): Revert jeff's earlier change,
8396         the change below is the more-correct fix.  All his was doing was
8397         ignoring the return code & looping actually :)
8398
8399         * camel-stream-fs.c (stream_write): Since we are non-blocking on
8400         the outgoing fd, keep looping if writing out large blocks, so we
8401         can keep checking for cancel, etc.
8402
8403 2001-02-02  Not Zed  <NotZed@Ximian.com>
8404
8405         * camel-folder-thread.c (camel_folder_thread_messages_new): When
8406         we drop a fake node, dont skip checking the next in the list.
8407         (camel_folder_thread_messages_new): Add an assertion check just to
8408         make sure we dont get any pseudo nodes, and spit a warning if we
8409         do.
8410
8411 2001-02-04  Jeffrey Stedfast  <fejj@ximian.com>
8412
8413         * camel-stream-filter.c (do_write): Make do_write loop until the
8414         entire buffer is written.
8415
8416 2001-02-02  Not Zed  <NotZed@Ximian.com>
8417
8418         * camel-stream-fs.c: Add missing header for cancel check stuff.
8419
8420         * camel-session.c (camel_cancel_cancel): Fix a wrong cast.
8421
8422         * camel-mime-part.c (init_header_name_table): Setup a new table
8423         header_formatted_table, that lists headers that we dont want to
8424         fold (they've already been folded).
8425         (write_to_stream): Check for already formatted headers, and dont
8426         try and fold them.  This is a fix for bug #1097.
8427
8428 2001-02-01  Not Zed  <NotZed@Ximian.com>
8429
8430         * camel-mime-utils.c (header_fold): If we are folding, drop the
8431         space at the end of the line.
8432
8433 2001-01-30  Not Zed  <NotZed@Ximian.com>
8434
8435         * camel-remote-store.c (timeout_cb): Remvoe the stream locking
8436         here.  I think this was leading to a deadlock when a keepalive is
8437         being sent, in imap.
8438
8439 2001-01-29  Not Zed  <NotZed@Ximian.com>
8440
8441         * providers/imap/camel-imap-command.c
8442         (imap_command_strdup_vprintf): Include the terminating NUL in the
8443         calculated string length.  This hit memcheck.
8444
8445 2001-01-25  Not Zed  <NotZed@Ximian.com>
8446
8447         * tests/folder/test3.c: Changed the subject search to handle case
8448         sensitive when it is mixed case.
8449
8450         * Makefile.am (libcamel_la_SOURCES): Added camel-ssearch-private.c
8451         (noinst_HEADERS): Added camel-search-private.h
8452
8453         * camel-folder-search.c (check_header): New function to do the
8454         work of the various header checks.
8455         (search_header_matches): 
8456         (search_header_starts_with): 
8457         (search_header_ends_with): 
8458         (search_header_contains): Use check_header to do the work.
8459         (build_match_regex): Removed.
8460
8461         * camel-search-private.c (header_soundex):  New
8462         function to match words to phrases using soundex algorithm.
8463
8464         * camel-filter-search.c (soundexcmp): Removed.
8465         (check_match): Moved to search-private.h
8466
8467 2001-01-24  Not Zed  <NotZed@Ximian.com>
8468
8469         * camel-search-private.c (camel_search_build_match_regex): Added
8470         extra flags, so the same function can be used for
8471         start/end/whole/partial matches.
8472         (camel_search_header_match): Convenience function to check a
8473         single header against all sorts of different matches.
8474
8475         * providers/imap/camel-imap-search.c (imap_body_contains): Fix for
8476         e_sexp api changes.
8477
8478         * camel-folder-search.c: Fix for e_sexp api changes.
8479         (search_header_contains): Free args/quit on unknown header.
8480         (search_header_matches): "
8481         (search_header_starts_with): "
8482         (search_header_ends_with): "
8483         (match_message): Add an exception argument.
8484         (search_body_contains): Free args/quit on fatal error.
8485         (message_body_contains): Removed (moved to
8486         camel-search-private.c), fixed callers.
8487
8488         * camel-filter-search.c: Fix for e_sexp api changes.
8489         (build_match_regex, message_body_contains): Moved into
8490         camel-filter-private.c  Fixed callers.
8491         (check_header): moved guts to camel-search-private, and
8492         changed to use regex's for everything.  Just calls that with the
8493         right args.
8494         (check_header): GEts the header, decodes it, and checks for
8495         failure, and whatnot.
8496         (check_match): Removed.
8497         (header_soundex): Changed significantly.  Now it soundexes each
8498         word in the header separately, and compares it to the first
8499         argument.
8500
8501         * tests/folder/test9.c (main): Fix for api changes.
8502         (main): Added tests to see that invalid match and action
8503         rules are properly detected.
8504
8505         * camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove
8506         the 'finished message' bit.
8507         (camel_filter_driver_filter_message): Remove an accidentally
8508         checked in debug.
8509         (camel_filter_driver_filter_message): Fix for e-sexp api changes.
8510
8511 2001-01-23  Dan Winship  <danw@ximian.com>
8512
8513         * providers/imap/camel-imap-wrapper.c: Add a lock around the
8514         delayed loading, so two threads won't try to do it at the same
8515         time.
8516
8517 2001-01-22  Dan Winship  <danw@ximian.com>
8518
8519         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Set the
8520         CamelFolder::name to just the base part of the vfolder name (the
8521         non-query part)
8522
8523 2001-01-23  Not Zed  <NotZed@Ximian.com>
8524
8525         * camel-filter-search.c (camel_filter_search_match): Perform error
8526         checking on parsing/execution.
8527
8528         * camel-folder-search.c (camel_folder_search_execute_expression):
8529         Perform error handling on search expression.
8530         (CamelFolderSearchPrivate): Add a camelexception for error
8531         returns.
8532         (camel_folder_search_execute_expression): Setup exception pointer.
8533         (search_match_all): Quit on error.
8534
8535         * providers/imap/camel-imap-summary.c (message_info_load): Removed
8536         some debug 'warnings', as they should now be displayed at the
8537         toplevel loader, and just made the code match similar code
8538         elsewhere.
8539
8540         * providers/local/camel-mbox-summary.c (message_info_load): Error
8541         handling.
8542         (message_info_save): more error handling.
8543
8544         * camel-folder-summary.c (message_info_load): Add error handling
8545         and sanity checking.
8546         (camel_folder_summary_load): Add error checks.
8547         (perform_content_info_load): Error + sanity checks.
8548         (content_info_load): error + sanity checks.
8549
8550         * camel-filter-driver.c (close_folder): avoid /0 by updating after
8551         we've done the sync.
8552         (close_folders): Setup the first progress report to start it off.
8553         (camel_filter_driver_filter_message): Fix a fixme, check errors in
8554         e_sexp parsing, etc.
8555
8556 2001-01-22  Christopher James Lahey  <clahey@helixcode.com>
8557
8558         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8559         Initialize the value of the variable exists here.
8560
8561 2001-01-22  Not Zed  <NotZed@Ximian.com>
8562
8563         * .cvsignore */*/.cvsignore: Added profiling temp
8564         files.
8565
8566         * camel-folder-thread.c (camel_folder_thread_messages_new): When
8567         removing phantom nodes, check for the end node too.
8568
8569         * camel-filter-driver.[ch]: Changed status vars to be
8570         CAMEL_FILTER_STATUS_ etc.
8571
8572 2001-01-21  Jeffrey Stedfast  <fejj@ximian.com>
8573
8574         * camel-mime-utils.c (header_param_list_format_append): Make the
8575         output a little prettier. Okay, so I'm anal...
8576
8577 2001-01-21  Not Zed  <NotZed@Ximian.com>
8578
8579         * camel-filter-driver.h: Added an exception to
8580         CamelFilterGetFolderFunc.
8581
8582         * camel-filter-driver.c (camel_filter_driver_filter_message):
8583         Remove source parameter, as it is determined elsewhere now.
8584         (camel_filter_driver_filter_folder): Same here.
8585         (camel_filter_driver_filter_mbox): And here.
8586         (do_move): If we cannot open a folder, quit, rather than ignoring
8587         it.
8588         (do_copy): Here too.
8589         (open_folder): Pass an exception into get_folder callback.
8590         (camel_filter_driver_filter_folder): Report that we're syncing,
8591         when we are.
8592         (camel_filter_driver_filter_mbox): And here too.
8593         (close_folder): And here.
8594
8595 2001-01-19  Jeffrey Stedfast  <fejj@ximian.com>
8596
8597         * camel-filter-driver.c (camel_filter_driver_filter_message): Set
8598         the deleted bit *before* copying to the default folder, this way
8599         if they are importing mail and have a rule to delete it, it
8600         doesn't get copied to the default folder un-deleted.
8601
8602 2001-01-19  Dan Winship  <danw@ximian.com>
8603
8604         * providers/imap/camel-imap-store.c
8605         (get_subscribed_folders_by_hand): If LISTing a subscribed folder
8606         doesn't return a LIST response, just ignore that folder. Yay
8607         RFC2060.
8608         (subscribe_folder): add a missing UNLOCK
8609
8610 2001-01-19  Kjartan Maraas  <kmaraas@gnome.org>
8611
8612         * providers/smtp/camel-smtp-provider.c: Mark strings for translation.
8613         
8614 2001-01-19  Not Zed  <NotZed@Ximian.com>
8615
8616         * camel-filter-driver.c (report_status): Add a percentage complete
8617         indicator to the status thing.
8618         (camel_filter_driver_filter_mbox): Add percentage complete to
8619         reporting.      
8620         (camel_filter_driver_filter_folder): Same.
8621
8622 2001-01-18  Dan Winship  <danw@ximian.com>
8623
8624         * camel-store.c (camel_folder_info_build): More tweaking... skip
8625         separator characters after the namespace character. (Gets rid of
8626         the shell folder registration warning some people have had with
8627         IMAP)
8628
8629         * providers/imap/camel-imap-store.c (imap_connect): I'm sure there
8630         was some clever reason I was storing the flags of the folder in
8631         the hash table rather than just "1", but I don't remember what it
8632         was now. Anyway, since we only ever test NULL/non-NULL, store 1,
8633         since flags is sometimes 0.
8634
8635         * providers/imap/camel-imap-folder.c (imap_update_summary): Oops.
8636         Somewhere in one of the reorgs, the code to add new messages to
8637         the CamelFolderChangeInfo structure got removed. Fix that.
8638
8639 2001-01-17  Jeffrey Stedfast  <fejj@ximian.com>
8640
8641         * providers/imap/camel-imap-summary.c (message_info_load): Add
8642         some g_warnings() to help debug later if I ever get the segfaults
8643         I was getting earlier. Can't seem to reproduce them after my
8644         previous "fix".
8645
8646         * camel-folder-summary.c (camel_folder_summary_load): Undid my
8647         change here, NotZed said it was wrong and that if it gets a NULL
8648         mi then it should abort and not continue.
8649
8650 2001-01-17  Jeffrey Stedfast  <fejj@ximian.com>
8651
8652         * camel-folder-summary.c (camel_folder_summary_load): Make sure
8653         that the message-info is non-null before we go accessing inner
8654         parts of it and/or adding it to the summary array. I may not have
8655         handled the error correctly, but it does seem to work
8656         correctly. If NotZed could double-check this it'd be great.
8657
8658         * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
8659         New smtp error-code to string mapping function.
8660         (smtp_connect): Use the new error->string function for reporting
8661         useful errors.
8662         (smtp_helo): Same. Also use a case-insensitive strstr for 8BITMIEM
8663         as it seems Exchange sends back lowercase for that one single SMTP
8664         extension. Everything else is uppercase. I'm seeing a lack of love
8665         for that extension by Microsoft dudes...
8666         (smtp_mail): Use get_smtp_error_string.
8667         (smtp_rcpt): Same.
8668         (smtp_data): Same.
8669         (smtp_quit): Same.
8670         (smtp_rset): Same.
8671
8672 2001-01-16  Jeffrey Stedfast  <fejj@ximian.com>
8673
8674         * camel-folder-summary.c (camel_folder_summary_array): Add an int
8675         i so this code will compile. Should I be worried about how well
8676         this code will work? ;-)
8677
8678 2001-01-17  Not Zed  <NotZed@Ximian.com>
8679
8680         * camel-folder.c (free_summary): Call
8681         camel_folder_summary_array_free() to do the work.
8682         (get_summary): Use camel_folder_summary_array() to get the array
8683         atomically.  These fixes allow folder/test8 to work again, and fix
8684         a sort of race where the summary size can change while we were
8685         making a copy of it.
8686
8687         * camel-folder-summary.c (camel_folder_summary_array): Get the
8688         summary array atomically, so it can't contain empty records.
8689         (camel_folder_summary_array_free): And free it.
8690
8691         * tests/lib/camel-test.c (die): If we are verbose & in threads,
8692         then goto sleep so we can debug.
8693
8694         * tests/folder/test8.c (worker): Add a missing pull() for
8695         comnparing content.
8696
8697         * camel-filter-search.c: Fix the symbol table, so match-all is an
8698         immediate function, as it should be.
8699
8700         * tests/folder/test9.c (main): New test, tests some filtering
8701         things.
8702
8703         * tests/message/test3.c (main): Dont use a boundary string with
8704         spaces in it.  Folding can corrupt it.  Maybe the folding isn't
8705         working entirely right, but anyway.
8706
8707         * camel-session.c: Debug out the debug.
8708
8709         * camel-filter-driver.c (camel_filter_driver_filter_folder): Plug
8710         a messageinfo leak.
8711
8712 2001-01-16  Dan Winship  <danw@ximian.com>
8713
8714         Delayed loading of IMAP message parts.
8715
8716         * camel-types.h: typedef CamelMessageInfo and
8717         CamelMessageContentInfo here
8718
8719         * camel-folder-summary.h: Add a "size" field to
8720         CamelMessageContentInfo.
8721
8722         * camel-folder-summary.c (camel_folder_summary_content_info_new,
8723         camel_folder_summary_content_info_free): Renamed and made
8724         non-static for providers that construct their own content info.
8725         (content_info_load, content_info_save): load/save size
8726
8727         * camel-data-wrapper.c (camel_data_wrapper_is_offline): New
8728         function to return if a data wrapper's contents are "offline". (So
8729         that, for example, we don't make thumbnails of images that haven't
8730         been loaded off the IMAP server yet.) Defaults to FALSE.
8731
8732         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8733         Fix a bug in re-selecting a folder when messages have been
8734         expunged from it by another client in the meantime.
8735         (imap_get_message): Rewrite. If the message is larger than a
8736         certain size, just create a skeleton message containing
8737         CamelImapWrappers that will read parts as needed. This way, large
8738         attachments only need to be downloaded if the user looks at them,
8739         and multipart/alternative alternatives that aren't used will never
8740         be downloaded at all.
8741         (imap_update_summary): Rewrite this a bunch too to make the
8742         parsing more robust.
8743
8744         * providers/imap/camel-imap-summary.c
8745         (CAMEL_IMAP_SUMMARY_VERSION): bump.
8746         (camel_imap_summary_new): Set build_content to TRUE.
8747         (content_info_load, content_info_save): Only save/load the content
8748         for messages that have it. (The content info gets created as a
8749         side effect of imap_get_message.)
8750
8751         * providers/imap/camel-imap-utils.c (imap_parse_body): New routine
8752         (and helpers) to parse an IMAP 'body' FETCH response and fill in a
8753         CamelMessageContentInfo from it.
8754
8755         * providers/imap/Makefile.am (libcamelimap_la_SOURCES,
8756         libcamelimap_la_HEADERS): add camel-imap-wrapper.
8757
8758 2001-01-16  Dan Winship  <danw@ximian.com>
8759
8760         * camel-tcp-stream-raw.c (stream_getsockopt, stream_setsockopt):
8761         * camel-stream-fs.c (stream_read, stream_write): 
8762         * camel-remote-store.c (socket_connect): fcntl(fd, F_GETFL)
8763         returns the flags as the return value, not via a passed in
8764         pointer. And F_SETFL looks for an int, not a long, and you have to
8765         pass it what it's expecting because it's a va_arg parameter. (Yes,
8766         the man page lies on Linux. But check the UNIX98 spec or the glibc
8767         source.) Also, fix another bug in socket_connect: if we manage to
8768         connect right away, unset O_NONBLOCK so it doesn't mess us up
8769         later.
8770
8771         Fixes a bunch of problems with non-blocking I/O being done in the
8772         allegedly-blocking case and then returning EWOULDBLOCK.
8773
8774 2001-01-16  Chris Toshok  <toshok@ximian.com>
8775
8776         * providers/Makefile.am (NNTP_DIR): set to nntp if ENABLE_NNTP
8777         (SUBDIRS): use $(NNTP_DIR)
8778
8779 2001-01-16  Jeffrey Stedfast  <fejj@ximian.com>
8780
8781         * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't check
8782         errno as it's not being set. Fixes bug #1150.
8783
8784 2001-01-16  Jeffrey Stedfast  <fejj@ximian.com>
8785
8786         Ugh, this design is ugly like my butt.
8787
8788         * camel-session.c (camel_session_query_cert_authenticator): New
8789         function which will be useful when we integrate SSL.
8790
8791         * camel-tcp-stream-ssl.c (ssl_auth_cert): Callback to authenticate
8792         a certificate.
8793         (ssl_bad_cert): Callback that gets the reason the certificate is
8794         bad and then calls camel's cert-authenticator callback to notify
8795         the user and to allow the user to override the check.
8796         (stream_connect): Set the URL we expect to connect with and setup
8797         the auth_cert and bad_cert callbacks.
8798         (camel_tcp_stream_ssl_new): Now takes a CamelSession and a
8799         expected_host argument that it will use for certificate
8800         authentication.
8801         (camel_tcp_stream_ssl_finalize): Unref the session and free the
8802         expected_host.
8803
8804 2001-01-16  Not Zed  <NotZed@Ximian.com>
8805
8806         * camel-filter-search.c (header_exists): Changed to support
8807         multiple args (or'd together).
8808         (header_contains): Cleaned up to match the search code.  Why did
8809         fejj change it? I'll never know.
8810         (header_matches): 
8811         (header_starts_with): 
8812         (header_ends_with): Big cleanup of fejj's "i'm the cut & paste
8813         king" code.  Also properly handle or'ing of additional args to
8814         match what the folder-search code should do.
8815         (check_match): New function which does the annoying matching
8816         stuff (for header matches).
8817         (check_header): Similarly, handles or'ing of the matches together.
8818         (header_contains):
8819         (header_matches): 
8820         (header_starts_with): 
8821         (header_ends_with): Call check_header to do the actual work.
8822         (header_soundex): And here too.
8823         (match_all): Yeah like match-all isn't passed expression results,
8824         its passed expression terms.  Fix this so match-all works like it
8825         should, by executing the contained expression.
8826         (message_body_contains): Copied directly from
8827         camel-folder-search.c, a more robust/faster/simpler body search
8828         code.
8829         (mime_part_matches): Removed entirely.
8830         (handle_multipart): Removed entirely.
8831         (build_match_regex): Copied from camel-folder-search.  Builds a
8832         set of simple strings into a regex pattern that matches any of
8833         them (for faster & simpler matching).  Expanded to accept regex
8834         patterns itself, so it can merge them together.
8835         (body_contains): Use build match/match message to match using a
8836         built regex.
8837         (body_regex): Likewise, this time we tell it we're building a
8838         regex though.
8839         (header_full_regex): Use build_match_regex to take the drudgery
8840         out of it, and expand it to handle multiple regex's at once.
8841         (get_full_header): slightly cleaner (well i dunno, the sprintf
8842         stuff just got to me).
8843         (header_regex): Cleaned up to use build_match_Regex too, and to
8844         properly check types.
8845         (filter_message_search): Just allocate 'fms' on the stack.
8846
8847         * camel-filter-driver.c (camel_filter_driver_finalise): 
8848         (camel_filter_driver_init): 
8849         (camel_filter_driver_class_init): 
8850         (camel_filter_driver_get_type): Changed from gtk object to camel
8851         object.
8852         (camel_filter_driver_add_rule): New function to add a rule to be
8853         processed in sexp form.
8854         (camel_filter_driver_init): Init the rules list.
8855         (camel_filter_driver_finalise): Clear the rules/rules list.
8856         (camel_filter_driver_filter_message): Scan rules list directly
8857         rather than creating on the fly.
8858
8859         * Makefile.am (libcamelinclude_HEADERS): Added camel-filter-driver.h
8860         (libcamel_la_SOURCES): Added camel-filter-driver.c, code taken
8861         from filter-driver, which can drive, uh, filters based on sexp's.
8862         (libcamelinclude_HEADERS): 
8863         (libcamel_la_SOURCES): Added camel-filter-search.[ch]
8864
8865         * camel-folder-summary.c (camel_folder_summary_decode_string):
8866         Chganged len back to be unsigned.  And do a simple range check on
8867         the string value to try and detect corrupted summary files.
8868
8869         * providers/imap/camel-imap-command.c (imap_read_untagged): Handle
8870         cancelled stream reads with an appropriate exception.
8871
8872         * providers/imap/camel-imap-private.h: Fix the include-once
8873         macro.  Doh, confliced with camel-private.h.
8874
8875         * providers/imap/camel-imap-store.c (imap_store_refresh_folders):
8876         A copy of camel_remote_store_refresh_folders.  We avoid locking
8877         each folder when we call it though.  This should be removed when i
8878         can work out how to remove the folder lock from this function
8879         easily.
8880
8881         * camel-stream-fs.c (stream_write): Fix n' argument of select.
8882         (stream_read): Likewise.
8883
8884         * camel-remote-store.c (socket_connect): Bump the connect timeout
8885         upto 4 minutes.
8886         (socket_connect): Oops, fix the 'n' argument of select.
8887
8888         * camel-session.c (camel_cancel_cancel): If we are given no
8889         cancellation node, then do it for all active ones.
8890
8891 2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>
8892
8893         * camel-stream-fs.c (stream_close): If the close() is successful,
8894         set the fd to -1.
8895
8896         * camel-tcp-stream-raw.c: Removed the disconnect() method.
8897         (stream_close): If the close() is successful, set the sockfd to
8898         -1.
8899
8900         * camel-tcp-stream-ssl.c: Removed the disconnect() method.
8901         (stream_close): If the close() is successful, set the sockfd to
8902         NULL.
8903
8904         * camel-tcp-stream.c (camel_tcp_stream_disconnect): Removed,
8905         easier to just use the close() method as it did the same thing
8906         anyway.
8907
8908 2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>
8909
8910         * camel-tcp-stream-raw.c (stream_getsockopt): Updated to be able
8911         to get the CAMEL_SOCKOPT_NONBLOCKING socket opt.
8912         (stream_setsockopt): Updated to be able to set the
8913         CAMEL_SOCKOPT_NONBLOCKING socket opt.
8914
8915 2001-01-15  Peter Williams  <peterw@ximian.com>
8916
8917         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
8918         around the imap_rescan, which needs it.
8919
8920 2001-01-15  Not Zed  <NotZed@Ximian.com>
8921
8922         * camel-remote-store.c (socket_connect): A cancellable connection
8923         routine.
8924         (remote_send_string): Return cancelled exception if we were.
8925         (remote_send_stream): "
8926         (remote_recv_line): "
8927
8928         * camel-stream-fs.c (stream_read): First cut at cancellation
8929         stuff.  Its looking a bit ugly.
8930
8931 2001-01-15  Jeffrey Stedfast  <fejj@ximian.com>
8932
8933         * camel-tcp-stream-ssl.c (stream_connect): Uses an SSL socket now
8934         although there's still a few things missing (like certificate
8935         handling and such).
8936
8937         * camel.c (camel_ssl_init): A replacement function for
8938         camel_init() that also initializes SSL.
8939
8940 2001-01-14  Jeffrey Stedfast  <fejj@ximian.com>
8941
8942         * camel-tcp-stream-ssl.c (stream_getsockopt): Implemented.
8943         (stream_setsockopt): Implemented.
8944
8945         * camel-tcp-stream-raw.c (stream_getsockopt): Implemented.
8946         (stream_setsockopt): Implemented.
8947
8948         * camel-tcp-stream.c (camel_tcp_stream_getsockopt): New method.
8949         (camel_tcp_stream_setsockopt): Another new method. I think you get
8950         the idea of what these are for so I won't explain them.
8951
8952 2001-01-14  Jeffrey Stedfast  <fejj@helixcode.com>
8953
8954         * camel-tcp-stream-ssl.[c,h]: New CamelTcpStream class that
8955         implements nspr sockets and eventually will use nss for
8956         SSL/TLS. Currently doesn't do any SSL/TLS but it should still
8957         work. It's functionally equivalent to CamelTcpStreamRaw at the
8958         moment only it uses nspr i/o.
8959
8960         * camel-tcp-stream-raw.[c,h]: New CamelTcpStream class that
8961         implements native sockets. Should be usable but may have some bugs
8962         yet.
8963
8964 2001-01-13  Jeffrey Stedfast  <fejj@ximian.com>
8965
8966         * camel-tcp-stream.[c,h]: New abstract class for TCP streams. The
8967         next step is to write child classes (CamelTcpStreamBSD and
8968         CamelTcpStreamSSL). The BSD stream will use normal BSD sockets
8969         while SSL will use Mozilla's NSPR and NSS libraries to do Secure
8970         Socket Layers which wille ventually replace CamelStreamSSL which I
8971         just commit'd. Oh well.
8972
8973 2001-01-13  Jeffrey Stedfast  <fejj@ximian.com>
8974
8975         * camel-stream-ssl.[c,h]: New stream for handling SSL/TLS
8976         connections.
8977
8978 2001-01-12  Not Zed  <NotZed@Ximian.com>
8979
8980         * camel-folder-thread.c (camel_folder_thread_messages_new):
8981         Perform a final pass, removing any pseudo nodes we added earlier.
8982         Quick patch to test the idea.
8983         (camel_folder_thread_messages_new): Added casts to rmeove some
8984         warnings for the analites out there.
8985
8986 2001-01-11  Dan Winship  <danw@ximian.com>
8987
8988         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
8989         Fix a bug in previous commit: don't check for deleted messages if
8990         there are no known messages in the folder (because it would end up
8991         sending "FETCH 0 ...").
8992         (imap_copy_message_to): Fix this up: sync flags to the server
8993         before copying so that they end up correct in the remote folder.
8994         And poke the destination folder after doing the copy so it notices
8995         the new message right away.
8996         (imap_move_message_to): Call imap_copy_message_to for most of the
8997         work rather than duplicating the code (since it's much more
8998         complicated now).
8999
9000 2001-01-11  Dan Winship  <danw@ximian.com>
9001
9002         * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
9003         New function to check for added/deleted messages when re-selecting
9004         a folder.
9005         (imap_refresh_info, imap_rescan, imap_update_summary): Various
9006         locking tweaks that turn out to be irrelevant since command_lock
9007         is recursive, but whatever.
9008
9009         * providers/imap/camel-imap-command.c (camel_imap_command): When
9010         selecting a new folder, call camel_imap_folder_selected on it.
9011
9012         * camel-folder.c (camel_folder_copy_message_to): Fix a locking
9013         problem. (One branch of an if statement was returning with the
9014         lock still locked.) Also remove the deprecation comments, to match
9015         move_message_to.
9016
9017 2001-01-10  Jeffrey Stedfast  <fejj@helixcode.com>
9018
9019         * providers/local/camel-local-provider.c: Changed the descriptions
9020         for mh, mbox, and maildir to be more "user-friendly".
9021
9022 2001-01-10  Dan Winship  <danw@helixcode.com>
9023
9024         * providers/imap/camel-imap-types.h: New header to prevent
9025         recursive #include problems
9026
9027         * providers/imap/*.h: Replace some #includes with #include
9028         "camel-imap-types.h", remove typedefs that were moved to
9029         camel-imap-types.h
9030
9031         * providers/imap/*.c: Add #includes to make up for #includes
9032         removed from .h files
9033
9034         * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
9035         camel-imap-types.h
9036
9037 2001-01-10  Dan Winship  <danw@helixcode.com>
9038
9039         * camel-store.c (camel_store_sync): New class function, parallel
9040         to camel_folder_sync. (The default implementation just calls
9041         camel_folder_sync on each cached folder.)
9042
9043         * providers/imap/camel-imap-store.c (get_folder_info): Call
9044         camel_store_sync before doing anything else so that the IMAP
9045         server and Camel are working from the same data. Don't ask the
9046         server for the unread message count of the current folder, since
9047         UW will return often-incorrect cached data, and we can calculate
9048         it without talking to the server anyway.
9049
9050 2001-01-09  Dan Winship  <danw@helixcode.com>
9051
9052         Mostly IMAP changes. Use the NAMESPACE extension (where
9053         available). Deal with servers that don't return LIST flags in
9054         response to LSUB (like UW) to get rid of the "not a selectable
9055         folder" error messages in the UI. Take advantage of the \Marked
9056         and \Unmarked flags to try to speed up the folder scan by not
9057         doing STATUS on unmarked folders. Some further tweaks on the shape
9058         of the resulting folder tree in various situations...
9059
9060         * camel-store.h: Remove the (read) message_count, since nothing
9061         uses it, and we can speed up IMAP a bit this way.
9062
9063         * camel-store.c (camel_folder_info_build): Redo this a bit to make
9064         it more useful for IMAP since that's the only thing that uses it.
9065
9066         * camel-remote-store.c (camel_remote_store_connected): Public
9067         function to check if the store is connected, and try to connect it
9068         if it's not.
9069         (remote_send_string, remote_send_stream, remote_recv_line): Use
9070         that.
9071
9072         * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
9073         fix up for changes.
9074         (camel_imap_store_init): Initialize subscribed_folders to NULL
9075         rather than an empty hash table.
9076         (imap_connect): Get the list of subscribed folders here. If the
9077         server doesn't claim that any of them are either Marked or
9078         Unmarked, then assume that it doesn't do that for LSUB and
9079         remember that for later. If the server supports the NAMESPACE
9080         extension and the user didn't specify a namespace, use the
9081         server-provided one.
9082         (imap_disconnect): Free the list of subscribed folders, and the
9083         namespace.
9084         (get_folder): check camel_remote_store_connected
9085         (get_folder_info): check camel_remote_store_connected. Add a bunch
9086         of new cleverness. If we learned that the server doesn't do LSUB
9087         usefully, do a bunch of LISTs by hand. Then, if we're getting
9088         unread counts, only do it for folders that weren't listed as
9089         Unmarked. Also, deal with namespaces that end with the separator
9090         character, and update for changes to camel_folder_info_build.
9091         (folder_subscribed): Add a g_return_val_if_fail.
9092         (subscribe_folder, unsubscribe_folder): check
9093         camel_remote_store_connected.
9094
9095         * providers/nntp/camel-nntp-store.c (build_folder_info,
9096         build_folder_info_from_grouplist, nntp_store_get_folder_info):
9097         Don't fill in message_count since it doesn't exist any more.
9098
9099 2001-01-09  Dan Winship  <danw@helixcode.com>
9100
9101         Kill off a long-hated Camel kludge: "empty" URLs and
9102         query_auth_types_generic.
9103
9104         * camel-url.c: Remove "empty" from CamelURL.
9105         (camel_url_new): No longer set it.
9106         (camel_url_to_string): Treat "" as equivalent to NULL for
9107         authmech. (Unrelated change, but it simplifies some stuff with the
9108         new config dialog.)
9109
9110         * camel-service.c (camel_service_new): Remove url->empty check: if
9111         the URL isn't valid, we don't create the service.
9112         (camel_service_query_auth_types): No longer need to switch between
9113         generic and connected variants.
9114
9115         * providers/smtp/camel-smtp-transport.c (query_auth_types): 
9116         * providers/pop3/camel-pop3-store.c (query_auth_types): 
9117         * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types): 
9118         * providers/imap/camel-imap-store.c (query_auth_types): 
9119         * camel-remote-store.c (remote_query_auth_types): Remove generic
9120         version, rename connected version.
9121
9122 2001-01-06  Not Zed  <NotZed@HelixCode.com>
9123
9124         * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Dont
9125         try and unref a messageinfo that wasn't there, and use the right
9126         free function too.  Modified patch from Iain.
9127         (vee_move_message_to): New method, call the real folders'
9128         move_message_to method.
9129
9130 2001-01-04  JP Rosevear  <jpr@helixcode.com>
9131
9132         * tests/lib/Makefile.am: fix includes for compilation
9133
9134         * tests/message/Makefile.am: Build test3 again
9135
9136         * tests/message/test2.c: Kill warnings with header includes
9137
9138         * tests/message/test3.c: ditto
9139
9140         * tests/lib/streams.c: ditto
9141
9142         * tests/lib/camel-test.c: ditto
9143
9144         * tests/lib/messages.c: ditto
9145
9146         * tests/lib/folders.c: ditto
9147
9148 2001-01-04  Dan Winship  <danw@helixcode.com>
9149
9150         * providers/imap/camel-imap-folder.c (imap_rescan): Fix two
9151         problems in figuring out server-expunged messages.
9152
9153 2001-01-04  Not Zed  <NotZed@HelixCode.com>
9154
9155         * camel-folder.c (thaw): If we have a lot of messages changed,
9156         promote it to a folder changed event.
9157
9158 2000-01-03  Jeffrey Stedfast  <fejj@helixcode.com>
9159
9160         * camel-folder-search.c (search_header_matches): Implemented.
9161         (search_header_exists): Implemented.
9162         (search_header_starts_with): Implemented.
9163         (search_header_ends_with): Implemented.
9164
9165 2001-01-03  Christopher James Lahey  <clahey@helixcode.com>
9166
9167         * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
9168         Initialize the exists variable so that we don't do random things
9169         if the imap server misbehaves.
9170
9171 2000-12-29  Not Zed  <NotZed@HelixCode.com>
9172
9173         * camel-folder.c (camel_folder_move_message_to): REmove warning,
9174         this isn't really deprecated, sigh.
9175
9176         * camel-mime-utils.c (header_fold): Comment out some debug.
9177
9178 2001-01-02  Christopher James Lahey  <clahey@helixcode.com>
9179
9180         * providers/maildir/, providers/mbox/, providers/mh/: Removed
9181         these directories since they're unused.
9182
9183 2001-01-02  Dan Winship  <danw@helixcode.com>
9184
9185         IMAP randomness.
9186
9187         * providers/imap/camel-imap-stream.[ch]: Remove. To be replaced.
9188
9189         * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Remove
9190         camel-imap-stream.h
9191
9192         * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Take a
9193         char ** instead of char *, to return the position at the end of
9194         parsing like the string parsing functions.
9195         (imap_parse_string_generic): New function to parse a string,
9196         nstring, or astring.
9197         (imap_parse_nstring, imap_parse_astring): Now macros
9198         (imap_parse_string): Added
9199
9200         * providers/imap/camel-imap-folder.h: Remove the "exists" field
9201         from CamelImapFolder.
9202
9203         * providers/imap/camel-imap-folder.c: Remove unused include of
9204         camel-imap-stream.h.
9205         (camel_imap_folder_init): Remove no-longer-relevant summary
9206         initialization.
9207         (camel_imap_folder_new): Update for imap_parse_flag_list change,
9208         exists removal, and imap_rescan.
9209         (imap_rescan): New function that does most of the work of the old
9210         imap_refresh_info, but taking "exists" as an argument instead of
9211         getting it from the folder. Also calls camel_imap_folder_changed
9212         to do the summary updating and signalling, rather than duplicating
9213         that code.
9214         (imap_refresh_info): Just call imap_rescan (using the size of the
9215         folder summary as "exists").
9216         (imap_update_summary): Update for imap_parse_flag_list change
9217         (camel_imap_folder_changed): Update for "exists" change.
9218
9219 2001-01-02  Dan Winship  <danw@helixcode.com>
9220
9221         * camel-mime-utils.c (header_content_type_simple): New function to
9222         return just foo/bar with no parameters.
9223
9224         * camel-data-wrapper.c (get_mime_type): Use
9225         header_content_type_simple rather than header_content_type_format.
9226
9227 2000-12-28  Dan Winship  <danw@helixcode.com>
9228
9229         * gmime-content-field.[ch]: Remove this. It was only a thin
9230         wrapper around struct _header_content_type anyway, and didn't
9231         match the naming scheme of anything else.
9232
9233         * Makefile.am: Remove gmime-content-field.[ch]
9234
9235         * camel.h: Remove gmime-content-field.h
9236
9237         * camel-types.h: Add CamelContentType as a typedef for struct
9238         _header_content_type (especially for use outside of camel).
9239
9240         * camel-multipart.c: 
9241         * camel-mime-part.c: 
9242         * camel-mime-message.c: 
9243         * camel-folder-summary.c:
9244         * camel-folder-search.c: 
9245         * camel-data-wrapper.[ch]: Use CamelContentType and
9246         header_content_type_* functions rather than the GMime stuff. 
9247
9248         * camel-mime-part-utils.c: 
9249         * camel-medium.c: Remove unused gmime-content-field.h include.
9250
9251 2000-12-27  Dan Winship  <danw@helixcode.com>
9252
9253         * providers/pop3/camel-pop3-store.c (connect_to_server): Fix the
9254         APOP check to not crash on servers that don't return any
9255         information on the +OK greeting line.
9256
9257 2000-12-24  Not Zed  <NotZed@HelixCode.com>
9258
9259         * providers/imap/camel-imap-search.c (imap_body_contains): Lock
9260         the command channel while searching.
9261         (imap_body_contains): If performing a whole uid search, then add
9262         references to our own summary items, dont look it up in the
9263         folder.  This way they can't vanish unexpectedly.
9264
9265         * providers/imap/camel-imap-folder.h (CamelImapFolder): Added a
9266         private field.
9267         (CamelImapFolder): Removed summary again from here.
9268
9269         * providers/imap/camel-imap-private.h: Added lock for imap
9270         searches.
9271
9272         * Merge from camel-mt-branch.
9273         
9274         * providers/imap/camel-imap-folder.c (imap_update_summary): Merge
9275         fix, use the folder->summary.
9276         (imap_get_message_flags, imap_set_message_flags,
9277         imap_get_message_user_flag, imap_set_message_user_flag): Removed
9278         again.
9279         (camel_imap_folder_init): Setup private data/lock.
9280         (imap_finalize): Free private data/search lock.
9281         (imap_search_free): Lock the search_lock.
9282         (imap_search_by_expression): Lock the search lock when using the
9283         search object.  Also copy/ref hte summary, rather than getting it
9284         directly.
9285         (imap_refresh_info): Free any info lookups.  Use folder->summary
9286         not imap_folder->summary.  And lock around commands.
9287         (camel_imap_folder_changed): Use folder->summary again.
9288         (camel_imap_folder_changed): Make sure we unref the summary lookup.
9289
9290 2000-12-22  Dan Winship  <danw@helixcode.com>
9291
9292         * providers/imap/camel-imap-store.c (get_folder_info): When
9293         getting the top-level folder list, include INBOX even if it's not
9294         subscribed. Don't show subscribed folders outside of the given
9295         namespace. Do a better job of pruning the namespace from the
9296         returned folder tree.
9297
9298 2000-12-21  Dan Winship  <danw@helixcode.com>
9299
9300         * providers/imap/camel-imap-search.c: New CamelFolderSearch
9301         subclass that just reimplements body_contains (using the IMAP
9302         SEARCH command). All other kinds of searching are done against the
9303         local summary.
9304
9305         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
9306         Use a CamelImapSearch to do searching.
9307
9308         * providers/imap/camel-imap-utils.c (imap_translate_sexp, etc): No
9309         longer needed.
9310
9311         * camel-folder-search.h: Add missing CAMEL_FOLDER_SEARCH_TYPE
9312         #define
9313
9314 2000-12-21  Dan Winship  <danw@helixcode.com>
9315
9316         * camel-stream-buffer.c (camel_stream_buffer_gets): Update the
9317         doc comment: since it always NUL-terminates the buffer, it reads
9318         at most @max-1 bytes, not @max.
9319
9320         * camel-remote-store.c (remote_recv_line): Fix the "did
9321         camel_stream_buffer_gets fill the whole buffer" check. Fixes a bug
9322         when reading lines longer than 1024 characters (eg, IMAP SEARCH
9323         responses in very large folders).
9324
9325 2000-12-19  Dan Winship  <danw@helixcode.com>
9326
9327         * providers/imap/camel-imap-folder.c (imap_refresh_info): Oops.
9328         Don't do "FETCH 1:0" when the folder is empty.
9329         (imap_protocol_get_summary_specifier): Request RFC822.SIZE too.
9330         (imap_update_summary): Parse RFC822.SIZE and add it to the
9331         summary.
9332
9333 2000-12-18  Dan Winship  <danw@helixcode.com>
9334
9335         * providers/imap/camel-imap-summary.c: Add "guint32 server_flags"
9336         to CamelImapMessageInfo to keep track of the last known message
9337         flag state on the server.
9338         (message_info_save, message_info_load): Save/load the
9339         server_flags.
9340
9341         * providers/imap/camel-imap-folder.c: Make this use
9342         CamelFolderChangeInfo and emit folder_changed notifications as it
9343         gets them rather than only on refresh_info.
9344         (imap_refresh_info): Notice flags that get cleared on the server
9345         as well as flags that get set.
9346         (imap_update_summary): Remove a comment that never actually
9347         applied to the committed code.
9348
9349 2000-12-15  Dan Winship  <danw@helixcode.com>
9350
9351         * providers/imap/camel-imap-command.c (camel_imap_command): Change
9352         the semantics of fmt: Now %S (capital S) means an IMAP "string",
9353         (which can be sent as either a quoted string or a literal). If
9354         the server supports LITERAL+, these will be sent as extended
9355         literals (which don't require any special escaping). Otherwise
9356         they'll be sent as quoted strings (and it now properly deals with
9357         " or \ in the string).
9358         (imap_command_strdup_vprintf): Utility routine that does the real
9359         work for the functionality mentioned above.
9360
9361         * providers/imap/camel-imap-utils.c (imap_quote_string): Turns a
9362         string into a proper IMAP "quoted string".
9363
9364         * providers/imap/camel-imap-store.c: 
9365         * providers/imap/camel-imap-folder.c: Use %S instead of "%s" where
9366         appropriate.
9367
9368 2000-12-22  Not Zed  <NotZed@HelixCode.com>
9369
9370         * camel-folder-summary.c (GLOBAL_INFO_UNLOCK): Doh, cut and paste
9371         victim again, call unlock instead of lock!
9372         (summary_assign_uid): Unlock around trying to get a new uid, if we
9373         have a clash.
9374
9375 2000-12-21  Not Zed  <NotZed@HelixCode.com>
9376
9377         * tests/folder/Makefile.am (TESTS): reenabled the tests here.
9378
9379         * providers/nntp/camel-nntp-newsrc.c (CamelNNTPNewsrc): Add a
9380         lock.  Made completely mt-safe.  Sigh, this is all so i can
9381         support snooping of the set_flags stuff inside camel-nntp-folder,
9382         since i've removed the global folder lock from all of the other
9383         folder summary operations.
9384         (camel_nntp_newsrc_read_for_server): Setup lock.
9385         (camel_nntp_newsrc_get_highest_article_read): Lock internal access.
9386         (camel_nntp_newsrc_get_num_articles_read): 
9387         (camel_nntp_newsrc_mark_article_read): 
9388         (camel_nntp_newsrc_mark_range_read): 
9389         (camel_nntp_newsrc_article_is_read): 
9390         (camel_nntp_newsrc_group_is_subscribed): 
9391         (camel_nntp_newsrc_unsubscribe_group): 
9392         (camel_nntp_newsrc_subscribe_group): 
9393         (camel_nntp_newsrc_get_subscribed_group_names): 
9394         (camel_nntp_newsrc_get_all_group_names): "
9395         (camel_nntp_newsrc_write_to_file): Lock internal accesses.
9396         (camel_nntp_newsrc_write): Lock around diry stuff.
9397
9398         * providers/local/camel-maildir-summary.c (maildir_summary_check):
9399         Lock around our internal poking of the summary hashtable/array.
9400         (maildir_summary_sync): And the same here too.
9401
9402         * camel-folder-summary.c: Moved the summaryprivate data into
9403         camel-private.h.  Only needed for the locks really.
9404         (camel_folder_summary_init): Setup locks.
9405         (camel_folder_summary_set_filename): Lock.
9406         (camel_folder_summary_index): lock
9407         (camel_folder_summary_uid): Lock
9408         (camel_folder_summary_next_uid): "
9409         (camel_folder_summary_set_uid): "
9410         (camel_folder_summary_load): Lock around whole load.  Hrm,
9411         probably not required.
9412         (camel_folder_summary_save): Lock around whole save, this is
9413         reqwuired, unless we ref/copy the whole list first, and i couldn't
9414         be bothreed.
9415         (camel_folder_summary_add): lock
9416         (summary_assign_uid): Lock around internal accesses.
9417         (camel_folder_summary_info_new_from_parser): Lock around filtr stuff.
9418         (camel_folder_summary_info_ref): Add locking.  Could probably use
9419         its own lock?
9420         (camel_folder_summary_touch): Add locking, likewise.
9421         (camel_folder_summary_clear): Lock.  If the preiovus two are
9422         changed, then so this will need mroe locking.
9423         (camel_folder_summary_info_free): Lock around refcounting.
9424         (camel_folder_summary_remove): Locking.
9425         (camel_folder_summary_remove_uid): Lock ref, unlock, unref.  Also
9426         fixed a bug that would have made this never work, freeing the key,
9427         which isn't allocated.
9428         (camel_folder_summary_remove_index): lock, ref, unlock unref also.
9429         (camel_message_info_ref): Lock using a separate global lock, since
9430         we have no context here.
9431         (camel_message_info_free): Here too.
9432         (content_info_alloc): Use an alocation lock here.  avoids races
9433         with setting up content_info_chunks, etc.
9434         (camel_folder_summary_info_new): And here too.
9435         (camel_folder_summary_load): Changed to use a differnet lock for
9436         loading/saving.
9437         (camel_folder_summary_init): Doh, i do need a reflock afterall,
9438         set one up.
9439         (camel_folder_summary_finalize): Free it.
9440         (camel_folder_summary_index): Add a reflock.
9441         (camel_folder_summary_uid): And here too.
9442         (camel_folder_summary_info_free): Use reflock instead of
9443         summary_lock.
9444         (camel_folder_summary_info_ref): Likewise.
9445         (camel_folder_summary_remove_uid): Add reflocking.
9446         (camel_folder_summary_remove_index): And here too.
9447
9448         * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Setup a
9449         summary object.
9450         (vee_folder_build): Build each item into the real summary object.
9451         (vee_folder_add, vee_folder_add_uid, vee_folder_add_change): New
9452         functions to add a single record to the vfolder summary.
9453         (vee_folder_build_folder): Use a real summary.
9454         (vee_get_uids): Removed, use default impl.
9455         (vee_free_message_info): "
9456         (vee_get_message_info): "
9457         (vee_get_summary): "
9458         (vee_get_unread_message_count): "
9459         (vee_get_message_count): "
9460         (vee_sync): Make vee-folder-sync sync all subordinate folders.
9461         Well i dont think this is right, but enough peopl ehave aksed for
9462         it.
9463         (vee_expunge): Same for expunge.
9464         (vee_set_message_flags): Call parent class, then mirror flags to
9465         subfolder.
9466         (vee_get_message_user_flag): Removed, we just use the default
9467         impl, and our flags should always match.
9468         (vee_set_message_user_flag): Snoop the set and set on subfolder.
9469         (vee_get_message_flags): Removed, jsut use parent impl, assume our
9470         copy matches the real ones.
9471         (get_real_message): Removed.  We sort ofneed to keep the
9472         summaryitem refed while we use it, so this doesn't make as much
9473         sense as it did once.
9474         (camel_vee_folder_finalise): Unhook listening events as we unref
9475         folders.
9476         (camel_vee_folder_new): Set the summary messageinfo data size
9477         properly.
9478         (vfolder_remove_match): Fixed for summary change.
9479         (folder_changed): ditto.  Also stopped changed items from being
9480         re-searched and possibly removed.  Might have to resort to the old
9481         whole-search idea again.
9482         (message_changed): Similarly.  Might be easier just not to bother
9483         with a whole search.
9484
9485         * providers/vee/camel-vee-folder.h: Removes summary
9486         hashtable/array, and use a real summary object.  Sigh, more work.
9487
9488         * providers/nntp/camel-nntp-folder.c (nntp_folder_sync): Move
9489         summary to folder object.
9490         (nntp_folder_get_message_count): Removed, use default impl.
9491         (nntp_folder_set_message_flags): Call parent impl to do the work,
9492         but snoop for newsrc.
9493         (nntp_folder_get_uids): Removed, use default impl.
9494         (nntp_folder_get_summary): "
9495         (nntp_folder_get_message_info): "
9496         (nntp_folder_free_message_info): "
9497         (camel_nntp_folder_new): moved summary to folder class
9498         
9499         * providers/imap/camel-imap-folder.c (camel_imap_folder_init):
9500         Move summary to folder object.
9501         (camel_imap_folder_new): "
9502         (imap_finalize): No longer unref the summary (or infact, do
9503         anything else either).
9504         (imap_refresh_info): move summary to folder object.
9505         (imap_sync): "
9506         (imap_get_message_count): Removed, use default impl.
9507         (imap_get_unread_message_count): "
9508         (imap_get_uids): "
9509         (imap_get_summary): "
9510         (imap_free_summary): "
9511         (imap_get_message_info): "
9512         (imap_free_message_info): "
9513         (imap_get_message_flags): "
9514         (imap_set_message_flags): "
9515         (imap_get_message_user_flag): ", this changes functionality, but
9516         only by providing non-permanent flags.
9517         (imap_set_message_user_flag): "
9518         (imap_update_summary): move summary to folder object, and use
9519         camel_folder_summary_info_new_from_header, instead of calling the
9520         virtual function directly.
9521
9522         * providers/local/camel-maildir-folder.c (maildir_append_message):
9523         move summary to folder object, again.
9524         (maildir_get_message): "
9525
9526         * providers/local/camel-mh-folder.c (mh_append_message): move
9527         summary to folder object.
9528         (mh_get_message): "
9529
9530         * providers/local/camel-mbox-folder.c (mbox_append_message): Move
9531         summary to folder object
9532         (mbox_get_message): "
9533         (mbox_set_message_user_flag): We need our own copy of this, sigh,
9534         so we can track if the xev needs a rewrite (probably, its only a
9535         guide anyway).
9536         (mbox_set_message_user_tag): Same same with this one.
9537         (camel_mbox_folder_class_init): Link in these new virtual functions.
9538
9539         * providers/local/camel-local-folder.h (CamelLocalFolder): removed
9540         summary.
9541
9542         * providers/local/camel-local-folder.c (local_get_message_count): 
9543         (local_get_unread_message_count): 
9544         (local_get_uids): 
9545         (local_get_summary): 
9546         (local_free_summary): 
9547         (local_get_message_info): 
9548         (local_free_message_info): 
9549         (local_get_message_flags): 
9550         (local_set_message_flags): 
9551         (local_get_message_user_flag): 
9552         (local_set_message_user_flag): 
9553         (local_get_message_user_tag): 
9554         (local_set_message_user_tag): Removed, all now use default
9555         implementation.
9556         (camel_local_folder_class_init): Removed overrides.
9557         (local_init): Clear folder->summary.
9558         (local_finalize): move summary to folder.
9559         (camel_local_folder_construct): "
9560         (local_sync): "
9561
9562         * camel-folder.c (free_summary): Provide a real impl.
9563         (get_summary): "
9564         (free_uids): "
9565         (get_uids): "
9566         (free_message_info): "
9567         (get_message_info): "
9568         (set_message_user_tag): "
9569         (get_message_user_tag): "
9570         (set_message_user_flag): "
9571         (get_message_user_flag): "  Sigh, the last so far.
9572         (get_message_flags): Sigh, 1 more afterall.
9573         (get_unread_message_count): And and this.
9574         (get_message_count): and this!
9575         (set_message_flags): Sigh, and this.
9576         (camel_folder_finalize): Unref the summary if we have it.
9577         (camel_folder_free_uids): Remove locking.
9578         (camel_folder_get_message_flags): Remove locks, since the summary
9579         is now mt-safe.
9580         (camel_folder_set_message_flags): "
9581         (camel_folder_get_message_user_flag): "
9582         (camel_folder_set_message_user_flag): "
9583         (camel_folder_get_message_user_tag): "
9584         (camel_folder_set_message_user_tag): "
9585         (camel_folder_get_message_info): "
9586         (camel_folder_free_message_info): "
9587         (camel_folder_get_uids): "
9588         (camel_folder_free_summary): "
9589         (camel_folder_get_unread_message_count): "
9590         (get_unread_message_count): Check we got info, no big deal, but
9591         the summary might change while we're counting, and upset the count
9592         slightly.
9593         (camel_folder_get_message_count): Remove locks.
9594
9595         * camel-folder.h (struct _CamelFolder): Added CamelFolderSummary
9596         to the base folder object.  Sigh, this is going to be a lot of
9597         work ...
9598
9599         * camel-service.c (camel_service_init, finalise): changed
9600         connect_lock to be recursive e_mutex.
9601
9602         * camel-remote-store.c (camel_remote_store_init, finalise): Changed
9603         stream_lock to recursive e_mutex.
9604
9605         * camel-private.h (RemoteStorePrivate, ServicePrivate): Use
9606         recursive mutexes for connect_lock & stream_lock.  Ick.  Because
9607         of the imap code.
9608
9609         * providers/imap/camel-imap-private.h: Change the command_lock to
9610         be an EMutex.
9611
9612         * providers/imap/camel-imap-store.c (connect_to_server): Removed
9613         the command_lock stuff.  If we are just connected again, it should
9614         be safe to assume we have exclusive access at this point without
9615         it (and yes, removes a deadlock).
9616         (imap_create): Remove a lock that wasn't even supposed to be
9617         there.
9618         (camel_imap_store_finalize, init): g_mutex->e_mutex(E_MUTEX_REC).
9619         Use a recursive mutex since the imap code is multiply recursivly
9620         calling some functions (sigh, it would be nice to fix this).
9621
9622 2000-12-20  Not Zed  <NotZed@HelixCode.com>
9623
9624         * camel-folder.c (folder_changed): Change the locks to inside the
9625         if.  Stops a deadloc,k and we dont need a lock to read a value.
9626         (message_changed): Likewise.
9627
9628         * camel.c (camel_init): Blah, comment out g_thread_init, leave it
9629         to the caller, since it can only ever be done once.
9630
9631         * camel-folder-thread.c (camel_folder_thread_messages_new): Ref
9632         and save the folder in the thread return.  Also get the summary
9633         once, and access that for the messageinfo's.  Added bonus that now
9634         threads should come out in a similar order.  We need to do this so
9635         that the messageinfo's dont get unref'd under us, and using the
9636         summary directly simplifies memory management.
9637         (camel_folder_thread_messages_destroy): Free the summary/unref the
9638         folder.
9639
9640         * camel-folder-thread.h: Add a folder to CamelFolderThread struct.
9641
9642 2000-12-19  Not Zed  <NotZed@HelixCode.com>
9643
9644         * providers/imap/camel-imap-utils.c (imap_translate_sexp): Unref
9645         using e_sexp_unref, since it is no longer an object.
9646
9647         * tests/lib/camel-test.c: Added a global lock, and made it
9648         thread-aware.
9649
9650         * camel-exception.c: Add a global lock.  Not sure its really
9651         needed here, but it doesn't really hurt.
9652         (camel_exception_clear): Lock around access.
9653         (camel_exception_set): Same.
9654         (camel_exception_setv): "
9655         (camel_exception_xfer): "
9656
9657         * providers/local/Makefile.am (noinst_HEADERS): Added, for
9658         camel-local-private.h
9659
9660         * camel-folder.c (camel_folder_search_by_expression): Removed
9661         locking here, now upto the implementing class to lock.
9662         (camel_folder_search_free): Removed the folder lock here too, for
9663         consistency really, and the locking probably wasn't needed.
9664
9665         * providers/local/camel-local-folder.c (local_get_summary):
9666         Changed to copy/ref the summary items.
9667         (local_free_summary): Unref the summary items/free the array.
9668         (local_get_unread_message_count): Free info lookups.
9669         (local_search_by_expression): Perform more fine-grained locking,
9670         and dont lock the whole folder while searching, just the search
9671         object.  Dum de dum, it *would* be possible to not even have to
9672         lock the search, by using our own copy of the search object each
9673         time.  Could be investigated.
9674         (local_init): Init priaate data/lock.
9675         (local_finalize): Free private data/lock.
9676         (local_search_free): Also lock around the search object, because
9677         it accesses global data inside.
9678
9679         * README.mt: Some info about the mt code development.
9680
9681         * camel-folder-search.c (match_message): Put in a warning, this
9682         plain deadlocks so far, but i'm going to bed now.
9683         (camel_folder_search_finalize): Use e_sexp_unref() since its no
9684         longer an object.
9685
9686         * camel-session.c (camel_session_init): Init private data/lock.
9687         (camel_session_finalise): Free private data/lock.
9688         (camel_session_register_provider): Lock hash insert.
9689         (service_cache_remove): Lock.
9690         (camel_session_list_providers): "
9691         (camel_session_get_service): Lock the whole function.
9692
9693         * camel-session.h (struct _CamelSession): Added private data.
9694
9695         * providers/imap/camel-imap-store.c (camel_imap_store_init): Setup
9696         private data.
9697         (camel_imap_store_finalize): Free private data.
9698         (connect_to_server): Lock around command calls.  I dont think its
9699         needed, but it shouldn't hurt either.
9700         (imap_connect): Lock around command calls.  Again, I don think it
9701         is needed, but wont hurt.
9702         (imap_disconnect): ditto for this one.
9703         (imap_create): Lock around command.
9704         (get_folder): "
9705         (get_folder_info): "
9706         (subscribe_folder): "
9707         (unsubscribe_folder): "
9708         (imap_keepalive): "
9709
9710         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
9711         around calling a command.
9712         (imap_refresh_info): Likewise.
9713         (imap_sync): "
9714         (imap_append_message): "
9715         (imap_copy_message_to): "
9716         (imap_move_message_to): "
9717         (imap_get_message): "
9718         (imap_update_summary): "
9719         (imap_search_by_expression): ", also minor logic cleanup.
9720         (imap_get_summary): Copy/ref the summary items.
9721         (imap_free_summary): And free it now too.
9722
9723         * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
9724         Lock the command stream for the command session.
9725
9726         * providers/imap/camel-imap-private.h: Private (locking info)
9727         stuff for imap provider.
9728         (CAMEL_IMAP_STORE_UNLOCK): Fix to call unlock, rather than lock!
9729
9730         * camel-service.c (camel_service_query_auth_types): Lock also for
9731         the connection here, incase the service needs to connect.
9732
9733         * camel-remote-store.c (camel_remote_store_init): Init private
9734         data/lock.
9735         (camel_remote_store_finalise): Readded, free private data/lock.
9736         (remote_send_stream): Changed to return the number of bytes
9737         written, like a good little stream function should.
9738         (camel_remote_store_send_string): Lock for stream access.
9739         (camel_remote_store_send_stream): Same here.
9740         (camel_remote_store_recv_line): And here.
9741         (camel_remote_store_refresh_folders): Lock the store for cache
9742         access.
9743         (timeout_cb): Lock for stream access.
9744
9745 2000-12-18  Not Zed  <NotZed@HelixCode.com>
9746
9747         * camel-service.c (camel_service_init): Init private data.
9748         (camel_service_finalise): Free private data.
9749         (camel_service_connect): Lock around connection access.
9750         (camel_service_disconnect): "
9751
9752         * camel-service.h (struct _CamelService): Added private field.
9753
9754         * camel-store.c (camel_store_init): Init private data/lock.
9755         (camel_store_finalize): Free private data/lock.
9756         (camel_store_get_folder): Lock internal calls.
9757         (camel_store_delete_folder): "
9758         (camel_store_rename_folder): "
9759         (camel_store_get_root_folder): "
9760         (camel_store_get_default_folder): "
9761         (camel_store_get_folder_info): "
9762         (camel_store_folder_subscribed): "
9763         (camel_store_subscribe_folder): "
9764         (camel_store_unsubscribe_folder): "
9765         (lookup_folder): Lock accesses to the folder cache.
9766         (cache_folder): "
9767         (uncache_folder): And here too.
9768
9769         * camel-store.h (struct _CamelStore): Added a private field.
9770
9771         * Makefile.am (noinst_HEADERS): Add camel-private.h.  There is a
9772         comment in that header as to why it ins't installed.
9773
9774         * camel-private.h: New header for private data, that subclasses
9775         can get to.
9776
9777         * tests/lib/camel-test.c (camel_test_init): If we do have threads
9778         enabled already, dont call g_thread_init().
9779         
9780         * tests/lib/folders.c (test_folder_counts): Add free of info.
9781         (test_folder_message): And here too.
9782
9783         * providers/local/camel-maildir-summary.c (remove_summary): Free
9784         info.
9785         (maildir_summary_check): Free info lookups.
9786
9787         * providers/local/camel-mh-summary.c (message_info_new): Removed,
9788         didn't add value.
9789         (remove_summary): free info after being used.
9790         (mh_summary_check): Free info lookups.
9791         (mh_summary_sync): and here too.
9792
9793         * providers/local/camel-mbox-summary.c (summary_update): Free info
9794         lookups.
9795         (mbox_summary_sync_full): Likewise.
9796         (mbox_summary_sync_quick): And here.
9797         (mbox_summary_sync):  ... and here.
9798
9799         * providers/local/camel-maildir-folder.c (maildir_get_message):
9800         Free messageinfo lookups.
9801
9802         * providers/local/camel-mh-folder.c (mh_get_message): Free
9803         messageinfo lookups.
9804
9805         * providers/local/camel-mbox-folder.c (mbox_get_message): Free
9806         messageinfo lookups.
9807
9808         * providers/local/camel-local-summary.c
9809         (message_info_new_from_message): Removed, since it wasn't doing
9810         anything useful.
9811         (message_info_new_from_parser): Same.  And some other dead code.
9812
9813         * providers/local/camel-local-folder.c (local_get_message_info):
9814         deconstify.
9815         (local_free_message_info):new func to free info.
9816         (local_get_uids): 
9817         (local_get_message_flags): 
9818         (local_set_message_flags): 
9819         (local_get_message_user_flag): 
9820         (local_set_message_user_flag): 
9821         (local_get_message_user_tag): 
9822         (local_set_message_user_tag): Free all info lookups.
9823         (local_expunge): Dont call camel_folder_* functions, to avoid a deadlock.
9824
9825         * providers/nntp/camel-nntp-folder.c
9826         (nntp_folder_get_message_info): deconstify.
9827         (nntp_folder_free_message_info): Free summary item.
9828         (nntp_folder_get_message_flags): Free summary lookup.
9829         (nntp_folder_set_message_flags): and here.
9830         (nntp_folder_get_uids): And here.
9831
9832         * providers/imap/camel-imap-auth.c: Make base64_*_simple optional
9833         with the HAVE_KRB4 flag.
9834
9835         * providers/imap/camel-imap-folder.c (imap_free_message_info):
9836         Added a free of the message info.
9837         (imap_refresh_info): 
9838         (imap_sync): 
9839         (imap_refresh_info): 
9840         (imap_get_unread_message_count): 
9841         (imap_get_uids): 
9842         (imap_get_message_flags): 
9843         (imap_set_message_flags): Free any summary lookups.
9844         (imap_get_message_flags): Get the message info directly from the
9845         summary, not via the folder interface.
9846         (imap_move_message_to): Dont call folder functions directly
9847         (delete_message), as it will deadlock since we already have the
9848         lock.
9849
9850         * providers/vee/camel-vee-folder.c (vee_free_message_info): Free/unref
9851         the messageinfo.
9852         (vee_get_message_info): First ref the internal copy, then return it.
9853         (folder_changed): Free all got message info's.
9854         (message_changed): And here.
9855         (get_real_message): And here.
9856         (vee_folder_build): and here.
9857         (vee_folder_build_folder): ... and here.
9858
9859         * camel-folder-summary.c (camel_folder_summary_info_new):
9860         Initialise the messageinfo refcount to 1.
9861         (camel_folder_summary_info_free): Down the refcount till we need
9862         to free.
9863         (camel_folder_summary_info_ref): New function to up the refcount.
9864         (camel_message_info_dup_to): Sewt the refcount of the dest to 1.
9865         (camel_message_info_new): Set refcount to 1.
9866         (camel_message_info_new_from_header): Dont allocate the mi
9867         ourselves.
9868         (camel_message_info_free): Handle refcounting.
9869         (camel_message_info_ref): New function.
9870         (camel_folder_summary_index): Ref the messageinfo before returning
9871         it.
9872         (camel_folder_summary_uid): Likewise.
9873         (camel_folder_summary_save): Access the messageinfo array
9874         directly, rather than through accessors (saves ref/unref).
9875         (camel_folder_summary_clear): Likewise.
9876         (camel_folder_summary_remove_index): Likewise.
9877         (main): Free lookups.
9878
9879         * camel-folder-summary.h (CamelMessageInfo): Added a refcount
9880         value.
9881
9882         * camel-folder.c (camel_folder_free_message_info): New function to
9883         'free' a message info.
9884         (camel_folder_get_message_info): Deconstify return.
9885         (camel_folder_lock): New (internal) function to thread-lock the
9886         folder.
9887         (camel_folder_unlock): Likewise for unlocking.
9888         (freeze): 
9889         (thaw): Lock around access to folder->frozen/changed_frozen.
9890         (folder_changed): Likewise.
9891         (message_changed): Likewise.
9892         (camel_folder_init): Init private data, locks and moved frozen
9893         info.
9894         (camel_folder_finalize): Free new private data, locks and moved
9895         frozen info.
9896         (copy_message_to): Free the messageinfo after we've used it.
9897         (move_message_to): And here too.
9898         (camel_folder_sync): Lock around virtual method invocation.  Just
9899         locking around any virtual method that is known to need it.  This
9900         is the first cut at locking.
9901         (camel_folder_refresh_info): "
9902         (camel_folder_expunge): "
9903         (camel_folder_get_message_count): "
9904         (camel_folder_get_unread_message_count): "
9905         (camel_folder_append_message): "
9906         (camel_folder_set_message_flags): "
9907         (camel_folder_get_message_flags): "
9908         (camel_folder_get_message_user_flag): "
9909         (camel_folder_set_message_user_flag): "
9910         (camel_folder_get_message_user_tag): "
9911         (camel_folder_set_message_user_tag): "
9912         (camel_folder_get_message): "
9913         (camel_folder_get_uids): "
9914         (camel_folder_free_uids): "
9915         (camel_folder_get_summary): "
9916         (camel_folder_search_by_expression): "
9917         (camel_folder_free_summary): "
9918         (camel_folder_search_free): "
9919         (camel_folder_move_message_to): "
9920         (camel_folder_copy_message_to): "
9921         (copy_message_to): Dont call any of our own folder functions
9922         directly, otherwise we will deadlock.
9923         (move_message_to): Likewise.
9924
9925         * camel-folder.h (CamelFolder): Added free_message_info() function
9926         & deconstify get_message_info()'s return.
9927         (CamelFolder): Add a private field (for locks).
9928         (struct _CamelFolder): Moved changed_changed/frozen into private
9929         data, since it really is private and now needs locked access.
9930
9931 2000-12-15  Jeffrey Stedfast  <fejj@helixcode.com>
9932
9933         * camel-mime-utils.c (header_fold): When checking to see if we
9934         need to fold the header, when we come accross a \n, make sure to
9935         start at p + 1 the next time through the loop or else we get into
9936         an infinite loop.
9937
9938 2000-12-13  Dan Winship  <danw@helixcode.com>
9939
9940         * Namespace cleanup: change a bunch of IS_CAMEL_* macros to
9941         CAMEL_IS_*
9942
9943 2000-12-13  Chris Toshok  <toshok@helixcode.com>
9944
9945         * providers/imap/camel-imap-auth.c: add #include <sys/types.h> for
9946         freebsd.
9947
9948 2000-12-12  Christopher James Lahey  <clahey@helixcode.com>
9949
9950         * camel-folder-summary.c, camel-folder-summary.h: Added #ifndef
9951         NO_WARNINGS around a #warning.  Added (void) to the prototype and
9952         declaration of camel_message_info_new.
9953
9954         * camel-mime-message.h: Added an include for
9955         camel-mime-filter-bestenc.h.  Added a prototype for
9956         camel_mime_message_set_best_encoding.  Reformatted prototypes to
9957         line up.
9958
9959         * camel-mime-parser.c: Added #if d(!)0 around the states string
9960         lookup table since it's only used in debugging output.
9961
9962         * camel-seekable-substream.c (stream_flush): Added a cast.
9963
9964         * providers/imap/camel-imap-auth.c: Added #include <netinet/in.h>.
9965
9966         * providers/imap/camel-imap-folder.c (imap_refresh_info): Made uid
9967         and flags const to fix warnings here.
9968
9969         * providers/imap/camel-imap-store.c (get_folder_info): Made p
9970         const to fix warnings here.
9971
9972 2000-12-12  Dan Winship  <danw@helixcode.com>
9973
9974         * tests/lib/Makefile.am: Add missing .h file. (From campd.)
9975
9976 2000-12-11  Not Zed  <NotZed@HelixCode.com>
9977
9978         * providers/smtp/camel-smtp-transport.c (smtp_data): Remove use of
9979         linewrap filter.  Headers are now wrapped.  encode_8bit already
9980         enforces a 998 octet line limit.
9981         (smtp_data): Also fixed a memleak, we always have to unref our own
9982         copy of the filters.  We also dont need to remove them manually,
9983         so dont bother.  The type's an int too ...
9984
9985         * camel-internet-address.c (internet_unformat): When scanning past
9986         quotes, remove them also.
9987         (camel_internet_address_format_address): If the name contains "'s,
9988         or ','s then strip and quotes and wrap the whole lot in one set of
9989         quotes.
9990         
9991         * Makefile.am (noinst_HEADERS): We dont want to install
9992         camel-charset-map-private.h, ever.  There are probably other
9993         similar files ..?
9994
9995         * camel-mime-part.c (write_to_stream): Fold header lines
9996         appropriately as we're writing them out.
9997
9998         * camel-mime-utils.c (header_fold): Add a new argument, headerlen,
9999         tells it how long the associated header token is.
10000         (header_fold): Also,k check to see if we need to fold first, using
10001         a better algorithm, and also accept already-folded lines, and
10002         re-process accordingly.
10003         (rfc2047_decode_word): Add a little buffer space to iconv output
10004         for shifting overheads?
10005         (rfc2047_decode_word): finish the iconv with a null call, to flush
10006         shift state, etc.
10007         (rfc2047_encode_word): Attempt to break up long words into
10008         appropriately sized, independent, chunks.  See rfc2047, section 2.
10009         (header_decode_mailbox): Dont add in extra spaces into the output
10010         if we are decoding adjacent encoded words.  We can only guess this
10011         case, as some broken mailers put encoded words inside quoted
10012         words.
10013         (header_encode_phrase): Dont merge words if they are going to end
10014         up too long.  Also change back ot only merge consecutive words of
10015         the same type.  e.g. 'foo. blah fum.' -> "foo." blah "fum."  or
10016         'iam an. idiot' -> iam "an." idiot
10017
10018         * camel-medium.c (camel_medium_set_header): Hrm, we actually want
10019         to call set_header, not add_header here, probably explains some
10020         duplicate X-Evolution headers i was trying to track down.  Also
10021         changed the api to handle a NULL value == remove the header.
10022
10023         * providers/local/camel-maildir-summary.c
10024         (maildir_summary_decode_x_evolution): Always return error, we dont
10025         use x-evolution for maildir.
10026         (maildir_summary_encode_x_evolution): Always return a NULL string,
10027         likewise.
10028         (maildir_summary_add): Hook in here, since the _new function
10029         doesn't have access to any flags from the caller.  If we have
10030         flags, then update the filename again.  Not ideal, but should
10031         work.
10032
10033 2000-12-08  JP Rosevear  <jpr@helixcode.com>
10034
10035         * tests/message/Makefile.am: Remove test3 from build until the files
10036         show up
10037         
10038 2000-12-09  Not Zed  <NotZed@HelixCode.com>
10039
10040         * camel-mime-message.c (camel_mime_message_set_date): Change the
10041         sign of the default date offset when none is supplied.
10042         (camel_mime_message_set_date): Also do dst if its dst (forward 1
10043         hour).  Fixes #928 + some.
10044
10045 2000-12-06  Not Zed  <NotZed@HelixCode.com>
10046
10047         * tests/lib/camel-test.h (check): Change line no format so that
10048         emacs can detect it.
10049
10050 2000-12-06  Jeffrey Stedfast  <fejj@helixcode.com>
10051
10052         * providers/imap/camel-imap-folder.c (imap_refresh_info): We want
10053         to bitwise-or the server and cached flags here so that we keep the
10054         flags that we have set locally and set any additional flags that a
10055         parallel connection may have set.
10056
10057 2000-12-05  Jeffrey Stedfast  <fejj@helixcode.com>
10058
10059         * providers/smtp/camel-smtp-transport.c (smtp_data): If the data
10060         wrapper fails to be written to the stream, unref it and the
10061         filters before returning.
10062
10063 2000-12-05  Dan Winship  <danw@helixcode.com>
10064
10065         * providers/imap/camel-imap-folder.c (imap_get_message): use
10066         BODY.PEEK[] rather than RFC822, so the message doesn't get marked
10067         as \Seen.
10068         (imap_refresh_info): Fix a really really really dumb bug.
10069
10070 2000-12-05  Dan Winship  <danw@helixcode.com>
10071
10072         * providers/imap/camel-imap-folder.c (imap_set_message_flags): Fix
10073         the check for "flags aren't actually changing".
10074
10075         * providers/local/camel-local-folder.c (local_set_message_flags,
10076         local_set_message_user_flag, local_set_message_user_tag): Don't
10077         emit message_changed unless the flags actually changed.
10078
10079         * providers/nntp/camel-nntp-folder.c
10080         (nntp_folder_set_message_flags): Don't emit message_changed unless
10081         the flags actually changed. Fix the check for marked as seen.
10082
10083 2000-12-05  Not Zed  <NotZed@HelixCode.com>
10084
10085         * camel-seekable-substream.c (stream_flush): stream_flush does
10086         make sense for a substream afterall (if you have a stream_write).
10087         (stream_write): Implement this.
10088         (stream_seek): Change the STREAM_END behaviour to be more sane.
10089         if bounded go from the end of the bound, if unbounded, go from the
10090         end of the parent stream.
10091
10092         * camel-stream-mem.c (stream_read): Dont return error if reading
10093         past the end of data, just return 0.
10094
10095         * camel-stream-fs.c (camel_stream_fs_init): Initialise the stream
10096         to be unbound.
10097         (stream_seek): Fix the logic when seeking from the end of an
10098         unbounded stream.
10099         (camel_stream_fs_new_with_fd): If the fd is invalid (-1), then
10100         return NULL immediately.
10101         (stream_seek): Range check a SEEK_END so it fits within
10102         bound_start.
10103
10104 2000-12-01  Not Zed  <NotZed@HelixCode.com>
10105
10106         * tests/lib/folders.c (test_folder_basic): New test to perform
10107         basic store operations on folders (taken from folders/test1).
10108         (test_folder_message_ops): Tkane the guts out of folders/test2.
10109
10110 2000-12-04  Jeffrey Stedfast  <fejj@helixcode.com>
10111
10112         * providers/smtp/camel-smtp-transport.c (smtp_connect): i18n-ize
10113         exception strings.
10114         (get_name): And here.
10115         (_send_to): Here too.
10116         (smtp_helo): And here and there...
10117         (smtp_mail): And around the square...
10118         (smtp_rcpt): Saying catch me if you can...
10119         (smtp_data): And here three.
10120         (smtp_rset): And here.
10121         (smtp_quit): And finally here.
10122
10123 2000-12-01  Jeffrey Stedfast  <fejj@helixcode.com>
10124
10125         * camel-folder-search.h: Added system_flag to CamelFolderSearchClass
10126
10127         * camel-folder-summary.c (camel_system_flag_get): Convenience
10128         function to return whether or not a flag is set using a string as
10129         the flag name.
10130         (camel_system_flag): Return the integer value of the flag string.
10131
10132         * camel-folder-search.c (search_system_flag): New ESExp callback
10133         for allowing vfoldering on CamelMessageInfo flags.
10134
10135 2000-12-01  Dan Winship  <danw@helixcode.com>
10136
10137         * camel-service.c (camel_service_disconnect): Don't
10138         g_return_if_fail if the service is already disconnected. Just
10139         return.
10140
10141         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
10142         Return FALSE (don't try again) if we get CAMEL_POP3_FAIL.
10143         (pop3_connect): If we don't succeed, disconnect.
10144
10145 2000-11-30  Jeffrey Stedfast  <fejj@helixcode.com>
10146
10147         * providers/imap/camel-imap-store.c
10148         (parse_list_response_as_folder_info): Fix a possible bug where
10149         'name' could be uninitialized.
10150
10151         * camel-folder-summary.c (camel_message_info_new): New convenience
10152         function, doesn't do much but it sure makes code cleaner to read.
10153         (camel_message_info_new_from_header): This one makes my life heaven.
10154
10155 2000-11-30  Jeffrey Stedfast  <fejj@helixcode.com>
10156
10157         * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
10158         Handle the case where the summary failed to load - clear the
10159         summary and then set the dirty bit so that it is sure to save
10160         later. Is this the right fix?
10161
10162 2000-11-30  Dan Winship  <danw@helixcode.com>
10163
10164         * camel-exception.c (camel_exception_setv): Remove unused
10165         variable.
10166
10167 2000-11-30  Not Zed  <NotZed@HelixCode.com>
10168
10169         * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
10170         assertion that content is there, when it no longer can be.
10171
10172         * camel-folder-summary.h: Removed pos/bodypos/endpos from
10173         camelmeessagecontentinfo.
10174         (CamelMessageFlags): Added an attachments flag.
10175
10176         * providers/local/camel-local-summary.h: Added load virtual
10177         function.
10178
10179         * tests/lib/folders.c (test_message_info): Accessors.
10180         (test_folder_message): "
10181
10182         * camel-folder-thread.c (get_root_subject): Fix accessors.
10183         (dump_tree_rec): "
10184
10185         * camel-folder-search.c (camel_folder_search_execute_expression):
10186         Accessors for messageinfo.
10187         (search_match_all): "
10188         (search_header_contains): "
10189         (search_header_contains): "
10190         (search_body_contains): "
10191         (camel_folder_search_execute_expression): Use mepool_strdup.
10192
10193         * providers/local/camel-mbox-summary.c (summary_update): Accessors
10194         for messageinfo.
10195         (mbox_summary_sync_full): "
10196
10197         * providers/local/camel-mh-summary.c (remove_summary): Accessors
10198         for messageinfo.
10199         (mh_summary_check): "
10200         (mh_summary_sync_message): "
10201         (mh_summary_sync): "
10202
10203         * providers/local/camel-mh-folder.c (mh_append_message): Use
10204         accessor for uid.
10205
10206         * providers/local/camel-local-summary.c
10207         (local_summary_decode_x_evolution): Use accessor to uid.
10208         (local_summary_encode_x_evolution): Likewise.
10209         (message_info_new): And here.
10210         (camel_local_summary_load): Call virtual load function.
10211         (local_summary_load): Default load function, load summary.
10212         (camel_local_summary_load): Check file exists before trying to
10213         load.
10214         (camel_local_summary_construct): Turn off building content info!
10215         (CAMEL_LOCAL_SUMMARY_VERSION): Bump, since we dont build content
10216         info anymore.
10217         (camel_local_summary_load): After a successful load/check, do a
10218         save too so we dont have to go through it again randomly.
10219
10220         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Use
10221         accessors for messageinfo.
10222
10223         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_uids): Use
10224         accessors for uid.
10225
10226         * providers/imap/camel-imap-folder.c (imap_refresh_info): Use
10227         accessor for uid.
10228         (imap_sync): Likewise.
10229         (imap_get_uids): Likewise.
10230         (imap_update_summary): And here.
10231
10232         * providers/vee/camel-vee-folder.c (vfolder_remove_match): Use
10233         accessor for uid.
10234         (vfolder_add_match): Handle estrv stuff.
10235         (vfolder_change_match): Accessor for uid.
10236         (get_real_message): "
10237         (vee_get_uids): "
10238         (vee_folder_build): " + estrv.
10239         (vee_folder_build_folder): "
10240
10241         * providers/local/camel-maildir-folder.c (maildir_append_message):
10242         Use acccessors for uid's.
10243         (maildir_get_message): Here too.
10244
10245         * providers/local/camel-maildir-summary.c
10246         (camel_maildir_summary_init): Setup the string count for us.
10247         (message_info_new): Access the string array directly.
10248         (message_info_free): No need to free string if using array.
10249         (camel_maildir_summary_info_to_name): Use accessor to get to uid.
10250         (remove_summary): And here.
10251         (maildir_summary_check): Likewise.
10252         (maildir_summary_sync): And here.
10253         (maildir_summary_load): Load up a cache of uid->filename mappings
10254         before loading the actual summary file.  This saves us having to
10255         waste the diskspace storing the filenames in the summary itself,
10256         and also helps us sync the summary better on load.
10257         (message_info_load): If we have the load_map setup, and the uid
10258         exists, then set the filename cache from it, and update the flags
10259         from the name, incase our summary mismatches it.
10260
10261         * camel-folder-summary.c (camel_folder_summary_init): Setup string
10262         count for compressed info record.  An optional compile mode which
10263         stores all strings for a given messageinfo into a packed array,
10264         which should save 36-50 bytes/record.
10265         (camel_folder_summary_info_new): Init the string array.
10266         (message_info_new): Set the string array items, as required.
10267         (message_info_load): And here too.
10268         (message_info_save): Use accessors to get to strings.
10269         (message_info_free): Free strings as one.
10270         (camel_message_info_dup_to): Handle packed array case.
10271         (camel_folder_summary_add): Use accessors.  And pack the strv
10272         before storing it.
10273         (summary_assign_uid): New function to assign a unique uid to a
10274         message, if it doesn't have one.
10275         (camel_folder_summary_add): Call assign_uid instead of doing it
10276         ourselves.
10277         (camel_folder_summary_info_new_from_parser): "
10278         (camel_folder_summary_info_new_from_message): "
10279         (camel_folder_summary_encode_string): constify.
10280         (camel_folder_summary_encode_token): "
10281         (summary_build_content_info_message): Fix accessors to messageinfo.
10282         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped, for removal of
10283         contentinfo->pos data.
10284         (camel_folder_summary_info_new_from_parser): Calculate the size
10285         based on the parser position, not the removed contentinfo stuff.
10286         (camel_folder_summary_info_new_from_message): Remove size stuff.
10287         (camel_folder_summary_offset_content): Removed, no longer means anything.
10288         (content_info_new): 
10289         (content_info_load): 
10290         (content_info_save): 
10291         (summary_build_content_info): Remove stuff for contentinfo->pos*.
10292         (summary_build_content_info): Take a msginfo argument, set
10293         attachments flag if we find any attachments.
10294         (summary_build_content_info_message): set attachments flag if we
10295         find any attachments.
10296         (camel_folder_summary_info_new_from_parser): Always scan the
10297         content info, even if we dont save it.
10298         (camel_folder_summary_info_new_from_message): And here too.
10299         (summary_build_content_info): Only create the contentinfo stuff if
10300         we have it turned on, otherwise just parse and discard.
10301         (summary_build_content_info_message): Likewise.
10302
10303 2000-11-29  Jeffrey Stedfast  <fejj@helixcode.com>
10304
10305         * camel-store.c (camel_store_get_folder): Updated the gtk-doc
10306         comment.
10307
10308 2000-11-29  Dan Winship  <danw@helixcode.com>
10309
10310         * camel-mime-utils.c: 
10311         * camel-mime-filter-charset.c: Use iconv instead of unicode_iconv.
10312
10313         * providers/imap/camel-imap-command.c (imap_read_untagged): Fix
10314         some off-by-one-ness.
10315
10316         * camel-stream-buffer.c (stream_read): Fix another bug found in
10317         previously-unused code here.
10318
10319 2000-11-29  Ettore Perazzoli  <ettore@helixcode.com>
10320
10321         * tests/lib/Makefile.am (INCLUDES): `$(top_srcdir)' for builddir
10322         != srcdir compilation.
10323
10324 2000-11-29  Not Zed  <NotZed@HelixCode.com>
10325
10326         * tests/message/test2.c (main): Add a missed unref.
10327
10328         * camel-stream-mem.c (camel_stream_mem_set_buffer): We must set
10329         ourselves as the owner of the byte-array.
10330         Weird, someone has modified this file (its been reindented), but i
10331         can't see any changelogs ...
10332
10333         * tests/lib/messages.c (content_finalise): Fix memleak in tester,
10334         free byte array when our content object is deleted.
10335
10336         * camel-folder-search.c (camel_folder_search_finalize): Yeah
10337         great, so the sexp is a gtk object, not a camel object.  Isn't
10338         that going to be fun to fix?
10339
10340         * camel-session.c (camel_session_finalise): Free the storage path.
10341
10342         * providers/local/camel-local-store.c (camel_local_store_init): If
10343         store->folders is setup, free it first, then overwrite.  Hmm,
10344         this seems a bit crappy to me.
10345
10346         * camel-store.c (camel_store_init): Dont setup store->folders if
10347         its already setup.
10348
10349         * camel-exception.c (camel_exception_setv): Removed a memleak.  no
10350         need to strdup after a strdup_printf!!!
10351
10352         * camel-address.c (camel_address_finalize): Free the address
10353         ptrarray, once finished.
10354
10355         * providers/local/camel-local-folder.c (local_finalize): Make sure
10356         we dont leave the folder locked on close.
10357         (local_finalize): Free summary/search.
10358
10359         * providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
10360         Small memleak, always free name after using it.
10361
10362         * camel-mime-part.c (set_content_object): Free txt after setting
10363         the header.
10364
10365         * providers/local/camel-maildir-summary.c (maildir_summary_check):
10366         Fix a memleak, close the dir after scanning new.
10367         (message_info_free): Added so we can free the filename cached in
10368         the messageinfo.
10369         (camel_maildir_summary_finalise): Free the hostname.
10370
10371         * tests/folder/test[12].c (main): Clear out camel-test before
10372         starting.
10373
10374         * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
10375         Because encode_x_evolution folds the line (sigh, because
10376         encode_param does, unlike every other function in
10377         camel-mime-utils), unfold the encoded result before comparing.
10378         (mbox_summary_sync_quick): Another small memleak, free xevnew once
10379         finished with it.
10380
10381         * camel-mime-utils.c (header_decode_quoted_string): Removed a
10382         redundant check for c=0.
10383         (header_unfold): New function to un-fold headers.
10384
10385         * providers/local/camel-local-summary.c
10386         (local_summary_encode_x_evolution): some problems with encoding
10387         tags, using the wrong output strings.
10388         (local_summary_encode_x_evolution): We dont need to append a ;
10389         either, param_list_format_append() will do it for us.
10390
10391 2000-11-28  JP Rosevear  <jpr@helixcode.com>
10392
10393         * camel-lock.c: No longer hard code the enabled lock types
10394
10395 2000-11-28  Dan Winship  <danw@helixcode.com>
10396
10397         * camel-remote-store.c (remote_recv_line): Don't set exception to
10398         g_strerror (errno) when nread == 0, because it won't have been
10399         set.
10400
10401         * providers/pop3/camel-pop3-folder.c (pop3_finalize): Don't try to
10402         free things if they haven't been set yet.
10403
10404 2000-11-28  Jeffrey Stedfast  <fejj@helixcode.com>
10405
10406         * providers/smtp/camel-smtp-transport.c (smtp_connect): Clear the
10407         exception if EHLO fails before trying HELO in the cases where the
10408         SMTP provider doesn't announce its ESMTPness.
10409
10410 2000-11-28  Not Zed  <NotZed@HelixCode.com>
10411
10412         * providers/local/camel-maildir-summary.c
10413         (camel_maildir_summary_init): Set the info size's properly, oops!
10414
10415         * tests/lib/folders.[ch]: Folder testing helpers.
10416
10417         * tests/folder/test2.c: Test basic message ops on folders.
10418
10419         * tests/folder/test1.c (main): Test basic folder ops on (local)
10420         stores.
10421
10422         * providers/local/camel-local-provider.c
10423         (camel_provider_module_init): Removed some debug.
10424
10425         * providers/local/camel-maildir-folder.c
10426         (camel_maildir_folder_class_init): fix parent class.
10427
10428         * providers/local/camel-mh-folder.c (camel_mh_folder_class_init):
10429         Fix parent class (damn cut & paste).
10430
10431         * providers/local/camel-maildir-store.c (get_folder): Call parent
10432         impl.
10433         (camel_maildir_store_class_init): Fix parent class setup.
10434         (delete_folder): Check the folder exists before trying to delete
10435         it.
10436         (delete_folder): Try and make the delete operation atomic/rollback
10437         failures.  e.g. if one directory isn't empty, then create the
10438         other empty ones back.  Also clear the tmp directory fully first.
10439
10440         * providers/local/camel-mbox-store.c (get_folder): Call parent
10441         impl.
10442         (camel_mbox_store_class_init): parent class is camel_local_store,
10443         not camel_folder, oops.
10444         (delete_folder): Return an error if it doesn't exist, rather than
10445         covering it up.
10446
10447         * providers/local/camel-mh-store.c (get_folder): Call parent impl.
10448         (camel_mh_store_class_init): fix parent class setup.
10449         (delete_folder): Error if it doesn't exist now.
10450
10451         * camel-folder.c (camel_folder_move_message_to):
10452         (camel_folder_copy_message_to): Added warnings as these functions
10453         are going to be removed later.
10454
10455         * camel-store.c (camel_store_get_root_folder): Fix for an early
10456         api change.  We want CAMEL_STORE_FOLDER_CREATE, not TRUE, since
10457         its a flag.
10458         (camel_store_get_default_folder): And here too.
10459
10460         * providers/local/camel-local-store.c (xrename): Handle renaming
10461         folders differently to renaming files.
10462         (get_default_folder_name): local stores dont have a default
10463         folder, so make it so.  Or at least, it doesn't seem to make sense
10464         to have one.
10465         (get_root_folder_name): Same for root.
10466         (get_folder): Added parent implementation, that makes sure the
10467         service path exists, if we are creating a new folder (but doesn't
10468         create the folder).
10469
10470 2000-11-27  Not Zed  <NotZed@HelixCode.com>
10471
10472         * providers/local/camel-local-store.c (xrename): Fixed races.  Use
10473         link/unlink, rather than rename, to properly detect overwriting
10474         another file.  And allow some files to be missing.
10475
10476 2000-11-28  Radek Doulik  <rodo@helixcode.com>
10477
10478         * providers/local/camel-local-summary.c
10479         (local_summary_decode_x_evolution): add scan = scan->next; to
10480         avoid infinite loop
10481
10482 2000-11-27  Dan Winship  <danw@helixcode.com>
10483
10484         * providers/imap/camel-imap-command.c (imap_read_untagged): Make
10485         this gratuitously more complicated. No wait, I mean, fix bugs. Now
10486         fully handles NULs in the data stream (which "can't happen" but
10487         do) and also handles responses containing multiple literals. Also
10488         does less copying than the original code.
10489
10490         * camel-stream-buffer.c (stream_read): Fix a bug that could make
10491         it lose sync and/or overrun buffers.
10492
10493 2000-11-27  JP Rosevear  <jpr@helixcode.com>
10494
10495         * providers/local/.cvsignore: shush
10496
10497 2000-11-27  Not Zed  <NotZed@HelixCode.com>
10498
10499         * providers/Makefile.am: Removed mh, mbox, added local, to the default.
10500
10501 2000-11-24  Not Zed  <NotZed@HelixCode.com>
10502
10503         * tests/data/getaddr.pl: little util to scan mailboxes for any and
10504         every address they contain.
10505
10506         * tests/message/test2.c (main): Added a bunch of stuff to test
10507         decoding/reencoding/etc of internationalised addresses.
10508
10509         * tests/message/lib/address-data.h: Copy of some unicode/other
10510         testing data.  **Beware** of editing this file in emacs, it'll
10511         probably try and convert all the characters to something
10512         unusable.
10513
10514         * tests/lib/camel-test.c (camel_test_break): Add a debugger hook
10515         point.
10516
10517         * camel-mime-utils.c (quoted_encode): Check for space and convert
10518         to _ separately.
10519         (header_decode_mailbox): Fixed the 'check comments for realname'
10520         code, problem was the domain getting code was skipping all
10521         whitespace/comments before we could get a look-in.  This is
10522         approximate but fairly robust.
10523         (header_decode_text): Dont use the c-type isspace func here, we
10524         want a specific whitespace only.
10525         (header_decode_text): If we have decoded words next to each other,
10526         do not insert whitespaces between them, which is what rfc2047 requires.
10527         (header_decode_text): Make c unsigned too.
10528
10529         * tests/README: Added at least some explanation of all this stuff.
10530
10531         * tests/lib/camel-test.h (check_msg): Added a non-gcc version of
10532         the fail command, we dont get the expression that failed, but no
10533         matter.  Should be (more) portable now.
10534         (check, check_msg): Put the file/lineno in the default message.
10535
10536         * Makefile.am (SUBDIRS): Add tests.
10537
10538         * camel-mime-filter-basic.c (filter): Well, I'll add the extra
10539         bytes here too, lathough not strictly needed, might save a
10540         re-malloc when we get to complete().
10541
10542         * camel-mime-filter-charset.c (filter): Make sure we have room if
10543         we only convert very short data.
10544         (complete): and here too.
10545
10546         * tests/Makefile.am: Initial test harness & tests.  Requires gcc
10547         for this.
10548
10549         * camel-internet-address.c (d): Turn off debug.
10550
10551         * camel-charset-map.c (camel_charset_step): Oops, & masks for set
10552         intersection, not | them.  Dunno how this got even close to
10553         working.
10554
10555 2000-11-23  Not Zed  <NotZed@HelixCode.com>
10556
10557         * camel-mime-filter-basic.c (filter): For base64 encoding, the
10558         output size for 0, 1, or 2 bytes of input can exceed input*2, so
10559         make sure we account for that as well.
10560         (complete): And here.
10561         (complete): Similarly for qp encoding, if we have a trailing
10562         space, we need some extra bytes (not needed for 'filter()', as any
10563         such bytes are stored in state/save).
10564
10565         * camel-mime-utils.c (quoted_decode_step): Removed fixme not required.
10566         (quoted_encode_close): Dont append a trailing afterall.  Otherwise
10567         a pass through the encode/decode will grow the message each time.
10568
10569 2000-11-22  Radek Doulik  <rodo@helixcode.com>
10570
10571         * camel-mime-utils.c (header_msgid_generate): check for return
10572         values
10573
10574 2000-11-21  Dan Winship  <danw@helixcode.com>
10575
10576         * camel-lock.c: 
10577         * camel-movemail.c: add #ifdef HAVE_ALLOCA_H
10578
10579 2000-11-21  Not Zed  <NotZed@HelixCode.com>
10580
10581         * providers/local/camel-mh-summary.c (mh_summary_sync_message):
10582         Shite, -1 on error, >=0 on success.  So i've just been truncating
10583         all the messages I touched, good one zed.
10584         (mh_summary_sync_message): Sigh, and write to the right damn fd as
10585         well.
10586         (mh_summary_sync_message): Argh, and we need to compare the length
10587         of the old xev -1 to the new xev, to check if we can optimise it.
10588
10589         * camel-folder.c (camel_folder_change_info_new): Init the pool.
10590         (camel_folder_change_info_add_source): Allocate string in the
10591         pool.
10592         (camel_folder_change_info_add_source_list): 
10593         (camel_folder_change_info_add_update): No longer free the key, as
10594         it cannot be yet.
10595         (change_info_add_uid): Add a new arg, copy, telling it whether to
10596         copy the uid argument or not, and copy using mempool_strdup.
10597         (change_info_cat): Tell add_uid to copy the string.
10598         (camel_folder_change_info_add_update): Call add_uid directly.
10599         (change_info_remove): Call add_uid directly, with no copy, and
10600         dont free the key.
10601         (change_info_free_update): No longer required since we dont malloc
10602         the keys.
10603         (camel_folder_change_info_add_uid): Fix for add_uid change.
10604         (camel_folder_change_info_remove_uid): 
10605         (camel_folder_change_info_change_uid): 
10606         (change_info_clear): No longer needed, just set the size to 0 on
10607         the array directly.
10608         (camel_folder_change_info_clear): Empty the arrays directly, and
10609         flush the mempool too, and also clear uid_source, incase anyone
10610         was silly enough to call us in the wrong order.
10611         (camel_folder_change_info_free): Dont bother clearing the array's
10612         contents, just free the pool and throw away all the indexes.
10613
10614         * camel-folder.h: Added a mempool to CamelFolderChangeInfo to
10615         store the uid's we get.
10616
10617         * camel-folder-search.c (search_match_all): If we are only
10618         matching a single info, just use that/do the search.
10619         (camel_folder_search_match_expression): New function.  Matches a
10620         single message info against an expression.
10621         (camel_folder_search_init): Init a hash table used to map the
10622         returned gptrarrays' to mempools.
10623         (camel_folder_search_execute_expression): Store all of the string
10624         data in a mempool, slightly faster, less wasted space (usually),.
10625         (camel_folder_search_free_result): Check for the mempool that
10626         stores the data for the list, and free that if we have it,
10627         otherwise assume we need to use g_free() (which should only happen
10628         if the list is empty at the moment).
10629         : commented out the debugging prints.  Got sick of 'executing
10630         header search' crap.
10631
10632         * providers/vee/camel-vee-folder.c (camel_vee_folder_init): Init
10633         changes.
10634         (camel_vee_folder_finalise): Free changes.
10635         (vfolder_add_match): Simple helper to add a new matching info
10636         record.
10637         (camel_vee_folder_add_folder): Only trigger a changed event if we
10638         have changes.
10639         (vfolder_change_match): New function, changes our local vfolder
10640         info to match the source.
10641         (vfolder_add_match): Add a new info to the vfolder list.
10642         (vfolder_remove_match): Remove a no-longer matching info from the
10643         vfolder summary.
10644         (message_changed): check if the message still matches, and
10645         remove/etc as required.
10646         (camel_vee_folder_finalise, init): init/free search object.
10647         (vee_folder_build_folder): Build the changes to the folder into
10648         the changes data, as we go.
10649         (folder_changed): If the folder gave us an explicit list of
10650         changes, then process each one separately (unless there's a lot
10651         added/changed).
10652
10653         * providers/vee/camel-vee-folder.h: Added a changes field to the
10654         folder.
10655
10656         * Makefile.am (libcamel_la_SOURCES): Added
10657         camel-folder-thread.[ch].
10658
10659         * camel-folder-thread.c: message-threading algorithm, taken from
10660         evolutions' mail component, as it is generally more useful than
10661         just for evolution itself.  Changed to use e-memchunks as well to
10662         speed it up a little and use less mem.
10663
10664 2000-11-20  Jeffrey Stedfast  <fejj@helixcode.com>
10665
10666         * camel-remote-store.c (remote_recv_line): Fixed to return the
10667         correct bytecount in all cases which is the real fix to
10668         imap_parse_nstring.
10669
10670         * providers/imap/camel-imap-command.c (imap_read_untagged): Again,
10671         don't use strlen for the post-data, use 'n'.
10672
10673         * providers/imap/camel-imap-utils.c (imap_parse_nstring): Undo my
10674         previous temp-fix.
10675
10676 2000-11-20  Not Zed  <NotZed@HelixCode.com>
10677
10678         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Fixes for
10679         the summary messageid changes.  Hash the messageid and store it.
10680         (get_XOVER_headers): Use camel_folder_summary_info_new() to create
10681         the summary item before adding it.
10682
10683         * camel-folder-summary.h (CamelMessageInfo): Changed the
10684         messgae-id to be an 8 byte md5 hash, and the references list to be
10685         an array of these.
10686
10687         * providers/local/camel-mh-summary.c (mh_summary_sync_message):
10688         New function, sync out the message info stuff.  Only updates the
10689         X-Ev header if it can get away with it, otherwise writes out a
10690         whole new message.
10691         (mh_summary_sync): Added more functionality.  All summary info is
10692         now written to the X-Ev header, etc, and new messages re-written
10693         if required during the sync process.
10694
10695         * providers/local/camel-local-folder.c
10696         (local_set_message_user_flag): Set the XEVCHANGE flag.
10697         (local_set_message_user_tag): And here too.
10698
10699         * providers/local/camel-local-summary.h: New flag
10700         CAMEL_MESSAGE_FOLDER_XEVCHANGE to indicate the XEV header has
10701         probably changed size and needs to be rewritten in whole.
10702
10703         * camel-folder-summary.c (next_uid_string): Want this static, not
10704         const.
10705         (message_info_new): Store the references and message-id values as
10706         64 bit, binary hashes.
10707         (message_info_load): fix for message-id/references changes.
10708         (message_info_save): Likewise.
10709         (camel_message_info_dup_to): And here.
10710         (camel_message_info_free): And here too.  No longer free
10711         message_id, and simple free for references array.
10712         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
10713         (camel_folder_summary_init): Init memchunk allocators to empty.
10714         (camel_folder_summary_finalize): Free memchunk allocators if
10715         there.
10716         (message_info_new): Use the chunk allocator to allocate message
10717         info's. 
10718         (camel_folder_summary_info_new): New helper to allocate the
10719         message info, and setup the memchunk if required.
10720         (content_info_alloc): Likewise for content info's.
10721         (message_info_load): Use summary_info_new_empty.
10722         (content_info_new): Use content_info_alloc.
10723         (content_info_load): "
10724         (content_info_free): Free the content info as a memchunk.
10725         (message_info_free): Free everything directly and the base as a
10726         memchunk, rather than calling camel_message_info_free(), which
10727         assumes a malloc'd array.
10728
10729         * providers/local/camel-local-summary.c: Include ctype.h, kill a
10730         warning.
10731         (local_summary_decode_x_evolution): If we get a NULL message info,
10732         then dont try and set anything, just check for validity.
10733         (camel_local_summary_write_headers): New function to write a set
10734         of headers to an fd.
10735         (camel_local_summary_check): Added some statistic generation
10736         stuff for memory profiling.
10737
10738         * providers/local/camel-mbox-summary.c (header_write): Changed to
10739         use stdoi functions to write out the header to a buffered stream,
10740         instead of using writev, which is apparently slow (and writing
10741         each line separately is slow anyway).
10742         (mbox_summary_sync_full): New implementation.  Does things
10743         differently, doesn't use or require the content info stuff.
10744         (summary_rebuild): Dont return an error if we start scanning at
10745         the end of file.
10746         (mbox_summary_sync_full): If we are not writing out new headers,
10747         make sure we copy the From line as we go, and update frompos
10748         appropriately.
10749         (mbox_summary_sync_full): Always copy the From line from the
10750         existing one, rather than trying to make one up ourselves.
10751         (mbox_summary_sync): If we can get by with a quick-sync, then try
10752         it, if that fails, then try a full sync anyway.
10753         (mbox_summary_sync_quick): Quick sync.  Only update system flags,
10754         etc.
10755         (mbox_summary_sync_full): Use the proper local summary encode_xev
10756         function.
10757         (header_evolution_decode): Removed, no longer needed.
10758         (header_evolution_encode): Same.
10759         (copy_block): No longer needed, removed.
10760         (header_write): Removed, replaced with
10761         camel_local_summary_write_headers.
10762         (mbox_summary_sync_full): Fixed for header_write change.
10763
10764         * camel-mime-parser.c (folder_scan_step): Implement the new
10765         optional parser state HSCAN_PRE_FROM, that returns the (currently
10766         unfiltered) input data.
10767         (folder_scan_drop_step): Do the right thing for the PRE_FROM
10768         state.
10769         (camel_mime_parser_scan_from): Update the doco.
10770         (camel_mime_parser_scan_pre_from): Ok, make this behaviour
10771         optional, it simplifies a lot of loops that dont otherwise need to
10772         know about it.
10773         (folder_scan_step): Made the PRE_FROM state optional.
10774         (struct _header_scan_state): Made the bool vars 1 bit.
10775         (folder_pull_part): Free the from_line buffer if it is there.
10776         (folder_scan_skip_line): Added a new arg, can save the skpped data
10777         to a byte_array, as we go.
10778         (folder_scan_step): Fixed calls to skip_line approrpiately.  Now
10779         we save the from line as we parse it.
10780         (camel_mime_parser_read): New function to read from the mime
10781         parser buffer directly.  Useful if you use the parser to read the
10782         first/some headers, then need to scan the rest of the data,
10783         without needing to use a seek(), or allocate your own buffers.
10784
10785         * camel-mime-parser.h (struct _header_state): Added a new parser state,
10786         pre-from which returns any data found before a from line during
10787         parsing (all other data can be retrieved by the caller except
10788         this).
10789
10790 2000-11-17  Jeffrey Stedfast  <fejj@helixcode.com>
10791
10792         * providers/imap/camel-imap-utils.c (imap_parse_nstring): When
10793         extracting a literal string, capture up until the end of the last
10794         line - this we we don't lose any data if the byte count is off.
10795
10796         * providers/imap/camel-imap-command.c (imap_read_untagged): Use
10797         the byte-read count to decrement the number of bytes left to read
10798         rather than using strlen. Not only does this protect against a DoS
10799         (embedded NUL chars in the literal string would make strlen
10800         inaccurate) but it also improves performace a little.
10801
10802         * camel-remote-store.c (remote_recv_line): *Sigh* Return the
10803         number of bytes read on success rather than 0. Also don't use
10804         camel_stream_buffer_read_line since we can't get an accurate octet
10805         count.
10806
10807 2000-11-17  Not Zed  <NotZed@HelixCode.com>
10808
10809         * providers/local/camel-local-summary.c (local_summary_add): Clear
10810         the NOXEV/FLAGGED bits, since we do have an xev header.  um m,
10811         maybe this is right, this assumes a write is following.  Maybe
10812         this should be done in folder::append() instead ...
10813
10814         * camel-stream-buffer.c (camel_stream_buffer_gets): We should
10815         always terminate the string.  No need to check outptr is in range,
10816         its already been checked.
10817
10818         * providers/local/camel-mbox-summary.c (mbox_summary_sync): When
10819         we update the summary, do it from mbox_summary->folder_size, not
10820         the content info endpos (which isn't any good anymore anyway).
10821
10822         * providers/local/camel-mbox-folder.c (mbox_append_message): Set
10823         the frompos from the current folder size, since summary_add wont
10824         have initialised it to anything useful.
10825
10826 2000-11-16  Not Zed  <NotZed@HelixCode.com>
10827
10828         * providers/local/camel-local-summary.c
10829         (local_summary_encode_x_evolution): Check the uid string is all
10830         digits before trying to write a 'standard' x-ev header.
10831
10832         * providers/local/camel-maildir-summary.c
10833         (camel_maildir_summary_info_to_name): Convert an info into a
10834         maildir name:info filename.
10835         (camel_maildir_summary_name_to_info): Convert a name:info filename
10836         into an info, and tell us if it didn't match it.
10837         (message_info_new): When creating a new filename, gets its info
10838         from the flags field.  Likewise if creating from an existing file,
10839         extract the flags.
10840         (maildir_summary_sync): Remove a small memleak.  Also, if our
10841         flags and that requires a filename change, perform that here.
10842         (message_info_new): Get the received date from the filename.
10843         Also, dont overwirte the uid if we have one.
10844         (maildir_summary_check): Sort the summary in received order before
10845         completion.
10846         (maildir_summary_next_uid_string): Test the name for collusions
10847         before we give it out.  Retry, and if that fails, well, I guess we
10848         collide :(
10849
10850         * providers/local/camel-mbox-folder.c (mbox_lock): Implement mbox
10851         locking.
10852         (mbox_unlock): And unlocking.
10853         (mbox_append_message): Lock the folder for write before doing
10854         anything.
10855         (mbox_get_message): Lock the folder for read before doing
10856         anything.
10857
10858         * providers/local/camel-local-folder.c (camel_local_folder_lock):
10859         Implement something here.  We handle the recursive ability but
10860         pass the locking to the folder itself.
10861         (camel_local_folder_unlock): Likewise for unlocking.
10862         (local_lock): Default - do nothing, return success.
10863         (local_unlock): Same.
10864         (local_sync): Changed slightly for locking api changes, and also,
10865         only lock around the sync process itself.
10866
10867         * camel-lock.c: New file - utility functions for locking using
10868         different strategies and/or for locking folders safely.
10869
10870         * Makefile.am (libcamel_la_SOURCES): Adde camel-lock.[ch]
10871
10872 2000-11-15  Radek Doulik  <rodo@helixcode.com>
10873
10874         * camel-mime-utils.c: mime_guess_type_from_file_name moved back to
10875         composer as it introduced unwanted VFS dependency
10876         removed  #include <libgnomevfs/gnome-vfs.h>
10877
10878 2000-11-15  Not Zed  <NotZed@HelixCode.com>
10879
10880         * providers/Makefile.am: Removed local again, not quite ready.
10881
10882 2000-11-14  Not Zed  <NotZed@HelixCode.com>
10883
10884         * camel-folder-summary.c (message_info_new_from_message): Use
10885         message_info_new to create the summary from headers, instead of
10886         getting directly from the message.
10887         (format_recipients): No longer required.
10888
10889         * providers/Makefile.am (SUBDIRS): Added local.
10890
10891 2000-11-11  Not Zed  <NotZed@HelixCode.com>
10892
10893         * camel-mime-parser.c (folder_push_part): Make sure 'atleast' is
10894         at least 1, always.  This is possibly a temporary fix for a
10895         bad failure mode on bad multipart messages.
10896         (folder_scan_content): Go until inend, not inend+1.  Changed the
10897         continuation and retry logic to be simpler and more robust.  If we
10898         can't find a marker within
10899         the atleast we need, just set it to 1, and try again, rather than
10900         just going to the next smaller limit (boundary check checks the
10901         length anyway).
10902         (header_append): streamline the empty line case.  And strip
10903         trailing \r's if there are any (\n's already stripped).
10904         (folder_scan_header): Reordered and cleaned up a lot.  Check for
10905         continuation only once, and compress lwsp then. Assume the header
10906         buffer already has end of line's stripped, and simplify some things:
10907                 Only check for end of headers once and easier.
10908                 Dont check to remove end of line character
10909         Dont bother testing inptr-start if we get a boundary match - it is
10910         always zero.
10911         (folder_scan_header): Removed the unused part variable, and a few
10912         pointless assignments.
10913         (folder_scan_header): Change the end limit to be 1 higher, to make
10914         sure we get all content.
10915         (folder_scan_content): And here too.
10916         (folder_scan_header): Killed a warning.
10917         (folder_push_part): Removed a bad comment.  Actually
10918         boundarylenfinal can be zero for a new message not in a
10919         multipart.  So we fix that here.
10920
10921 2000-11-09  Not Zed  <NotZed@HelixCode.com>
10922
10923         * camel-mime-utils.c (header_decode_param_list): Renamed from
10924         header_param_list_decode.
10925         (header_param_list_decode): New external function to decode a
10926         parameter list.
10927         (header_param_list_format_append): Made public.
10928         (header_param_list_format): Another new public helper function for
10929         formatting just a param list.
10930
10931         * camel-folder-summary.c (next_uid_string): Default implementation
10932         is the same as before.
10933         (camel_folder_summary_class_init): And set it up.
10934
10935         * camel-folder-summary.h: Make next_uid_string a virtual function.
10936
10937         * camel-folder.c (camel_folder_change_info_changed): New function
10938         to return true if the changeset contains any changes.
10939
10940 2000-11-14  Jeffrey Stedfast  <fejj@helixcode.com>
10941
10942         * camel-stream.c (camel_stream_printf): Don't cast an int to a
10943         ssize_t.
10944
10945 2000-11-10  Dan Winship  <danw@helixcode.com>
10946
10947         * providers/mbox/camel-mbox-summary.c
10948         (camel_mbox_summary_build_from): put a space before a single-digit
10949         day of the month since it seems some mailers are fantastically
10950         picky about this. (bugs.gnome.org #27232)
10951
10952 2000-11-10  Radek Doulik  <rodo@helixcode.com>
10953
10954         * camel-mime-utils.c (header_msgid_generate): fix ids ending with '.'
10955
10956 2000-11-09  Dan Winship  <danw@helixcode.com>
10957
10958         * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
10959         Fix error handling. (Only send a "*" to bail out of authentication
10960         if the server hasn't already bailed on us.)
10961
10962 2000-11-08  Radek Doulik  <rodo@helixcode.com>
10963
10964         * camel-mime-utils.c (mime_guess_type_from_file_name): new
10965         function, moved from composer
10966
10967 2000-11-08  Not Zed  <NotZed@HelixCode.com>
10968
10969         * camel-mime-message.c (find_best_encoding): Keep track of the
10970         caller bestenc flags that make sense.
10971         
10972         * camel-mime-filter-bestenc.c (filter): Added code to detect when
10973         we have "^From " lines in the sequence of text.
10974         (camel_mime_filter_bestenc_get_best_encoding): Added a new flag
10975         CAMEL_BESTENC_NO_FROM: if set, it will not allow any lines
10976         matching "^From " to appear in the output - currently forcing
10977         base64 encoding to achieve this.
10978
10979         * camel-mime-parser.c (folder_scan_step): Call
10980         camel_mime-filter_complete() once we're done, rather than
10981         filter_filter().
10982         (folder_scan_content): Some fixes for state changing; so that when
10983         we do find another boundary it is properly flagged.  Since we
10984         strip the last \n off all data, we must take that into account
10985         too.  Sigh.  Fixes a rather nasty set of bugs where multipart
10986         messages could start including following messages as parts, etc.
10987         (struct _header_scan_stack): Added new parameter,
10988         boundarylenfinal, which holds the length of the final boundary, if
10989         it is different (e.g. for From lines, whihc aren't)
10990         (folder_scan_step): Setup teh boundarylenfinal value when creating
10991         a new boundary.
10992         (folder_scan_content): Hmm, if we hit the end-of-buffer sentinal,
10993         reset the scanner back to leave 'atleast' chars in the buffer
10994         still, dump that content, and retry again.  Stops us losing a
10995         check for a boundary on some data we haven't really looked at yet!
10996         (folder_scan_content): Use boundarylenfinal to calculate
10997         'atleast'.
10998         (folder_scan_header): And here too.
10999         (folder_boundary_check): Use the atleast value directly, dont
11000         truncate it.  Use the boundarylen/boundarylenfinal values directly
11001         too.
11002         (struct _header_scan_stack): Add an atleast parameter to cache the
11003         atleast info.
11004         (folder_push_part): Determine/set 'atleast', every time we add a
11005         new part.
11006         (folder_scan_header): Get the cached atleast info from the current
11007         part.
11008         (folder_scan_content): And here too.
11009         (folder_scan_header): Fix a problem where a part starting with
11010         " text" would be interpreted as a followon header wrongly.
11011
11012         * camel-mime-filter-charset.c (complete): Add some assertions to
11013         find a bug.
11014
11015 2000-11-07  Ettore Perazzoli  <ettore@helixcode.com>
11016
11017         * camel-service.c (get_name): Strdup the "???" string you return,
11018         so that the expected semantics for `::get_name()' is respected.
11019
11020 2000-11-07  Dan Winship  <danw@helixcode.com>
11021
11022         * camel-stream-filter.c (d): Kill debugging, as it causes lots of
11023         evolution-mail spewage.
11024
11025 2000-11-07  Not Zed  <NotZed@HelixCode.com>
11026
11027         * camel-mime-filter-bestenc.c (complete): Implement a complete()
11028         function, now we need one.
11029         (filter): Upgraded to match rfrc2045 properly.  Checks also for
11030         length of line and valid CRLF sequences.
11031         (camel_mime_filter_bestenc_get_best_encoding): Do the work of
11032         working out what is the best encoding given what we found about
11033         the stream.
11034
11035         * camel-mime-part.c (camel_mime_part_encoding_to_string): Use a
11036         lookup table to get the encoding naem, and add the binary type.
11037         (camel_mime_part_encoding_from_string): Likewise for the reverse.
11038
11039         * camel-mime-part.h: Added the binary encoding type, see rfc2045.
11040
11041         * camel-mime-utils.c (header_param_list_format_append): Dont put a
11042         space before ;'s in parameter lists, makes them more
11043         readable/consistent.
11044
11045         * camel-mime-message.c (multipart_has_8bit_parts): Cleaned up the
11046         old stuff, well removed it.
11047         (camel_mime_message_set_best_encoding): Added another argument
11048         that lets you select what you want to set the best of.  i.e. for
11049         smtp transport we only need 7 bit, and dont need to optimise the
11050         charset (although of course, we should always).
11051         (find_best_encoding): Implement this feature, if we are not
11052         getting the best charset, use the one we have.
11053         (best_encoding): Set the charset on the part appropriately.  Sigh,
11054         the interfaces for this are nonexistant.
11055         (find_best_encoding): Tell the bestenc filter that lf should be
11056         treated as crlf for the purposes of determining encodings.
11057
11058 2000-11-06  Not Zed  <NotZed@HelixCode.com>
11059
11060         * camel-charset-map.c (camel_charset_init): Init function for an
11061         iterative charset determinator.
11062         (camel_charset_step): Iterate another buffer.
11063         (camel_charset_mask): Removed, since it couldn't have worked.
11064         (camel_charset_best): Use the iterative interface to do the work.
11065         (camel_charset_best_name): Get the best name for a charset so far.
11066
11067         * camel-mime-filter-bestenc.c: New class, a stream
11068         filter that can be used to memory-efficiently determine the best
11069         encoding and/or charset to use for a given stream of bytes.
11070
11071         * Makefile.am (libcamelinclude_HEADERS): Added stream-null*.
11072         (libcamel_la_SOURCES): Added bestenc*
11073
11074         * camel-stream-null.c: New class, a null-stream, that always
11075         succeeds, and never has any contents.
11076
11077         * camel-stream.c: Minor pointless changes.  Was going to do
11078         something else but changed my mind.  Added trivial default
11079         implementations for all callbacks.
11080
11081         * camel-mime-message.h: Cleaned up some old cruft.
11082
11083         * camel-folder-summary.c (camel_folder_summary_format_address):
11084         address_list_format() no longer encodes, so we dont need to decode
11085         it.
11086
11087         * camel-address.c (camel_address_unformat): New function, attempts
11088         to reverse the formatting process on display addresses.
11089         (camel_address_length): New function to get the number of
11090         addresses, without having to peek the structure.
11091
11092         * camel-mime-message.c (camel_mime_message_set_from): Fix a typo.
11093         (camel_mime_message_finalize): Only unref from/reply_to if we have
11094         it.
11095         (camel_mime_message_set_recipients): New function - set the
11096         recipients as a CamelInternetAddress.  This function effectively
11097         deprecates the older recipient setting functions.
11098         (camel_mime_message_add_recipient): What the hell, i'll bite the
11099         bullet.  Terminate this function.  The old api was ambiguious and
11100         inefficient and didn't work right anyway.
11101         (camel_mime_message_remove_recipient_address): And this one.
11102         (camel_mime_message_remove_recipient_name): And this one too.
11103         (camel_mime_message_set_recipients): If we set an empty header,
11104         then remove it from the header list.  Allow a null receipient
11105         object to clear a header.
11106         (camel_mime_message_set_from): Likewise, if setting an empty from
11107         address.
11108         (camel_mime_message_encode_8bit_parts): Eeek!!
11109         camel_stream_mem_new_with_byte_array owns the byte_array we give
11110         it, so make sure we dont free any of it!
11111         (camel_mime_message_encode_8bit_parts):  Infact, i'll just rewrite
11112         the whole lot, its a bit of a mess.  Should really rename it and
11113         make it a little more useful too, lets see ...
11114         (best_encoding): This has a string interface?  Oh boy.
11115         (camel_mime_message_foreach_part): New experimental function to
11116         iterate over all message parts.  Might not remain.
11117         (camel_mime_message_has_8bit_parts): New implementation using
11118         foreach_part.  Fixed a couple of problems.
11119         (find_best_encoding): New function, that finds the best encoding
11120         for a given part (will probably be moved to camel-mime-part), and
11121         also the best charset to use if it is a text part.  Since one
11122         affects the other it is a two pass process, but uses streams and
11123         not memory to achieve this.
11124         (camel_mime_message_set_best_encoding): Uses the function above to
11125         configure an entire message for the best encoding possible given
11126         transport constraints.
11127         (camel_mime_message_encode_8bit_parts): Reimplemented to use the
11128         function above to perform the work.
11129
11130         * camel-internet-address.c
11131         (camel_internet_address_format_address): Dont put <> around a lone
11132         address with no real name.
11133         (camel_internet_address_encode_address): Similarly.
11134         (internet_decode): Actually return the count of decoded addresses.
11135         (internet_unformat): Implement the unformatting routine.
11136
11137 2000-11-05  Not Zed  <NotZed@HelixCode.com>
11138
11139         * providers/smtp/camel-smtp-transport.c (_send_to): Changed to get
11140         the internetaddress directly, rather than having to parse it
11141         itself.
11142
11143         * camel-address.c (camel_address_format): Added a new function
11144         which will format address, suitable for display.
11145         (camel_address_cat): Concatentate 1 camel address onto another.
11146         It is upto the caller to ensure the addresses are of compatible
11147         types.
11148         (camel_address_new_clone): New function to create a new address by
11149         copying an existing one of the same type.
11150         (camel_address_copy): New helper function to copy an address.
11151
11152         * camel-mime-message.h (struct _CamelMimeMessage): Removed cached
11153         copy of date string.
11154         (struct _CamelMimeMessage): Added date_received info.
11155
11156         * camel-mime-message.c (camel_mime_message_get_date_string):
11157         Removed.  Nothing uses it anyway, and it is redundant.
11158         (camel_mime_message_finalize): No more date_str.
11159         (camel_mime_message_init): No more date_str, initialise
11160         date_received*
11161         (write_to_stream): Change the check for a date header.
11162         (process_header): No longer track the date_str.
11163         (camel_mime_message_get_received_date): Removed.  totally invalid
11164         anyway.
11165         (camel_mime_message_get_sent_date): Removed.  Redundant.  The only
11166         'date' is the sent date, the received date is just made up.
11167         (camel_mime_message_get_date): Args changed to be more consistent
11168         with utility functions.
11169         (camel_mime_message_get_date): Dont set the date when we're asked
11170         for it (if its not set by the time its written, it'll be set
11171         then).
11172         (camel_mime_message_get_date_received): Actually do 'the right
11173         thing' here, if we have a received header, use that to determine
11174         the received date.  And return the data in the same format as
11175         get_date.
11176         (camel_mime_message_set_from): Changed the api to better match
11177         what we should be doing.  Pass a camelinternetaddress, etc.
11178         (camel_mime_message_set_reply_to): Cahnged similarly to take an
11179         internetaddress.
11180         (camel_mime_message_get_reply_to): Likewise.
11181         (camel_mime_message_finalize): Unref the from/reply_to objects.
11182         (format_address): Removed, no longer needed.
11183         (process_header): Changed to store the from/reply_to as
11184         internetaddress's.
11185         (write_to_stream): Set the from header directly to empty, if we
11186         dont have one.  Maybe we should just abort, and/or create one
11187         based on the current user.
11188
11189         * camel-mime-utils.c (header_address_list_format): Renamed to
11190         header_address_list_encode, which is what it is actually doing.
11191         (header_address_list_format_append): Similarly.
11192         (encoding_map[]): Removed, no longer used.
11193         (header_address_list_encode_append): Take another arg, do we
11194         encode the address (for internet), or not (for display - utf8
11195         only).
11196         (header_address_list_format): Re-added this function, but now it
11197         generates a display version only.  Surprise surprise, that is all
11198         anythign needs to generate anyway.  Sigh.
11199
11200         * camel-internet-address.c (camel_internet_address_get): Return
11201         false if we get an invalid index only.
11202         (camel_internet_address_encode_address): Helper function to encode
11203         a single address for mailing.
11204         (internet_encode): Use the above function to format it.
11205         (camel_internet_address_format_address): Format a single address
11206         for display.
11207         (internet_format): Implement the display version.
11208         (camel_internet_address_class_init): Init the internet_format
11209         virtual function.
11210         (internet_cat): Implement virtual function to concatenate
11211         addresses.
11212
11213         * camel-folder-summary.c
11214         (camel_folder_summary_info_new_from_header): new function, only
11215         build the summary info, dont add it.
11216         (camel_folder_summary_info_new_from_parser): Likewise, for new
11217         info from parser.
11218         (camel_folder_summary_add_from_parser): Cahnged to call function
11219         above to build info.
11220         (camel_folder_summary_add_from_header): Changed to call function
11221         above, to build info.
11222         (camel_folder_summary_info_free): New function to free the summary
11223         message info.
11224         (camel_folder_summary_clear): Changed to clal above to free info.
11225         (camel_folder_summary_remove): Likewise.
11226         (camel_folder_summary_add): Cleaned up the clashing uid
11227         re-assignment logic a little bit.
11228         (camel_folder_summary_decode_uint32): Fixed a typo, 01 != -1.
11229         (camel_folder_summary_decode_time_t): Return -1 on error.
11230         (camel_folder_summary_encode_off_t): New function to encode an
11231         off_t type.
11232         (camel_folder_summary_decode_off_t): And likewise for the reverse.
11233         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped the summary version, since
11234         we're now encoding time/off_t's right.
11235         (summary_header_save): Use time_t encoder to save the timestamp.
11236         (summary_header_load): Likewise for decoding the timestamp.
11237         (content_info_load): Decode off_t types directly, now we can.
11238         (content_info_save): And likewise for encoding.
11239         (camel_folder_summary_add_from_message): New function, create a
11240         summary item from an existing message and add it.
11241         (camel_folder_summary_info_new_from_message): New function, create
11242         a summary item from an existing message.
11243         (summary_build_content_info_message): New function to do the dirty
11244         work of building the conent info/indexing, from a message source.
11245         (format_recipients): Format an internetaddress suitable for the
11246         summary.
11247         (message_info_new_from_message): Build a new summary item from a
11248         mime message.
11249         (content_info_new_from_message): Build a new conent info from a
11250         mime part.
11251         (camel_folder_summary_class_init): Init the new class functions.
11252         (message_info_new_from_message): Fixed for message api change.
11253
11254         Added documentation to the functions.
11255         
11256 2000-11-03  Radek Doulik  <rodo@helixcode.com>
11257
11258         * camel-mime-utils.c (header_msgid_generate): new function,
11259         generates simple message/content id
11260
11261 2000-11-04  Not Zed  <NotZed@HelixCode.com>
11262
11263         * camel-mime-part-utils.c
11264         (camel_mime_part_construct_content_from_parser): Set the
11265         preface/postface from the parser into the multipart object.
11266
11267         * camel-multipart.c (camel_multipart_set_postface): Function to
11268         set the postface text on a multipart.
11269         (camel_multipart_set_preface): Similarly for preface text.
11270
11271         * camel-mime-parser.c (folder_scan_content): If we scan until a
11272         boundary, then we do not include the \n that starts the boundary
11273         line in the content.
11274         (struct _header_scan_stack): Added a ByteArray to store the
11275         multipart pre/post-text as we're scanning.
11276         (folder_pull_part): Free pre/posttext if they are allocated.
11277         (folder_scan_step): Build into the pre/posttext arrays as we
11278         encounter data.
11279         (camel_mime_parser_preface): REturn the multipart preface text, if
11280         there is any scanned.
11281         (camel_mime_parser_postface): Likewise for postface text.
11282         (byte_array_to_string): helper function for above.
11283
11284         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Change
11285         the from line to be "\nFrom ..." always, so no need to
11286         check/append a \n to messages.
11287         (mbox_append_message): Open the output stream with append mode
11288         [assuming this is more efficient than seeking to the end]
11289         And dont prepend \n  on the From line if its the first in the
11290         mbox.
11291         (mbox_append_message): Pass the offset of the real start of the
11292         "From " line when we perform the update (which may != 'seek')
11293
11294         * camel-mime-filter-charset.c (complete): Removed the terminating
11295         NUL 'fix'.
11296
11297         * camel-stream-filter.c (do_read): Added some debug.
11298         (do_flush): And here.
11299         (do_write): And here too.
11300         (do_write): ARGH!!! ARGH!  Ok, so the filter stream was writing a
11301         different number of bytes than the requester was asking it to
11302         write (because of filtering, of course!).  So instead of returning
11303         the true number of written bytes, we'll return what they asked us
11304         to write - unless there is an error in which case we return -1.
11305
11306         * camel-mime-utils.c (base64_encode_close): Sigh, forgot to make
11307         it unsigned.  I think this is actually a gcc bug as (48 >> 2)
11308         somehow ended up negative, when it obviously should not, even if
11309         the data load was signed.
11310
11311 2000-11-03  Jeffrey Stedfast  <fejj@helixcode.com>
11312
11313         * camel-url.c: Undo my incorrect fix - I misunderstood danw -
11314         sorry!
11315
11316 2000-11-03  Dan Winship  <danw@helixcode.com>
11317
11318         * providers/pop3/camel-pop3-store.c (camel_pop3_store_expunge):
11319         Unbreak this.
11320
11321 2000-11-03  Jeffrey Stedfast  <fejj@helixcode.com>
11322
11323         * camel-url.c (camel_url_to_string): If show_pass, then base64 the
11324         password before writing it to the output string.
11325         (camel_url_new): Assume password has been base64 encoded and
11326         decode accordingly.
11327
11328 2000-11-03  Dan Winship  <danw@helixcode.com>
11329
11330         * camel-provider.h: Add an "url_flags" field to CamelProvider.
11331         Move the CAMEL_SERVICE_URL_* defines here and remove the SERVICE_
11332         part of the name.
11333
11334         * camel-service.h: Remove CAMEL_SERVICE_URL_* flags and
11335         service->url_flags field.
11336
11337         * camel-service.c (check_url, get_path): Get URL flags from
11338         service->provider, update for changed flag names.
11339
11340         * providers/*/camel-*-provider.c: Add URL flags to provider
11341         structures.
11342
11343         * providers/*/camel-*-{store,transport}.c, camel-remote-store.c:
11344         Remove service->url_flags initialization.
11345
11346 2000-11-02  Jeffrey Stedfast  <fejj@helixcode.com>
11347
11348         * providers/imap/camel-imap-store.c (get_folder_info): Quote
11349         foldernames when sending to the IMAP server because the folder
11350         name might contain spaces.
11351
11352 2000-11-02  Not Zed  <NotZed@HelixCode.com>
11353
11354         * Merged in camel-incremental-branch.
11355
11356 2000-11-01  Dan Winship  <danw@helixcode.com>
11357
11358         * providers/imap/camel-imap-store.c (get_folder_info): Remove old
11359         subbed folders from hash table after freeing them.
11360
11361         * providers/imap/camel-imap-folder.c (imap_get_full_name): Deal
11362         correctly with namespace == ""
11363
11364 2000-11-01  Gediminas Paulauskas  <menesis@delfi.lt>
11365
11366         * camel-charset-map.c, camel-charset-map-private.h: synced all charsets
11367         with ones found in libunicode. Just include more "iso/*.h" and rebuild
11368         ...private.h with this.
11369         
11370 2000-10-31  Dan Winship  <danw@helixcode.com>
11371
11372         * camel-service.c (service_disconnect): Add a new argument, clean,
11373         that says whether or not to try to disconnect cleanly.
11374
11375         * camel-remote-store.c (remote_send_string, remote_send_stream,
11376         remote_recv_line): disconnect uncleanly on failure to prevent
11377         infinite loops when providers would normally send commands from
11378         disconnect(). Remove some unneeded CamelException goo.
11379
11380         * providers/smtp/camel-smtp-transport.c (smtp_disconnect): 
11381         * providers/pop3/camel-pop3-store.c (pop3_disconnect): 
11382         * providers/nntp/camel-nntp-store.c (nntp_store_disconnect):
11383         * providers/imap/camel-imap-store.c (imap_disconnect): Don't send
11384         QUIT/LOGOUT if !clean.
11385
11386 2000-10-30  Dan Winship  <danw@helixcode.com>
11387
11388         * providers/imap/camel-imap-auth.c: New file with code for IMAP
11389         authentication mechanisms. (Currently just krb4, and without
11390         integrity/privacy protection).
11391
11392         * providers/imap/Makefile.am: Add camel-imap-auth.[ch] and krb4
11393         CFLAGS/LDFLAGS
11394
11395         * providers/imap/camel-imap-store.c (connect_to_server): Split out
11396         from imap_connect. Just does the basic connect and CAPABILITY
11397         check. Redo the CAPABILITY code more robustly.
11398         (query_auth_types_connected): Do this right rather than punting to
11399         query_auth_types_generic. Check for KERBEROS_V4 if compiled with
11400         krb4 support.
11401         (query_auth_types_generic): Mention KERBEROS_V4 if compiled with
11402         krb4 support.
11403         (imap_connect): Use connect_to_server().
11404
11405         * camel-mime-utils.c (base64_encode_step, base64_encode_close):
11406         Take an additional argument, "break_lines", saying whether or not
11407         to add '\n's to the output.
11408
11409         * camel-multipart.c (set_boundary): 
11410         * camel-mime-filter-basic.c (filter, complete): Update for base64
11411         api change.
11412
11413 2000-10-30  Peter Williams  <peterw@helixcode.com>
11414
11415         * providers/imap/camel-imap-store.c (unsubscribe_folder): Correct
11416         parameters to g_hash_table_lookup_extended.
11417
11418 2000-10-29  Dan Winship  <danw@helixcode.com>
11419
11420         Improved IMAP namespace handling: leave the namespace in the
11421         folder names rather than constantly prepending it and stripping it
11422         off. Also some subscription fixes.
11423
11424         * camel-store.c (camel_folder_info_build): Fix for the case where
11425         @top isn't in @folders.
11426
11427         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Add
11428         a "short_name" argument rather than figuring it out ourselves.
11429         (imap_get_full_name): Implementation of CamelFolder::get_full_name
11430         that strips off namespace so the user doesn't have to see it.
11431         (imap_append_message, imap_copy_message_to, imap_move_message_to):
11432         Use folder->full_name rather than calling
11433         camel_imap_store_get_folder_path.
11434
11435         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
11436         Update this: make @flags a bitmask and @sep a char rather than a
11437         string. Make all of the out arguments optional. Handle literals in
11438         the server response.
11439
11440         * providers/imap/camel-imap-store.c (imap_connect): Do a better
11441         job of getting the correct dir_sep for the namespace we're using.
11442         Construct a base_url here that will be used by get_folder_info.
11443         (camel_imap_store_folder_path): Removed
11444         (imap_folder_exists): Add an argument to return the short name of
11445         the folder (parsed out of the LIST response). Update for
11446         imap_parse_list_response change.
11447         (get_folder): Update for the various other changes.
11448         (get_folder_info): Update for the various other changes. Be more
11449         consistent about the returned layout: put everything underneath
11450         the "namespace" directory, including INBOX, even if it doesn't
11451         belong there. Don't destroy the list of subscribed folders until
11452         we've actually gotten the new list.
11453         (folder_subscribed, subscribe_folder, unsubscribe_folder): Use
11454         folder_name directly rather than camel_imap_store_folder_Path.
11455
11456         * providers/imap/camel-imap-command.c (camel_imap_command): Update
11457         for folder name changes.
11458
11459 2000-10-29  Dan Winship  <danw@helixcode.com>
11460
11461         * camel.h: Remove md5-utils.h include since it's not part of Camel
11462         any more.
11463
11464         * camel-charset-map.c: Kill some warnings.
11465
11466         * providers/nntp/camel-nntp-grouplist.c
11467         (camel_nntp_get_grouplist_from_file, camel_nntp_grouplist_save):
11468         Clean up warnings about time_t casts.
11469
11470         * providers/smtp/camel-smtp-transport.c: Remove unused md5-utils.h
11471         include.
11472
11473         * providers/pop3/camel-pop3-store.c: Undefine the "_" macro
11474         defined by krb4's des.h when compiling with krb support.
11475         Fix md5-utils.h include.
11476
11477 2000-10-27  Dan Winship  <danw@helixcode.com>
11478
11479         * camel-mime-utils.c (header_param_list_format_append): Only quote
11480         Content-type parameters when the quoting is mandatory, and deal
11481         with embedded quotes/backslashes when quoting.
11482
11483 2000-10-27    <jpr@helixcode.com>
11484
11485         * providers/pop3/Makefile.am: Tidy up build
11486
11487         * providers/smtp/Makefile.am: ditto     
11488         
11489         * Makefile.am:  Move md5-utils.[hc] to e-util because the 
11490         addressbook is going to use md5 hashes for pilot syncing.
11491         Maybe the calendar conduits as well because this is a good idea
11492         Chris had.
11493
11494 2000-10-26  Kjartan Maraas  <kmaraas@gnome.org>
11495
11496         * camel-exceptions-list.def: Add newline to kill warnings.
11497         
11498 2000-10-25  Dan Winship  <danw@helixcode.com>
11499
11500         * providers/imap/camel-imap-store.c (get_folder_info): Fix folder
11501         listing code infinite loop.
11502
11503         * camel-store.h: Add a "parent" field to CamelFolderInfo.
11504
11505         * camel-store.c (camel_folder_info_build): Deal with "parent"
11506         (camel_store_folder_subscribed, camel_store_subscribe_folder,
11507         camel_store_unsubscribe_folder): Add g_return_if_fails checking
11508         that the folder supports subscriptions.
11509
11510         * providers/imap/camel-imap-store.c (folder_subscribed,
11511         subscribe_folder, unsubscribe_folder): Remove "+ 1"s since the
11512         mail subscribe UI won't prepend / to the folder names now.
11513         (get_folder_info): Clear the "parent" field of the folderinfos
11514         when removing an empty top level.
11515
11516         * providers/nntp/camel-nntp-store.c (nntp_store_folder_subscribed,
11517         nntp_store_subscribe_folder, nntp_store_unsubscribe_folder):
11518         Remove "+ 1"s since the mail subscribe UI won't prepend / to the
11519         folder names now.
11520
11521 2000-10-24  Chris Toshok  <toshok@helixcode.com>
11522
11523         * providers/imap/camel-imap-store.h: add subscribed_folders.
11524
11525         * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
11526         fill in vtable entries for subscription functions.
11527         (camel_imap_store_finalize): new function, so we can free up our
11528         subscribed_folders hashtable.
11529         (camel_imap_store_init): set CAMEL_STORE_SUBSCRIPTIONS in the
11530         CamelStore flags, and create our subscribed_folders hashtable.
11531         (camel_imap_store_get_type): camel_imap_store_finalize is our
11532         finalize function.
11533         (get_folder_info): if we're looking at subscribed_only, clear out
11534         the subscribed_folders hashtable, use LSUB instead of LIST, and
11535         insert folder paths (prepended by their namespace if there is one)
11536         into subscribed_folders.  INBOX subscription support needs work,
11537         since we always show it, regardless of it's subscribed state.
11538         (folder_subscribed): new function.  just look up the folder_path
11539         in the hashtable.
11540         (subscribe_folder): new function.  use the imap SUBSCRIBE command,
11541         and if successful add it to the hashtable.
11542         (unsubscribe_folder): new function.  use the imap UNSUBSCRIBE
11543         command, and if successful remove it from the hashtable.
11544
11545 2000-10-24  Dan Winship  <danw@helixcode.com>
11546
11547         * providers/imap/camel-imap-store.c (get_folder_info): Fill in the
11548         message_count and unread_message_count flags (if !fast).
11549
11550 2000-10-23  Dan Winship  <danw@helixcode.com>
11551
11552         * camel-object.h: #include gnome-i18n.h (and gnome-defs.h since
11553         the former depends on it.)
11554
11555         * *: Add lots of _() and N_().
11556
11557 2000-10-23  Chris Toshok  <toshok@helixcode.com>
11558
11559         * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
11560         camel-nntp-types.h.
11561
11562 2000-10-23  Dan Winship  <danw@helixcode.com>
11563
11564         * providers/imap/camel-imap-command.c (imap_read_untagged): Fix a
11565         "how could this have been working before" memory overrun bug
11566         found by Vlad.
11567
11568         * camel-op-queue.[ch], camel-thread-proxy.[ch]: These should have
11569         gone away a long time ago.
11570
11571 2000-10-20  Chris Toshok  <toshok@helixcode.com>
11572
11573         * providers/Makefile.am (SUBDIRS): re-enable the nntp provider.
11574
11575 2000-10-20  Chris Toshok  <toshok@helixcode.com>
11576
11577         * providers/nntp/camel-nntp-store.c (build_folder_info): add
11578         function to build a tree from the nntp group names (using '.' as a
11579         heirarchy separator.)  #ifdefed INFO_AS_TREE only.
11580         (build_folder_info_from_grouplist): if INFO_AS_TREE is selected,
11581         call build_folder_info instead of appending a new CamelFolderInfo
11582         to our list.
11583         (ensure_news_dir_exists): use e_mkdir_hier instead of failing if a
11584         parent directory (~/evolution/news generally) isn't there.
11585
11586 2000-10-19  Chris Toshok  <toshok@helixcode.com>
11587
11588         * camel-folder-search.c: #include <sys/types.h> before <regex.h>
11589
11590 2000-10-19  Dan Winship  <danw@helixcode.com>
11591
11592         * providers/imap/camel-imap-utils.c (imap_parse_list_response):
11593         Fix a bug with "INBOX" (or anything else with NIL hierarchy
11594         separator) as the namespace.
11595
11596         * providers/imap/camel-imap-folder.c (imap_refresh_info): Emit
11597         message_changed and folder_changed as appropriate.
11598
11599 2000-10-19  Dan Winship  <danw@helixcode.com>
11600
11601         * camel-folder.c (camel_folder_refresh_info): Update comment here
11602         so refresh_info isn't just for reconnects any more. Make the
11603         default implementation a no-op rather than an error.
11604
11605         * providers/nntp/camel-nntp-folder.c: Move refresh_info impl into
11606         camel_nntp_folder_new, since it would have leaked memory and not
11607         done anything useful if it was called later.
11608
11609         * providers/mbox/camel-mbox-folder.c: Remove no-longer-necessary
11610         refresh_info impl.
11611
11612         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
11613         Update imap_folder->exists, but don't actually load the new
11614         messages. This is a temporary workaround to deal with the IMAP
11615         provider stealing the message list focus at annoying times.
11616         (imap_copy_message_to, imap_move_message_to): Emit a
11617         folder_changed by hand, for now.
11618
11619 2000-10-19  Ettore Perazzoli  <ettore@helixcode.com>
11620
11621         * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
11622         `camel-imap-stream.h'.
11623
11624         * Makefile.am (libcamelinclude_HEADERS): Add `camel-charset-map.h'
11625         and `camel-charset-map-private.h'.
11626
11627 2000-10-18  Jeffrey Stedfast  <fejj@helixcode.com>
11628
11629         * camel-mime-part.c (camel_mime_part_set_description): The correct
11630         fix this time - the description should be encoded here and not in
11631         the camel-medium layer.
11632
11633 2000-10-30  Not Zed  <NotZed@HelixCode.com>
11634
11635         * camel-folder.c (camel_folder_change_info_add_update): Fixed the
11636         changeset logic, which was completely wrong.
11637
11638 2000-10-27  Not Zed  <NotZed@HelixCode.com>
11639
11640         * camel-mime-utils.c (quoted_encode_step): Removed is_blank() stuff.
11641         (header_decode_init): When we set the 'space' bit, dont clear all
11642         the others.
11643         (quoted_encode): Put back the safemask.  Yes we totally need it,
11644         see rfc 2047 section 5, parts (1) and (3).
11645         (CHARS_PSPECIAL): Remove '=' and '_' from the list of allowed
11646         characters (this is an allowed list, not a not-allowed list, like
11647         the ESPECIAL).
11648         (camel_mime_special_table): Updated for fixes to definitions.
11649         (CHARS_ESPECIAL): Added '_' to list of characters that should be
11650         encoded.
11651
11652 2000-10-26  Not Zed  <NotZed@HelixCode.com>
11653
11654         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
11655         Use the new camel_folder_change_info_* stuff to build the update
11656         diff, rather than doing it ourselves.
11657
11658         * camel-folder.c (camel_folder_change_info_add_source): Add a
11659         'source' list, used to create change lists.
11660         (camel_folder_change_info_add_source_list): Add a list of uid's,
11661         convenience function.
11662         (camel_folder_change_info_add_update): Add a uid to the list of
11663         uid's in the new updated list.
11664         (camel_folder_change_info_add_update_list): Add a bunch of uid's
11665         at once for the same purpose.
11666         (camel_folder_change_info_build_diff): Take the source list, the
11667         update list, and find the differences, building on the added or
11668         removed list as appropriate.
11669
11670 2000-10-20  Not Zed  <NotZed@HelixCode.com>
11671
11672         * providers/mbox/camel-mbox-summary.c (removed_uids): REnamed from
11673         add_uid.
11674         (camel_mbox_summary_update): Oops, fix the reversed logic for
11675         determining the uid changesets.
11676
11677         * camel-folder.c (message_changed): Oops, we want to change the
11678         uid, not add it.
11679
11680 2000-10-19  Not Zed  <NotZed@HelixCode.com>
11681
11682         * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Added a
11683         change list argument, and add expunged uid's to it.
11684
11685         * providers/mh/camel-mh-folder.c (mh_init): Setup the change list.
11686         (mh_finalize): And free it.
11687         (mh_sync): Track changes, and send a folder_changed signal as
11688         appropriate.
11689         (mh_expunge): Likewise.
11690         (mh_append_message): Add the new uid to the change list and
11691         trigger a folder_changed event.
11692
11693         * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
11694         Setup a mbox list of changes structure.
11695         (mbox_finalize): And free it.
11696         (mbox_expunge): Include the change list with the folder_changed
11697         event, and clear it off.
11698         (mbox_sync): And the same for when we are just syncing the folder.
11699         (mbox_append_message): And do the same here, after we've updated
11700         the folder.
11701
11702         * providers/mbox/camel-mbox-summary.c
11703         (camel_mbox_summary_build_from): Use gmtime_r to get the time
11704         thread-safely.
11705         (camel_mbox_summary_sync): Added a changeinfo argument.  Add any
11706         removed or changed messages to the changelists as appropriate.
11707         (camel_mbox_summary_update): Added a changeinfo argument.
11708         Genereate a list of added/removed uid's based on the difference
11709         before and after rebuilding the summary.
11710
11711         * camel-folder.c (camel_folder_change_info_new):
11712         (camel_folder_change_info_add_uid): 
11713         (change_info_add_uid): 
11714         (camel_folder_change_info_remove_uid): 
11715         (camel_folder_change_info_change_uid): 
11716         (change_info_clear): 
11717         (camel_folder_change_info_clear): 
11718         (camel_folder_change_info_free):
11719         (change_info_cat): 
11720         (camel_folder_change_info_cat):  Bunch of utility functions for
11721         working with change info lists.
11722         (camel_folder_init): Init the change info list.
11723         (camel_folder_finalize): And free it.
11724         (thaw): Changed to pass through a list of changes, or to get the
11725         changed message uids from the camelfolderchangeinfo struct, and
11726         reset it.
11727         (folder_changed): Add the changed lists to the frozen change list
11728         if we are frozen.
11729         (message_changed): Add the message to the changed list if we are
11730         in the frozen state.
11731
11732         * camel-folder.h (CamelFolderChangeInfo): New structure to hold
11733         information for the folder_changed event.
11734
11735 2000-10-18  Ettore Perazzoli  <ettore@helixcode.com>
11736
11737         * camel-mime-filter-charset.c (complete): Put a zero at the start
11738         of the outbuf.
11739
11740 2000-10-18  Not Zed  <NotZed@HelixCode.com>
11741
11742         * camel-mime-part.c (add_header): No, we must not encode the
11743         headers here.  These interfaces ARE raw interfaces as they are
11744         defined in camel_medium.  Also removed a bogus/meaningless FIXME.
11745         (set_header): Likewise here, we must not.
11746         (process_header): Removed another bogus comment.
11747
11748         * camel-object.c (shared_is_of_type): Comment out the spitting of
11749         a big warning when we're trying to determine types from code.
11750
11751         * providers/mbox/camel-mbox-summary.c
11752         (message_info_new_from_parser): Only call ibex funcitons if we
11753         have an index.
11754
11755         * providers/mh/camel-mh-summary.c (camel_mh_summary_add): Only
11756         call ibex functions if we have an index.
11757         (remove_summary): Likewise.
11758         (camel_mh_summary_check): Likewise.
11759
11760         * providers/nntp/camel-nntp-store.c (nntp_store_get_folder):
11761         get_folder -> flags argument.
11762
11763         * providers/vee/camel-vee-store.c (vee_get_folder): create->flags.
11764
11765         * providers/pop3/camel-pop3-store.c (get_folder): Changed create
11766         -> flags.
11767
11768         * providers/imap/camel-imap-store.c (get_folder): Added flags
11769         argument.
11770
11771         * providers/mh/camel-mh-folder.c (camel_mh_folder_new): Added
11772         flags argument, and fixed code appropriately.
11773
11774         * providers/mh/camel-mh-store.c (get_folder): Added flags argument.
11775
11776         * camel-folder-search.c (message_body_contains): Perform a regex
11777         match on the contents of messages.  This wont quite work yet as
11778         message contents are encoded when written to a stream.
11779         (build_match_regex): Converts a number of strings into a regex
11780         matching pattern, escaping special chars.
11781         (match_message): match a single message from a folder, by uid.
11782         Slow.
11783         (search_body_contains): Changed to support matching where no index
11784         is supplied.  Matches are performed by retrieving message
11785         contents, etc.
11786         () WTF?  camel should not be including any widget headers.
11787         
11788         * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
11789         Added flags argument.
11790         (mbox_refresh_info): Changed into a NOP, the refresh info code
11791         moved into the new function.
11792         (camel_mbox_folder_new): If we have an index requested, build one,
11793         otherwise, remove an old one, or just dont do anything.
11794
11795         * providers/mbox/camel-mbox-store.c (get_folder): Changed create
11796         to flags, changed code to suit.
11797
11798         * camel-store.c (camel_store_get_folder): Changed create to flags.
11799         (get_folder_internal): And here.
11800         (get_folder): And here too.
11801
11802         * camel-store.h (camel_store_get_folder): Change the create
11803         argument to be a flags argument.
11804
11805 2000-10-17  Dan Winship  <danw@helixcode.com>
11806
11807         * providers/imap/camel-imap-folder.c (imap_refresh_info): Remove
11808         cached info at the end of the summary when the folder shrinks
11809         between sessions. Also remove an untrue comment.
11810         (camel_imap_folder_new): Move the summary creation to after the
11811         folder selection again, since it depends on the uidvalidity
11812         having been set.
11813
11814         * providers/imap/camel-imap-store.c (get_folder): Fix up
11815         summary_file to not include the namespace twice.
11816
11817 2000-10-17  Jeffrey Stedfast  <fejj@helixcode.com>
11818
11819         * camel-mime-part.c (set_header): Encode the header value.
11820         (add_header): Same.
11821
11822 2000-10-17  Not Zed  <NotZed@HelixCode.com>
11823
11824         * camel-mime-filter.c: Added some malloc check debugging stuff.
11825
11826         * camel-mime-parser.c
11827         (struct _header_scan_state): Removed top_part, top_start, and
11828         pending.  I can't even remember why they were there, and they're
11829         not used anymore.
11830
11831         * camel-mime-filter-basic.c (filter): Forgot to up the space here
11832         too.
11833
11834 2000-10-14  Not Zed  <NotZed@HelixCode.com>
11835
11836         * camel-mime-filter-basic.c (complete): Ok, so we hit a fixme, 3x
11837         just wasn't enough for some sequences.
11838
11839 2000-10-16  Jeffrey Stedfast  <fejj@helixcode.com>
11840
11841         * providers/imap/camel-imap-command.c
11842         (imap_read_response): Don't imap_next_word(respbuf + 2), instead
11843         use imap_next_word(respbuf) or else we'll skip over the second
11844         token.
11845
11846 2000-10-16  Jeffrey Stedfast  <fejj@helixcode.com>
11847
11848         * providers/imap/camel-imap-command.c
11849         (camel_imap_response_extract): Don't free 'resp' as it doesn't
11850         point to the beginning of the allocated data, instead free
11851         response->untagged->pdata[i]. Also, if '*resp' is equal to a space
11852         character, then set resp = imap_next_word (resp) rather than
11853         expecting resp++ to work (there's a list broken IMAP daemons that
11854         like to put extra spaces between tokens).
11855         (imap_read_response): Don't expect 'respbuf+2' to be where the
11856         untagged number response to start (see above fix for an
11857         explanation).
11858
11859 2000-10-16  Chris Toshok  <toshok@helixcode.com>
11860
11861         * camel-service.c (get_path): when using the construct (flags &
11862         CAMEL_SERVICE_URL_NEED_*) make sure to do ((flags &
11863         CAMEL_SERVICE_URL_NEED_*) == CAMEL_SERVICE_URL_NEED_*)
11864         (check_url): same.
11865
11866 2000-10-16  Jeffrey Stedfast  <fejj@helixcode.com>
11867
11868         * providers/imap/camel-imap-store.c (imap_disconnect): Only send
11869         the LOGOUT command if the store is connected.
11870         (imap_connect): Set the 'connected' state to TRUE when we
11871         successfully connect.
11872         (get_folder_info): if (!topfi), 'topfi' was allocated but then
11873         'fi' was set. I think Dan meant to set topfi since fi is an
11874         uninitialized value at this point.
11875
11876         * providers/imap/camel-imap-command.c (imap_read_response): Check
11877         for the untagged BYE response and set the 'connected' state to
11878         FALSE if we receive the BYE response. Return NULL if we get a BYE
11879         response.
11880
11881 2000-10-16  Dan Winship  <danw@helixcode.com>
11882
11883         * providers/imap/camel-imap-store.c (get_folder_info): Deal with
11884         the possibility of not getting a LIST response back for the top
11885         level.
11886
11887 2000-10-12  Dan Winship  <danw@helixcode.com>
11888
11889         * providers/imap/camel-imap-summary.c: Simple subclass of
11890         CamelFolderSummary that also keeps a UIDVALIDITY value (and
11891         doesn't, for the moment, build content info).
11892
11893         * providers/imap/camel-imap-folder.c:
11894         (various): Use a CamelImapSummary to store/fetch summary info.
11895         (camel_imap_folder_new): Take a path to a file to use for the
11896         summary. Set the folder's permanent_flags correctly according to
11897         the server response. Read in the summary (checking the
11898         UIDVALIDITY) and update it if it's out of date.
11899         (imap_refresh_info): Just fetch UIDs and flags. If the UIDs all
11900         match, update the flags as needed and be done with it. Otherwise,
11901         delete messages that have been expunged from the server and fetch
11902         full summary info for any new messages.
11903         (imap_sync): Save the summary to disk.
11904         (imap_update_summary): Renamed from imap_get_summary_internal. Can
11905         now be told to get summary for only a subset of messages. Use
11906         camel-mime-utils functions rather than rolling our own header
11907         parsing.
11908         (imap_get_message_info_internal): Merged into imap_update_summary.
11909         (imap_set_message_flags): Don't marked the message FOLDER_FLAGGED
11910         if we're not actually changing the value of any of the flags.
11911         (camel_imap_folder_changed): Deal with EXISTS rather than RECENT.
11912         
11913         * providers/imap/camel-imap-store.c (imap_connect): Call
11914         camel_session_get_storage_path and save the value.
11915         (get_folder): Create a local directory to store summary
11916         information and pass a summary file name to camel_imap_folder_new.
11917         Don't call camel_folder_refresh_info from here any more since
11918         camel_imap_folder_new does it again.
11919
11920         * providers/imap/camel-imap-command.c (camel_imap_command): Add a
11921         special case to this to make it possible to get the repsonses from
11922         a SELECT and still have store->current_folder be updated
11923         correctly.
11924         (imap_read_response): parse EXISTS rather than RECENT
11925
11926         * camel-session.c (camel_session_get_storage_path): Use
11927         e_mkdir_hier.
11928
11929         * camel-folder-summary.c (camel_folder_summary_remove_index): New
11930         function.
11931
11932         * camel-mime-utils.c (header_raw_append_parse): fix this.
11933         (camel-mime-parser.c doesn't use this code because of the MEMPOOL
11934         optimization, so nothing was ever actually calling it before.)
11935
11936 2000-10-11  Not Zed  <NotZed@HelixCode.com>
11937
11938         * camel-mime-part.h (struct _CamelMimePart): Removed
11939         temp_message_buffer, and content_input_stream fields which seem to
11940         have come from nowhere, and are unused.
11941
11942         * camel-mime-utils.c: Added a note about touching this file.
11943         Nobody is to touch it without asking me first.  That goes for you
11944         too Jeff.
11945         (header_decode_text): In what way is this broken?
11946
11947 2000-10-10  Not Zed  <NotZed@HelixCode.com>
11948
11949         * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
11950         Fix camel_summary_* function rename
11951         (imap_get_message_info_internal): Likewise.
11952
11953         * camel-mime-parser.c (camel_mime_parser_finalise): Fixed a spelling mistake.
11954
11955         * camel-folder-summary.c (camel_summary_format_address): Uh, why
11956         do we encode and then decode here ... sigh.  This is not the way
11957         to fix this.
11958         (camel_folder_summary_format_address): Renamed to a proper name,
11959         this was only supposed to be a private function.
11960         (camel_folder_summary_format_string): Likewise.  Oh i see why it
11961         was made public, code reuse by cut & paste.  Joy.
11962
11963 2000-10-11  Chris Toshok  <toshok@helixcode.com>
11964
11965         * providers/nntp/camel-nntp-store.c (nntp_store_unsubscribe_folder): remove the leading '/'.
11966         (nntp_store_subscribe_folder): same.
11967         (nntp_store_folder_subscribed): same.
11968
11969 2000-10-11  Jeffrey Stedfast  <fejj@helixcode.com>
11970
11971         * providers/imap/camel-imap-folder.c (imap_move_message_to): Quote
11972         the mailbox name as it may contain spaces.
11973         (imap_copy_message_to): Same.
11974
11975 2000-10-10  Chris Toshok  <toshok@helixcode.com>
11976
11977         * providers/nntp/camel-nntp-store.c
11978         (build_folder_info_from_grouplist): fill in message_count and
11979         unread_message_count properly.
11980
11981         * providers/nntp/camel-nntp-newsrc.h: reformat.
11982
11983         * providers/nntp/camel-nntp-grouplist.c
11984         (camel_nntp_get_grouplist_from_file): remove spew.
11985
11986         * providers/nntp/camel-nntp-newsrc.c
11987         (camel_nntp_newsrc_group_get_num_articles_read): new function.
11988         (camel_nntp_newsrc_group_get_highest_article_read): robustification.
11989
11990 2000-10-10  Joe Shaw  <joe@helixcode.com>
11991
11992         * providers/imap/camel-imap-store.c 
11993         (parse_list_response_as_folder_info): Check before dereferencing the
11994         sep pointer.
11995
11996 2000-10-10  Jacob "Ulysses" Berkman  <jacob@helixcode.com>
11997
11998         * camel-*.c: teach camel about "its" vs. "it's"
11999
12000 2000-10-09  Chris Toshok  <toshok@helixcode.com>
12001
12002         * providers/nntp/camel-nntp-store.c (finalize): write out the
12003         newsrc.
12004         (nntp_store_get_name): if @brief, just return host.
12005
12006         * providers/nntp/camel-nntp-newsrc.c: robustification and bug
12007         fixes.
12008
12009 2000-10-06  Jeffrey Stedfast  <fejj@helixcode.com>
12010
12011         * camel-folder-summary.c (camel_summary_format_address): Decode
12012         the resulting string.
12013
12014 2000-10-06  Chris Toshok  <toshok@helixcode.com>
12015
12016         * providers/nntp/camel-nntp-grouplist.c: new file.
12017
12018         * providers/nntp/camel-nntp-grouplist.h: new file.
12019
12020         * providers/nntp/camel-nntp-types.h: new file.
12021
12022 2000-10-06  Jeffrey Stedfast  <fejj@helixcode.com>
12023
12024         * camel-mime-utils.c (quoted_encode): Fix so that we don't encode
12025         every single char in the word. Also, do we need a safemask? I
12026         don't see why we would.
12027         (header_encode_string): Don't strip off the last char!!
12028
12029 2000-10-06  Chris Toshok  <toshok@helixcode.com>
12030
12031         * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
12032         camel-nntp-grouplist.h
12033         (libcamelnntp_la_SOURCES): add camel-nntp-grouplist.c
12034
12035         * providers/nntp/camel-nntp-provider.c: add our own hash functions
12036         for nntp urls.
12037
12038         * providers/nntp/camel-nntp-newsrc.c
12039         (camel_nntp_newsrc_group_is_subscribed): new function.
12040         (camel_nntp_newsrc_subscribe_group): new function.
12041         (camel_nntp_newsrc_unsubscribe_group): new function.
12042
12043         * providers/nntp/camel-nntp-newsrc.h: add prototypes for
12044         _group_is_subscribed, _subscribe_group, and _unsubscribe_group.
12045
12046         * providers/nntp/camel-nntp-store.c
12047         (build_folder_info_from_grouplist): new function.
12048         (nntp_store_get_folder_info): add subscribed_only_parameter.  if
12049         it's FALSE, load the grouplist and call
12050         build_folder_info_from_grouplist.
12051         (nntp_store_folder_subscribed): implement.
12052         (nntp_store_subscribe_folder): implement.
12053         (nntp_store_unsubscribe_folder): implement.
12054         (camel_nntp_store_init): add CAMEL_STORE_SUBSCRIPTIONS to the
12055         store's flags.
12056
12057         * providers/mh/camel-mh-store.c (get_folder_info): add
12058         subscribed_only parameter.
12059
12060         * providers/mbox/camel-mbox-store.c (get_folder_info): add
12061         subscribed_only parameter.
12062
12063         * providers/imap/camel-imap-store.c (get_folder_info): add
12064         subscribed_only parameter.
12065
12066         * camel-store.c (camel_store_supports_subscriptions): new function.
12067         (camel_store_folder_subscribed): new function.
12068         (camel_store_subscribe_folder): new function.
12069         (camel_store_unsubscribe_folder): new function.
12070
12071         * camel-store.h: add prototypes and virtual functions for the
12072         subscribe implementation.  also, add a subscribed_only argument to
12073         camel_store_get_folder_info.
12074
12075 2000-10-05  Jeffrey Stedfast  <fejj@helixcode.com>
12076
12077         * camel-mime-utils.c (header_address_list_format_append): Encode
12078         the name part of the address and don't quote the name.
12079         (header_decode_text): Rewrote from scratch, the old code was badly
12080         broken.
12081
12082 2000-10-05  Jeffrey Stedfast  <fejj@helixcode.com>
12083
12084         * camel-mime-message.c (camel_mime_message_set_reply_to): Use the
12085         camel_address_encode function again.
12086         (camel_mime_message_set_from): Same.
12087
12088 2000-10-05  Jeffrey Stedfast  <fejj@helixcode.com>
12089
12090         * camel-mime-utils.c (quoted_encode_step): Modified to not encode
12091         space chars in the middle of a line.
12092         (isblank): New macro if we're not on a system with the GNU isblank
12093         extension.
12094
12095         * camel-mime-message.c (camel_mime_message_set_from): Reversed my
12096         changes, don't header_encode_phrase - it generates broken headers.
12097         (camel_mime_message_set_reply_to): Same.
12098
12099 2000-10-04  Chris Toshok  <toshok@helixcode.com>
12100
12101         * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
12102         revert to old method (only use XOVER if OVER is supported.)
12103
12104         * providers/nntp/camel-nntp-store.c
12105         (camel_nntp_store_get_overview_fmt): handle the case where the
12106         OVER extension isn't listed but LIST OVERVIEW.FMT works (again,
12107         INN 2.2).  enable the OVER extension in this case.
12108
12109 2000-10-04  Chris Toshok  <toshok@helixcode.com>
12110
12111         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): return a
12112         gboolean so we can tell if this command worked.  we can't key off
12113         the OVER extension being present because at least one server (INN
12114         2.2) doesn't report the OVER extension but implements the XOVER
12115         command.  This could of course just be because I'm a loser for
12116         thinking they were related in the first place.
12117         (camel_nntp_get_headers): always try XOVER first, and if it fails
12118         revert to the slow method.
12119
12120 2000-10-04  Dan Winship  <danw@helixcode.com>
12121
12122         * providers/mbox/camel-mbox-store.c (get_folder): Fix a case where
12123         a variable was free'd and then possibly used in an error message.
12124
12125 2000-10-04  Chris Toshok  <toshok@helixcode.com>
12126
12127         * providers/nntp/camel-nntp-provider.c
12128         (camel_provider_module_init): news: -> nntp:.
12129
12130 2000-10-04  Chris Toshok  <toshok@helixcode.com>
12131
12132         * providers/nntp/camel-nntp-store.c (nntp_store_get_folder_info):
12133         use "nntp:" instead of "news:" since "news:" urls aren't supposed
12134         to have host/user/port info in them.  also, if there's a user
12135         defined in the url, put it in the urls for our folders.
12136
12137 2000-10-04  Chris Toshok  <toshok@helixcode.com>
12138
12139         * providers/nntp/camel-nntp-auth.c (camel_nntp_auth_authenticate):
12140         borrow some code from the imap provider to query the user for
12141         their password, and pass the user/passwd to nntp.  be extra
12142         paranoid and zero out the password before freeing it.
12143
12144         * providers/nntp/camel-nntp-store.c (camel_nntp_store_init): add
12145         ALLOW_USER/ALLOW_PASSWORD/ALLOW_AUTH to the url flags.
12146         (nntp_store_query_auth_types_generic): return our list of
12147         auth_types.
12148         (nntp_store_query_auth_types_connected): broken, return same as in
12149         query_auth_types_generic.
12150
12151 2000-10-04  Dan Winship  <danw@helixcode.com>
12152
12153         * providers/imap/camel-imap-store.c (imap_connect): IMAP4
12154         (pre-rev1) doesn't support the 'LIST "" ""' idiom, so don't use
12155         it. Just assume the dir_sep is '/'. Shrug.
12156
12157 2000-10-04  Jeffrey Stedfast  <fejj@helixcode.com>
12158
12159         * camel-mime-message.c (camel_mime_message_set_reply_to): Use
12160         header_encode_phrase instead.
12161         (camel_mime_message_set_from): Same.
12162
12163 2000-10-04  Not Zed  <NotZed@HelixCode.com>
12164
12165         * camel-mime-utils.c (header_content_type_is): Handle the case
12166         where ct != NULL, but type and subtype are, and also match that
12167         against text/plain.
12168
12169         * camel-folder-summary.c: Bump summary file version.
12170         (message_info_save): Save the size from the messageinfo.
12171         (message_info_load): Load the size from the summary file.
12172         (message_info_load): Fixed up the time_t saving/loading.  There
12173         was a reason the warning was left there ... obviously nobody could
12174         read the comment "/* warnings, leave them here */", why do i even
12175         bother.
12176         (camel_folder_summary_decode_time_t): Decode a time_t value from
12177         the summary file.
12178         (camel_folder_summary_encode_time_t): Encode a time_t value to the
12179         summary file.
12180
12181 2000-10-03  Jeffrey Stedfast  <fejj@helixcode.com>
12182
12183         * providers/imap/camel-imap-command.c (camel_imap_command): Quote
12184         the mailbox name when sending a SELECT request otherwise mailboxes
12185         with spaces in their names will cause problems.
12186
12187         * camel-mime-message.c (camel_mime_message_set_reply_to): encode
12188         before setting.
12189         (camel_mime_message_set_from): Same.
12190
12191 2000-10-03  Dan Winship  <danw@helixcode.com>
12192
12193         * providers/imap/camel-imap-command.c: New file containing
12194         camel_imap_command and friends. Major camel_imap_command rewrite
12195         to remove duplicated code, make the parsing of literals be
12196         more safe/correct, deal with RECENT/EXPUNGE responses more
12197         consistently, and make it possible to implement the AUTHENTICATE
12198         command.
12199
12200         * providers/imap/camel-imap-utils.c (imap_parse_nstring): New
12201         function, to parse an IMAP "nstring".
12202
12203         * providers/imap/camel-imap-store.c: Move command stuff to
12204         camel-imap-command.c. Update for camel_imap_command changes.
12205
12206         * providers/imap/camel-imap-folder.c: Update for
12207         camel_imap_command changes.
12208         (imap_append_message): CRLF filter the message before sending it.
12209
12210         * providers/imap/Makefile.am: Add camel-imap-command.[ch], remove
12211         camel-imap-stream.[ch] for now.
12212
12213 2000-10-02  Jeffrey Stedfast  <fejj@helixcode.com>
12214
12215         * camel-mime-message.c (camel_mime_message_has_8bit_parts): New
12216         convenience function to determine if there are any 8bit mime parts
12217         in a mime message.
12218         (camel_mime_message_encode_8bit_parts): New convenience function
12219         to recursively reencode all 8bit mime parts to either
12220         quoted-printable or base64 depending on which would be the best
12221         encoding for that part.
12222
12223         * providers/smtp/camel-smtp-transport.c (smtp_data): If the mime
12224         message contains 8bit parts and the server doesn't support 8bit
12225         transfers, reencode those parts before proceding with the send.
12226         (smtp_mail): If the mime message contains 8bit parts and the
12227         server supports the 8BITMIME extension to SMTP, notify the server
12228         that we'll be sending it 8bit mime parts.
12229         (_send_to): Find out if the message contains 8bit parts.
12230
12231 2000-10-02  Jeffrey Stedfast  <fejj@helixcode.com>
12232
12233         * providers/smtp/camel-smtp-transport.c (_send_to): Use the
12234         CamelInternetAddress parser.
12235         (smtp_get_email_addr_from_text): deprecated.
12236
12237 2000-10-02  Dan Winship  <danw@helixcode.com>
12238
12239         * camel-provider.h: Remove default_ports.
12240
12241         * camel-remote-store.c (remote_connect): Get default_port from
12242         CamelRemoteStore rather than CamelProvider.
12243
12244         * providers/{imap,nntp,pop3}/camel-*-store.c: Initialize
12245         CamelRemoteStore::default_port
12246
12247         * providers/*/camel-*-provider.c: Remove default_ports.
12248
12249 2000-10-02  Dan Winship  <danw@helixcode.com>
12250
12251         * camel-folder.[ch]: Remove
12252         camel_folder_{get,free}_subfolder_info, as we want to be able to
12253         scan the whole subfolder tree without having to open any folders,
12254         so this needs to be in CamelStore. Remove can_hold_folders and
12255         can_hold_messages flags; things that don't hold messages are no
12256         longer considered CamelFolders.
12257
12258         * camel-folder-summary.[ch]: Remove CamelFolderInfo stuff.
12259
12260         * camel-store.[ch]: Add camel_store_{get,free}_folder_info, as
12261         well as camel_store_free_folder_info_full and ..._nop for default
12262         implementations, and camel_folder_info_free and
12263         camel_folder_info_build as convenience functions. Turn
12264         CamelFolderInfo into a tree structure and also add an "url"
12265         member.
12266
12267         * providers/*/camel-*-folder.c: Remove subfolder_info and can_hold
12268         stuff.
12269         * providers/*/camel-*-store.c: Add folder_info stuff.
12270
12271         * providers/imap/camel-imap-folder.c (imap_summary_free): Free the
12272         summary elements with camel_message_info_free, not
12273         camel_folder_info_free. Oops.
12274
12275         * providers/imap/camel-imap-utils.c: const poison
12276
12277 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
12278
12279         * providers/smtp/camel-smtp-transport.c: Fixed some memory leaks.
12280         (camel_smtp_transport_init): Initialize supports_8bit to FALSE.
12281         (smtp_helo): If server supports 8bit, set supports_8bit to TRUE.
12282
12283         * camel-transport.h (struct _CamelTransport): Added variable
12284         gboolean supports_8bit (we'll need this eventually? - see bugzilla
12285         bug #53)
12286
12287         * providers/smtp/camel-smtp-transport.c
12288         (smtp_get_email_addr_from_text): Ugh, no wonder people were
12289         getting illegal seek warnings *sigh*. I guess I can only blame
12290         myself for this one though :-(
12291
12292 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
12293
12294         * providers/smtp/camel-smtp-transport.c (_send_to): Don't send the
12295         recipient data through smtp_get_email_addr_from_text - this is a
12296         complete waste. In fact, we don't want to have to use that
12297         function ever.
12298
12299         * camel-internet-address.c, camel-address.c: Added some gtk-doc
12300         comments.
12301         
12302 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
12303         
12304         * camel-mime-utils.c (header_encode_string): Make sure to add the
12305         space char after an encoded word when the encoding is iso-8859-1.
12306
12307 2000-09-28  Jeffrey Stedfast  <fejj@helixcode.com>
12308
12309         * providers/imap/camel-imap-folder.c (imap_get_message): When
12310         getting a literal string response, don't include the \r\n after
12311         the closing } (as in: "... {798}\r\n...")
12312         
12313         * providers/imap/camel-imap-stream.c (stream_read): Same.
12314
12315 2000-09-28  Not Zed  <NotZed@HelixCode.com>
12316
12317         * camel-mime-utils.c (header_fold): New function to fold headers.
12318
12319 2000-09-27  Not Zed  <NotZed@HelixCode.com>
12320
12321         * camel-mime-parser.c (folder_scan_header): If we had an empty
12322         header, then it must be end of the headers too.
12323         (folder_scan_init): No we dont need to init the outbuf with a nul
12324         terminator.
12325
12326         * camel-folder-summary.c (camel_folder_summary_set_uid): New
12327         function to reset the uid to a higher value.
12328
12329         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
12330         "something failed (yo!)" what sort of crap is this?  Fixed all the
12331         indenting again, what wanker keeps running stuff through indent?
12332         (message_info_new): Check the uid we loaded off the disk, if it
12333         existed already, assign a new one.  If it didn't then make sure
12334         the nextuid is higher.
12335
12336         * camel-charset-map.c: New file, used to build a large unicode
12337         decoding mapping table, and use it to determine what is the
12338         lowest charset a given word can be encoded with.  Uses tables from
12339         libunicode's source.
12340
12341         * camel-internet-address.c (internet_encode): Use
12342         header_phrase_encode to properly encode the fullname, as required.
12343         refixed indenting.  Who keeps doing that?
12344         (camel_internet_address_find_address): Changed fatal return/warnings
12345         into assertions.
12346
12347         * camel-mime-utils.c (header_raw_append_parse): Check : explicitly
12348         (removed from is_fieldname() macro).
12349         (camel_mime_special_table): Changed to short, so we can represent
12350         more bit types.
12351         (quoted_encode): Take a mask of the safe chars for this encoding.
12352         (header_address_decode): Removed a #warning that makes no sense
12353         anymore.
12354         (header_decode_date): Fixed the 'broken date' parser code, if it
12355         ever decoded it it just threw away the result.
12356         (header_encode_string): Use better charset matching for encoding
12357         strings as well.
12358
12359 2000-08-31  Not Zed  <NotZed@HelixCode.com>
12360
12361         * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Save
12362         the index if we do a sync.
12363         (camel_mh_summary_check): Save the index here too.  Probably.
12364
12365 2000-09-27  Dan Winship  <danw@helixcode.com>
12366
12367         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12368         Return untagged data in a GPtrArray rather than a string, since it
12369         saves processing time and is much easier to deal with for several
12370         commands. Update for camel_imap_folder_changed change.
12371         (camel_imap_fetch_command): Update for camel_imap_folder_changed
12372         change.
12373         (imap_connect, imap_folder_exists): Update for
12374         camel_imap_command_extended change.
12375
12376         * providers/imap/camel-imap-folder.c
12377         (imap_get_message_count_internal,
12378         imap_get_subfolder_info_internal, imap_search_by_expression):
12379         Update for camel_imap_command_extended change.
12380
12381         (imap_get_summary_internal, imap_get_message_info_internal): Use
12382         camel_imap_fetch_command here now to get around the
12383         camel_imap_command_extended change.
12384
12385         (camel_imap_folder_changed): turn expunged into a GArray of ints
12386         rather than a GPtrArray of strings representing ints.
12387
12388 2000-09-26  Jeffrey Stedfast  <fejj@helixcode.com>
12389
12390         * providers/imap/camel-imap-folder.c
12391         (imap_get_message_count_internal): Quote the folder name as it may
12392         contain spaces.
12393         (imap_get_subfolder_info_internal): Same.
12394
12395         * providers/imap/camel-imap-utils.c (imap_parse_list_response): Do
12396         proper unquoting for folder names.
12397         (func_get_current_date): Implemented.
12398
12399         * providers/imap/camel-imap-store.c
12400         (imap_folder_exists): Quote the folder name as it may have spaces.
12401         (imap_create): Same.
12402         (check_current_folder): Same.
12403
12404 2000-09-22  Dan Winship  <danw@helixcode.com>
12405
12406         * providers/imap/camel-imap-folder.c
12407         (imap_get_subfolder_info_internal): The root folder's name is "",
12408         not the namespace.
12409         (camel_imap_folder_new): constify folder_name.
12410
12411         * providers/imap/camel-imap-store.c (get_folder): Create the
12412         folder with folder_name, not folder_path.
12413         (camel_imap_command_preliminary): Don't free cmdid here.
12414
12415 2000-09-21  Dan Winship  <danw@helixcode.com>
12416
12417         * providers/imap/camel-imap-utils.c (imap_create_flag_list): New
12418         function to convert Camel flags to an IMAP flag_list.
12419         (imap_parse_flag_list): Contrariwise.
12420
12421         * providers/imap/camel-imap-store.c (camel_imap_command_*): Make
12422         the @ret arg actually optional, as (mostly) documented.
12423         (various): Don't pass "&result" to camel_imap_command_* if we're
12424         just going to immediately free it. Don't record status if we're
12425         not going to look at it.
12426
12427         * providers/imap/camel-imap-folder.c: Likewise.
12428         (imap_summary_free): Use camel_folder_info_free.
12429         (imap_sync): Use imap_create_flag_list. Clear
12430         CAMEL_MESSAGE_FOLDER_FLAGGED after syncing so we don't keep
12431         re-syncing.
12432         (imap_append_message): Use imap_create_flag_list. Don't leak the
12433         memstream if the append fails.
12434         (imap_move_message_to): Use camel_folder_delete_message rather
12435         than doing it by hand.
12436         (imap_get_summary_internal, imap_get_message_info_internal): Use
12437         imap_parse_flag_list and header_raw_clear.
12438         (camel_imap_folder_changed): Use camel_message_info_free.
12439
12440 2000-09-21  Dan Winship  <danw@helixcode.com>
12441
12442         * providers/imap/camel-imap-store.c (get_folder_name): INBOX is
12443         case-insensitive.
12444         (get_root_folder_name): Make the root folder "" rather than "/".
12445         (get_folder): Update for root folder name change.
12446         (camel_imap_store_get_toplevel_dir): Removed. (Unused, unneeded.)
12447         (camel_imap_store_folder_path): New function to turn a Camel
12448         folder name into the corresponding namespaced IMAP path.
12449         (imap_folder_exists): Make this take a store and a path rather
12450         than a folder.
12451         (imap_create): Likewise
12452         (get_folder): Update for camel_imap_store_folder_path and other
12453         changes.
12454         (check_current_folder): Likewise.
12455
12456         * providers/imap/camel-imap-folder.c: Change a bunch of CamelStore
12457         variables to CamelImapStore (and add a few more) to prevent excess
12458         gratuitous casting. Use camel_imap_store_folder_path where
12459         appropriate.
12460         (camel_imap_folder_new): Update for root folder name change.
12461
12462 2000-09-19  Jeffrey Stedfast  <fejj@helixcode.com>
12463
12464         * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
12465         linewrap filter to achieve full RFC0821 compliance.
12466
12467         * camel-mime-filter-linewrap.[c,h]: New mime-filter to word-wrap.
12468
12469 2000-09-19  Jeffrey Stedfast  <fejj@helixcode.com>
12470
12471         * camel-internet-address.c (internet_encode): When encoding the
12472         internet address, quote the name as the name may have commas or
12473         any other token which may later confuse our address parser.
12474
12475 2000-09-19  Dan Winship  <danw@helixcode.com>
12476
12477         * providers/imap/camel-imap-folder.c
12478         (imap_get_subfolder_info_internal): Fix the case where INBOX
12479         isn't returned in the folder listing.
12480
12481 2000-09-19  Dan Winship  <danw@helixcode.com>
12482
12483         * camel-folder.c: (init): Removed
12484         (camel_folder_init, camel_folder_construct): New object init
12485         function and public object constructor to replace the old init
12486         method in a more Gtk-like fashion.
12487
12488         (get_parent_folder, camel_folder_get_parent_folder): Removed. No
12489         CamelFolder subclass was ever setting the parent_folder member, no
12490         code has ever needed to look at it, and fixing it would actually
12491         be pretty hard.
12492
12493         (get_subfolder_info, camel_folder_get_subfolder_info): Renamed
12494         from ..._names. Deals in CamelFolderInfo now.
12495         (free_subfolder_info, camel_folder_free_subfolder_info): Likewise.
12496
12497         (get_subfolder, camel_folder_get_subfolder): Removed.
12498         CamelFolderInfo contains the subfolder's full name, so this is
12499         unnecessary now, and removing it lets us get rid of the
12500         CamelFolder separator member, which is needed for the default
12501         implementation of this function, but not otherwise needed for most
12502         providers.
12503
12504         Also, lots of code style fixes.
12505
12506         * providers/*: Update CamelFolder subclasses for changes, although
12507         none of them fill in the message counts in the CamelFolderInfo
12508         yet.
12509
12510 2000-09-18  Christopher James Lahey  <clahey@helixcode.com>
12511
12512         * camel-folder-search.c, camel-folder-search.h,
12513         camel-remote-store.c, providers/imap/camel-imap-folder.c,
12514         providers/imap/camel-imap-store.c: Fixed the #include lines to
12515         deal properly with gal.
12516
12517 2000-09-17  Dan Winship  <danw@helixcode.com>
12518
12519         * camel-folder-summary.h: update CamelFolderInfo
12520         * camel-folder-summary.c (camel_folder_info_free): New function to
12521         free the contents of a CamelFolderInfo
12522
12523 2000-09-15  Dan Winship  <danw@helixcode.com>
12524
12525         * camel.c (camel_init): Set camel_verbose_debug to TRUE if
12526         CAMEL_VERBOSE_DEBUG is set in the environment.
12527
12528         * camel-remote-store.c (remote_send_line, remote_recv_line): only
12529         log if camel_verbose_debug is TRUE.
12530
12531 2000-09-14  Jeffrey Stedfast  <fejj@helixcode.com>
12532
12533         * providers/imap/camel-imap-store.c (get_folder): Don't use
12534         dir_sep as top-level directory, use "/".
12535
12536         * providers/imap/camel-imap-folder.c (imap_expunge): Get rid of
12537         unused variable.
12538
12539 2000-09-13  Dan Winship  <danw@helixcode.com>
12540
12541         * providers/imap/camel-imap-folder.c (imap_expunge): Don't look at
12542         the response of the command. camel_imap_command_extended()
12543         processes EXPUNGE responses itself, so if we do it here too we
12544         remove twice as many summary items as we should.
12545
12546 2000-09-13  Jeffrey Stedfast  <fejj@helixcode.com>
12547
12548         * providers/imap/camel-imap-store.c (imap_folder_exists): Rewrote
12549         to take a third argument (gboolean *selectable) so that we can
12550         find out if the folder is selectable or not as we look to see if
12551         it exists. Also, don't use EXAMINE because that will not work on
12552         non-selectable folders, so use LIST instead.
12553         (get_folder): Check to see if the folder exists even vefore
12554         calling imap_create as this will save time. If the folder does
12555         exist, find out if it's selectable. Moved the call to refresh_info
12556         here.
12557
12558         * providers/imap/camel-imap-folder.c (imap_get_uids): Check for a
12559         NULL summary.
12560         (camel_imap_folder_new): Don't call refresh_info here - call it in
12561         get_folder() because we don't know if this folder even exists on
12562         the server yet! And even if it does, we don't know if it can hold
12563         messages or not yet.
12564
12565 2000-09-12  Jeffrey Stedfast  <fejj@helixcode.com>
12566
12567         * camel-mime-parser.c (folder_scan_step): Make sure *datalength is
12568         > 0 before calling camel_mime_filter_filter otherwise we will get
12569         a segfault if the filter calls iconv().
12570
12571 2000-09-08  Christopher James Lahey  <clahey@helixcode.com>
12572
12573         * providers/nntp/camel-nntp-auth.c,
12574         providers/nntp/camel-nntp-auth.h: Fixed a warning.
12575
12576 2000-09-07  Dan Winship  <danw@helixcode.com>
12577
12578         * camel-session.c (camel_session_get_storage_path): Make this not
12579         leak.
12580         
12581 2000-09-07  Dan Winship  <danw@helixcode.com>
12582
12583         * camel-session.c (camel_session_new): Make this take a path to a
12584         directory that Camel can use for its own nefarious purposes.
12585         (camel_session_get_storage_path): New function to return a path
12586         that a service can use for its own nefarious sub-purposes.
12587
12588         * camel-service.c (camel_service_get_path): New method (and
12589         useful default implementation) to get a (relative) pathname
12590         corresponding to the service.
12591
12592 2000-09-06  Dan Winship  <danw@helixcode.com>
12593
12594         * providers/pop3/camel-pop3-store.c (connect_to_server): Make KPOP
12595         work again.
12596
12597 2000-09-06  Jeffrey Stedfast  <fejj@helixcode.com>
12598
12599         * camel-mime-message.c (camel_mime_message_get_received_date):
12600         Implemented (someone added these to camel-mime-message.h but never
12601         implemented them!!) - though it may not be right.
12602         (camel_mime_message_get_sent_date): Same.
12603
12604 2000-09-05  Dan Winship  <danw@helixcode.com>
12605
12606         * camel-mime-part.c (camel_mime_part_get_filename): If a MIME part
12607         has no Content-Disposition, but does have a "name" on the
12608         Content-Type, return that as the filename.
12609         (process_header): strstrip the Content-Description
12610
12611 2000-09-05  Chris Toshok  <toshok@helixcode.com>
12612
12613         * providers/nntp/camel-nntp-utils.c (get_OVER_headers): care about
12614         response code.
12615         (get_HEAD_headers): same.
12616         (camel_nntp_get_headers): same.
12617
12618         * providers/nntp/camel-nntp-store.h: get rid of
12619         CAMEL_NNTP_OK/ERR/FAIL.
12620
12621         * providers/nntp/camel-nntp-store.c
12622         (camel_nntp_store_get_extensions): take CamelException arg and
12623         pass along to camel_nntp_command.
12624         (camel_nntp_store_get_overview_fmt): same.
12625         (nntp_store_connect): convert to using constants in
12626         camel-nntp-resp-codes.h
12627         (nntp_store_get_folder): make use of camel_nntp_folder_new.
12628         (camel_nntp_command_send_recv): new function to deal with auth
12629         challenge.
12630         (camel_nntp_command): split out most of this function into
12631         camel_nntp_command_send_recv.  also, return the actual response
12632         code instead of CAMEL_NNTP_OK/ERR/FAIL.
12633
12634         * providers/nntp/camel-nntp-resp-codes.h: new file.
12635
12636         * providers/nntp/camel-nntp-folder.h: prototype for
12637         camel_nntp_folder_new.
12638
12639         * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): new
12640         convenience function.
12641         (nntp_folder_get_message): care more about the actual response
12642         code.
12643
12644         * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
12645         camel-nntp-auth.c.
12646         (libcamelnntpinclude_HEADERS): add camel-nntp-auth.h.
12647
12648         * providers/nntp/camel-nntp-auth.h: new file.
12649
12650         * providers/nntp/camel-nntp-auth.c: new file.
12651
12652 2000-09-05  Peter Williams  <peterw@helixcode.com>
12653
12654         * providers/imap/camel-imap-store.c (imap_folder_exists): Don't free the
12655         result on error; the exception will have the relevant info.
12656
12657         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Check for
12658         exceptions here.
12659
12660         * providers/imap/camel-imap-store.c (imap_connect): Check the exception
12661         on the refresh_folders call.
12662
12663         * providers/imap/camel-imap-store.h: Clean up some now-unused fields.
12664
12665         * camel.c (camel_init): Call unicode_init again, now that libunicode
12666         will not initialize itself twice.
12667
12668 2000-09-02  Lauris Kaplinski  <lauris@helixcode.com>
12669
12670         * camel-folder-search (search_header_contains): Use e_utf8_strstrcase
12671
12672 2000-09-01  Christopher James Lahey  <clahey@helixcode.com>
12673
12674         * providers/imap/camel-imap-utils.c: Removed some unused
12675         functions.
12676
12677 2000-09-01  Peter Williams  <peterw@helixcode.com>
12678
12679         * providers/nntp/camel-nntp-store.c (camel_nntp_command): Initialize
12680         the statically-allocated CamelException so that it doesn't contain
12681         junk data that camel_exception_set() may try to free.
12682         (camel_nntp_store_get_extensions): Same.
12683         (camel_nntp_store_get_overview_fmt): Same.
12684
12685         * providers/pop3/camel-pop3-store.c (camel_pop3_command): Typo
12686         fix (if (*ret) -> if (ret)).
12687
12688         * providers/pop3/camel-pop3-store.c (pop3_connect): Set the
12689         port # back to what was specified ASAP, so that the hash of
12690         the URL doesn't change (which causes a failure in
12691         service_cache_remove that leads to a segfault).
12692
12693         * providers/imap/camel-imap-store.c (imap_connect): Clear the 
12694         exception after a failed LOGIN so that it doesn't pass through
12695         to the upper level and make mail think that the login failed.
12696
12697         * providers/pop3/camel-pop3-store.c (pop3_connect): As above.
12698
12699 2000-08-31  Peter Williams  <peterw@helixcode.com>
12700
12701         * providers/pop3/camel-pop3-store.c (camel_pop3_store_get_type):
12702         Implement POP3 with the CamelRemoteStore now.
12703         (connect_to_server): Hack this a bit to get KPOP to work. Obey
12704         the new connection semantics of the remote store (implicitly).
12705         (query_auth_types_connected): Clear exceptions after attempts
12706         to connect; the code at the bottom will catch hard errors.
12707         Use camel_service_connect.
12708         (camel_pop3_command): Take a CamelException; now, when an error
12709         occurs, ret is set to NULL and the exception passes back the
12710         appropriate information.
12711         (pop3_get_response): Same as above.
12712         (pop3_try_authenticate): Give camel_pop3_command its exception
12713         and handle it properly.
12714         (pop3_connect): Call the parent classfuncs. Don't disconnect
12715         on error (done for us).
12716
12717         * providers/pop3/camel-pop3-folder.c: Obey the camel_pop3_command
12718         semantics.
12719
12720         * camel-remote-store.c (remote_query_auth_types_connected): Don't
12721         warn; just return NULL.
12722         (remote_query_auth_types_generic): Same.
12723         (remote_send_string): Filter out passwords in debugging output.
12724
12725         * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Also
12726         set the ALLOW_AUTH flag.
12727
12728         * providers/imap/camel-imap-store.c (camel_imap_store_init): Same.
12729
12730 2000-08-31  Chris Toshok  <toshok@helixcode.com>
12731
12732         * providers/nntp/camel-nntp-store.c (camel_nntp_store_class_init):
12733         remove get_folder_name.
12734         (nntp_store_get_folder_name): remove.
12735
12736 2000-08-31  Lauris Kaplinski  <lauris@helixcode.com>
12737
12738         * camel-mime-part.c (write_to-stream): Use filter only if we have one
12739         
12740 2000-08-31  Chris Toshok  <toshok@helixcode.com>
12741
12742         * providers/nntp/camel-nntp-utils.c (get_OVER_headers): use
12743         camel_remote_store_recv_line.
12744
12745         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message):
12746         use camel_remote_store_recv_line to build message.  also, free our
12747         buffer so we don't leak like mad.
12748
12749         * providers/nntp/camel-nntp-store.c:
12750         (camel_nntp_store_get_additional_data) remove.
12751         (camel_nntp_store_get_extensions): use
12752         camel_remote_store_recv_line.
12753         (camel_nntp_store_get_overview_fmt): same.  also, don't rely on
12754         _get_additional_data anymore since it's easier to parse without.
12755         (camel_nntp_command): use camel_remote_store_send_string and
12756         camel_remote_store_recv_line.
12757
12758         * providers/nntp/camel-nntp-store.h: CamelRemoteStore is the
12759         parent class now.  remove istream/ostream since CamelRemoteStore
12760         takes care of that for us.  also remove the prototype for
12761         camel_nntp_store_get_additional_data.
12762
12763         * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_write):
12764         make sure to clear dirty bit.
12765         (camel_nntp_newsrc_read_for_server): don't worry about continually
12766         trying to open the file - if it fails we just return an
12767         unpopulated .newsrc file.
12768
12769 2000-08-31  Chris Toshok  <toshok@helixcode.com>
12770
12771         * providers/nntp/camel-nntp-newsrc.c
12772         (camel_nntp_newsrc_read_for_server): make this a bit more robust.
12773         try to create an empty .newsrc file for the server if we can't
12774         open it for reading.  also, don't allocate everything until we've
12775         opened the file.
12776
12777         * providers/nntp/camel-nntp-utils.c (get_OVER_headers): make use
12778         of our overview field indices.
12779         (camel_nntp_get_headers): only call get_OVER_headers if the
12780         extension is present.  warn if it's not - since get_HEAD_headers
12781         needs work before it works.
12782
12783         * providers/nntp/camel-nntp-store.c
12784         (camel_nntp_store_get_extensions): new function - query the server
12785         for it's extensions.
12786         (camel_nntp_store_get_overview_fmt): new function - query the
12787         server for the overview format and build our table of the indices
12788         we care about.  support the "full" suffix on fields.
12789         (nntp_store_connect): call camel_nntp_store_get_extensions and
12790         camel_nntp_store_get_overview_fmt.
12791
12792         * providers/nntp/camel-nntp-store.h: add codes for extensions
12793         found on news.mozilla.org.  only one that we care about is OVER.
12794         also, add CamelNNTPOverField and an enum of the overview fields
12795         that we care about.
12796
12797 2000-08-31  Jeffrey Stedfast  <fejj@helixcode.com>
12798
12799         * providers/imap/camel-imap-utils.c (imap_translate_sexp):
12800         Reimplemented. It should now work correctly for most possible
12801         VFolder rules.
12802
12803 2000-08-31  Jeffrey Stedfast  <fejj@helixcode.com>
12804
12805         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12806         Don't save any exceptions caused by camel_imap_folder_changed
12807         (camel_imap_fetch_command): Same.
12808         
12809         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
12810         Using a new way of calculating the first recent message that seems
12811         more accurate. Also added code to make sure we don't accidently
12812         add a duplicate summary.
12813
12814 2000-08-31  Not Zed  <NotZed@HelixCode.com>
12815
12816         * camel-mime-part.c (write_to_stream): Use the proper type
12817         checking function to check for text types.
12818         (write_to_stream): If we have a charset on a text type that
12819         isn't us-ascii or utf-8, then we need to reencode it, so add a
12820         filter to do that too.
12821         (write_to_stream): Fix some warnings/use the right constructor,
12822         oops.
12823         (write_to_stream): Rearrange the logic so it always does charset
12824         conversion, and not just if we have a qp/base64 block.
12825
12826         * camel-mime-utils.c (append_latin1): New function - even though
12827         its broken, we'll assume mailers send latin1 headers instead of
12828         us-ascii.  We just have to encode high chars into utf-8.
12829         (header_decode_text): Call append_latin1 for appending unencoded
12830         text segments.
12831         (append_latin1): Do an additional mask for account for c's
12832         undefined behaviour for sign extension whilst shifting right.
12833
12834 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
12835
12836         * providers/imap/camel-imap-store.c (camel_imap_fetch_command):
12837         Rewrote to ignore strings that look like server responses until it
12838         is sure that it has finished reading the literal string response.
12839
12840 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
12841         
12842         * camel-remote-store.c (remote_send_string): Don't wrap printed
12843         strings in quotes, makes things messy
12844         
12845         * providers/imap/camel-imap-folder.c (imap_get_message): Updated
12846         to use the camel_imap_fetch_command
12847         
12848         * providers/imap/camel-imap-stream.c (stream_read): Updated to use
12849         camel_imap_fetch_command
12850
12851         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12852         No longer handles FETCH requests so no longer needs to be
12853         concerned with checking to make sure that server responses are
12854         valid (they have to be).
12855         (camel_imap_fetch_command): New convenience function that handles
12856         all FETCH requests
12857
12858 2000-08-30  Peter Williams  <peterw@helixcode.com>
12859
12860         * camel-remote-store.c (remote_connect): Unify with remote_post_connect.
12861         (remote_disconnect): Unify with remote_pre_disconnect.
12862         (camel_remote_store_class_init): Don't use the post_connect and
12863         pre_disconnect classfuncs anymore ; they weren't especially useful.
12864
12865         * providers/imap/camel-imap-store.c (imap_connect): Use this again
12866         instead of implementing post_connect.
12867         (imap_disconnect): Analogous to above.
12868
12869         * camel-session.c (camel_session_get_service_connected): New function.
12870         Like camel_session_get_service() but also connects to the service
12871         if needed. camel_session_get_{store,transport} (defined in the header)
12872         used this now, preventing annoying when-to-connect problems.
12873
12874         * camel-service.c (camel_service_new): Revert to the old behavior
12875         of not connecting until told to do so. Otherwise doing auth
12876         testing correctly is really hard.
12877         (camel_service_connect): Fix behavior here (set the connected
12878         flag).
12879         (camel_service_disconnect): Unset the connected flag.
12880
12881 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
12882
12883         * providers/imap/camel-imap-store.c: General cleanup / moving
12884         stuff around to make things easier to follow.
12885
12886 2000-08-30  Jeffrey Stedfast  <fejj@helixcode.com>
12887         
12888         * camel-remote-store.c: Prevent exceptions from being overwritten
12889
12890         * providers/imap/camel-imap-folder.c (imap_expunge): Beautified
12891         (imap_get_subfolder_names_internal): Removed old code as the
12892         replacement code has now been tested and proven to work
12893
12894 2000-08-29  Jeffrey Stedfast  <fejj@helixcode.com>
12895
12896         * providers/imap/camel-imap-utils.c: Removed old code that will
12897         never be needed again
12898
12899         * providers/imap/camel-imap-store.c: Removed old code for
12900         try_connect - will never need this code
12901         (slurp_response): Update to make sure we aren't falsely detecting
12902         EXPUNGE flags
12903
12904 2000-08-29  Peter Williams  <peterw@helixcode.com>
12905
12906         * camel-service.c (camel_service_connect): Uncomment this.
12907         (camel_service_disconnect): Same.
12908
12909         * camel-remote-store.[ch]: New files. Abstract remote storages
12910         (IMAP, POP3, NNTP) and hides the lower-level networky stuff.
12911         
12912         * camel-service.c (camel_service_new): Take an extra argument, the
12913         provider that created us, cause it's useful.
12914         (camel_service_finalize): Unref our new provider member.
12915
12916         * camel-session.c (camel_session_get_service): Pass the proper number of
12917         arguments to camel_service_new().
12918
12919         * camel-imap-store.c: Massive update: 1) use the CamelRemoteService to
12920         make our life Very Easy (TM). 2) Change the semantics of all 
12921         camel_imap_command* functions to take exceptions, centralize tons of
12922         duplicate code, and use the handy RemoteStore utility functions
12923
12924         * camel-imap-folder.c: Use the new semantics of camel_imap_command*
12925
12926         * camel-imap-stream.c: Same.
12927         
12928 2000-08-29  Jeffrey Stedfast  <fejj@helixcode.com>
12929
12930         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
12931         Updated to check for EXPUNGE notifications
12932
12933         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
12934         Updated to account for messages which have been expunged (now
12935         takes a new arg, a GPtrArray of message id's that have been
12936         expunged)
12937         (imap_expunge): Updated (we may want to just use the code in
12938         folder_changed now instead of doing our own summary
12939         expunging...but that can be fixed later)
12940         (imap_append_message): Updated.
12941         (imap_copy_message_to): Updated.
12942         (imap_move_message_to): Updated.
12943
12944 2000-08-28  Peter Williams  <peterw@helixcode.com>
12945
12946         * camel-folder.c (camel_folder_refresh_info): New member function,
12947         refresh_info, used for rereading folder state after its state has
12948         somehow become unknown. Tries to preserve last-known status of
12949         messages.
12950
12951         * providers/mbox/camel-mbox-folder.c (mbox_refresh_info): Implement
12952         ::refresh_info (split up ::init)
12953
12954         * providers/mbox/camel-mbox-store.c (get_folder): Call ::refresh_info.
12955
12956         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Call
12957         ::refresh_info once initialized.
12958         (imap_refresh_info): New member function; reads the summary from
12959         the server (used to be in camel_imap_folder_new; split out).
12960
12961         * providers/imap/camel-imap-store.c (imap_connect): Set
12962         CamelService::connected a little early so that 
12963         camel_imap_command won't try to connect while already
12964         connnecting.
12965         (camel_imap_command*): Try to connect if not connected already.
12966         
12967         * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Same as above.
12968
12969         * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Same
12970         as above.
12971
12972         * providers/pop3/camel-pop3-store.c (pop3_connect): Set 
12973         CamelService::connected a little early so that
12974         camel_pop3_command won't try to connect while already
12975         connecting
12976         (connect_to_server): Same.
12977
12978         * providers/nntp/camel-nntp-folder.c (nntp_folder_refresh_info): Same
12979         as above.
12980
12981 2000-08-28  Jeffrey Stedfast  <fejj@helixcode.com>
12982
12983         * providers/imap/camel-imap-folder.c (imap_get_message): Fixed the
12984         hack around quoted string responses - should now handle them
12985         according to the specifications in the RFC
12986         
12987         * providers/imap/camel-imap-stream.c (stream_read): Updated to
12988         match the code currently used in camel-imap-folder.c
12989
12990 2000-08-28  Ettore Perazzoli  <ettore@helixcode.com>
12991
12992         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
12993         Never ever free `tmpname' as it comes from `alloca()'!
12994
12995 2000-08-26  Ettore Perazzoli  <ettore@helixcode.com>
12996
12997         * camel-mime-utils.c (header_decode_text): Use `g_free()', not
12998         `free()', to free `decword'.
12999
13000 2000-08-25  Peter Williams  <peterw@helixcode.com>
13001
13002         * camel.c (camel_init): Don't call unicode_init; code in e-util
13003         will do it, and if unicode_init is called twice, you get an
13004         infinite loop when looking up nonexistant encodings (patch
13005         has been submitted to libunicode's maintainer).
13006         
13007         * camel-provider.h: Add a new field, default_ports, which
13008         helps the configuration code guess about how to make CamelURL's
13009         from providers.
13010         
13011         * providers/*/camel-*-provider.c: Specify default ports.
13012
13013 2000-08-25  Jeffrey Stedfast  <fejj@helixcode.com>
13014
13015         * providers/imap/camel-imap-folder.c
13016         (imap_get_subfolder_names_internal): If the url path is "/" and
13017         the folder path is "/", just LIST "" "*" (this should fix some
13018         cyrus imapd problems). Also, INBOX is case insensitive so use
13019         g_strcasecmp
13020
13021 2000-08-24  Lauris Kaplinski  <lauris@helixcode.com>
13022
13023         * camel-folder-summary.c (summary_build_content_info):
13024         Use UTF-8 as default
13025         * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
13026         Use UTF-8 as default
13027         * camel-mime-utils.c (rfc2047_decode_word): Use UTF-8
13028         
13029 2000-08-17  Not Zed  <NotZed@HelixCode.com>
13030
13031         * providers/mh/camel-mh-folder.c (mh_finalize): And here too.
13032
13033         * providers/mbox/camel-mbox-folder.c (mbox_finalize): Close index
13034         on exit.
13035
13036 2000-08-23  Dan Winship  <danw@helixcode.com>
13037
13038         * camel-mime-utils.c (header_address_list_format_append): put
13039         commas between addresses.
13040
13041 2000-08-22  Dan Winship  <danw@helixcode.com>
13042
13043         * providers/imap/camel-imap-folder.c
13044         (imap_protocol_get_summary_specifier): use BODY.PEEK, not BODY, so
13045         we don't set the message \Seen.
13046
13047 2000-08-22  Christopher James Lahey  <clahey@helixcode.com>
13048
13049         * providers/pop3/camel-pop3-store.c: Fixed a small warning.
13050
13051 2000-08-22  Peter Williams  <peterw@helixcode.com>
13052
13053         * camel-service.c (camel_service_new): Connect automatically if the
13054         URL is not empty.
13055         (finalize): Disconnect automatically if connected.
13056         (camel_service_query_auth_types): Split into two functions; one to
13057         be called if we're connected to an actual server (_connected), one
13058         to be called if we're just gauging the general authtypes supported
13059         (_generic).
13060         (is_connected): Remove.
13061
13062         * camel-store.c (camel_store_get_folder): Don't connect explicitly to
13063         the service.
13064
13065         * providers/nntp/camel-nntp-store.c (query_auth_types_generic): Split
13066         the query_auth_types function. Hook it up in _new.
13067         (finalize): Don't try to disconnect here.
13068         
13069         * providers/pop3/camel-pop3-store.c (query_auth_types_generic): Same.
13070         (finalize): Don't try to disconnect here.
13071
13072         * providers/imap/camel-imap-store.c (query_auth_types_generic): Same.
13073         (finalize): Don't try to disconnect here.
13074
13075         * providers/smtp/camel-smtp-transport.c (query_auth_types_generic): Split
13076         the query_auth_types (dummy, in this case) function. Hook it up in _new.
13077         (finalize): Don't try to disconnect here.
13078
13079 2000-08-21  JP Rosevear  <jpr@helixcode.com>
13080         
13081         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_subfolder_names):
13082         Make sure newsrc is not null
13083         (nntp_folder_get_subfolder_names): ditto
13084
13085         * providers/nntp/camel-nntp-newsrc.c 
13086         (camel_nntp_newsrc_get_subscribed_group_names): Programming check
13087         for newsrc == NULL
13088         (camel_nntp_newsrc_get_all_group_names): ditto
13089         (camel_nntp_newsrc_write_to_file): ditto
13090         (camel_nntp_newsrc_write): ditto
13091
13092 2000-08-21  JP Rosevear  <jpr@helixcode.com>
13093
13094         * providers/nntp/camel-nntp-store.c (camel_nntp_command): 
13095         Make sure respbuffer is not null before manipulating it.
13096         If it is null, return CAMEL_NNTP_FAIL and a decent error
13097         message.
13098         
13099 2000-08-18  Peter Williams  <peterw@helixcode.com>
13100
13101         * camel-internet-address.c (internet_encode): If the name is "" we
13102         weren't outputting anything; output the address at least.
13103
13104 2000-08-16  Peter Williams  <peterw@helixcode.com>
13105
13106         * camel-internet-address.c (internet_encode): Fix a leak when
13107         name = "". It's a single-byte leak, but it's the little things
13108         that count.
13109
13110         * camel-object.c (camel_type_lock_up): Don't leave the type
13111         system locked when a bad unlock happens.
13112
13113         * providers/mbox/camel-mbox-store.c (get_folder): Fix a leak.
13114
13115 2000-08-15  Peter Williams  <peterw@helixcode.com>
13116
13117         * providers/imap/camel-imap-folder.c (imap_copy_message_to): Typo fix.
13118
13119 2000-08-14  Peter Williams  <peterw@helixcode.com>
13120
13121         * camel-folder-search.c (search_get_sent_date): New search function;
13122         returns the time_t when the message was sent.
13123         (search_get_receive_date): Same for when it was received.
13124         (search_get_current_date): Gets the current time for use with the
13125         above two. Is this in the right place?
13126
13127         * camel-folder-search.h: Add the new functions above to the class.
13128
13129 2000-08-13  Dan Winship  <danw@helixcode.com>
13130
13131         * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): Add
13132         camel-nntp-utils.h
13133
13134         * providers/imap/camel-imap-folder.c
13135         (imap_get_subfolder_names_internal): do a strcasecmp rather than
13136         just a strcmp when checking if a folder is "INBOX", since it is
13137         a case-insensitive name.
13138
13139 2000-08-12  Dan Winship  <danw@helixcode.com>
13140
13141         * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
13142         Don't assume the FETCH results will come back in the order they
13143         were requested.
13144         (imap_get_subfolder_names_internal): Add "INBOX" to the list as
13145         g_malloc'ed memory, not a static string.
13146
13147 2000-08-12  Jeffrey Stedfast  <fejj@helixcode.com>
13148
13149         * providers/imap/camel-imap-store.c
13150         (camel_imap_command_continuation): Now takes a char * parameter
13151         rather than a stream
13152         (camel_imap_command_continuation_with_stream): Same function as
13153         above but takes a stream parameter instead
13154
13155         * providers/imap/camel-imap-folder.c (imap_append_message): Use
13156         camel_imap_command_continuation_with_stream
13157
13158 2000-08-12  Dan Winship  <danw@helixcode.com>
13159
13160         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): New
13161         function to do one round of attempted authentication.
13162         (pop3_connect): Move a bunch of code out into
13163         pop3_try_authenticate and fix some bugs in the edge cases.
13164
13165 2000-08-12  Jeffrey Stedfast  <fejj@helixcode.com>
13166
13167         * providers/imap/camel-imap-store.c (query_auth_types): No longer
13168         calls try_connect() to get authtypes
13169
13170 2000-08-11  Jeffrey Stedfast  <fejj@helixcode.com>
13171
13172         * providers/imap/camel-imap-store.c
13173         (camel_imap_command_continuation): Changed param order a bit and
13174         fixed some logic
13175
13176         * providers/imap/camel-imap-folder.c (imap_append_message): Use
13177         the new multi-transactional convenience functions
13178
13179 2000-08-11  Jeffrey Stedfast  <fejj@helixcode.com>
13180         
13181         * providers/imap/camel-imap-store.c
13182         (camel_imap_command_preliminary): New convenience function for
13183         multi-transactional commands (opening request)
13184         (camel_imap_command_continuation): New convenience function for
13185         multi-transactional commands (followup data)
13186
13187 2000-08-11  Christopher James Lahey  <clahey@helixcode.com>
13188
13189         * providers/mh/camel-mh-folder.c: Fixed a warning.
13190
13191 2000-08-11  Chris Toshok  <toshok@helixcode.com>
13192
13193         * providers/nntp/camel-nntp-folder.c
13194         (camel_nntp_folder_class_init): remove get_name and get_full_name
13195         assignments, since the camel-folder.c implementation does what we
13196         need.
13197
13198 2000-08-11  Chris Toshok  <toshok@helixcode.com>
13199
13200         * providers/nntp/camel-nntp-store.c
13201         (camel_nntp_store_get_toplevel_dir): use g_get_home_dir, since
13202         evolution_dir isn't available in the providers.
13203
13204 2000-08-11  Peter Williams  <peterw@helixcode.com>
13205
13206         * camel-folder.c (thaw): Fix a bug where the message_changed
13207         signal wasn't being emitted.
13208
13209 2000-08-11  Not Zed  <NotZed@HelixCode.com>
13210
13211         * providers/mh/camel-mh-folder.c (mh_set_message_user_tag):
13212         Implement.
13213         (mh_get_message_user_tag): Implement.
13214
13215         * providers/mbox/camel-mbox-folder.c (mbox_get_message_user_tag):
13216         (mbox_set_message_user_tag): Implement.
13217
13218         * camel-folder.c (move_message_to): Yay so lets fix an already
13219         fixed fix, again.
13220         (copy_message_to): and here too ... update for api change to append().
13221         And removed another warning.
13222         (camel_folder_set_message_user_tag): Routine to set message tags.
13223         (camel_folder_get_message_user_tag): And accessor.
13224
13225 2000-08-10  Christopher James Lahey  <clahey@helixcode.com>
13226
13227         * camel-folder-search.c, camel-folder-summary.c, camel-medium.c,
13228         camel-mime-filter-charset.c, camel-mime-filter.c,
13229         camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c,
13230         camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c,
13231         camel-movemail.c, camel-multipart.c, camel-object.c,
13232         camel-stream-mem.c, providers/mbox/camel-mbox-folder.c,
13233         providers/mbox/camel-mbox-summary.c,
13234         providers/mh/camel-mh-folder.c,
13235         providers/smtp/camel-smtp-transport.c: Fixed some warnings.
13236
13237 2000-08-11  Not Zed  <NotZed@HelixCode.com>
13238
13239         * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Free
13240         the search properly.
13241         (vee_folder_build): And here too.
13242
13243 2000-08-10  Jeffrey Stedfast  <fejj@helixcode.com>
13244
13245         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13246         If we go over the max number of messages, don't keep requesting
13247         new message summaries, just break.
13248
13249 2000-08-11  Not Zed  <NotZed@HelixCode.com>
13250
13251         * camel-mime-parser.c (folder_scan_header): A better way to
13252         compress leading whitespace.  The code is probably invalid anyway,
13253         I dont think it will work across buffer boundaries.
13254
13255         * providers/mbox/camel-mbox-folder.c (mbox_append_message): And
13256         write out proper format From lines here too.
13257
13258         * providers/mbox/camel-mbox-summary.c
13259         (camel_mbox_summary_build_from): New function to build a more
13260         compatible mbox "From " line.
13261         (camel_mbox_summary_sync): Write From lines in the proper format.
13262
13263 2000-08-10  Not Zed  <NotZed@HelixCode.com>
13264
13265         * providers/mh/camel-mh-store.c (get_folder): Remove warnin g.
13266
13267         * providers/mbox/camel-mbox-store.c (xrename): Kill some warnings
13268         with constification.
13269
13270         * providers/imap/camel-imap-folder.c (imap_append_message): Fixed
13271         for append api change.  Eek this routine seriously wastes memory.
13272
13273         * providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt.
13274         (mh_append_message): Fix for api change, and include user flags
13275         and tags in new message.
13276
13277         * providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix
13278         for search api change.
13279
13280         * camel-folder.c (camel_folder_search_free): New function for
13281         freeing search results.
13282         (search_free): Changed my mind, implement a default that actually
13283         does something.  Free as to the old interface.
13284         (camel_folder_append_message): Changed to accept a
13285         camelmessageinfo rather than flags, which just doesn't have enough
13286         info in it.
13287         (copy_message_to): Change for append_message api change.
13288         (move_message_to): Likewise.
13289
13290         * providers/mbox/camel-mbox-folder.c (mbox_search_free):
13291         Implement.
13292         (mbox_append_message): Fix for api change, and also copy user
13293         flags/tags across to new summary.
13294
13295         * camel-folder-search.c (search_user_tag): A search expression
13296         that returns the current use flag by name.
13297         (camel_folder_search_free_result): New function to free the result
13298         of a search.
13299
13300         * camel-folder-summary.c: Bump summary version.
13301         (message_info_new): 
13302         (message_info_load): 
13303         (message_info_save): 
13304         (camel_message_info_dup_to): 
13305         (camel_message_info_free): Added support for arbitrary tag/value
13306         pairs (CamelTag's).
13307         (camel_tag_get): 
13308         (camel_tag_set):
13309         (camel_tag_list_size):
13310         (camel_tag_list_free): Operations for working with CamelTags.
13311
13312 2000-08-09  Peter Williams  <peterw@helixcode.com>
13313
13314         * camel-store.c (camel_store_get_folder): Connect beforehand, if
13315         necessary.
13316
13317         * providers/imap/camel-imap-store.c (camel_imap_store_init): Default
13318         the dir_sep to "/" so that certain functions can safely assume that
13319         dir_sep is valid (at least, nonnull).
13320
13321 2000-08-09  Ettore Perazzoli  <ettore@helixcode.com>
13322
13323         * providers/nntp/camel-nntp-folder.c
13324         (nntp_folder_set_message_flags): Get rid of an unused variable.
13325
13326         * providers/nntp/Makefile.am (INCLUDES): Fix includes so that we
13327         don't use installed headers anymore.  [I copied this over from the
13328         IMAP provider, that does not seem to have this problem.]
13329
13330 2000-08-09  Not Zed  <NotZed@HelixCode.com>
13331
13332         * camel-folder-search.c (camel_folder_search_execute_expression):
13333         Reorder search result in summary order if we searched with a
13334         summary.
13335
13336 2000-08-08  Dan Winship  <danw@helixcode.com>
13337
13338         * camel-uid-cache.c: New code to keep an on-disk cache of what
13339         UIDs have been seen in a folder.
13340
13341         * camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail
13342         can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE
13343         (you can work with mail directly without needing to copy it local).
13344
13345         * providers/*/camel-*-provider.c: Add flags as needed: imap and
13346         mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is
13347         just SOURCE.
13348
13349         * camel-mime-message.c (process_header): Add another subject
13350         g_strstrip that fejj's earlier commit missed.
13351
13352 2000-08-08  Peter Williams  <peterw@helixcode.com>
13353
13354         * camel-provider.h: Remove some GTK stuff that I missed.
13355
13356         * providers/imap/camel-imap-store.c (imap_noop): Turn this
13357         back on with the new timeout interface in CamelSession.
13358
13359         * camel-session.[ch] (camel_session_register_timeout): New
13360         interface for Camel to register timeouts. Basically the
13361         GTK timeout interface is copied. We do this because Camel isn't
13362         allowed to use GTK anymore.
13363         
13364 2000-08-07  Not Zed  <NotZed@HelixCode.com>
13365
13366         * providers/mh/camel-mh-folder.c (mh_append_message): Only retry
13367         another uid if we had a name clash, otherwise fail.
13368
13369 2000-08-07  Jeffrey Stedfast  <fejj@helixcode.com>
13370
13371         * providers/imap/camel-imap-folder.c
13372         (imap_get_subfolder_names_internal): If we are trying to get a
13373         subfolder listing of the root folder, always make sure INBOX is
13374         there...
13375
13376         * providers/imap/camel-imap-utils.c (imap_parse_list_response): 
13377         Check for NIL as a directory separator.
13378
13379 2000-08-07  Peter Williams  <peterw@helixcode.com>
13380
13381         * providers/nntp/Makefile.am: Reorder the INCLUDES to pull
13382         in the camel headers from the local source tree before
13383         the ones in $(includedir). This was causing compile problems
13384         because the installed, Gtk-based camel-object.h was included
13385         before the uninstall Camel-based one.
13386
13387 2000-08-07  Jeffrey Stedfast  <fejj@helixcode.com>
13388
13389         * providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip
13390         all \n's from the expression
13391
13392         * string-utils.c (strip): New convenience function to strip
13393         occurences of a single char from a string
13394
13395         * camel-mime-message.c (camel_mime_message_set_subject): Do a
13396         g_strstrip on the subject so we can stop getting those annoying
13397         leading spaces
13398
13399 2000-08-07  Dan Winship  <danw@helixcode.com>
13400
13401         * camel-folder.c (camel_folder_free_deep): Fix this to not require
13402         NULL-termination of the array.
13403
13404 2000-08-04  Jeffrey Stedfast  <fejj@helixcode.com>
13405
13406         * providers/imap/camel-imap-store.c (imap_connect): If we fail to
13407         get a dir_sep, then supply the default of "/".
13408         (get_folder): Undo changes by Peter
13409
13410 2000-08-04  Peter Williams  <peterw@helixcode.com>
13411
13412         * providers/imap/camel-imap-store.c (get_folder): Prevent a coredump
13413         when get_folder()ing from a store with dir_sep = NULL.
13414
13415 2000-08-04  Peter Williams  <peterw@helixcode.com>
13416
13417         * camel-store.h: Include camel-object.h. Ettore said this wasn't
13418         compiling.
13419
13420 2000-08-04  Not Zed  <NotZed@HelixCode.com>
13421
13422         * camel-url.c (camel_url_set_protocol): 
13423         (camel_url_set_host): 
13424         (camel_url_set_path): 
13425         (camel_url_set_port): Url editing functions.
13426
13427 2000-08-04  Dan Winship  <danw@helixcode.com>
13428
13429         * providers/pop3/camel-pop3-folder.c (pop3_set_message_flags): 
13430         (pop3_sync): Indexes into the flags array are message_number minus
13431         1, not just message_number.
13432
13433         * providers/pop3/camel-pop3-store.c: add a debugging macro for
13434         doing protocol tracing.
13435
13436 2000-08-03  Jeffrey Stedfast  <fejj@helixcode.com>
13437
13438         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Only
13439         call imap_get_summary_internal if the folder can hold messages
13440
13441         * providers/nntp/camel-nntp-provider.c (camel_provider_module_init): 
13442         Initialize the service_cache for the news/nntp providers
13443
13444 2000-08-03  Peter Williams  <peterw@helixcode.com>
13445
13446         * providers/nntp/Makefile.am (INCLUDES): Add -I$(top_srcdir) to
13447         pull in libibex/ibex.h
13448
13449 2000-08-02  Not Zed  <NotZed@HelixCode.com>
13450
13451         * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Expunge
13452         from the end, so the index isn't messed up when you remove a
13453         message.
13454
13455         * providers/mh/camel-mh-folder.c (mh_append_message): Fix a bug
13456         where it would never open an output file/uid.
13457
13458         * providers/mbox/camel-mbox-store.c (rename_folder):
13459         Implementation for mbox as well.
13460
13461         * camel-store.c (camel_store_rename_folder): New method to rename folders.
13462         (rename_folder): Default implementation.
13463
13464         * providers/mh/camel-mh-store.c (delete_folder): Implement this.
13465         (rename_folder): Implement a rename operation.
13466
13467 2000-08-02  Dan Winship  <danw@helixcode.com>
13468
13469         * providers/MH: Kill this. It doesn't have any code to do anything
13470         the new mh provider doesn't do better.
13471
13472         * providers/Makefile.am: Remove reference to MH subdir, and
13473         promote nntp to fully-supported status, since it does compile and
13474         all.
13475
13476         * camel-mime-message.c (camel_mime_message_set_subject): Trim
13477         trailing space from the subject. I've now seen replies from two
13478         different people that tricked the threading code by (a) not having
13479         References/In-Reply-To, and (b) adding an extra space to the end
13480         of the subject line so the subject-based threading fails too. Who
13481         writes these broken mailers anyway?
13482
13483 2000-08-01  Jeffrey Stedfast  <fejj@helixcode.com>
13484
13485         * providers/smtp/camel-smtp-transport.c (smtp_helo): When forced
13486         to use the IP, place it in square brackets.
13487
13488         * providers/imap/camel-imap-utils.c (imap_translate_sexp): New and
13489         improved sexp parser. An honest try at using e-sexp is wrapped in
13490         a #ifdef at the bottom of the file but is currently not used
13491
13492         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13493         We want to do a UID SEARCH so we get UIDs back instead of sequence
13494         numbers
13495
13496 2000-08-01  Not Zed  <NotZed@HelixCode.com>
13497
13498         * providers/mh: New mh provider implementation.
13499
13500         * providers/Makefile.am (SUBDIRS): Added mh provider.
13501
13502 2000-07-31  Jeffrey Stedfast  <fejj@helixcode.com>
13503
13504         * providers/imap/camel-imap-folder.c (imap_get_message_info_internal): 
13505         Some IMAP servers don't wrap the UID in ()'s so don't depend on that
13506         (imap_get_summary_internal): Same
13507
13508         * providers/imap/camel-imap-utils.c (free_sexp_node): Oops, forgot to
13509         free node->function - not good.
13510
13511 2000-07-31  Peter Williams  <peterw@helixcode.com>
13512
13513         * providers/vee/camel-vee-folder.c (vee_search_by_expression): Add
13514         a NULL to the matches pointer array so that g_strfreev knows where
13515         the end is.
13516
13517 2000-07-31  Jeffrey Stedfast  <fejj@helixcode.com>
13518
13519         * providers/imap/camel-imap-utils.c (imap_translate_sexp): New
13520         convenience function to translate a Camel sexp into the equivalent
13521         IMAP sexp.
13522
13523         * providers/imap/camel-imap-store.c: More places now use
13524         imap_next_word
13525
13526         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
13527         Implemented initial version (this may or may not work quite right)
13528
13529 2000-07-28  Jeffrey Stedfast  <fejj@helixcode.com>
13530
13531         * providers/imap/camel-imap-folder.c (imap_expunge): Make sure
13532         the third word/token (whatever) is "EXPUNGE" and not something
13533         else like "EXISTS" or "RECENT". When removing the message from
13534         the summary also make sure to free that data to avoid leakage.
13535         Also make sure to subtract 1 from the 'id' since IMAP starts
13536         at 1 and our summary starts at 0 :-)
13537
13538 2000-07-28  Jeffrey Stedfast  <fejj@helixcode.com>
13539         
13540         * providers/imap/camel-imap-store.c (camel_imap_status): Cleaned
13541         up a bit, now uses imap_next_word()
13542         (camel_imap_command_extended): Now uses imap_next_word(). When
13543         checking for RECENT, allow the first digit of the recent-count
13544         be between 0 and 9 inclusive instead of exclusive.
13545
13546         * providers/imap/camel-imap-folder.c (imap_expunge): Optimized.
13547         No longer will it need to reload the summary as it now instead
13548         removes the appropriate message summaries from the cache.
13549         (camel_imap_folder_changed): If recent == 0 then return. If 
13550         recent < 0 then just emit the folder_changed signal, don't reload
13551         summaries.
13552
13553 2000-07-28  Jeffrey Stedfast  <fejj@helixcode.com>
13554
13555         * providers/imap/camel-imap-folder.c
13556         (imap_get_message_count_internal): Get message count when STATUS
13557         is not available.
13558         (imap_init): folder->has_search_capability is required for IMAP so
13559         should always be set to TRUE (is currently being set to FALSE as
13560         I've not yet implemented SEARCH support).
13561         (camel_imap_folder_changed): Seem to have fixed my optimization
13562         hack
13563
13564 2000-07-28  Jon K Hellan  <hellan@acm.org>
13565
13566         * providers/imap/camel-imap-store.h (CamelImapServerLevel): New
13567         enum.
13568         (CamelImapStore): Added server_level and has_status_capability
13569         members.
13570
13571         * providers/imap/camel-imap-store.c (imap_connect): Detect
13572         IMAP4REV1, IMAP4 and STATUS in capability response.
13573
13574         * providers/imap/camel-imap-folder.c
13575         (imap_get_message_count_internal): Use STATUS only if server
13576         supports it. TODO: Get message count when STATUS not supported.
13577         (imap_get_message, imap_get_summary_internal,
13578         imap_get_message_info_internal): Handle IMAP4 as well.
13579         (imap_protocol_get_summary_specifier): New function: Make a data
13580         item specifier for the header lines we need, appropriate to the
13581         server level.
13582
13583 2000-07-27  Peter Williams <peterw@helixcode.com>
13584
13585         * camel-mime-utils.c (header_decode_lwsp): More
13586         checks for end of string.
13587
13588         * providers/imap/camel-imap-store.c:
13589         (imap_command_extended): Free the elements of our
13590         array (huge mem leak)
13591
13592         * providers/imap/camel-imap-folder.c:
13593         (summary_get_internal): Same as above.
13594         
13595
13596 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
13597
13598         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13599         Fixed my routine to only fetch new headers, my IDs were off by 1
13600         on the high end, so when it would fetch the last newly arrived
13601         message it would fail and end up fetching all of the summaries
13602         because of the corruption.
13603
13604 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
13605
13606         * camel-url.c (camel_url_to_string): If the path doesn't begin
13607         with a / and there is a host, prepend a / to the path.
13608
13609 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
13610         
13611         * providers/imap/Makefile.am: Added camel-imap-utils.[c,h]
13612         
13613         * providers/imap/camel-imap-utils.[c,h]: Utilities for parsing
13614         server responses for use in both camel-imap-store.c and
13615         camel-imap-folder.c
13616         
13617         * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
13618         Free all the pointers in the headers array.
13619         (imap_get_subfolder_names_internal): Updated to use
13620         imap_parse_list_response
13621         (imap_parse_subfolder_list): Removed in favor of
13622         imap_parse_list_response
13623
13624         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13625         Free all the pointers in the data array.
13626         (imap_connect): Updated to use imap_parse_list_response and fixed
13627         a leak
13628         (folder_is_selectable): Updated.
13629
13630 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
13631         
13632         * providers/imap/camel-imap-folder.c (imap_get_message_info): Now
13633         uses a hash table for looking up message info rather than a linear
13634         search :)
13635
13636 2000-07-27  Peter Williams  <peterw@helixcode.com>
13637
13638         * providers/*/Makefile.am: Don't specify SUBDIRS =
13639         [nothing]. Messes up distcheck.
13640         
13641 2000-07-26  Peter Williams  <peterw@helixcode.com>
13642         
13643         * camel-mime-parser.c (folder_scan_init): Initialize
13644         outbuf to be "" -- it's not guaranteed to be zeroed.
13645         
13646         * camel-mime-utils.c (header_references_decode): Return
13647         if the header is NULL -> or "" <-. Don't do our stupid
13648         mailer trick if we point to \0.
13649         (header_decode_quoted_string): Don't rip past end of 
13650         string!
13651         
13652 2000-07-26  Dan Winship  <danw@helixcode.com>
13653
13654         * camel-movemail.c (movemail_external): routine to call an
13655         external movemail program.
13656         (camel_movemail): Nuke return value, use movemail_external when
13657         available and useful, and don't delete "dest" on errors, since
13658         it might have started non-empty.
13659
13660 2000-07-26  Jeffrey Stedfast  <fejj@helixcode.com>
13661
13662         * camel-url.c (camel_url_to_string): Should now always prepend a '/'
13663         before the path if it doesn't already exist.
13664
13665         * providers/imap/camel-imap-folder.c: Fixed a few compiler warnings
13666
13667 2000-07-25  Jeffrey Stedfast  <fejj@helixcode.com>
13668
13669         * providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the
13670         real problem that Peter was running into.
13671
13672 2000-07-25  Dan Winship  <danw@helixcode.com>
13673
13674         * camel-mime-message.c (write_to_stream): Don't add a Mime-Version
13675         header to a message that already has one.
13676
13677         * camel-internet-address.c (internet_encode): Don't put <>s around
13678         addresses with no name part.
13679
13680 2000-07-25  Peter Williams  <peterw@helixcode.com>
13681
13682         * providers/imap/camel-imap-folder.c (imap_expunge): Set 
13683         imap_folder->summary to NULL after calling imap_summary_free,
13684         so we don't get stuck with a junk summary pointer. Should
13685         we free it at all?
13686
13687 2000-07-25  Jeffrey Stedfast  <fejj@helixcode.com>
13688
13689         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
13690         Optimized to try and get the new message headers without reloading
13691         the entire summary from scratch.
13692         (imap_get_summary_internal): Will now sync() before attempting to
13693         reload the summary so that flags are set in the reloaded summary
13694         as well.
13695
13696 2000-07-24  Jeffrey Stedfast  <fejj@helixcode.com>
13697
13698         * providers/imap/camel-imap-store.c (get_folder): Updated to give
13699         special attention to the root folder.
13700
13701         * providers/imap/camel-imap-folder.c
13702         (imap_get_subfolder_names_internal): Updated to handle the root
13703         folder
13704         (imap_get_message_count_internal): return 0 if folder can't hold
13705         messages
13706         (camel_imap_folder_new): Change so that root folder gets special
13707         attention and always gets can_hold_messages set to FALSE
13708
13709 2000-07-24  Dan Winship  <danw@helixcode.com>
13710
13711         * camel-folder.c: Remove exceptions from a number of methods that
13712         work on what ought to be static data: get_parent_folder,
13713         get_parent_store, get_message_count, get_unread_message_count,
13714         get_permanent_flags, get_message_flags, set_message_flags,
13715         get_message_user_flag, set_message_user_flag, get_uids,
13716         get_summary, get_subfolder_names. Turn camel_folder_delete_message
13717         into a macro. (Mostly a pull-up from the camel-async branch.)
13718
13719         * providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder
13720         changes
13721
13722 2000-07-24  Jeffrey Stedfast  <fejj@helixcode.com>
13723
13724         * providers/imap/camel-imap-folder.c (imap_get_message_info): Updated
13725         to port easily to the new Camel API
13726         (imap_init): Don't SELECT INBOX, we don't need to do that
13727
13728 2000-07-24  Jeffrey Stedfast  <fejj@helixcode.com>
13729
13730         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): 
13731         Initialize the summary and subfolder listing.
13732         (imap_summary_free): Now takes a GPtrArray arg rather than a 
13733         CamelImapFolder as it increases it's usefullness for free()'ing
13734         temporary summaries.
13735         (imap_get_message_count_internal): A new convenience function for
13736         getting the actual message count on a server to be used by 
13737         imap_get_summary_internal)
13738         (imap_get_message_count): Since the Camel API is on the move again, 
13739         the future version of this function will not be able to make a
13740         call to the store, it must only access previously fetched data (thus 
13741         the creation of the _internal function)
13742         (imap_get_subfolder_names_internal): Again, because the future version
13743         of imap_get_subfolder_names will not take an exception, we must rename
13744         this function which will be called by camel_imap_folder_new()
13745         (imap_get_subfolder_names): We now return the previously collected
13746         subfolder listing that the _internal function fetched previously
13747         (imap_get_summary_internal): Again, same idea as the previous _internal
13748         functions...
13749         (imap_get_summary): Again... now returns a previously aquired summary
13750
13751         * providers/imap/camel-imap-store.c (imap_noop): This will hopefully
13752         prevent the imap store from disconnecting.
13753         (imap_connect): Modified to add a gtk timeout event that will call
13754         imap_noop() every 10 minutes (we may want to change this time value)
13755         (imap_disconnect): Modified to remove the NOOP timeout event from the
13756         store.
13757         (camel_imap_command_extended): Commented out the code that would try
13758         and detect if the store was disconnected and then reconnect if it was
13759         needed.
13760
13761 2000-07-24  Dan Winship  <danw@helixcode.com>
13762
13763         * camel-folder.[ch]: Remove camel_folder_get_message_uid, which
13764         was not used, and not implemented by any provider.
13765
13766         * providers/nntp/camel-nntp-folder.c: Remove get_message_uid
13767         non-implementation.
13768
13769         * camel-folder-pt-proxy.[ch], camel-arg-collector.c,
13770         camel-marshal-utils.[ch]: Bye bye bye.
13771
13772         * Makefile.am: remove reference to camel-arg-collector.c
13773
13774 2000-07-23  Jeffrey Stedfast  <fejj@helixcode.com>
13775
13776         * providers/imap/camel-imap-store.c (imap_disconnect): Made it a
13777         little more forgiving. Also set current_folder to NULL as there is
13778         no selected folder after a disconnect.
13779         (stream_is_alive): Detects whether or not a socket is "alive"
13780         (camel_imap_command_extended): Use stream_is_alive() to aid in the
13781         detection of a disconnected state.
13782
13783 2000-07-22  Jeffrey Stedfast  <fejj@helixcode.com>
13784
13785         * providers/imap/camel-imap-store.c (get_folder): Clear
13786         CamelExceptions when appropriate (eg when folder is marked as
13787         \NoSelect). Still needs some cleanup and perhaps Dan will have a
13788         better way of doing this as this seems like a messy way of
13789         handling this.
13790
13791         * providers/imap/camel-imap-folder.c (imap_get_uids): Took out
13792         some debug statements as they are no longer needed.
13793
13794 2000-07-21  Jeffrey Stedfast  <fejj@helixcode.com>
13795
13796         * providers/imap/camel-imap-folder.c (imap_get_subfolder_names):
13797         Updated to not strip out subfolders that are marked as \NoSelect
13798         because this will be correctly handled in store->get_folder from
13799         now on.
13800
13801         * providers/imap/camel-imap-store.c (folder_is_selectable): New
13802         convenience function for use in get_folder().
13803         (parse_list_response): Now takes a char **flags argument which is
13804         needed by folder_is_selectable().
13805         (imap_connect): Updated to reflect changes to
13806         parse_list_response().
13807
13808 2000-07-21  Jeffrey Stedfast  <fejj@helixcode.com>
13809         
13810         * providers/imap/camel-imap-stream.c (stream_read): Updated with
13811         some of the same fixes I've made to camel-imap-folder.c like
13812         recalculating message part lengths.
13813
13814         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
13815         Rewrote the code to check for "* %d RECENT". Still needs to be
13816         modified, but should no longer cause an infinite loop by detecting
13817         mis-detecting RECENT messages.
13818
13819 2000-07-20  Jeffrey Stedfast  <fejj@helixcode.com>
13820
13821         * providers/imap/camel-imap-folder.c (imap_get_summary):
13822         (imap_get_message_info): Oops. Fix UID parser to allow 0 and 9 to
13823         be in the range of valid UID chars.
13824
13825 2000-07-20  Peter Williams  <peterw@helixcode.com>
13826
13827         * camel-object.c (camel_object_unref): Add a new global mutex
13828         'refcount' held when refcounting operations occur.
13829
13830 2000-07-19  Peter Williams  <peterw@helixcode.com>
13831
13832         * camel-object.c (camel_type_lock_up): Correct the recursiveness;
13833         the locklevel is stored as a private, so each thread has its own
13834         idea of the locklevel. Thus one thread can relock, but a different
13835         one will think that it's a level 0 and try to lock the type_system
13836         mutex.
13837
13838 2000-07-19  Jeffrey Stedfast  <fejj@helixcode.com>
13839
13840         * providers/imap/camel-imap-folder.c: General cleanup working
13841         towards getting Actions->Expunge working correctly.
13842
13843         * providers/imap/camel-imap-store.c
13844         (cammel_imap_command_extended): Added code to look for "* %d
13845         RECENT" and to emit the folder_changed signal if there are any
13846         recent messages. Note: this is a hack and needs to be rewritten
13847         badly.
13848
13849 2000-07-19  Jeffrey Stedfast  <fejj@helixcode.com>
13850
13851         * providers/imap/camel-imap-folder.c (imap_get_summary): If the
13852         folder's message count is not the same as the number of summaries,
13853         free the old summary and create a new summary.
13854
13855 2000-07-18  Jeffrey Stedfast  <fejj@helixcode.com>
13856
13857         * providers/imap/camel-imap-folder.c
13858         (camel_imap_folder_class_init): Added in
13859         imap_[g,s]et_message_user_flag() methods
13860         (imap_get_message_info): Rewrote to use the more efficient way of
13861         downloading summary information and also added a UID comparison so
13862         that if the UID requested doesn't match the UID received, it
13863         returns NULL.  FIXME: When the mailer gets NULL when it requested
13864         message info, it seems that it displays a row for that message and
13865         when you try and select the blank row, it segfaults.
13866
13867         * providers/imap/camel-imap-store.c (get_folder): Oops, this
13868         should not be checking against "/", it should be checking against
13869         dir_sep.
13870
13871         * providers/imap/camel-imap-folder.c (imap_parse_subfolder_line):
13872         Updated to trim out the leading namespace.
13873         (imap_get_subfolder_names): Let the subfolder parser trim the
13874         namespace off the folder name.
13875
13876 2000-07-17  Peter Williams  <peterw@helixcode.com>
13877
13878         * camel-object.c (camel_type_lock_up): New function; the
13879         Camel type_system lock is now fakey-recursive, being controlled
13880         by a semaphore that goes up and down and is protected by another
13881         lock. Theoretically all we need is the lock on the semaphore,
13882         but this we catch exceptions "better" (by deadlocking).
13883         (camel_type_lock_down): Corresponding to above.
13884         (all functions): s,G_LOCK,camel_type_lock_up, etc.
13885
13886 2000-07-17  Jeffrey Stedfast  <fejj@helixcode.com>
13887
13888         * providers/imap/camel-imap-store.c (imap_disconnect): Send a
13889         "LOGOUT" command.
13890
13891         * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to
13892         get IMAP code to work with CommunigatePro and MS Exchange (and any
13893         other servers that send back a UID at the end of each FETCH inside
13894         of the main body of the message part).
13895         (imap_sync): Un-#if 0 the code that sets the flags on the IMAP
13896         server for messages that have changed. Oops, don't mask with
13897         DELETED to find out if the message has been answered ;-)
13898         (imap_expunge): sync before expunging.
13899
13900 2000-07-16  Jeffrey Stedfast  <fejj@helixcode.com>
13901
13902         * providers/imap/camel-imap-store.c: All SELECT calls now pass
13903         a NULL folder argument to camel_imap_command_extended() since it's
13904         not needed.
13905         (imap_connect): Moved service_class->connect() to the point right
13906         after a connection is established with the server rather than
13907         waiting until the end of the function.
13908         (camel_imap_command): Updated the documentation comment
13909         (camel_imap_command_extended): Before sending a command, first
13910         check to make sure we are connected; if we aren't, then reconnect.
13911         Don't strncmp() command with "SELECT" as it's redundant.
13912
13913         * providers/imap/camel-imap-folder.c: All SELECT calls now pass
13914         a NULL folder argument to camel_imap_command_extended() since it's
13915         not needed. Also s/camel_imap_command/camel_imap_command_extended as
13916         I will probably be doing away with camel_imap_command() or at least
13917         only using it for LOGIN and similar commands where the server won't
13918         notify us of any recent messages.
13919
13920 2000-07-15  Jeffrey Stedfast  <fejj@helixcode.com>
13921
13922         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): 
13923         One last fix to get rid of hard-coded "/" directory separators
13924
13925 2000-07-14  Peter Williams  <peterw@helixcode.com>
13926
13927         * camel-object.c : Implement 'events', which are suspiciously
13928         like signals except without all the marshalling baggage, and
13929         with quasi-thread-safety.
13930         (camel_object_class_declare_event): New func.
13931         (camel_object_hook_event): Ditto.
13932         (camel_object_trigger_event): Ditto.
13933         (obj_class_init): Declare the "finalize" event.
13934         (obj_class_finalize): Free the hashtable of events->preps
13935         (obj_finalize): Free the hashtable of events->hooklists
13936         (camel_object_unref): Trigger the finalize event (ourselves,
13937         to prevent massively unpleasant looping things.)
13938         
13939 2000-07-14  Peter Williams  <peterw@helixcode.com>
13940         
13941         * camel-object.c (make_global_classfuncs): Change to return
13942         a CamelObjectClass. Change parents to a GSList and free it
13943         when done.
13944         (camel_object_new): Don't allocate a classfuncs for every object;
13945         merely give it a reference to the global_classfuncs. Convert
13946         parents to a GSList and free it when done.
13947         (camel_object_unref): Don't free the classfuncs. Free the parents
13948         list, which is changed to a GSList.
13949
13950 2000-07-14  Jeffrey Stedfast  <fejj@helixcode.com>
13951
13952         * string-utils.c (string_unquote): New convenience function
13953         to unquote a string if it's encapsulated by "'s
13954         
13955         * providers/imap/camel-imap-folder.c:
13956         * providers/imap/camel-imap-store.c: Made the necessary changes
13957         to stop using hard coded directory separators.
13958
13959 2000-07-13  Dan Winship  <danw@helixcode.com>
13960
13961         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
13962         If the summary is for a smaller mbox, and rebuilding from the
13963         last-known end position fails, try rebuilding from the beginning.
13964         Deals with the case where the user edits the mbox and makes it
13965         bigger, without adding new messages.
13966
13967 2000-07-13  Peter Williams  <peterw@helixcode.com>
13968
13969         * camel-object.c: Rewritten to not be based on GtkObject,
13970         but a tiny threadsafe ripoff thereof. Objects still cannot
13971         be shared across threads, but ref/unref/destroy/new/etc
13972         will work. Signals are not implemented because doing it
13973         robustly would be a major pain in the butt, but class
13974         functions are. There's a small demonstration that it doesn't
13975         crash in ./temp-test.c: build it with ./make-test.sh.
13976         * camel-stream.c, camel-seekable-stream.c, camel-stream-mem.c:
13977         moved over to CamelObject. Proof of concept: two levels of
13978         subclass and class functions, all working without coredumps.
13979         To port to CamelObject:
13980         - s,GTK_,CAMEL_,g in the cast checks
13981         - s,gtk_type_new,camel_object_new,g
13982         - s,GtkType,CamelType,g
13983         - Change get_type function over to camel_type_declare
13984         - instead of hooking to finalize function, it goes into the
13985           type declaration.
13986         - remove signals.
13987         - instead of GTK_OBJECT(so)->klass, CAMEL_OBJECT_GET_CLASS(so)
13988         - s,gtk_type_class,camel_type_get_global_classfuncs,g
13989         - don't chain finalize handlers; it will be done for you
13990         
13991 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
13992
13993         * providers/imap/camel-imap-folder.c: 
13994         * providers/imap/camel-imap-store.c: If a SELECT fails, set
13995         imap_store->current_folder to NULL so a SELECT is forced before
13996         any message/folder operations are requested. Also, because some
13997         users don't use a namespace, make sure that if the url->path is 
13998         "/" we don't use it when creating the folder_path.
13999         (camel_imap_command[_extended]): Since we allow the passing of
14000         a NULL folder which we can use to bypass a forced SELECT, no need
14001         to check for the individual commands that don't require a folder
14002         to be selected.
14003
14004 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
14005
14006         * providers/imap/camel-imap-folder.c: 
14007         * providers/imap/camel-imap-store.c: Updated to use CAMEL_IMAP_OK, 
14008         CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and CAMEL_IMAP_FAIL rather than the 
14009         ones copied from the POP3 provider. 
14010
14011 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
14012
14013         * providers/imap/camel-imap-folder.c (imap_get_summary): Oops.
14014         If the number of messages in the folder is 0, don't fetch
14015         summaries 1 thru 0, just return an empty summary.
14016         (imap_copy_message_to): Fixed to use message UID and also send
14017         the source folder as an arg to camel_imap_command rather than NULL.
14018         (imap_move_message_to): Same.
14019         (imap_init): If SELECT is successful, we need to set the current
14020         folder to the one selected, this was causing problems with move/copy
14021
14022 2000-07-13  Dan Winship  <danw@helixcode.com>
14023
14024         * camel-service.h: define a set of CAMEL_SERVICE_URL_ALLOW_* flags
14025         parallel to the _NEED_* flags, and make the _NEED_* flags imply
14026         the _ALLOW_* ones.
14027
14028         * providers/imap/camel-imap-store.c (camel_imap_store_init): imap
14029         urls ALLOW_PATH
14030
14031 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
14032
14033         * providers/imap/camel-imap-folder.c (imap_get_summary): New
14034         and improved approach to fetching an entire folder summary
14035         that should be much much faster than the old way as it gets
14036         the entire folder summary in 1 shot rather than requesting
14037         message by message. As with the last update, this version
14038         also only fetches the minimum number of header fields.
14039         (imap_get_summary): Oops, forgot to free the temp 
14040         GPtrArray *headers
14041
14042 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
14043
14044         * providers/imap/camel-imap-folder.c (imap_get_summary): Don't
14045         fetch the entire RFC822 header, just fetch the fields we want.
14046         (imap_get_message_info): Same.
14047
14048 2000-07-13  Not Zed  <NotZed@HelixCode.com>
14049
14050         * camel-mime-filter-basic.c (camel_mime_filter_basic_new_type):
14051         Reset filter on setup.
14052         (reset): When resetting qp encoding, set the state to -1, instead
14053         of 0.
14054
14055         * camel-mime-utils.c (quoted_encode_step): Actually count the
14056         characters output sofar (it never counted any).  Bunch of other
14057         fixes.
14058         (quoted_encode_close): Also flush out final character, if there's
14059         one.
14060
14061 2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>
14062
14063         Chris forgot to add #include <e-util/e-util.h> to the source files
14064         
14065         * providers/imap/camel-imap-store.c (imap_connect): Fixed Peter's 
14066         fix, we don't want to send a string to a %d.
14067
14068 2000-07-12  Christopher James Lahey  <clahey@helixcode.com>
14069
14070         * camel-folder-search.c, providers/imap/camel-imap-store.c:
14071         Changed from strstrcase to e_strstrcase.
14072
14073         * string-utils.c, string-utils.h: Removed strstrcase (in favor of
14074         e_strstrcase in e-util/e-util.c.)
14075
14076 2000-07-12  Chris Toshok  <toshok@helixcode.com>
14077
14078         * providers/nntp/camel-nntp-folder.c
14079         (nntp_folder_set_message_flags): get the article num out of our
14080         uid and mark it read in the newsrc.
14081         (nntp_folder_get_message): get the message id out of the uid to
14082         fetch the article.
14083
14084         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): the uid
14085         is now <article-num>,<messageid>
14086         (get_HEAD_headers): same.
14087
14088         * camel-mime-parser.c (folder_scan_step): go to HSCAN_MESSAGE
14089         state when ct->subtype is "news" as well as "rfc822".  this makes
14090         attachments of type "message/news" display properly.
14091
14092 2000-07-12  Dan Winship  <danw@helixcode.com>
14093
14094         * camel-folder.c (camel_folder_free_deep,
14095         camel_folder_free_shallow, camel_folder_free_nop): Useful default
14096         implementations for free_{uids,subfolder_names,summary}.
14097         (free_subfolder_names, free_uids): Make these g_warning-ing
14098         default implementations.
14099
14100         * providers/*/camel-*-folder.c: Use the new functions where
14101         appropriate, remove duplicated code.
14102
14103 2000-07-12  Peter Williams  <peterw@helixcode.com>
14104
14105         * providers/imap/camel-imap-store.c (query_auth_types): Check for
14106         NULL parameters when setting the exception so as to not crash on
14107         Solaris (can't handle a %s passed NULL).
14108         (imap_connect): Same.
14109         
14110 2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>
14111
14112         * providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use
14113         mbox_set_message_flags () instead of setting the flags by hand. This
14114         fixes the problem of the "message_changed" signal not being emitted
14115         at the correct time.
14116
14117         * providers/imap/camel-imap-folder.c: "folder_changed" signals should
14118         pass a third argument (which is ignored).
14119
14120         * camel-folder.c: Undo gtk signal emits done in set_flags and 
14121         expunge.
14122         (move_message_to): 
14123         (copy_message_to): Create info as a const CamelMessageInfo
14124
14125 2000-07-12  Chris Toshok  <toshok@helixcode.com>
14126
14127         * providers/nntp/Makefile.am: don't add test-newsrc to the build
14128         since it needs libcamel (which isn't built at the time test-newsrc
14129         needs linking.)
14130
14131         * providers/nntp/camel-nntp-utils.c (get_HEAD_headers): fill in
14132         MessageInfo->message_id.
14133         (get_XOVER_headers): same.
14134
14135         * providers/nntp/camel-nntp-folder.c (nntp_folder_init): move
14136         summary loading here.
14137         (nntp_folder_sync): summary/newsrc changes should be stored here.
14138         put a comment to that effect.
14139         (nntp_folder_set_message_flags): don't save the newsrc here.
14140         (nntp_folder_get_uids): use g_ptr_array_index instead of the
14141         cast/addition.
14142         (nntp_folder_get_summary): no need to check if we should generate
14143         the summary here.  already done.
14144         (nntp_folder_get_message_info): implement.
14145
14146         * providers/nntp/camel-nntp-store.c
14147         (camel_nntp_store_get_toplevel_dir): use evolution_dir instead of
14148         computing it ourselves.
14149         (nntp_store_disconnect): call camel_nntp_newsrc_write.
14150         (ensure_news_dir_exists): new function to create the news/<news
14151         server> subdir.
14152         (camel_nntp_store_class_init): hook up connect/disconnect and
14153         finalize.
14154         (nntp_store_connect): if ensure_news_dir_exists fails throw an
14155         exception.
14156
14157 2000-07-12  Peter Williams  <peterw@helixcode.com>
14158
14159         * camel-folder.c (camel_folder_set_message_flags): Emit a message_changed
14160         signal once the flags are set on the message.
14161         (camel_folder_set_user_flag): Ditto.
14162         (camel_folder_expunge): Emit a folder_changed if no exception.
14163
14164 2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>
14165
14166         * camel-stream.c: Use size_t and ssize_t for read/write methods
14167         
14168         * providers/imap/camel-imap-folder.c (imap_set_message_flags): 
14169         Updated to emit the message_changed signal.
14170         (imap_delete_message): Updated to use imap_set_message_flags ().
14171         (imap_move_message_to): Updated to use imap_set_message_flags ()
14172         and to emit the folder_changed signal on the destination folder.
14173         (imap_copy_message_to): Updated to emit the folder_changed signal 
14174         on the destination folder.
14175         (imap_append_message): Updated to emit the folder_changed signal 
14176         on the destination folder.
14177
14178 2000-07-11  Jeffrey Stedfast  <fejj@helixcode.com>
14179
14180         * camel-folder.c (camel_folder_append_message): Now takes a
14181         flags argument to specify the flags to be set on the message
14182         since we might not necessarily want the flags to be wiped clean.
14183         (move_message_to):
14184         (copy_message_to): Updated to send a flags argument to 
14185         append_message (); currently sends the original message's flags.
14186
14187         * providers/mbox/camel-mbox-folder.c (mbox_append_message): 
14188         * providers/imap/camel-imap-folder.c (imap_append_message): 
14189         Updated.
14190
14191 2000-07-11  Dan Winship  <danw@helixcode.com>
14192
14193         * camel-folder.c: Remove exceptions from a number of methods
14194         that work on what ought to be static data: get_parent_folder,
14195         get_parent_store, get_message_count, get_unread_message_count,
14196         get_permanent_flags, get_message_flags, set_message_flags,
14197         get_message_user_flag, set_message_user_flag, get_message_uid,
14198         get_uids, get_summary, get_subfolder_names. Turn
14199         camel_folder_delete_message into a macro.
14200
14201         * providers/{mbox,pop3,vee}: Update for CamelFolder changes
14202
14203         * providers/Makefile.am: Disable imap and nntp for now
14204
14205 2000-07-11  Jeffrey Stedfast  <fejj@helixcode.com>
14206
14207         * providers/imap/camel-imap-folder.c (imap_search_by_expression): 
14208         This shouldn't return NULL, it should return g_ptr_array_new ()
14209         so the mailer gets what it expects.
14210
14211 2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>
14212
14213         * camel-folder-summary.c (camel_folder_summary_decode_string): 
14214         Oops, an unsigned integer can never be < 0
14215
14216 2000-07-10  Dan Winship  <danw@helixcode.com>
14217
14218         * providers/vee/camel-vee-folder.c (vee_search_by_expression):
14219         Initialize a variable to make this not crash again. And fix a bug
14220         so it actually does something.
14221
14222 2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>
14223
14224         * camel-folder-summary.c: Cleaned up a bunch of compile warnings
14225
14226 2000-07-10  Dan Winship  <danw@helixcode.com>
14227
14228         * providers/vee: kill more debugging messages
14229
14230 2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>
14231
14232         * providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count): 
14233         * providers/vee/camel-vee-folder.c (vee_get_unread_message_count): 
14234         * providers/imap/camel-imap-folder.c (imap_get_unread_message_count):
14235         Implemented.
14236
14237         * camel-folder.c (camel_folder_get_unread_message_count): New
14238         convenience function to allow the mailer to query the number
14239         of unread messages in a folder (for displaying message stats
14240         in a folder tree?).
14241
14242 2000-07-09  Dan Winship  <danw@helixcode.com>
14243
14244         * camel-mime-utils.c (header_references_dup): New function to copy
14245         a header_references structure.
14246
14247         * camel-folder-summary.c (camel_message_info_dup_to): New function
14248         to (deep) copy the data from one CamelMessageInfo into another.
14249         (camel_message_info_free): And free the data.
14250
14251         * providers/vee/camel-vee-folder.c (vee_sync): Implement. (empty).
14252         (vee_search_by_expression): belatedly update for
14253         camel_folder_search change.
14254         (vee_folder_build): belatedly update for camel_folder_search
14255         change. Use camel_message_info_dup_to and camel_message_info_free
14256         (in particular, so that we get message_id and references info so
14257         vfolders can be threaded).
14258         (vee_folder_build_folder): Ditto.
14259
14260 2000-07-08  Jeffrey Stedfast  <fejj@helixcode.com>
14261
14262         * providers/nntp/camel-nntp-folder.c: 
14263         * providers/nntp/camel-nntp-utils.c: 
14264         * providers/nntp/camel-nntp-store.c: Update to reflect past changes
14265         in the Camel API. Use gtk macro casts wherever possible and use glib's
14266         memory functions instead of standard c's (since they are not 
14267         compatable)
14268
14269         * providers/smtp/camel-smtp-transport.c: 
14270         * providers/imap/camel-imap-store.c: Wrap debug print statements
14271         in a macro
14272
14273         * providers/imap/camel-imap-stream.c (stream_read): Make sure
14274         that we get up to and including the last \n of the mime part.
14275
14276         * providers/imap/camel-imap-folder.c (imap_get_message): Make sure
14277         that we get up to and including the last \n of the mime part.
14278         Wrap debug print statements in a macro.
14279
14280         * providers/imap/camel-imap-stream.c (stream_read): Only cache
14281         the important data (aka the mime part requested and no extra
14282         server response stuff)
14283
14284 2000-07-07  Dan Winship  <danw@helixcode.com>
14285
14286         * camel-mime-utils.c (header_references_decode): Work around
14287         In-Reply-To's with unquoted punctuation. So many broken mailers.
14288
14289         * camel-folder.c (camel_folder_search_by_expression): Make this
14290         return a GPtrArray rather than a GList.
14291
14292         * camel-folder-search.c (camel_folder_search_execute_expression):
14293         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
14294         * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
14295         * providers/nntp/camel-nntp-folder.c (nntp_search_by_expression):
14296         Update to return a GPtrArray rather than a GList.
14297
14298 2000-07-07  Jeffrey Stedfast  <fejj@helixcode.com>
14299
14300         * providers/smtp/camel-smtp-transport.c (esmtp_get_authtypes): 
14301         Fixed the parser to actually work
14302
14303 2000-07-06  Dan Winship  <danw@helixcode.com>
14304
14305         * camel-mime-utils.c (header_references_decode): Make this deal
14306         with the full RFC822 References/In-Reply-To format rather than
14307         just the more-nicely-behaved RFC1036 version. (Needed to parse
14308         In-Reply-To headers with extra junk in them.)
14309
14310 2000-07-06  Jeffrey Stedfast  <fejj@helixcode.com>
14311
14312         * providers/imap/camel-imap-folder.c (imap_get_summary): Parse for
14313         more header information to allow message threading in IMAP.
14314         (imap_get_message_info): Same.
14315
14316         * camel-folder-summary.c: Renamed summary_format_* to
14317         camel_summary_format_* and moved them into public scope.
14318
14319         * providers/smtp/camel-smtp-transport.c (smtp_connect): Oops. Don't
14320         pass port # as a string in the error code (if it fails to connect).
14321
14322         * providers/imap/camel-imap-folder.c (imap_append_message): Changed
14323         over to camel_imap_command_extended as that was the source of the
14324         problems - apparently appending replies with more than just 1 line.
14325
14326 2000-07-05  Dan Winship  <danw@helixcode.com>
14327
14328         * camel-folder-search.c (search_header_contains): make header
14329         matching case-insensitive
14330
14331         * camel-folder-summary.c:
14332         * camel-session.c:
14333         * providers/mbox/camel-mbox-folder.c:
14334         * providers/mbox/camel-mbox-summary.c: Remove some non-error case
14335         debugging-type messages.
14336
14337 2000-07-05  Ettore Perazzoli  <ettore@helixcode.com>
14338
14339         * providers/mbox/camel-mbox-summary.c (d): Define to empty so that
14340         we get rid of a ton of debugging messages.
14341
14342 2000-07-05  Jeffrey Stedfast  <fejj@helixcode.com>
14343
14344         * camel-mime-utils.h: Added prototype for uudecode_step
14345
14346         * camel-mime-utils.c (uudecode_step): Cleaned up some junk that
14347         should have been cleaned up when debugging printf's were taken out.
14348
14349 2000-07-05  Ettore Perazzoli  <ettore@helixcode.com>
14350
14351         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
14352         Update the X-Evolution: header even if the in-memory UID and the
14353         saved UID are not the same.  Otherwise mboxes with clashing UIDs
14354         can never be fixed.
14355
14356         * camel-folder-summary.c
14357         (camel_folder_summary_add_from_parser): Add the message to the
14358         summary before doing any ibex stuff.  In fact, this might also
14359         have the side effect of reassigning the UID so it needs to be done
14360         before we start using the UID.
14361
14362         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Add
14363         debugging message to keep track of the UIDs we add.
14364
14365 2000-07-05  Dan Winship  <danw@helixcode.com>
14366
14367         * camel-folder-summary.c: Add "Cc" to summary and bump summary
14368         version number.
14369
14370         * camel-folder-search.c (search_header_contains): make "Cc" a
14371         searchable header.
14372
14373 2000-07-03  Ettore Perazzoli  <ettore@helixcode.com>
14374
14375         * camel-folder-summary.c (camel_folder_summary_next_uid_string):
14376         New.
14377         (camel_folder_summary_add): Use
14378         `camel_folder_summary_next_uid_string()' instead of recomputing
14379         the UID manually here.
14380         (camel_folder_summary_add_from_parser): Likewise.
14381
14382 2000-07-03  Ettore Perazzoli  <ettore@helixcode.com>
14383
14384         * camel-folder-summary.c (camel_folder_summary_set_uid): Removed.
14385
14386 2000-07-03  Dan Winship  <danw@helixcode.com>
14387
14388         * camel-folder-summary.c (message_info_new): Parse In-Reply-To
14389         with header_references_decode, not header_msgid_decode.
14390
14391         * camel-mime-message.c (camel_mime_message_class_init): message
14392         headers are case-insensitive.
14393
14394         * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fix a
14395         bug in error-setting code.
14396         (pop3_connect): Don't re-prompt for password in the KPOP case.
14397         (pop3_get_response): New function, split out from
14398         camel_pop3_command.
14399         (connect_to_server): Use pop3_get_response to parse the greeting
14400         message, and error out appropriately if it's -ERR.
14401
14402 2000-07-02  Dan Winship  <danw@helixcode.com>
14403
14404         * camel-folder.c (camel_folder_freeze, camel_folder_thaw): New
14405         functions to freeze and thaw a folder (to prevent message/folder
14406         changed signals in the middle of a long series of operations).
14407         (camel_folder_class_init): Change signals to GTK_RUN_FIRST.
14408         (message_changed, folder_changed): Add default implementations
14409         that stop the emission and record info for later if the folder is
14410         frozen.
14411
14412         * providers/mbox/camel-mbox-folder.c (mbox_sync): leftover fixes
14413         from the close->sync change: don't destroy the ibex, summary, and
14414         search when syncing.
14415         (append_message): emit "folder_changed" on a successful append.
14416
14417 2000-07-02  Jeffrey Stedfast  <fejj@helixcode.com>
14418
14419         * camel-mime-utils.c (uudecode_step): A rather complex uudecoder
14420         written in the spirit of Zucchi-ness, is it up to par? Only the 
14421         Z-man can tell us :-)
14422
14423 2000-07-01  Dan Winship  <danw@helixcode.com>
14424
14425         * camel-service.c (camel_service_get_name): New method, to return
14426         an end-user-friendly name corresponding to a service. (eg, "POP
14427         service for danw on trna.helixcode.com").
14428
14429         * providers/imap/camel-imap-store.c,
14430         providers/mbox/camel-mbox-store.c,
14431         providers/nntp/camel-nntp-store.c,
14432         providers/pop3/camel-pop3-store.c,
14433         providers/sendmail/camel-sendmail-transport.c,
14434         providers/smtp/camel-smtp-transport.c: Implement.
14435
14436         * providers/imap/Makefile.am: remove unneeded
14437         libcamelimap_la_LDADD.
14438
14439         * providers/pop3/camel-pop3-store.c (connect_to_server): fix the
14440         CAPA-parsing code to not get into an infinite loop.
14441
14442 2000-07-01  Jeffrey Stedfast  <fejj@helixcode.com>
14443
14444         * providers/imap/camel-imap-folder.c (imap_get_message): Fixed
14445         the bug that would sometimes leave part of the server response
14446         tacked on to the end of the message.
14447
14448         * camel-folder.c: Renamed _by_uid methods. Since we no longer
14449         have get-by-number methods, no need to have the _by_uid 
14450         extensions. 
14451         (get_message_by_uid): Renamed to get_message
14452         (delete_message_by_uid): Renamed to delete_message
14453         (summary_get_by_uid): Renamed to get_message_info
14454
14455         * providers/mbox/camel-mbox-folder.c: 
14456         * providers/pop3/camel-pop3-folder.c:
14457         * providers/imap/camel-imap-folder.c:
14458         * providers/vee/camel-vee-folder.c: Updated to reflect
14459         camel-folder changes.
14460
14461 2000-06-30  Jeffrey Stedfast  <fejj@helixcode.com>
14462
14463         * camel-folder.c (camel_folder_copy_message_to): New function, to
14464         copy a message from one folder to another. The default
14465         implementation just uses append_message, but providers can 
14466         implement more efficient versions for use when both folders are on 
14467         the same store.
14468
14469         * broken-date-parser.[c,h]: Utilities for parsing broken
14470         date strings.
14471         
14472         * providers/imap/camel-imap-folder.c (imap_move_message_to): 
14473         (imap_copy_message_to): Implemented.
14474
14475         * camel-mime-utils.c (header_decode_date): Wrote some code to try
14476         and un-mangle broken date formats and then parse that new string 
14477         instead.
14478
14479 2000-06-30  Dan Winship  <danw@helixcode.com>
14480
14481         * camel-folder.c (camel_folder_move_message_to): New function, to
14482         move a message from one folder to another. The default
14483         implementation just uses append_message and delete_message, but
14484         providers can implement more efficient versions for use when both
14485         folders are on the same store.
14486
14487 2000-06-29  Jeffrey Stedfast  <fejj@helixcode.com>
14488
14489         * providers/imap/camel-imap-folder.c (imap_expunge): Should now
14490         print a meaningful error message when it doesn't succeed
14491
14492 2000-06-28  Jeffrey Stedfast  <fejj@helixcode.com>
14493
14494         * providers/imap/camel-imap-store.c (imap_connect): Changed to
14495         keep prompting user for a valid password until it either
14496         authenticates or until Canceled by the user.
14497         (camel_imap_command_extended): Improved speed (replaced the
14498         g_strjoinv call with a faster implementation)
14499
14500         * providers/pop3/camel-pop3-store.c 
14501         (camel_pop3_command_get_additional_data): Fixed.
14502         (pop3_connect): Changed to keep prompting the user for a
14503         password until it either works or until Canceled by the user.
14504
14505         * providers/mbox/camel-mbox-summary.c: General cleanup
14506         (camel_mbox_summary_sync): Fixed a memory leak and added
14507         CamelException handling.
14508
14509         * providers/mbox/camel-mbox-store.c (delete_folder): Fixed a 
14510         memory leak
14511
14512         * providers/mbox/camel-mbox-folder.c (mbox_append_message): 
14513         Default 'off_t seek' to -1 so as to make sure it's initialized
14514         before it's used in the case of a bad stat() call.
14515         (mbox_sync): Updated
14516         (mbox_expunge): Updated
14517
14518 2000-06-27  Jeffrey Stedfast  <fejj@helixcode.com>
14519
14520         * providers/imap/camel-imap-store.c (imap_connect): Move the 
14521         CAPABILITY command here so we don't have to keep checking
14522         each time we open a folder.
14523         (camel_imap_command_extended): If we are doing an EXAMINE,
14524         don't bother doing a SELECT first.
14525
14526         * providers/imap/camel-imap-folder.c (imap_init): Update so
14527         folder->has_search_capability depends on the parent IMAP store
14528         (since this is really dependant on the IMAP implementation and
14529         not the folder)
14530
14531 2000-06-27  Christopher James Lahey  <clahey@helixcode.com>
14532
14533         * providers/smtp/camel-smtp-transport.c: Don't close the filter
14534         stream when done with it (this causes the source stream to close);
14535         Instead, just flush it when done.
14536
14537 2000-06-27  Michael Zucchi  <zucchi@zedzone.mmc.com.au>
14538
14539         * camel-folder-search.c (search_header_contains): Make header
14540         search 'to' match 'to', and not 'from', small typo, fixes #317.
14541
14542 2000-06-26  Christopher James Lahey  <clahey@helixcode.com>
14543
14544         * providers/mbox/camel-mbox-summary.c: Added debugging
14545         information.
14546
14547 2000-06-23  Jeffrey Stedfast  <fejj@helixcode.com>
14548
14549         * providers/imap/camel-imap-store.c: 
14550         * providers/imap/camel-imap-folder.c: Improved folder parsing.
14551         Not specifying a namespace should no longer list the entire
14552         filesystem.
14553
14554 2000-06-22  Chris Toshok  <toshok@helixcode.com>
14555
14556         * providers/nntp/.cvsignore: ignore test-newsrc
14557
14558         * providers/nntp/camel-nntp-store.c,
14559         providers/nntp/camel-nntp-store.h,
14560         providers/nntp/camel-nntp-folder.c,
14561         providers/nntp/camel-nntp-folder.h,
14562         providers/nntp/camel-nntp-utils.c: Bring the nntp provider up to a
14563         state where it builds and is usable with the current camel.  there
14564         are still warts (semi-broken .newsrc file handling, and a lack of
14565         a subscribe ui -- in fact no way to add a new server, really), but
14566         it'll display news messages.
14567
14568         * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
14569         camel-nntp-newsrc.c
14570         (libcamelnntpinclude_HEADERS): add camel-nntp-newsrc.h
14571         also, add test-newsrc stuff.
14572         
14573         * providers/nntp/test-newsrc.c: new file that tests the newsrc
14574         stuff by parsing and regurgitating a .newsrc file for a particular
14575         server.
14576
14577         * providers/nntp/camel-nntp-newsrc.c,
14578         providers/nntp/camel-nntp-newsrc.h: new files, initial support for .newsrc files.
14579
14580 2000-06-22  Jeffrey Stedfast  <fejj@helixcode.com>
14581
14582         * providers/imap/camel-imap-folder.c (imap_get_message_count): 
14583         Oops. Now appends the namespace to the folder before querying
14584         for the number of messages.
14585
14586         * providers/imap/camel-imap-store.c (imap_folder_exists): New
14587         convenience function for use by imap_create().
14588         (get_folder): If folder is specified as "/", we really want
14589         "INBOX".
14590
14591         * providers/sendmail/camel-sendmail-provider.c:
14592         * providers/vee/camel-vee-provider.c:
14593         * providers/smtp/camel-smtp-provider.c:
14594         * providers/mbox/camel-mbox-provider.c:
14595         * providers/pop3/camel-pop3-provider.c:
14596         * providers/imap/camel-imap-provider.c: Updated
14597         
14598         * camel-session.c: Moved service_cache hash table into the
14599         providers.
14600         (service_cache_remove): Updated.
14601         (camel_session_get_service): Updated.
14602
14603         * camel-url.c (camel_url_hash): Took out the hashing of
14604         url->passwd. We don't want this anymore.
14605
14606         * providers/imap/camel-imap-folder.c (imap_init): Took out
14607         references to 'namespace'
14608         (camel_imap_folder_init): Same
14609
14610         * providers/imap/camel-imap-folder.h: No more namespace. We are
14611         instead going to use url->path as the namespace.
14612
14613 2000-06-21  Jeffrey Stedfast  <fejj@helixcode.com>
14614
14615         * providers/imap/camel-imap-store.c (imap_create): Modified to
14616         use the "namespace" (url->path) if it exists.
14617
14618         * providers/imap/camel-imap-folder.c (imap_delete_message_by_uid):
14619         Now just sets the deleted flag on the summary rather than speaking 
14620         directly to the IMAP server. This is both faster and cleaner.
14621
14622 2000-06-21  Dan Winship  <danw@helixcode.com>
14623
14624         * providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb
14625         bug.
14626
14627 2000-06-21  Jeffrey Stedfast  <fejj@helixcode.com>
14628
14629         * providers/imap/camel-imap-folder.c (imap_get_message_by_uid): 
14630         We are getting mail in IMAP now!! whoo-hoo!. Stripped out the 
14631         filtering so messages may have some dot-stuffing, but the 
14632         filtering can always be added back in later when we know it 
14633         works and isn't the problem.
14634
14635 2000-06-21  Peter Williams  <peterw@curious-george.helixcode.com>
14636
14637         * providers/mbox/camel-mbox-folder.c (mbox_init): Use the basename
14638         of the mailbox so we don't get pathnames like ~/evolution/inbox///movemail.ibex
14639
14640 2000-06-21  Dan Winship  <danw@helixcode.com>
14641
14642         * camel-folder-summary.c (message_info_new): Set date_received
14643         based on the first (most recent) "Received" header.
14644
14645 2000-06-20  Dan Winship  <danw@helixcode.com>
14646
14647         * camel-mime-part.c (write_to_stream): flush the filter stream
14648         before unreffing it, so it will camel_mime_filter_complete.
14649
14650         * camel-stream-filter.c (camel_stream_filter_class_init): Fix a
14651         braino so camel_stream_flush works here.
14652
14653         * camel-stream-mem.c (stream_seek): Fix a bug that resulted in
14654         large attachments being silently dropped.
14655
14656         * providers/pop3/camel-pop3-store.c
14657         (camel_pop3_command_get_additional_data): Don't use g_strjoinv
14658         here, since it is O(n^2) on the length of the output string, and
14659         we can do O(n).
14660
14661         * camel-mime-part-utils.c
14662         (simple_data_wrapper_construct_from_parser): add a CRLF decoder
14663         after the QP/B64 decoder if it's text.
14664
14665 2000-06-20  Jeffrey Stedfast  <fejj@helixcode.com>
14666
14667         * providers/imap/camel-imap-folder.c (imap_get_summary): Only
14668         fetch the summary if the folder summary doesn't already exist.
14669         When the summary *does* exist, start fetching from 1, not 0.
14670         (imap_free_summary): Don't do anything here.
14671         (imap_finalize): Free the summary here instead of in
14672         imap_free_summary().
14673         (imap_set_message_flags): Implemented
14674         (imap_sync): Added code to set flags on messages that have had
14675         their flags changed (however I #if'd it out until we are more
14676         confidant in the IMAP code :)
14677         (imap_summary_get_by_uid): Now parese flags correctly.
14678         (imap_get_summary): Now parese flags correctly. Also correctly
14679         parses the UID correctly.
14680
14681         * camel-url.c (check_equal): No need to check s1 if s2 is NULL
14682         (camel_url_equal): Don't check the passwd component of the url.
14683
14684 2000-06-20  Dan Winship  <danw@helixcode.com>
14685
14686         * camel-folder-summary.c (camel_folder_summary_add): mark the
14687         message info with CAMEL_MESSAGE_FOLDER_FLAGGED if we change the
14688         uid, so the folder will know that it's dirty.
14689
14690 2000-06-20  Jeffrey Stedfast  <fejj@helixcode.com>
14691
14692         * providers/imap/camel-imap-store.c (camel_imap_command_extended): 
14693         Now returns the last line of data that the server sends back as
14694         well. This is needed for commands like SELECT (like Peter pointed
14695         out).
14696         (camel_imap_command): No longer checks for SELECT (no need)
14697
14698         * providers/imap/camel-imap-folder.c: Added namespace stuff
14699         which we will need later on...
14700         (imap_parse_subfolder_line): Convenience function for use in
14701         get_subfolder_names()
14702         (imap_get_subfolder_names): Updated. Also changed it to use LIST
14703         instead of LSUB (temporary change).
14704
14705 2000-06-19  Jeffrey Stedfast  <fejj@helixcode.com>
14706
14707         * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set
14708         summary equal to NULL.
14709         (imap_get_summary): Store the summary in the ImapFolder
14710         (imap_summary_get_by_uid): If we have a summary cache in the
14711         ImapFolder, first check to see if that message info is in the
14712         cached summary first, if not fetch it directly from the IMAP
14713         server and append it to the summary cache.
14714         (imap_get_message_flags): Don't free the message info that we get
14715         back from summary_get_by_uid as we don't want to be corrupting our
14716         cached summary.
14717
14718 2000-06-19  Peter Williams  <peterw@curious-george.helixcode.com>
14719
14720         * providers/imap/camel-imap-store.c (camel_imap_command{,_extended}): When
14721         SELECT'ing a folder for an IMAP command, use _extended to grab the entire
14722         response (before we just used camel_imap_command and missed the OK codes)
14723
14724 2000-06-18  Jeffrey Stedfast  <fejj@helixcode.com>
14725
14726         * providers/imap/camel-imap-folder.c (imap_summary_get_by_uid): 
14727         Now gets the message flags as it should.
14728         (imap_get_summary): Same as imap_summary_get_by_uid
14729         (imap_get_permanent_flags): Return the permanent flags stored
14730         on the folder.
14731         (imap_get_message_flags): Return message flags associated with
14732         given uid. Note: we may want to somehow cache summary info so
14733         that we don't have to keep querying the IMAP provider in
14734         imap_summary_get_by_uid().
14735
14736 2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>
14737
14738         * providers/imap/camel-imap-folder.c (imap_free_summary): We were
14739         leaking memory - but not anymore!
14740         (imap_get_summary): We now get the UIDs and the beginnings of the
14741         code to get the message flags as well.
14742
14743 2000-06-17  Dan Winship  <danw@helixcode.com>
14744
14745         * camel-mime-parser.c (folder_scan_header): Don't copy newlines
14746         into the parsed header text, and turn any number of tabs and
14747         spaces after a newline into a single space.
14748
14749 2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>
14750
14751         * providers/imap/camel-imap-folder.c (imap_init): Should now
14752         correctly do CAPABILITY.
14753
14754 2000-06-17  Dan Winship  <danw@helixcode.com>
14755
14756         * providers/mbox/camel-mbox-summary.c: Add some debugging printfs
14757         when rebulding summary to help figure out why people's summaries
14758         are always being rebuilt.
14759
14760 2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>
14761
14762         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
14763         Began to implement, need to get information on how to
14764         deconstruct @expression into an IMAP search expression and
14765         parse the results.
14766         (imap_init): Now queries the IMAP provider for CAPABILITY to
14767         determine if SEARCH is implemented or not.
14768
14769         * providers/imap/imap.c: Removed - no longer a need to have
14770         this as an example for anyone interesting to help mecode IMAP
14771         support.
14772         
14773 2000-06-16  Jeffrey Stedfast  <fejj@helixcode.com>
14774
14775         * providers/imap/camel-imap-folder.c (imap_sync): Added code
14776         to expunge if called for (still need to finish coding this).
14777         (imap_get_uids): Implemented.
14778         (imap_get_summary): Found a way to get the date
14779         (imap_summary_get_by_uid): Same.
14780         (imap_free_summary): Implemented.
14781
14782         * string-utils.c (strstrcase): Fixed a compile warning
14783
14784         * providers/imap/camel-imap-summary.c: Removed - we don't
14785         need a CamelImapSummary structure.
14786
14787 2000-06-16  Dan Winship  <danw@helixcode.com>
14788
14789         Move flag handling from CamelMimeMessage to CamelFolder. This
14790         simplifies several flag-handling pieces of code in the mailer, and
14791         lets you change a message's flags without having to fetch the
14792         message body. It also means that fully-constructed
14793         CamelMimeMessages are now essentially constant, which will help
14794         simplify locking issues later since it means two threads
14795         interested in the same message can just work with separate copies
14796         of it.
14797
14798         * camel-mime-message.h (struct _CamelMimeMessage): Removed flags
14799         and user_flags (moved to summary). Removed expunged and
14800         message_number which were unused. Removed message_uid and folder
14801         which are no longer needed in the new scheme.
14802         (struct CamelMimeMessageClass): Removed message_changed signal and
14803         get/set_message_number methods.
14804
14805         * camel-mime-message.c: Updates for CamelMimeMessage changes.
14806         (camel_mime_message_get/set_flags,
14807         camel_mime_message_get/set_user_flag): Replaced with methods in
14808         CamelFolder.
14809         (camel_flag_get, camel_flag_set, camel_flag_list_size,
14810         camel_flag_list_free): Moved verbatim to camel-folder-summary.c
14811         
14812         * camel-folder.c (camel_folder_get/set_message_flags,
14813         camel_folder_get/set_message_user_flag): New methods (and
14814         corresponding useless default implementations)
14815         (camel_folder_class_init): add a message_changed signal
14816
14817         * camel-folder-summary.c (camel_flag_get, camel_flag_set,
14818         camel_flag_list_size, camel_flag_list_free): Moved here from
14819         camel-mime-message.c
14820
14821         * providers/mbox/camel-mbox-folder.c (message_changed): Removed.
14822         (mbox_get_message_flags, mbox_set_message_flags,
14823         mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak
14824         summary bits as appropriate. (Functionality moved here from
14825         message_changed.)
14826         (mbox_get_message_by_uid): Update for CamelMimeMessage changes
14827         (less stuff to initialize).
14828
14829         * providers/imap/camel-imap-folder.c (message_changed): Remove
14830         this. It was just copied from the mbox provider and doesn't deal
14831         with the real IMAP flag stuff anyway. (So there's currently no
14832         flag support in the IMAP provider.)
14833         (imap_get_message_by_uid): Update for CamelMimeMessage changes.
14834
14835         * providers/vee/camel-vee-folder.c: (message_changed): Remove old
14836         one. Add a new one to listen for message_changed on each folder
14837         and re-emit message_changed signals that correspond to messages in
14838         the vfolder.
14839         (vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy
14840         flag setting to the underlying real messages.
14841         (vee_append_message): Removed for now; there's no way to translate
14842         this into the new CamelMimeMessage/CamelFolder scheme, but (a)
14843         there's also no code which would ever call it and (b) we're
14844         probably going want a better interface than append_message for
14845         message drag and drop to work anyway. To be revisited.
14846
14847 2000-06-16  Dan Winship  <danw@helixcode.com>
14848
14849         * camel-mime-utils.c (rfc2047_decode_word): 
14850         * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): 
14851         * camel-folder-summary.c (summary_build_content_info): 
14852         KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet,
14853         output ISO-8859-1 instead, so Ettore can read his Italian mail. :)
14854         This will be reverted later.
14855
14856 2000-06-15  Jeffrey Stedfast  <fejj@helixcode.com>
14857
14858         * providers/imap/camel-imap-folder.c (imap_get_summary): Started to 
14859         implement - may want to use ENVELOPE instead of BODY.PEEK[HEADER]
14860         (imap_summary_get_by_uid): Started to code, I've got to find a way to 
14861         get the date in time_t format and also get the flags
14862
14863         * string-utils.c (strstrcase): Added this convenience function - I
14864         know about strcasestr() but it's not portable.
14865
14866 2000-06-15  Dan Winship  <danw@helixcode.com>
14867
14868         * camel-service.c: Remove camel_service_connect_with_url. (URLs
14869         must be specified when the service is requested from the session,
14870         so that there can only ever be one service for any URL.)
14871
14872         * camel-folder.c: (camel_folder_open, camel_folder_is_open,
14873         camel_folder_get_mode): Kill. Folders are now always open, and
14874         handle "closing" sorts of operations at sync or finalize time.
14875         (camel_folder_sync): renamed from camel_folder_close. Syncs state
14876         to the store but doesn't necessarily close/disconnect.
14877
14878         * providers/*/camel-*-folder.c: Merge "open" methods into "init"
14879         methods. Rename close to sync and update appropriately.
14880
14881         * providers/imap/camel-imap-store.c: Remove camel_imap_store_open
14882         and camel_imap_store_close, which should not have been copied from
14883         the POP provider (where the exist to work around limitations of
14884         the POP protocol).
14885
14886         * providers/mbox/camel-mbox-summary.c: fix a bug. (don't expunge
14887         deleted messages if called with expunge == FALSE)
14888         
14889         * providers/pop3/camel-pop3-store.c (connect_to_server): Check
14890         server for various interesting extensions.
14891
14892         * providers/pop3/camel-pop3-folder.c (get_uids): If the server
14893         supports UIDL, use real UIDs rather than fake ones.
14894         (etc): Map uids back to numbers appropriately
14895
14896         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Fix to
14897         previous change: make sure the "seek" variable ends up with the
14898         value it should.
14899
14900         * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
14901         summary mtime as well as size.
14902
14903 2000-06-14  Dan Winship  <danw@helixcode.com>
14904
14905         * providers/mbox/camel-mbox-folder.c (mbox_append_message): if the
14906         mbox doesn't end with a '\n', write one before appending the new
14907         message.
14908
14909 2000-06-14  Jeffrey Stedfast  <fejj@helixcode.com>
14910
14911         * camel-mime-filter-crlf.c (filter): Updated the encoder to allocate 
14912         more memory (since we are also now adding dots). Also updated the
14913         decoder as we have found that it sometimes passes the end of the 
14914         buffer.
14915
14916         * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Took out the
14917         filter code (we already filter in 
14918         camel_pop3_command_get_additional_data)
14919
14920         * camel-folder.c (init): Updated: a separator is now a char* rather 
14921         than a single char because IMAP can have a string for a directory 
14922         separator. Also, since IMAP does not begin with a directory separator,
14923         there is a new argument (path_begins_with_sep) which decides if a 
14924         directory should begin with a directory separator.
14925
14926         * providers/imap/camel-imap-store.c (imap_create): Since, on connect,
14927         Camel tries to create INBOX (which already exists on every IMAP 
14928         provider) we can return TRUE when the folder name is "INBOX".
14929
14930         * providers/vee/camel-vee-folder.c (vee_init): Updated.
14931
14932         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated.
14933
14934         * providers/mbox/camel-mbox-store.c (get_folder): Updated.
14935
14936         * providers/mbox/camel-mbox-folder.c (mbox_init): Updated.
14937
14938         * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated.
14939
14940 2000-06-14  Dan Winship  <danw@helixcode.com>
14941
14942         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
14943         Renamed from camel_mbox_summary_expunge. Takes a gboolean saying
14944         whether to expunge or just sync the mbox file. Change some
14945         g_errors to g_warning so we don't abort. Make the quick
14946         X-Evolution updating code lseek around correctly. Update the
14947         mbox mtime in the summary file even in the quick case.
14948
14949         * providers/mbox/camel-mbox-summary.h: make
14950         CAMEL_MESSAGE_FOLDER_NOXEV not conflict with
14951         CAMEL_MESSAGE_FOLDER_FLAGGED defined in camel-mime-message.h
14952
14953         * providers/mbox/camel-mbox-folder.c (mbox_close): call
14954         camel_mbox_summary_sync to save flag state if not expunging.
14955         (mbox_expunge): Update for camel_mbox_summary_expunge rename.
14956
14957 2000-06-13  Jeffrey Stedfast  <fejj@helixcode.com>
14958
14959         * providers/imap/camel-imap-store.c (camel_imap_store_open): 
14960         (camel_imap_store_close): Added.
14961         (camel_imap_command_extended): Fixed a segfault and updated
14962         to use camel_imap_status()
14963         (camel_imap_command): Updated to use camel_imap_status()
14964         (camel_imap_status): New convenience function for parsing
14965         the return status of an IMAP command
14966
14967 2000-06-12  Jeffrey Stedfast  <fejj@helixcode.com>
14968
14969         * providers/imap/camel-imap-folder.c (imap_get_message_by_uid): 
14970         Works like the POP fetch code, should work temporarily until
14971         we get around to coding it the way it "Should Be".
14972
14973         * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Now uses
14974         the camel-mime-filter-crlf decoder when retrieving messages.
14975
14976         * camel-mime-filter-smtp.c: Deprecated.
14977
14978         * providers/smtp/camel-smtp-transport.c (smtp_data): Updated to use
14979         camel-mime-filter-crlf with my 'dot' extension in place of
14980         camel-mime-filter-smtp
14981
14982         * camel-mime-part.c (write_to_stream): Updated to reflect changes
14983         made to camel-mime-filter-crlf.c
14984
14985         * camel-mime-filter-crlf.c (filter): Modified to be able to
14986         encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder
14987         so that it should no longer get caught in an infinite loop.
14988
14989 2000-06-12  Dan Winship  <danw@helixcode.com>
14990
14991         * providers/*/Makefile.am: don't pass a second (incorrect) -rpath
14992         in addition to the (correct) one automatically provided by
14993         automake.
14994
14995         * camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion.
14996         (Currently only tested in the LF->CRLF direction.)
14997
14998         * camel-mime-part.c (write_to_stream): if content-type is text,
14999         and it's QP or B64 encoded, pass through the CRLF filter before
15000         the other filter to satisfy the "canonical encoding" rules in the
15001         MIME spec.
15002
15003 2000-06-09  Dan Winship  <danw@helixcode.com>
15004
15005         * camel-session.c (camel_session_query_authenticator): Add another
15006         argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
15007         CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache
15008         bad info.
15009
15010         * providers/pop3/camel-pop3-store.c (pop3_connect): uncache the
15011         password if it doesn't work.
15012
15013 2000-06-09  Jeffrey Stedfast  <fejj@helixcode.com>
15014
15015         * providers/imap/camel-imap-stream.c (stream_read): Updated to reflect
15016         changes made in camel-imap-store.c
15017
15018         * providers/imap/camel-imap-store.c (imap_create): No longer checks to
15019         make sure a folder doesn't already exists (as this is no longer needed)
15020         (camel_imap_command): Now takes a CamelFolder argument so it can detect
15021         whether or not it needs to SELECT a folder or not
15022         (camel_imap_command_extended): Same.
15023
15024         * providers/smtp/camel-smtp-transport.c (smtp_connect): Will now always
15025         send EHLO first, if that fails it will fall back on HELO.
15026         (esmtp_get_authtypes): Should now correctly parse authtypes.
15027
15028 2000-06-07  Jeffrey Stedfast  <fejj@helixcode.com>
15029
15030         * providers/imap/camel-imap-summary.c: Now builds (not that it's worth
15031         much yet).
15032         
15033         * providers/imap/camel-imap-folder.c (imap_get_uids): Now uses the 
15034         correct cast to a CamelImapMessageInfo structure (should get rid of 
15035         compile warnings).
15036
15037         * providers/imap/Makefile.am: Added rules to build 
15038         camel-imap-stream
15039         
15040         * providers/imap/camel-imap-store.c (get_folder): Update.
15041         Moved imap_create here.
15042
15043         * providers/imap/camel-imap-folder.c (delete_messages): Remove.
15044         (imap_create): Removed.
15045         (imap_delete): Removed.
15046         (imap_exists): Removed.
15047
15048         * providers/imap/camel-imap-stream.h: Added typedef's for the stream
15049
15050         * providers/imap/camel-imap-stream.c: Modified to build cleanly
15051
15052 2000-06-07  Not Zed  <NotZed@HelixCode.com>
15053
15054         * camel-mime-utils.c (header_msgid_decode_internal): Properly
15055         dereference warning/debug messages.
15056         (header_references_decode): Check we actually have msgid stuff
15057         before trying to decode it ...
15058
15059 2000-06-06  Jeffrey Stedfast  <fejj@helixcode.com>
15060
15061         * camel-imap-stream.[c,h]: Removed
15062
15063         * providers/imap/camel-imap-stream.[c,h]: Relocated to this
15064         location
15065
15066         * providers/imap/camel-imap-summary.c: Added
15067
15068 2000-06-06  Dan Winship  <danw@helixcode.com>
15069
15070         * camel-folder.c: Remove exists, create, delete. A CamelFolder
15071         now always references an existing folder. Remove delete_messages
15072         too since it wasn't being used. Add a "create" flag to
15073         get_subfolder saying whether or not to create the subfolder if it
15074         doesn't yet exist.
15075
15076         * camel-store.c (camel_store_get_folder): Add a "create" flag to
15077         say whether or not to create the folder if it doesn't yet exist.
15078         (camel_store_delete_folder): New method, moved from CamelFolder.
15079         (cache_folder, uncache_folder): Fix up a bit.
15080         (get_folder_name): Explain what this is for.
15081
15082         * providers/mbox/camel-mbox-folder.c: 
15083         * providers/mbox/camel-mbox-store.c: Update. Remove support for
15084         hierarchical folders to simplify this for now, since we're not
15085         using it, and it's not completely clear how they should work in an
15086         ELocalStorage world. Needs to be revisited.
15087
15088         * providers/pop3/camel-pop3-folder.c (delete_messages): Remove.
15089         * providers/pop3/camel-pop3-store.c (get_folder): Update.
15090
15091         * providers/vee/camel-vee-folder.c (exists): Remove.
15092         * providers/vee/camel-vee-store.c (vee_get_folder): Update.
15093
15094 2000-06-06  Jeffrey Stedfast  <fejj@helixcode.com>
15095
15096         * providers/imap/camel-imap-*.[c,h]: Started on getting 
15097         imap to build cleanly (tho some work has not been completed
15098         so it still won't build until camel-imap-summary is finished
15099         along with a few methods in camel-imap-folder)
15100
15101         * camel-stream.[c,h]: Changed the read and write method prototypes
15102         to return an ssize_t type rather than an int and also changed
15103         the 'number of bytes' to read or write to a size_t type
15104
15105         * camel-stream-fs.c: same as above
15106
15107         * camel-stream-mem.c: again, same as above
15108
15109         * camel-stream-buffer.c: same
15110
15111         * camel-imap-stream.[c,h]: Added this new stream, cache's previously 
15112         read data so each successive call will instead read from the cache
15113         
15114 2000-06-05  Dan Winship  <danw@helixcode.com>
15115
15116         * camel-mime-part.c (camel_mime_part_set_disposition): fix
15117         typo/braino (set "Content-Disposition", not "Content-Description")
15118         (camel_mime_part_set_filename): const poison
15119
15120 2000-06-02  Not Zed  <NotZed@HelixCode.com>
15121
15122         * camel-mime-utils.c (base64_encode_step): Ick, damn signs!  Fix a
15123         bug with sign extended bytes.
15124
15125         * camel-mime-filter-smtp.c (filter): Changed layout/logic slightly
15126         (to match From filter)
15127
15128 2000-06-02  Jeffrey Stedfast  <fejj@helixcode.com>
15129
15130         * camel-mime-filter-smtp.c (filter): Fixed the filter so that it 
15131         wouldn't insert garbage under certain conditions.
15132
15133 2000-06-02  Christopher James Lahey  <clahey@helixcode.com>
15134
15135         * camel-session.c: Don't ref the services in the cache.
15136
15137 2000-06-02  Jeffrey Stedfast  <fejj@helixcode.com>
15138
15139         * providers/smtp/camel-smtp-transport.c: Rearanged where debug
15140         fprintf statements we placed so that any data the server sends 
15141         back is printed out before an exception is set and the function
15142         returns.
15143
15144 2000-06-02  Not Zed  <NotZed@HelixCode.com>
15145
15146         * camel-mime-utils.c (header_decode_date): If we get a funny
15147         result, just throw it out.  Basically a fix for the one true
15148         broken TradeClient.
15149
15150 2000-06-01  Not Zed  <NotZed@HelixCode.com>
15151
15152         * camel-folder-summary.c (message_info_free): Free
15153         references/messsage id.
15154         (message_info_save): Save them.
15155         (message_info_load): Load them.
15156         (message_info_new): And get them from the new message.
15157         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped for new changes.
15158
15159         * camel-folder-summary.h: Added references and messageid to
15160         summary.
15161
15162 2000-06-02  Christopher James Lahey  <clahey@helixcode.com>
15163
15164         * camel-session.c: Ref and unref objects in the service cache
15165         properly.
15166
15167         * camel-store.c: Ref the folder when returning it using
15168         lookup_folder.  Used the folder's full name for the key for the
15169         folder cache since that's used to uncache it.
15170
15171 2000-06-02  Dan Winship  <danw@helixcode.com>
15172
15173         Fun with purify.
15174
15175         * providers/pop3/camel-pop3-store.c (pop3_connect): free msg on
15176         success as well as failure.
15177         (camel_pop3_command_get_additional_data): free buf after reading
15178         the last line (".").
15179
15180         * providers/pop3/camel-pop3-folder.c (get_message_by_uid): free
15181         body data after creating the memstream from it (which will copy
15182         the data).
15183
15184         * providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary
15185         and index paths.
15186
15187         * camel-data-wrapper.c (finalize): unref the stream, if it exists.
15188
15189 2000-06-01  Not Zed  <NotZed@HelixCode.com>
15190
15191         * camel-mime-part.c (construct_from_parser): For a message part,
15192         set the default content-type to message/rfc822.  Maybe needs to be
15193         done for multiparts too?
15194
15195 2000-05-31  Not Zed  <NotZed@HelixCode.com>
15196
15197         * camel-mime-message.c (construct_from_parser): Typo in assersion.
15198
15199         * camel-mime-parser.c (folder_scan_step): Use a default type of
15200         message/rfc822 for multipart/digest.  Bug Z192.
15201         (folder_scan_drop_step): Remove warning.
15202
15203 2000-05-30  Not Zed  <NotZed@HelixCode.com>
15204
15205         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Init
15206         filter_from to NULL, for exception case.
15207         (mbox_get_message_by_uid): Cast off_t to long int for diagnostics.
15208
15209         * camel-url.c (camel_url_hash): Hash funciton for using camel
15210         url's as hash keys.
15211         (camel_url_equal): equal function for same.
15212
15213         * camel-session.c (camel_session_finalise): Free cached services.
15214         (camel_session_init): Init service cache.
15215         (service_cache_remove): destroy callback to remove a service from
15216         the cache.
15217
15218         * camel-store.c (get_folder_internal): Remove the extra ref of the
15219         folder.  That seems the right behaviour ...?
15220         (camel_store_get_type): Doh, actually call store init, so the
15221         cache works.
15222         (cache_folder): strdup the folder name!  no wonder it never found
15223         it again.
15224
15225 2000-05-30  Jeffrey Stedfast  <fejj@helixcode.com>
15226
15227         * providers/imap/camel-imap-folder.c: Implemented a few more
15228         methods like imap_append and 1 or 2 others
15229
15230 2000-05-29  Not Zed  <NotZed@HelixCode.com>
15231
15232         * camel-store.c (camel_store_init): Move it to here.  If this
15233         level is going to maintain it, it should set it up.  Lets see what
15234         caching folders breaks :(
15235
15236         * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Dont
15237         init folder cache here.
15238
15239         * providers/mbox/camel-mbox-summary.c
15240         (camel_mbox_summary_expunge): Make sure we copy messages which are
15241         still intact to the new folder.
15242         (camel_mbox_summary_expunge): Update the frompos as well when
15243         moving the content.
15244         (camel_mbox_summary_expunge): Remove some debug, and dont offset
15245         frompos?
15246
15247         * providers/vee/camel-vee-folder.c (vee_folder_build): Check the
15248         searched folder is open before trying to search it.
15249         (message_changed): Track changes to the source message in the
15250         summary.
15251         (folder_changed): Track folder changes, re-query the folder that
15252         changed, and cascade the changed event as well.
15253         (camel_vee_folder_finalise): Free subfolder and subfolder summary.
15254
15255 2000-05-29  Dan Winship  <danw@helixcode.com>
15256
15257         * camel-service.c (camel_service_new): Fix up some glib
15258         precondition stuff. Try to set the URL in camel_service_new before
15259         checking whether or not it's "empty" so that you can successfully
15260         set "sendmail:" as a URL.
15261
15262 2000-05-28  Dan Winship  <danw@helixcode.com>
15263
15264         * camel-provider.h: Add a domain field to CamelProvider, to say
15265         what kind of data it provides.
15266
15267         * providers/imap/camel-imap-provider.c: 
15268         * providers/mbox/camel-mbox-provider.c: 
15269         * providers/pop3/camel-pop3-provider.c: 
15270         * providers/sendmail/camel-sendmail-provider.c: 
15271         * providers/smtp/camel-smtp-provider.c: Set domain to "mail".
15272
15273         * providers/nntp/camel-nntp-provider.c: Set domain to "news".
15274
15275         * providers/vee/camel-vee-provider.c: Set domain to "vfolder". (So
15276         it doesn't end up being listed as a potential mail source in the
15277         mail config wizard.)
15278
15279         * providers/pop3/camel-pop3-store.c: Split apart password and APOP
15280         auth, since some servers seem to do both, but don't really.
15281         (connect_to_server): Renamed from try_connect. Now actually does
15282         the connection up to the point of checking the greeting for APOP
15283         support.
15284         (query_auth_types): Return APOP, if appropriate. Call
15285         pop3_disconnect after connect_to_server since we don't really want
15286         to be connected.
15287         (pop3_connect): Use connect_to_server rather than duplicating
15288         code. Fix a one-byte buffer overrun in the APOP code.
15289         (pop3_disconnect): Make this able to clean up after a partial
15290         connect.
15291         (connect_to_server): Remove port number from error message since
15292         it's not terribly useful and we were getting it from the wrong
15293         place anyway.
15294
15295         * camel-mime-utils.c (header_address_list_format_append): Use
15296         `foo@bar' rather than `"" <foo@bar>' for email addresses with no
15297         name component.
15298
15299 2000-05-27  Jeffrey Stedfast  <fejj@helixcode.com>
15300
15301         * providers/imap/camel-imap-store.c: Removed 
15302         camel_imap_command_get_additional_data() as it was
15303         completely useless, replaced with 
15304         camel_imap_command_extended() which may eventually replace
15305         camel_imap_command() as well.
15306
15307         * providers/imap/camel-imap-store.h: Modified to reflect
15308         changes made to camel-imap-store.c
15309
15310         * providers/imap/camel-imap-folder.c: Wrote the first of many
15311         methods: camel_imap_init(), imap_open(), imap_expunge(), 
15312         imap_get_message_count(), and imap_get_subfolder_names()
15313
15314 2000-05-26  Dan Winship  <danw@helixcode.com>
15315
15316         * camel-multipart.c (camel_multipart_init): Don't set a default
15317         boundary. Require the caller to do that.
15318         (set_boundary): if boundary is NULL, generate a "random" boundary.
15319
15320         * camel-mime-part-utils.c
15321         (camel_mime_part_construct_content_from_parser): Add a call to
15322         camel_multipart_set_boundary after creating a new multipart.
15323
15324 2000-05-25  Jeffrey Stedfast  <fejj@helixcode.com>
15325
15326         * providers/imap/camel-imap-store.c (try_connect): Removed
15327         Exception code - Pop doesn't seem to set exceptions
15328
15329         * providers/imap/camel-imap-folder.c: Initial code, mostly
15330         just a template for future code
15331
15332         * providers/imap/imap.[c,h]: Source code from my personal
15333         mailer - for reference only!
15334
15335 2000-05-25  NotZed  <NotZed@HelixCode.com>
15336
15337         * camel-mime-part-utils.c
15338         (camel_mime_part_construct_content_from_parser): Replace simple
15339         data wrapper here too, oops.
15340
15341         * Makefile.am (libcamel_la_SOURCES): Removed
15342         camel-simple-data-wrapper again.  Less code to maintain == better
15343         code.
15344         
15345         * camel-data-wrapper.c (construct_from_stream): Fixes for bug
15346         where text attachments dont work.  Made data-wrapper concrete for
15347         the second time.
15348
15349 2000-05-23  NotZed  <NotZed@HelixCode.com>
15350
15351         * providers/vee/camel-vee-folder.c (vee_folder_build_folder):
15352         Update the vfolder details for a single folder.
15353
15354 2000-05-25  Jeffrey Stedfast  <fejj@helixcode.com>
15355
15356         * providers/smtp/camel-smtp-transport.c (_send_to): Took out code
15357         that had been there to reconnect to the server if it was not
15358         already connected - Mailer code was fixed so that this should not
15359         be needed.
15360
15361         * providers/imap/camel-imap-store.[c,h]: Initial code.
15362
15363 2000-05-24  Dan Winship  <danw@helixcode.com>
15364
15365         * camel.h: Re-add camel-simple-data-wrapper.h, which was removed
15366         for some reason.
15367
15368 2000-05-24  Jeffrey Stedfast  <fejj@helixcode.com>
15369
15370         * providers/smtp/camel-smtp-transport.[c,h]: Moved global
15371         variables into struct CamelSmtpTransport to make SMTP
15372         thread-safe
15373
15374         * providers/imap/camel-imap-*.h: Stolen from Mbox. Rough structure
15375         for Imap.
15376         
15377 2000-05-23  Jeffrey Stedfast  <fejj@helixcode.com>
15378
15379         * providers/imap: Added some initial code to the camel tree
15380         for IMAPv4
15381
15382         * providers/imap/.cvsignore: Added to repository
15383
15384         * providers/smtp/camel-smtp-transport.c: Added debug fprintf's
15385         so that testers can provide more information. Tested with simple
15386         messages and a reply to the hello@helixcode.com default message
15387         but should really be tested more.
15388         (smtp_data): Fixed to use data_wrapper_write_to_stream.
15389
15390         * camel-mime-filter-smtp.c (filter): Modified to escape all lines
15391         beginning with a '.' and to place a \r before each \n if one did
15392         not previously exist. Removed code to escape "From " as it was
15393         found to not be needed for SMTP.
15394
15395 2000-05-22  Jeffrey Stedfast  <fejj@helixcode.com>
15396
15397         * providers/smtp/camel-smtp-transport.c (smtp_data): Fixed the 
15398         filtered stream. Fixes for stream changes, updated to use 
15399         camel-mime-filter-smtp.
15400
15401         * Makefile.am: Added camel-mime-filter-smtp.c
15402         
15403         * camel-mime-filter-smtp.[c,h]: Added to camel tree
15404         Smtp filter used to change \n into \r\n, escape lone dots,
15405         and escape "From "'s.
15406
15407 2000-05-19  NotZed  <NotZed@HelixCode.com>
15408
15409         * camel-simple-data-wrapper.c (construct_from_stream): If we
15410         already have been constructed, unref our content.
15411         (write_to_stream): Check we've been constructued, and change for
15412         stream api changes.
15413
15414         * camel-mime-parser.c: Removed exception stuff.
15415
15416         * md5-utils.c (md5_get_digest_from_stream): repaired.
15417
15418         * camel-mime-message.c: Remove exception from write_to_stream, and
15419         fix, and fix formatting.
15420
15421         * providers/sendmail/camel-sendmail-transport.c (_send_internal):
15422         Fix for stream changes.
15423
15424         * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fixes
15425         for stream changes.
15426
15427         * providers/mbox/camel-mbox-folder.c, and elsewhere, fix all
15428         stream api changes.
15429         (mbox_append_message): Use stream_close() now its back.
15430         (mbox_append_message): unref the from filter.
15431
15432         * camel-stream-mem.c: And here.
15433
15434         * camel-stream-fs.[ch]: Here too.
15435
15436         * camel-stream-filter.c: Likewise.  This is getting tedious.
15437
15438         * camel-stream-buffer.c (stream_write): Fix a few little problems.
15439         (stream_close): Reimplement.
15440         (camel_stream_buffer_read_line): Slightly more efficient version,
15441         that also only allocates the right amount of memory for strings.
15442
15443         * camel-seekable-substream.c: Likewise.
15444
15445         * camel-seekable-stream.[ch]: Remove exceptions, fix formatting,
15446         changes for stream (re)fixes.  set_bounds returns an error.
15447
15448         * camel-stream.[ch]: Remove exceptions.  Make flush and reset return
15449         an error code, repair all the screwed up formatting, and put back
15450         close.
15451
15452         * camel-mime-part-utils.c
15453         (camel_mime_part_construct_content_from_parser): And here.
15454
15455         * camel-mime-part.c (camel_mime_part_set_content): And this too.
15456         (write_to_stream): Fixed for stream changes.
15457
15458         * camel.h: Fixed.
15459
15460         * providers/vee/camel-vee-folder.c (vee_search_by_expression):
15461         Implement.  Performs an intersection of the two searches.
15462         (camel_vee_folder_finalise): Unref search folders.
15463         (vee_append_message): Implement append.
15464
15465 2000-05-18  Dan Winship  <danw@helixcode.com>
15466
15467         * camel-folder.c: remove message_number_capability and require uid
15468         capatibility.
15469         (camel_folder_list_subfolders, camel_folder_get_uid_list,
15470         camel_folder_get_subfolder_info, camel_folder_get_message_info):
15471         removed
15472         (camel_folder_get_subfolder_names,
15473         camel_folder_free_subfolder_names): new subfolder interfaces.
15474         (camel_folder_get_uids, camel_folder_free_uids): new uid
15475         interfaces
15476         (camel_folder_get_summary, camel_folder_free_summary): new summary
15477         interfaces
15478
15479         * providers/mbox/camel-mbox-folder.c,
15480         * providers/nntp/camel-nntp-folder.c:
15481         * providers/vee/camel-vee-folder.c: Update for changes
15482
15483         * providers/pop3/camel-pop3-folder.c: Implement get_uids, update
15484         for other changes.
15485
15486 2000-05-18  NotZed  <NotZed@HelixCode.com>
15487
15488         * providers/vee/camel-vee-folder.c: Guess!
15489
15490         * camel-folder-search.c (search_user_flag): Implement user_flag
15491         search term.
15492
15493         * camel-folder-search.h: Added user_flag search capability
15494         (user-flag "blah")
15495
15496         * providers/mbox/camel-mbox-folder.c (mbox_init): Set USER flag in
15497         permanent flags for the folder.
15498
15499 2000-05-17  Dan Winship  <danw@helixcode.com>
15500
15501         * camel-folder.c: Remove unused async open/close and
15502         copy_message_to functions.
15503         Rename functions without initial _. Fix glib preconditions and
15504         gtk-doc comments.
15505
15506 2000-05-17  Dan Winship  <danw@helixcode.com>
15507
15508         * camel-data-wrapper.c: remove get/set_output_stream operations.
15509         They're redundant with write_to_stream, and CamelMimePart and
15510         CamelMimeMessage only implement the latter, meaning that trying to
15511         get_output_stream on a CamelMimeMessage that was built from pieces
15512         rather than being parsed from a stream doesn't work. Anything that
15513         uses get_output_stream can be rewritten to use write_to_stream, so
15514         we'll standardize on that.
15515         (camel_data_wrapper_new): remove this: CamelDataWrapper is
15516         supposed to be an abstract class.
15517         (write_to_stream): remove default implementation. (Moved to
15518         CamelSimpleDataWrapper)
15519         
15520         * camel-simple-data-wrapper.c: resurrect, although it's not really
15521         the same thing it was before. A simple data wrapper, which is
15522         backed by a CamelStream.
15523
15524         * camel-mime-part-utils.c
15525         (simple_data_wrapper_construct_from_parser): Use
15526         construct_from_stream rather than set_output_stream.
15527         (camel_mime_part_construct_content_from_parser): Change
15528         camel_data_wrapper_new to camel_simple_data_wrapper_new.
15529
15530         * camel-mime-part.c (camel_mime_part_set_content): Change
15531         camel_data_wrapper_new to camel_simple_data_wrapper_new.
15532         
15533
15534 2000-05-17  Darin Adler  <darin@eazel.com>
15535
15536         * camel-folder-summary.c: (message_info_load):
15537         Quick fix to get it to compile. I hope I don't get into trouble.
15538
15539 2000-05-17  Dan Winship  <danw@helixcode.com>
15540
15541         * camel.h: Don't include the no-longer-distributed
15542         possibly-to-be-removed headers.
15543
15544         * providers/smtp/camel-smtp-transport.c
15545         (smtp_get_email_addr_from_text): fix an off-by-one error in
15546         address parsing
15547         (smtp_data): use camel_data_wrapper_get_output_stream rather than
15548         data_wrapper->output_stream
15549
15550 2000-05-17  NotZed  <NotZed@HelixCode.com>
15551
15552         * providers/mbox/camel-mbox-folder.c (message_changed): Snoop
15553         changes to user flags on the message into the summary as well.
15554
15555         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_init):
15556         Changed version init to include the parent class version info
15557         (i.e. add it not overwrite it).
15558
15559         * camel-folder-summary.c (message_info_new): Initialise user_flags
15560         to empty.
15561         (message_info_load): And load user flags.
15562         (message_info_save): And save user flags.
15563         (message_info_free): And free them.
15564         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
15565
15566         * camel-folder-summary.h: Added user-flags to summary.
15567
15568         * camel-mime-message.c (camel_mime_message_set_user_flag): Dont
15569         use a hashtable for user flags.
15570         (camel_mime_message_get_user_flag): And changed here too.
15571         (camel_flag_get): New interface to get a flag from a flag
15572         list.  Flag lists are easier to work with than hash tables, and
15573         save memory too.
15574         (camel_flag_set): And set.
15575         (camel_flag_list_free): And free.
15576         (free_key_only): Discard.
15577         (finalize): Remove the flag list.
15578
15579 2000-05-17  Jeffrey Stedfast  <fejj@stampede.org>
15580
15581         * providers/smtp/camel-smtp-transport.c: (smtp_helo): Error
15582         checking on gethostbyaddr() eliminating a possible segfault.
15583
15584 2000-05-16  NotZed  <NotZed@HelixCode.com>
15585
15586         * providers/mbox/camel-mbox-folder.c (mbox_delete_message_by_uid):
15587         Implement.
15588
15589 2000-05-12  NotZed  <NotZed@HelixCode.com>
15590
15591         * camel-movemail.c (camel_movemail): Open the destination with
15592         O_APPEND, so we dont blow away a partially transferred mbox.
15593         (camel_movemail): Loop if we get errno=INTR, and not fail.
15594
15595 2000-05-11  NotZed  <NotZed@HelixCode.com>
15596
15597         * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
15598         the summarised file size, if everything went ok.
15599         (camel_mbox_summary_expunge): Clear header flags after updating.
15600
15601 2000-05-16  Chris Toshok  <toshok@helixcode.com>
15602
15603         * providers/nntp/camel-nntp-folder.c:
15604         * providers/nntp/camel-nntp-folder.h:
15605         * providers/nntp/camel-nntp-provider.c: 
15606         * providers/nntp/camel-nntp-store.c: 
15607         * providers/nntp/camel-nntp-utils.c: 
15608         * providers/nntp/camel-nntp-utils.h: 
15609         get things working with new camel summary stuff.
15610
15611         * providers/nntp/camel-nntp-summary.c: 
15612         * providers/nntp/camel-nntp-summary.h: 
15613         removed files since camel-folder-summary does all we need.
15614
15615 2000-05-15  Jeffrey Stedfast  <fejj@stampede.org>
15616
15617         * providers/smtp/camel-smtp-transport.c: Added some preliminary
15618         AUTH support.
15619
15620 2000-05-15  Dan Winship  <danw@helixcode.com>
15621
15622         * camel-folder.h: Remove camel_folder_get_summary, which no longer
15623         exists.
15624
15625 2000-05-11  Dan Winship  <danw@helixcode.com>
15626
15627         * Makefile.am: remove some cruft that we're not currently using.
15628
15629         * camel-stream-mem.c (camel_stream_mem_new_with_buffer): Change
15630         to match prototype (size_t vs unsigned int) so it works on 64-bit
15631         machines. Noted by msw.
15632
15633 2000-05-11  NotZed  <NotZed@HelixCode.com>
15634
15635         * providers/mbox/camel-mbox-folder.c (message_changed): Indicate
15636         the summary changed also.
15637
15638 2000-05-11  Jeffrey Stedfast  <fejj@stampede.org>
15639
15640         * providers/smtp/camel-smtp-transport.c: (smtp_helo): 
15641         Updated to more closely comply with RFC 821 standards
15642
15643 2000-05-11  NotZed  <NotZed@HelixCode.com>
15644
15645         * camel-mime-part.c (write_to_stream): Unref the filter after
15646         adding it to the filtering stream.
15647
15648         * providers/mbox/camel-mbox-summary.c
15649         (camel_mbox_summary_finalise): Free the folder path.
15650         (camel_mbox_summary_update): Also save summary when done.
15651         (camel_mbox_summary_expunge): Unindex items when deleting them.
15652         (camel_mbox_summary_expunge): Save the index as well as the
15653         summary.
15654
15655         * camel-folder-summary.c (camel_folder_summary_finalise): Free the
15656         summary path.
15657         (camel_folder_summary_touch): New function, indicate the summary
15658         info changed.
15659         (camel_folder_summary_remove): Dirty here.
15660
15661         * camel-internet-address.c (internet_decode): Free multiple entry
15662         addresses properly.
15663
15664         * camel-mime-utils.c (header_decode_mailbox): Plugged another
15665         memleak, free text after converting it.
15666         (header_decode_addrspec): More leaks plugged.
15667
15668         * camel-mime-message.c (finalize): Free message_uid.
15669         (finalize): Free the recipients hashtable.
15670
15671 2000-05-11    <notzed@helixcode.com>
15672
15673         * camel-folder-summary.c (camel_folder_summary_finalise): Free
15674         summary items and charset filters.
15675
15676 2000-05-10    <notzed@helixcode.com>
15677
15678         * camel-folder-summary.c (camel_folder_summary_finalise): Don't
15679         free stuff in p, after we've free'd p.
15680
15681         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Unref
15682         the stream we created for appending.
15683
15684 2000-05-10  Jeffrey Stedfast  <fejj@stampede.org>
15685
15686         * providers/smtp/camel-smtp-transport.c: (camel_smtp_transport_class_init):
15687         Added initialization for service_class
15688
15689 2000-05-10  Dan Winship  <danw@helixcode.com>
15690
15691         * camel-multipart.c (write_to_stream): fix a stupid typo. Thank
15692         you, C.
15693
15694         * camel-mime-part.c (write_to_stream): don't ref the stream before
15695         wrapper a filter around it, since nothing will ever unref it.
15696
15697 2000-05-10  Christopher James Lahey  <clahey@helixcode.com>
15698
15699         * Makefile.am: Added camel-types.h, camel-folder-pt-proxy.h, and
15700         camel-thread-proxy.h.
15701
15702 2000-05-09  Dan Winship  <danw@helixcode.com>
15703
15704         * providers/sendmail/camel-sendmail-transport.c (_send_internal):
15705         Bleah. Can't fsync a pipe. As a quick kludge, just don't
15706         stream_flush it. The right fix will require bringing back
15707         stream_close though.
15708
15709 2000-05-09  Jeffrey Stedfast  <fejj@stampede.org>
15710         * camel-internet-address.[c,h]: Undid my changes (moved
15711         struct _address back into came-internet-address.c)
15712         * providers/smtp/camel-smtp-transport.c: (_send): changed
15713         from using it's own address manipulation (using struct _address)
15714         to using camel_internet_address_get(). Also some format changes
15715         to keep consistant with the rest of Camel
15716
15717 2000-05-09  Jeffrey Stedfast  <fejj@stampede.org>
15718
15719         * camel-internet-address.[c,h]: Moved struct _address from
15720         camel-internet-address.c to camel-internet-address.h
15721         (hopefully this doesn't break anything...)
15722         * providers/smtp/camel-smtp-transport.c: (_send): now
15723         populates the recipient list with To, Cc, and Bcc addresses.
15724         Should now be able to use this module.
15725
15726 2000-05-09  Dan Winship  <danw@helixcode.com>
15727
15728         * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
15729         one more refcounting fix I missed before.
15730
15731 2000-05-08  Jeffrey Stedfast  <fejj@stampede.org>
15732
15733         * providers/smtp/camel-smtp-transport.c: no longer frees memory it
15734         shouldn't, updated to reflect camel-stream changes involving
15735         CamelException (perhaps it should use a different CamelException
15736         variable than is passed to the camel smtp module?)
15737
15738 2000-05-08  Dan Winship  <danw@helixcode.com>
15739
15740         * camel-stream.c (camel_stream_read, camel_stream_write,
15741         camel_stream_flush, camel_stream_reset, camel_stream_printf,
15742         camel_stream_write_to_stream): Use CamelException to signal
15743         failure.
15744         (camel_stream_write_strings): Remove. camel_stream_printf is more
15745         useful in most of the places that used this.
15746         (camel_stream_write_string): Change from macro to function to
15747         prevent problems with double-evaluation.
15748
15749         * camel-seekable-stream.c (camel_seekable_stream_seek,
15750         camel_seekable_stream_set_bounds): Use CamelException.
15751         (reset): Update.
15752
15753         * camel-seekable-substream.c, camel-stream-buffer.c,
15754         camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c:
15755         Update.
15756
15757         * camel-stream-fs.c: Remove the virtual init functions and move
15758         the code into the creator functions. Add CamelExceptions to
15759         creation functions that could fail.
15760
15761         * camel-data-wrapper.c (camel_data_wrapper_write_to_stream): Use
15762         CamelException.
15763         * camel-mime-message.c, camel-mime-part.c, camel-multipart.c
15764         (write_to_stream): Update.
15765
15766         * camel-mime-parser.c: add an exception to the mime parser private
15767         data and pass that to stream functions as needed.
15768         
15769         * gmime-content-field.c, md5-utils.c: Update (badly) for stream
15770         changes.
15771         
15772         * camel-exception.h (camel_exception_is_set): convenience macro.
15773
15774         * providers/Makefile.am: disable SMTP for now
15775
15776         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Pass
15777         CamelException to the functions that now need it. Check the
15778         exception after calling camel_stream_flush, and fail if it fails.
15779         (mbox_get_message_by_uid): More updates.
15780
15781         * providers/pop/camel-pop3-folder.c,
15782         providers/pop/camel-pop3-store.c,
15783         providers/sendmail/camel-sendmail/transport.c: Update.
15784
15785
15786 2000-05-08  NotZed  <NotZed@HelixCode.com>
15787
15788         * camel-mime-message.c (process_header): Format From and Reply-To
15789         to at least a decoded string.  Should probably store them as an
15790         camelinternetaddress.
15791
15792         * Merged NEW_SUMMARY branch back to trunk, and resolved conflicts.
15793         
15794         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
15795         Return status.
15796         (camel_mbox_summary_expunge): Force an update of the summary
15797         before we do anything.
15798         (camel_mbox_summary_expunge): Build new xev line in xevnew, and
15799         free that, and consify xev.
15800         (camel_mbox_summary_load): If we are rebuilding from scratch, make
15801         sure we clear the summary content.
15802
15803         * camel-stream-filter.c (do_close): We NEED a stream close.
15804
15805 2000-05-07  Dan Winship  <danw@helixcode.com>
15806
15807         Make camel not leak like a sieve.
15808
15809         * camel-object.c: New subclass of GtkObject which is now the base
15810         of the Camel object hierarchy. Currently the only difference
15811         between CamelObject and GtkObject is that CamelObjects don't start
15812         out floating.
15813
15814         * *.h: Move a bunch of typedefs to camel-types.h. Standardize on
15815         using <camel/foo.h> in header files rather than <foo.h>, "foo.h",
15816         or "camel/foo.h". Remove some unneeded includes.
15817
15818         * camel-address.c, camel-data-wrapper.c, camel-folder-search.c,
15819         camel-folder-summary.c, camel-folder.c, camel-mime-filter.c,
15820         camel-mime-parser.c, camel-service.c, camel-session.c,
15821         camel-stream.c: These are now subclasses of CamelObject.
15822
15823         * camel-data-wrapper.c (set_output_stream):
15824         * camel-medium.c (set_content_object):
15825         * camel-seekable-substream.c
15826         (init_with_seekable_stream_and_bounds):
15827         * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid): 
15828         remove gtk_object_sink calls.
15829
15830         * camel-stream-buffer.c (init_vbuf): 
15831         * camel-stream-filter.c (camel_stream_filter_new_with_stream):
15832         ref the original stream.
15833
15834         * camel-folder-summary.c (camel_folder_summary_finalise): unref
15835         the filters when finalizing.
15836
15837         * camel-mime-part-utils.c
15838         (simple_data_wrapper_construct_from_parser,
15839         camel_mime_part_construct_content_from_parser):
15840         * camel-mime-part.c (camel_mime_part_set_content): Unref objects
15841         that are created only to be handed off to other objects. If
15842         they're going to be needed later, they will have been additionally
15843         ref'ed by the object that needs them.
15844
15845         * providers/pop3/camel-pop3-folder.c (get_message_by_number):
15846         unref the message stream after creating the data from it.
15847
15848         * camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c,
15849         camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close,
15850         since its semantics are dubious (what happens when you close a
15851         stream other people still have references on?).
15852
15853         * providers/nntp/camel-nntp-store.c:
15854         * providers/smtp/camel-smtp-transport.c:
15855         * providers/pop3/camel-pop3-store.c:
15856         replace camel_stream_close calls with gtk_object_unref.
15857
15858         * providers/mbox/camel-mbox-folder.c:
15859         * providers/nntp/camel-nntp-folder.c:
15860         * providers/sendmail/camel-sendmail-transport.c:
15861         replace camel_stream_close with camel_stream_flush +
15862         gtk_object_unref
15863
15864 2000-05-06  Dan Winship  <danw@helixcode.com>
15865
15866         * providers/pop3/camel-pop3-store.c (query_auth_types): A machine
15867         which serves neither POP nor KPOP is not a POP server.
15868
15869         * providers/smtp/camel-smtp-provider.c: Note in the description
15870         that this provider is not yet tested.
15871
15872 2000-05-08    <notzed@helixcode.com>
15873
15874         * camel-mime-part.c (write_to_stream): Free the filter stream when
15875         done.
15876
15877         * camel-mime-parser.c (folder_seek): Make sure we add the \n
15878         terminal when we seek as well (frob!).
15879
15880         * camel-mime-utils.c (header_decode_addrspec): Plug minor memleak.
15881
15882         * camel-mime-part.c (finalize): Free header tables once finished.
15883
15884         * camel-folder-summary.c (camel_folder_summary_remove): Dont try
15885         to access info after its free'd.
15886
15887 2000-05-07  NotZed  <NotZed@HelixCode.com>
15888
15889         * camel-mime-part.c (write_to_stream): Apply encoding to content
15890         part, when writing to a stream *sigh*.
15891
15892         * camel-stream-filter.c (do_write): implement write for the
15893         filtering stream.  Writes shouldn't be mixed with reads.
15894         (do_flush): Implemented flush.  Again write/flush shouldn't be
15895         mixed with reads.  Only flushes if the last op was write.
15896         (do_close): Force flush on close.
15897
15898         * camel-mime-filter.c (filter_run): Oops, make sure we include the
15899         backlen in the total length before passing onto the filter.
15900
15901         * camel-mime-filter-from.c: New filter, munges 'From ' lines into
15902         '>From ', for mbox.
15903
15904         * camel-mime-parser.c (camel_mime_parser_header_remove): New
15905         function to remove the parser's raw header, rather than
15906         manipulating the header directly (wich doesn't work with
15907         mempools).
15908
15909         * camel-mime-utils.c (header_address_list_clear): Fixed some
15910         broken(tm) logic, which would leak entries on multivalued lists.
15911
15912         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
15913         Use ibex_save() to save the ibex.  Makes a big difference to
15914         startup times for very large mailboxes.
15915         (camel_mbox_summary_expunge): Dum de dum, reimplemented.  Designed
15916         to be much more robust, and to stop immediately if anything awry
15917         happens.
15918         (copy_block): Utility function to copy n bytes from one fd to
15919         another.
15920         (header_write): Utility function to write out raw headers to an
15921         fd.
15922         (camel_mbox_summary_update): Incremental summary updater.
15923
15924         * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
15925         Dont unref the stream, because of the broken(tm) ref model of gtk
15926         widget that for some odd reason is being perpetuated in camel.  
15927         (mbox_expunge): Reenable expunge again.
15928         (mbox_append_message): Removed the optimised mbox append.  If its
15929         an issue, it can go back later.  Cleaned up a lot, checks error
15930         returns, and automagically translates 'From ' into '>From' as
15931         necessary.
15932
15933 2000-05-07    <notzed@helixcode.com>
15934
15935         * camel-mime-filter.c (filter_run): Oops, forgot to add the
15936         backlen to the pre-buffer (*poof*).
15937
15938 2000-05-07  NotZed  <NotZed@HelixCode.com>
15939
15940         * camel-mime-message.c (construct_from_parser): Allow
15941         HSCAN_FROM_END to terminate the processing of a message.
15942
15943         * camel-folder-summary.c (perform_content_info_load): Ick, dont
15944         try and append a node onto its own list.
15945         (camel_folder_summary_clear): Actually clear the indexes after
15946         we've removed the messages.
15947         (camel_folder_summary_clear): Set dirty if it changes.
15948         (camel_folder_summary_load): Clear dirty.
15949         (camel_folder_summary_save): Only save if dirty.
15950
15951         * providers/mbox/camel-mbox-summary.c (summary_header_load): Oops,
15952         remember to call that parent class first ...
15953         (summary_header_save): Here too.
15954         (camel_mbox_summary_load): Do more checking to verify the index
15955         contents as well as teh summary contents, against the mbox
15956         contents.
15957         (camel_mbox_summary_load): Removed some fo that checking, it needs
15958         more code to work reliably.
15959
15960 2000-05-07    <notzed@helixcode.com>
15961
15962         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
15963         Set the size and mtime of the mbox we indexed once done.
15964
15965         * camel-folder-summary.c (camel_folder_summary_set_index): Dont
15966         write the index if it changes - let the claler fix it (uh, kind of
15967         impacts performance).
15968         (camel_folder_summary_load): close in.
15969
15970         * camel-folder-summary.c (summary_format_string): Check header
15971         exists before trying to strip its leading spaces.
15972
15973 2000-05-06  NotZed  <NotZed@HelixCode.com>
15974
15975         * camel-folder.h: Removed summary info from here, and include
15976         camel-folder-summary.h as well.
15977         
15978         * camel-mime-parser.c (camel_mime_parser_step): Allow it to accept
15979         a NULL databuffer.
15980
15981         * providers/mbox/camel-mbox-summary.c: Totally new file, now
15982         subclasses camel-folder-summary.
15983
15984         * camel-folder-summary.c (message_info_load): Load the uid as a
15985         string.
15986         (message_info_save): And save too.
15987         (camel_folder_summary_clear): New function, clears the contents of
15988         the summary.
15989
15990         * providers/mbox/camel-mbox-folder.c: Fixes for summary changes.
15991         (mbox_get_message_by_uid): Completely redone.  Now cross-checks
15992         the summary information to make sure we get a real message.
15993         (mbox_append_message): Disabled the copy version of append for
15994         now.
15995         (mbox_expunge): Temporarily disabled the expunge function, until
15996         it is put back in camel-mbox-summary.c
15997
15998 2000-05-05  NotZed  <NotZed@HelixCode.com>
15999
16000         * camel-folder-summary.c: And same here ...
16001         (camel_folder_summary_encode_fixed_int32): Ugh, fwrite doesn't
16002         return -1 on error ..
16003         (camel_folder_summary_decode_fixed_int32): Neither deos fread.
16004         (camel_folder_summary_encode_token): Fix here too.
16005         (summary_build_content_info): Use start-headers to get the pos of
16006         the message, not parser_tell(), which might not be what we
16007         expected because of parser_unstep().
16008         (camel_folder_summary_encode_token): Use bserch() to tokenise the
16009         values, rather than a linear search.
16010
16011         * camel-mime-utils.c: Defined out some memory profiling stuff I
16012         left there by mistake.
16013         (header_decode_mailbox): Dont try to append the word part of a
16014         local address if we ran out of words.
16015
16016         * camel-mime-parser.c (folder_scan_content): Apply the fix from
16017         the header scanner to here too.
16018         (folder_scan_header): Only check for end of header if we have
16019         space for it (didn't end the read with a newline)
16020         (folder_scan_header): inptr is the only real thing we need
16021         registerised for performance.  Try to help the compiler be smart
16022         about it ..
16023         (folder_scan_header): Simplified the save header case a tad.
16024
16025         Commented out some memory profiling stuff.
16026
16027 2000-05-05    <notzed@helixcode.com>
16028
16029         * camel-mime-utils.c (header_decode_mailbox): Plug a memory leak.
16030         (header_decode_text): Fixed memory leaks with g_string_append().
16031         (header_encode_string): And here too, and a few other places.  The
16032         glib api is so awful ...
16033         (header_content_type_decode): More memory leaks.
16034
16035 2000-05-05    <notzed@helixcode.com>
16036
16037         * camel-mime-parser.c (folder_scan_init_with_fd): Make sure we
16038         init the end of buffer sentinal!
16039         (folder_scan_init_with_stream): And here too ...
16040
16041 2000-05-04  NotZed  <NotZed@HelixCode.com>
16042
16043         * providers/mbox/camel-mbox-folder.c (summary_get_message_info):
16044         Maxcount is minimum of the max and the requested count, not the
16045         maximum :)
16046
16047         * camel-mime-parser.c (folder_scan_content): Properly set midline,
16048         so we dont falsely catch offset boundary markers (i.e. From inside
16049         content).
16050         (folder_read): Set a sentinal on the end of the read data (\n) so
16051         we dont have to check the buffer boundary in the inner loop.
16052         (mempool_*): New experimental memory management routines, speed
16053         up simple structure parsing by about 25% ... not compiled in by
16054         default.  Something similar may be needed for camel-mime-utils to
16055         address performance issues with g_malloc and friends.
16056
16057         * camel-mime-utils.c: Added a macro w(x) used to wrap all warnings
16058         about mime/rfc violations, so they can be turned off.
16059
16060         * camel-folder-summary.c (summary_build_content_info): Step after
16061         the end of a message ...
16062         Turn into a stand-alone program for testing and profiling.
16063
16064 2000-05-04  Dan Winship  <danw@helixcode.com>
16065
16066         * providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall
16067         back to plaintext passwords if APOP fails, since it should also
16068         fail.
16069
16070 2000-05-04  Dan Winship  <danw@helixcode.com>
16071
16072         * camel-session.c (camel_session_list_providers): New function to
16073         replace camel_provider_scan. Returns a list of either (a) all
16074         currently-loaded providers, or (b) all available providers.
16075
16076         * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that
16077         it contains only a protocol).
16078
16079         * camel-service.c (camel_service_query_auth_types): Make this take
16080         a CamelException (since it may have to try to connect to the
16081         server, and it might not able to.)
16082
16083         * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP)
16084         support. This is mostly so I have two kinds of authmech to play
16085         with instead of just one. (But it does actually work.)
16086
16087         * providers/smtp/camel-smtp-transport.c (query_auth_types): update
16088         for prototype change, but disable the functionality, since it
16089         doesn't really support any auth types yet.
16090         (camel_smtp_transport_get_type): add an object init function to
16091         set the service url_flags.
16092
16093 2000-05-04  NotZed  <NotZed@HelixCode.com>
16094
16095         * providers/mbox/camel-mbox-summary.c: Yes, and anotherone.
16096
16097         * camel-mime-utils.c: And another one.
16098
16099         * camel-mime-part.c: And another one.
16100
16101         * camel-mime-part-utils.c: And another one.
16102
16103         * camel-folder-search.c: And another one.
16104
16105         * camel-mime-parser.c: Reverted a change wihtout a ChangeLog entry.
16106
16107 2000-05-04  NotZed  <NotZed@HelixCode.com>
16108
16109         * camel-folder-summary.[hc]: Yes, CamelFolderSummary is back ...
16110         ... re-usable class to summarise and index any stream or message
16111         and to manage/load/save the created summaries.
16112         
16113         * camel-folder.c: Include string.h to kill a warning.
16114
16115 2000-05-03  Jason Leach  <leach@wam.umd.edu>
16116
16117         * Makefile.am (INCLUDES): add $(UNICODE_CFLAGS) to the INCLUDES,
16118         people who installed libunicde in non-standard include paths need
16119         this.
16120
16121 2000-05-03  NotZed  <NotZed@HelixCode.com>
16122
16123         * camel-folder.h: Added pos/bodypos/endpos to the basic message
16124         content info object.  Size to be removed?  Moved the
16125         messageconentinfo and messageinfo back to camel-folder-summary.h.
16126
16127         * camel-mime-filter-index.c (camel_mime_filter_index_set_ibex):
16128         New function to (re)set the index to use on a filter.
16129
16130         * camel-mime-parser.c (camel_mime_parser_scan_from): Whole bunch
16131         of inline docs.
16132         (camel_mime_parser_drop_step): New function to drop a state from
16133         the parser.  Needs more testing.
16134
16135         * camel-mime-utils.c (rfc2047_decode_word): If the iconv handle is
16136         -1, then dont try and convert (crashes unicode_iconv?).
16137         (rfc2047_decode_word): Use alloca for variables instead of
16138         g_malloc - by the rfc they should always be short.
16139         (rfc2047_decode_word): If we can't do the charset conversion, undo
16140         the quoted-printable/base64 at least?  Should probably convert
16141         unknown characters to the utf-8 unknown character.
16142
16143 2000-05-02  Larry Ewing  <lewing@helixcode.com>
16144
16145         * camel-mime-utils.c (header_decode_date): fix typo when
16146         dereferencing saveoffset.
16147
16148 2000-05-02  NotZed  <NotZed@HelixCode.com>
16149
16150         * camel-folder-search.c: Added some header doco.
16151
16152         * camel.h: REmove gmime-utils.h from here.
16153
16154         * providers/mbox/camel-mbox-search.[ch]: Removed.  Functionally
16155         redundant.
16156
16157         * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
16158         Use the new CamelFolderSearch class to do the actual searching,
16159         just setup the search here.
16160
16161         * camel-folder-search.[ch]: A helper class that providers may
16162         subclass to provide their own search functionality, or they can
16163         simply use as is, it supports body searches if an ibex is
16164         supplied, and header searches if a summary is supplied.
16165
16166 2000-05-02  Matt Loper  <matt@helixcode.com>
16167
16168         * Makefile.am: set G_LOG_DOMAIN.
16169         * providers/MH/Makefile.am: same.
16170         * providers/maildir/Makefile.am: same.
16171         * providers/mbox/Makefile.am: same.
16172         * providers/nntp/Makefile.am: same.
16173         * providers/pop3/Makefile.am: same.
16174         * providers/sendmail/Makefile.am: same. 
16175         * providers/smtp/Makefile.am: same.             
16176
16177 2000-05-02  NotZed  <NotZed@HelixCode.com>
16178
16179         * providers/mbox/camel-mbox-search.c
16180         (camel_mbox_folder_search_by_expression): Dont store/remove
16181         current search from the search list.
16182         
16183         * providers/mbox/camel-mbox-folder.h: Removed searches list,
16184         searches are all sync now.
16185
16186         * gmime-utils.[ch]: What the hell, remove it.  This will break the
16187         nntp provider.  The mime parser can be used instead though.
16188         Removed from all code including it (but none were using it).
16189
16190         * gmime-utils.c (_store_header_pair_from_string): Removed bizarre
16191         string_dichotomy version of this.  This code is somewhat redundant
16192         now, and is headed for death anyway.
16193
16194         * gstring-util.c (g_string_dichotomy): Same with this one.
16195         (g_string_clone): Removed a memory leak, g_string_new() allocates
16196         its own memory.
16197         (g_string_append_g_string): Allow to append an empty gstring onto
16198         another gstring, dont abort()!
16199
16200         * string-utils.c (string_dichotomy): Removed this incredibly weird
16201         function.
16202
16203         * camel-folder.c (_create): Replaced the rather obtuse use of
16204         "string_dichotomy" function with a simple strrchr().  Still not
16205         sure it'll work.
16206
16207         * camel-folder-summary.c: cvs removed a long-removed file.
16208
16209         * camel-mime-parser.c (folder_scan_header): Fix the previous
16210         overflow problem properly (can happen in 2 places).
16211         (header_append): A new macro to include the code changed above, so
16212         it only appears in one place.
16213         (folder_scan_step): Change the content type to text/plain if the
16214         multipart is broken.  Doesn't actually change the header though.
16215         (header_append): Also move the header-start tracking stuff here.
16216         Could be a static function to save code.
16217
16218 2000-05-02    <notzed@helixcode.com>
16219
16220         * camel-mime-part-utils.c
16221         (simple_data_wrapper_construct_from_parser): Dont use autofill on
16222         these fucking long function anmes!!!!!!
16223
16224 2000-05-02  NotZed  <NotZed@HelixCode.com>
16225
16226         * providers/mbox/camel-mbox-summary.c
16227         (camel_mbox_summary_expunge): Fix the offset for the summary when
16228         an item is expunged to take account of the From line.
16229
16230 2000-05-01  NotZed  <NotZed@HelixCode.com>
16231
16232         * providers/mbox/camel-mbox-folder.h (CamelMboxFolder): Removed
16233         search_id.
16234
16235         * providers/mbox/camel-mbox-search.c
16236         (camel_mbox_folder_search_cancel): Remove.d
16237         (camel_mbox_folder_search_complete): Removed.
16238         (camel_mbox_folder_search_by_expression): Changed back to sync
16239         api.
16240         (struct _searchcontext): Removed cancelled flag.
16241         (find_context): Removed.
16242         (func_header_contains): Debug out some search stuff.
16243
16244         * providers/mbox/camel-mbox-search.h
16245         (camel_mbox_folder_search_by_expression): Moved back to sync api.
16246
16247         * providers/mbox/camel-mbox-summary.c
16248         (camel_mbox_summary_set_flags_by_uid): New function to update the
16249         flags in the summary.
16250         (camel_mbox_summary_expunge): Expunge messages from a folder.
16251         (offset_content): Re-align offsets of summary when messages
16252         added/removed to an existing summary.
16253         (camel_mbox_summary_remove_uid): Remove a message summary entry by
16254         uid.
16255         (index_folder): Restore flags from X-Evolution header, if they are set.
16256         (index_folder): Make sure we index using a decimal uid, since
16257         thats what everything else indexes off (oops).
16258         Upped SUMMARY_VERSION as a result.
16259         (camel_mbox_summary_expunge): Oops, my wrong, use the string uid
16260         to unindex on.
16261
16262         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
16263         Connect to the message_changed signal.
16264         (_init): Set permanent flags to something reasonable.  No user
16265         flags yet ...
16266         (message_changed): If the flags of the message change, update the
16267         flags in the summary.
16268         (mbox_expunge): Implement the expunge.
16269         (camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s
16270         (mbox_expunge): Emit a folder_changed signal on expunge (uh, even
16271         if it didn't ...)
16272
16273         * camel-folder.c (_finalize): Uh, dont free permanent_flags
16274         anymore (this wouldn't failed anyway, it was a GList !!!)
16275         (camel_folder_search_complete): Removed.
16276         (camel_folder_search_cancel): Removed.
16277         (camel_folder_expunge): Changed to only allow expunge on an open
16278         folder.  It doesn't make sense for mbox, otherwise (?)
16279         (camel_folder_class_init): Added a folder_changed signal.
16280
16281         * camel-folder.h (struct _CamelFolder): Change permanent_flags to
16282         a bitfield.
16283         (list_permanent_flags): Renamed to get_permanent_flags, and
16284         returns a bitfield.
16285         (camel_folder_expunge): Changed expunge to a void type.  The
16286         messages would no longer be useful after they have been removed
16287         ...
16288         (CamelFolderClass): New function summary_get_by_uid() to get a single
16289         summary.
16290         (*search*): Moved back to synchronous search api ... *sigh*
16291         
16292         * camel-folder.h: Removed CamelSearchFunc.
16293
16294         * camel-mime-message.c (set_flag): Removed.
16295         (camel_mime_message_set_flag): Removed.
16296         (get_flag): Removed.
16297         (camel_mime_message_get_flag): Removed.
16298         (add_flag_to_list): Removed.
16299         (get_flag_list): Removed.
16300         (camel_mime_message_get_flag_list): Removed.
16301         (camel_mime_message_get_flags): New interface to get system flags.
16302         (camel_mime_message_set_flags):  " to set ".
16303         (camel_mime_message_get_user_flag): To get a user flag.
16304         (camel_mime_message_set_user_flag): To set a user flag.
16305         (finalize): Hmm, the old one free'd the key and data, not good
16306         when the data is a boolean ...
16307
16308 2000-04-30  Dan Winship  <danw@helixcode.com>
16309
16310         * camel-provider.h: Tweak the definition of CamelProvider. Among
16311         other things, a provider may now be both a store and a transport.
16312
16313         * camel-provider.c: Remove a lot of code we had no intention of
16314         using. This now only contains two functions: camel_provider_init
16315         to read the installed .urls files, and camel_provider_load to
16316         load and register a new provider.
16317
16318         * camel-session.c: Remove more unused code and simplify some of
16319         the remaining code. The list of available provider modules is now
16320         stored in the session, and it handles calling camel_provider_load
16321         to load them as needed. Provider registration is now done by
16322         calling back from the module init routine, which allows a single
16323         module to register providers for multiple URL types.
16324
16325         * providers/*: Update provider structures and init routines for
16326         the new stuff. Add a .urls file to each provider specifying what
16327         urls it handles, and install that with the library.
16328
16329         * providers/nntp/camel-nntp-provider.c: Add hints towards
16330         supporting both news: and nntp: URLs, and using nntp as both a
16331         store and a transport.
16332
16333 2000-04-29  Dan Winship  <danw@helixcode.com>
16334
16335         * camel-internet-address.c (camel_internet_address_get): const
16336         poison
16337
16338         * camel-mime-part-utils.c
16339         (simple_data_wrapper_construct_from_parser):
16340         camel_mime_parser_tell() returns an offset from where it started
16341         parsing, not necessarily from the start of data. Since we're
16342         parsing a bounded seekable_stream, we need to add the stream's
16343         starting bound to camel_mime_parser_tell's return value to
16344         create the substream in the right place.
16345
16346         * camel-seekable-substream.c
16347         (camel_seekable_substream_new_with_seekable_stream_and_bounds):
16348         say CAMEL_STREAM_UNBOUND rather than -1 in doc.
16349
16350         * camel-seekable-stream.c (camel_seekable_stream_seek): Add more
16351         info to docs.
16352
16353 2000-04-28  Dan Winship  <danw@helixcode.com>
16354
16355         * camel-mime-parser.c (folder_scan_header): fix a bug that would
16356         cause corruption with very long headers.
16357
16358 2000-04-27  Ettore Perazzoli  <ettore@helixcode.com>
16359
16360         * providers/pop3/Makefile.am (INCLUDES): Add `-I$(srcdir)/../../..'
16361         to pick the Camel includes.
16362         * providers/sendmail/Makefile.am (INCLUDES): Likewise.
16363
16364         * camel.h: Don't #include <camel/data-wrapper-repository.h> anymore.
16365
16366 2000-04-27  NotZed  <NotZed@HelixCode.com>
16367
16368         * camel-mime-utils.c (check_header): Dont try and check a NULL
16369         header.
16370
16371         * camel-recipient.[ch]: Dead.  Its not pining.
16372
16373         * camel-mime-message.h: Dont include recipients.h anymore.
16374
16375         * camel-mime-message.c (camel_mime_message_add_recipient): Accept
16376         name/address separately, and store in an CamelInternetAddress.
16377         (add_recipient): Removed.
16378         (remove_recipient): Removed.
16379         (remove_recipient_address): Renamed from remove_receipient, works
16380         via address.
16381         (camel_mime_message_remove_recipient_name): New function to remove
16382         by name.
16383         (get_recipients): Removed.
16384         (camel_mime_message_get_recipients): Return a camel-internet-address.
16385         (write_to_stream): No longer write receipients directly.
16386         (write_recipients_to_stream): Removed.
16387         (write_one_recipient_to_stream): Removed.
16388         (camel_mime_message_init): Setup recipients hashtable, rather than
16389         usign the recipients stuff.
16390         (set_recipient_list_from_string): Killed, a violent and lengthy
16391         death.
16392         (process_header): Simplified recipient handling code a lot.
16393         (received_date_str, sent_date_str, reply_to_str, subject_str,
16394         from_str): Removed some oddly-defined global statics.
16395         (camel_mime_message_class_init): Dont initialise above variables
16396         anymore.
16397         (init_header_name_table): Removed, use a table to init this, and
16398         do it in class init (2 lines of code ...).
16399
16400         * camel-news-address.c: Class to represent news addresses -
16401         currently empty, and not built.
16402
16403         * camel-internet-address.h: Class to represent internet (email)
16404         addresses.
16405
16406         * camel-address.h: Abstract class to represent (lists of)
16407         addresses.
16408
16409 2000-04-27  Dan Winship  <danw@helixcode.com>
16410
16411         * camel-mime-part.c (write_to_stream): Revert previous change. I
16412         was confused.
16413
16414         * camel-url.[ch] (camel_url_encode, camel_url_decode): expose
16415         these routines.
16416
16417 2000-04-26  Dan Winship  <danw@helixcode.com>
16418
16419         * camel-mime-part.c (write_to_stream): Only write a newline
16420         between the headers and the content object if the content object
16421         is not a CamelMedium. (If the content is a medium, it may have its
16422         own headers, which then need to go before the blank line.)
16423
16424         * camel-mime-body-part.[ch]: Remove. We weren't using the fields
16425         that made this different from camel-mime-part, so it basically
16426         just forced us to do lots of gratuitous typecasting.
16427
16428         * camel-multipart.[ch]: Use CamelMimePart. Remove the multipart
16429         parent stuff, since we weren't using that either.
16430
16431         * etc: update for CamelMimeBodyPart -> CamelMimePart
16432
16433 2000-04-26  Dan Winship  <danw@helixcode.com>
16434
16435         * camel-medium.c (set_content_object): sink the content object
16436         after referencing it.
16437
16438         * camel-mime-part.c: fix various little things in the handling
16439         of CamelMedium methods. Change camel_mime_part_set_text to the
16440         more generic camel_mime_part_set_content.
16441
16442         * camel.h: sync to current reality
16443
16444         * camel-folder-utils.[ch]: removed
16445
16446         * camel-mime-utils.c (header_format_date): fix format specifier
16447         for time zone. Fix typo in month names array.
16448
16449 2000-04-26  NotZed  <NotZed@HelixCode.com>
16450
16451         * camel-seekable-substream.c (stream_seek): Changed to have
16452         absolute seek semantics, not relative to the bounds.
16453
16454         * camel-seekable-stream.c (reset): When we reset, seek to the
16455         start of the bound, if there is one.
16456         (stream_tell): Make tell virtual.
16457
16458         * camel-stream-filter.c (do_available): Removed.
16459
16460         * camel-stream-buffer.c: Remove leading _'s from static functions.
16461         (stream_read): Renamed from read().  Fancy that conflicting!  (my
16462         boo!)  Others too.
16463
16464         * providers/pop3/camel-pop3-folder.c (get_message_by_number):
16465         Changed to stream_mem interface.
16466
16467         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed
16468         for streamfs interface changes, and implement a failure case.
16469         (_append_message): Changed for fs stream interface change.
16470
16471         * camel-multipart.c (print_part): Iterate rahter than callback.  I
16472         hate glists's interface (hence, move this to write_to_stream).
16473         (write_to_stream): Return an error (yuck, this is a royal PITA to
16474         do with the stream write interface).
16475
16476         * camel-mime-message.c: Removed leading _ from static names.
16477
16478         * camel-mime-part.h: construct_from_parser() now returns an error
16479         code.
16480
16481         * camel-mime-part-utils.c
16482         (camel_mime_part_construct_content_from_parser): Changed to use a
16483         camel-data-wrapper instead of a camel-simple-data-wrapper (no
16484         change needed elsewhere?).
16485         (simple_data_wrapper_construct_from_parser): Fixes for stream-mem
16486         interface changes.
16487
16488         * camel-simple-data-wrapper.[ch],
16489         camel-simple-data-wrapper-stream.[ch],
16490         camel-stream-data-wrapper.[ch], removed.  Fixed including of these
16491         files.
16492         
16493         * camel-mime-part.c (camel_mime_part_set_text): Remove the use of
16494         the camel-simple-data-wrapper-stream, just use a mem stream.
16495         (write_to_stream): Renamed from my_*
16496         (construct_from_stream): Return an error on error.
16497
16498         * camel-stream-mem.c (camel_stream_mem_new*): Remove mode
16499         parameter.
16500
16501         * camel-stream-mem.h (enum CamelStreamMemMode): Removed.  It
16502         wasn't used at all.
16503
16504         * camel-data-wrapper.h: Add camel_data_wrapper_new() to create
16505         these.
16506         (write_to_stream, construct_from_stream): Return an error
16507         indicator for success.  Fixed all methods to match (ICK).
16508
16509         * Makefile.am (libcamel_la_SOURCES): Remove
16510         camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c,
16511         camel-stream-data-wrapper.c.  Obsoleted by code re-use!
16512
16513         * camel-data-wrapper.c (construct_from_stream): Change the default
16514         implementation to just set the output stream == construction
16515         stream.  Well, this lets me get rid of both simple-data-wrapper
16516         and stream-data-wrapper (unused anyway), and
16517         simple-data-wrapper-stream in one hit.  CamelDataWrapper is now
16518         also a concrete class.
16519         (write_to_stream): Use camel_stream_write_to_stream() to
16520         calculate/return values (and save code).
16521         Include <errno.h> for obvious reasons.
16522
16523         * camel-stream.c (eos): Provide a default implementation of .eos().
16524         (camel_stream_write_to_stream): Make it return an error code on
16525         error.
16526         (camel_stream_printf): Changed to return the number of bytes
16527         written/error.
16528         (camel_stream_available): Removed.
16529
16530         * camel-stream-fs.h (enum CamelStreamFsMode): Removed.  Changed to
16531         use unix modes and so forth (wasn't used for anything but new file
16532         creation and didn't work well either).
16533
16534         * camel-stream-fs.c: Removed leading _'s for names.  And removed
16535         some virtual method 'documentation'.
16536         (destroy): Dont try and close a closed/error fd.  Only report
16537         error if close returns -1.  Moved all the code to finalise(), and
16538         killed this function.
16539         (init_with_fd): Properly setup the seek offset, if it is a
16540         valid and seekable file descriptor.
16541         (init_with_fd_and_bounds): Use off_t for bounds, set bounds on the
16542         seekable stream.
16543         (init_with_name): Return error codes.
16544         (init_with_name_and_bounds): Ditto.
16545         (camel_stream_fs_new_with_name): REturn NULL object if it failed.
16546         (camel_stream_fs_new_with_name_and_bounds): Return NULL object on
16547         failure.  Changed with_name* api's to take unix open style args
16548         and flags.
16549         (read): The bounded stream bounds checking seemed off, simplified
16550         code a bit.
16551         (write): Implement bounds checking for writing, the comment was
16552         wrong, it could make sense to bound writing.  Cleaned up a little.
16553         (available): Gone.
16554         (eos): Removed.  Use CamelStream's implementation now.
16555         (close): Reset the fd to -1, provide a warning for bad usage.
16556         (seek): Cleaned up.  Changed the behaviour a little, the returned
16557         offset is the absolute position in the file, even in bounded
16558         streams.        
16559         (seek): Seek from end mirrors lseek() behaviour (reverse seeking).
16560
16561 2000-04-25  NotZed  <NotZed@HelixCode.com>
16562
16563         * camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof
16564         indicator to other parent classes.
16565
16566         * camel-stream.c (camel_stream_printf): New utility
16567         function.  Obvious use.
16568
16569         * camel-stream-mem.c: Removed leading _'s from static func's.
16570         (camel_stream_mem_new_with_byte_array): Fixed for api changes, set
16571         the owner for the byte array to us.
16572         : Removed A bunch of gtk doc stuff for static (implementation) functions.
16573         (available): Removed.
16574         (write): Fixed the write implementation so that seek() works on a
16575         seekable memory stream, as expected.  Seeking past the end of the
16576         buffer has unix semantics (filling with 0).
16577         (available): Removed.
16578         (write): Implement seekable stream bounded stream.
16579         (read): Implement seekable stream bounded stream.
16580         (close): Dont free the stream_mem if we're not the owner.
16581         (seek): Allow to seek beyond the end of memory area,
16582         implement bounds checking.
16583         (seek): Set errno on bad policy.
16584
16585         * camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t.
16586         (new_with_buffer): Changed len to be a size_t.
16587         (set_buffer, set_byte_array): New interface functions.
16588         (struct _CamelStreamMem): Removed position, it is stored in the
16589         superclass.
16590
16591         * camel-stream.h: Removed some of the seemingly random
16592         whitespace.  Removed the available method (its not
16593         impelemented/useful enough).
16594
16595         * camel-seekable-substream.c
16596         (init_with_seekable_stream_and_bounds): Remove the data_available
16597         stuff, it hasn't been properly implemented/finished, and may never
16598         work (unfortunately *sigh).
16599         (reemit_parent_signal): Removed part of the above change.
16600         (set_bounds): Removed (moved to seekable-stream).
16601         : Fixed up some of the generally unreadable indenting (sorry,
16602         wrapping at 80 characters with
16603         camels_really_long_function_names()
16604         just_doesnt_work_very_well_does_it().
16605         (available): Removed.
16606         (stream_seek): Fixup for object changes.  Make sure we return -1
16607         if the parent stream can't seek.
16608
16609         * camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New
16610         function to bound any seekable stream.
16611         : Removed _'s.
16612         (camel_seekable_stream_class_init): Implement an init function, to
16613         setup the stream bounds to unbound.
16614
16615         * camel-seekable-stream.h (CamelSeekableStreamClass): New virtual
16616         method set_bounds for seekable streams.
16617         (CAMEL_STREAM_UNBOUND): New define for no bound.
16618
16619         * camel-seekable-substream.h (struct _CamelSeekableSubstream):
16620         Removed sup_bound and inf_bound, moved to CamelSeekableStream (and
16621         renamed, and changed to off_t's).
16622         (new_with_seekable_stream_and_bounds): Use off_t as the bounds.
16623         (CamelSeekableSubstreamClass): Uh, why was the intialiser virtual?
16624         Removed.
16625
16626         * camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek
16627         to accept an off_t as the offset.
16628         (struct _CamelSeekableStream): Renamed cur_pos to position and
16629         changed it to an off_t type.
16630         (enum CamelStreamSeekPolicy): Set to match the SEEK_* constants
16631         from lseek().
16632         (get_current_position): Renamed to tell().
16633
16634         * camel-stream-buffer.h: Commented out set_vbuf - never implemented.
16635
16636 2000-04-25  Dan Winship  <danw@helixcode.com>
16637
16638         * camel-stream-buffer.c (_eos): only return TRUE if the parent is
16639         at eos AND the buffer has been exhausted
16640
16641         * camel-mime-message.c: fix some incorrect macro usage that
16642         resulted in bogus casts
16643
16644 2000-04-24  Dan Winship  <danw@helixcode.com>
16645
16646         * camel-mime-part-utils.c
16647         (simple_data_wrapper_construct_from_parser): fix a cut-and-pasto.
16648
16649         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): ref
16650         (and sink) the message stream if we're going to unref it later.
16651         Otherwise it could get destroyed while there are still substreams
16652         attached to it. This needs a cleaner solution.
16653
16654         * camel.h: remove data-wrapper-repository.h include(s)
16655
16656 2000-04-24  NotZed  <NotZed@HelixCode.com>
16657
16658         * camel-mime-message.c (construct_from_parser): Allow MESSAGE_END
16659         _or_ EOF as valid termination conditions.
16660
16661         * providers/mbox/camel-mbox-summary.c (message_struct_new): Decode
16662         and then re-encode the addresses, so they are consistently
16663         formatted.
16664
16665         * camel-mime-utils.c (header_decode_mailbox): Store the address in
16666         a _header_address.  And try to get a comment-stored name if there
16667         is one.
16668         (header_decode_address): Actually return an address.
16669         (header_to_decode): Renamed to header_address_decode()
16670         (header_mailbox_decode): New function to get a single mailbox.
16671         (header_mime_decode): Return the major/minor value, as
16672         appropriate.
16673         (header_address_new, and friends): Whole bunch of utility
16674         functions for working with the address thingies.
16675         (header_decode_domain): Free the string header, and dont expand
16676         '.' into ' . '.
16677
16678         * camel.c (camel_init): No longer call
16679         data_wrapper_repository_init.
16680
16681         * camel-medium.c (write_to_stream): Moved (back) to
16682         camel-mime-part.
16683         (add_header):
16684         (set_header):
16685         (remove_header): 
16686         (get_header): Make all these abstract, and spit warnings if
16687         called.  I guess it could manage the list, but well, it doesn't.
16688
16689         * camel-medium.h (struct _CamelMedium): Dont store headers here,
16690         the implementor is the only one who knows their format.
16691         (CamelMediumClass): Changed header values to be void *'s.  They
16692         need not be strings?
16693
16694         * camel-simple-data-wrapper.c (construct_from_stream): And we're
16695         back.  Set the output stream.
16696         (construct_from_parser): Moved to camel-mime-part-utils.
16697
16698         * camel-mime-part-utils.c
16699         (camel_mime_part_construct_content_from_parser): Create the
16700         contents of multipart and simple messages.
16701         (camel_mime_part_construct_content_from_parser): Oops, this was
16702         totally screwed up, try creating the right cotnent on the right
16703         object.
16704
16705         * camel-multipart.c (construct_from_parser): Moved to
16706         camel-mime-part-utils.
16707         (separate_part): Removed.
16708
16709         * camel-mime-part.c (construct_from_stream): Back again!  This now
16710         switches over to using a mime parser for any mime parts, only.
16711         (my_write_to_stream): Write our headers and so forth here.
16712         (add_header): Add header directly, parent class is abstract.
16713         (remove_header): Ditto.
16714         (set_header): Ditto.
16715
16716         * camel-data-wrapper.c (camel_data_wrapper_construct_from_stream):
16717         Remade abstract.
16718         (camel_data_wrapper_construct_from_parser): Moved to
16719         camel_mime_part.
16720
16721         * camel-data-wrapper.h: Put back construct_from_stream.
16722
16723         * camel-mime-part.h: Put construct_from_parser in here, the
16724         data-wrapper shouldn't know about mime.  Ok, so now to undo half
16725         of the last hours changes ... duh.
16726         
16727 2000-04-23  Dan Winship  <danw@helixcode.com>
16728
16729         * camel-mime-utils.c (header_to_decode, header_mime_decode): fix
16730         some obvious minor bugs noted by -Wall.
16731
16732 2000-04-23  NotZed  <NotZed@HelixCode.com>
16733
16734         * providers/pop3/camel-pop3-folder.c (get_message_by_number): Use
16735         construct_from_stream instead of set_input_stream().
16736
16737         * camel-simple-data-wrapper-stream.c
16738         (camel_simple_data_wrapper_stream_construct): REmoved the destroy
16739         callback code.
16740         (wrapper_destroy_cb): Removed.
16741
16742         * camel-simple-data-wrapper.h: Add prototype for _construct()
16743         method.
16744
16745         * camel.c: Include unicode.h to kill a warning.
16746
16747         * camel-data-wrapper.h (CameldataWrapperClass): Removed
16748         construct_from_stream virtual method.
16749         Removed get/set input stream.
16750
16751         * data-wrapper-repository.[ch]: Removed&from build.  Obsoleted?
16752         The justification as is follows: It is mixing storage
16753         protocol/format with message architecture.  It really just doesn't
16754         serve any purpose, as each medium implementor will have to have its
16755         own type->handler mapping, and the only current implementor,
16756         mimepart has a very simple structure and no need for this.
16757
16758         * camel-medium.c (write_to_stream): Moved here from most of the
16759         stuff in camel-mime-part.  Well, the MEDIUM is the one that knows
16760         what the headers are, and the content is, let it write it out.
16761
16762         * camel-mime-part-utils.c (camel_mime_part_construct_content):
16763         Copied from camel-mime-part.c, removed handling of message
16764         followon state (moved to camel-mime-message).
16765         (camel_mime_part_construct_content_from_parser): Renamed from
16766         construct_content.
16767         (camel_mime_part_construct_headers_from_stream):
16768         (camel_mime_part_construct_content_from_stream):
16769         (camel_mime_part_store_stream_in_buffer): Removed.  Replaced by
16770         the new construct from parser stuff.
16771
16772         * camel-mime-message.c (construct_from_parser): Do
16773         construct_from_parser for mime-message.
16774         (_write_to_stream): Set the mime-version header for medium to
16775         write out, rather than writing it out ourselves.
16776
16777         * camel-data-wrapper.c (set_mime_type_field): Ref the
16778         content_field when we get it?
16779         (construct_from_stream): Removed.
16780         (camel_data_wrapper_construct_from_stream): Changed to a helper
16781         function, creates a mime_parser, and constructs from that.
16782         (set_input_stream): Removed.
16783         (camel_data_wrapper_set_input_stream): Removed.
16784         (get_input_stream): Removed.
16785         (camel_data_wrapper_get_input_stream): Removed.
16786
16787         * camel-mime-parser.c (camel_mime_parser_unstep): New function.
16788         Cause a subsequent call to mime_parser_step() to return the same
16789         state over again.
16790
16791         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
16792         Initial test code using the mime parser to construct the message.
16793         (_get_message_by_uid): Use construct_from_stream() instead of
16794         creating our own parser.
16795
16796         * camel-mime-part.c (construct_from_parser): part constructor.
16797         (camel_mime_part_construct_content): Basically a simpler
16798         replacement for the datawrapper repository.
16799         (camel_mime_part_init): Set the default type to text/plain.
16800         (camel_mime_part_construct_content): Removed to
16801         camel-mime-part-utils.c
16802         (my_get_output_stream): Removed.  The streeam is in the
16803         data-wrapper.
16804         (my_get_content_object): Removed.  The content object is stored in
16805         the medium.  If none is there, the object wasn't created properly.
16806         (my_write_content_to_stream): Removed.  The content object is the
16807         one that knows how to write itself out!!!!!!!!
16808         (my_write_to_stream): Remove the base header writing stuff - has
16809         been moved to camel-medium, where it belongs.  This can just be
16810         used to check for mandatory headers.
16811         (my_construct_from_stream): Removed.
16812         (my_set_input_stream): What the hell, i'll remove this too.
16813         Nobody seems to understand how it differs from create from stream,
16814         and they both seem to serve the same purpose ...
16815
16816         * camel-simple-data-wrapper.c (construct_from_parser): Initial
16817         implementation of a content constructor.
16818         (construct_from_stream): Removed!  Job taken over by
16819         construct_from_parser.
16820
16821         * camel-multipart.c (construct_from_parser): Multipart
16822         construction routine.
16823         (camel_multipart_init): Set the default multipart type to
16824         multipart/mixed.  Duh, no subtype is not allowed anyway.
16825         (set_input_stream): REmoved.  Replaced by construct_from_parser.
16826
16827 2000-04-22  Dan Winship  <danw@helixcode.com>
16828
16829         * camel-multipart.[ch]: clean, document, etc.
16830         (camel_multipart_init): pick a prettier default boundary. Still
16831         need to deal with the larger problem
16832
16833 2000-04-22  NotZed  <NotZed@HelixCode.com>
16834
16835         * camel-mime-message.h (struct _CamelMimeMessage): Removed
16836         send_date, and received_date, and replaced it with a time_t
16837         'date' (this is what the header is called), and date_offset to
16838         store the GMT offset of the date.
16839
16840         * camel-mime-message.c (camel_mime_message_set_from): Update raw
16841         header as we go.
16842         (_set_from): Removed.
16843         (_get_from): Removed.
16844         (camel_mime_message_get_from): Moved implementation here.
16845         (camel_mime_message_get_subject): Move implementation here.
16846         (_get_subject): Nuked.
16847         (camel_mime_message_set_subject): Handle utf-8 input, and also
16848         update raw header when changed.
16849         (_set_subject): Removed.
16850         (_set_received_date): Removed.
16851         (camel_mime_message_set_received_date): Removed.
16852         (_get_received_date): Removed.
16853         (camel_mime_message_get_received_date): Removed.
16854         (_get_sent_date): Removed.
16855         (camel_mime_message_get_sent_date): Removed.
16856         (camel_mime_message_get_date): New function to get the date as a
16857         time_t/offset.
16858         (camel_mime_message_set_date): Set the date as a time_t/offset.
16859         (camel_mime_message_get_date_string): Get the date as a string.
16860         (camel_mime_message_init): Initialise the current date as
16861         'CMAEL_MESSAGE_DATE_CURRENT'.
16862         (_set_reply_to): Removed.
16863         (camel_mime_message_set_reply_to): Moved implementation here.
16864         This is still broken, reply-to can have multiple addresses.
16865         (_get_reply_to): Removed.
16866         (_set_field): Removed, no longer used anywhere.
16867         (_get_field): Also removed.
16868         (_init_header_name_table): Add the Date header.
16869         (process_header): Also handle snooping of Date header here.
16870
16871         * camel-stream-filter.c (finalise): Unref the source stream on
16872         finalise, and also call the parent class (oops).
16873
16874         * camel-mime-parser.c (camel_mime_parser_state): New function to
16875         get the current parser state.
16876         (camel_mime_parser_stream): Allow you to get the stream back from
16877         the mime_parser.
16878         (camel_mime_parser_fd): Alternative to allow you to get the fd
16879         back from the mime_parser.
16880         (folder_scan_init_with_stream): Properly ref/unref the stream.
16881         (folder_scan_close): Properly unref the stream/close the fd on
16882         exit.
16883         (folder_scan_init_with_fd): Close the old fd if there is one.
16884
16885         * camel-data-wrapper.c (camel_data_wrapper_construct_from_parser):
16886         New method, construct a data wrapper from an initialised parser.
16887         (construct_from_parser): Empty implementation.
16888         
16889         * providers/mbox/camel-mbox-summary.c (message_struct_new):
16890         Convert subject line to unicode, before storing in the summary.
16891         (strdup_trim): Removed, no longer needed.
16892
16893         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref
16894         the folder after setting it in the new message.
16895
16896         * camel-mime-part.c (my_set_content_object): Have the headers
16897         follow the content-type change here too.
16898         (my_write_to_stream): Dont write content-type here, automatically
16899         stored in the headers ...
16900         (my_write_to_stream): Use header_disposition_format() to format
16901         the content-disposition header.
16902         (my_write_to_stream): Removed old code, all headers are now stored
16903         in the camel-medium level, always.  Need to do the same with
16904         camel-mime-message i suppose ...
16905         (my_write_to_stream): Write the content using the parent class,
16906         not some weird function.
16907         (camel_mime_part_class_init): Dont override get_output_stream.
16908         (camel_mime_part_encoding_from_string): Bleh, make it
16909         case-insensitive.
16910
16911         * camel-mime-utils.c (header_content_type_is): Handle empty types.
16912         (header_encode_string): Start of an implementation of the rfc2047
16913         encoder.  It does iso-8859-1, and us-ascii, and utf-8 (others get
16914         tricky *sigh*)
16915         (rfc2047_encode_word): Convert a single word/string into rfc2047
16916         encoding.
16917         (quoted_encode): Different quoted-printable encoding for rfc2047
16918         encoding of headers.
16919
16920         * gmime-content-field.c (gmime_content_field_write_to_stream): Use
16921         header_content_type_format() to format it.
16922
16923 2000-04-21  NotZed  <NotZed@HelixCode.com>
16924
16925         * camel-mime-utils.h: Add prototype for header_param_list_free.
16926
16927         * camel-recipient.c: New function to remove all the types of a
16928         recipient list.  I think this whole object needs a major review.
16929
16930         * camel-mime-message.c (camel_mime_message_class_init): Removed
16931         parse_header_pair override, override add_header instead.
16932         (_parse_header_pair): Renamed to add_header.
16933         (remove_header): Add this method, to make sure we keep upto date
16934         with removed headers too.
16935         (_set_field): If given a NULL value, clear it out.
16936         (_set_recipient_list_from_string): Constify.
16937         (set_header): Override set_header from camel_medium.
16938         (process_header): Local function to handle set/add/remove of each
16939         header we know about.
16940
16941         * camel-mime-part.c (camel_mime_part_class_init): Removed
16942         parse_header_pair setup.
16943         (my_parse_header_pair): Moved into add_header(), removed.
16944         (my_set_disposition): Allow a NULL disposition to clear it.
16945         (my_set_content_id): Allow NULL content id to clear it.
16946         (remove_header): Track removed headers.
16947         (my_set_description): Allow NULL description to clear it.
16948         (my_set_content_MD5): Make sure we copy the md5 value, and allow a
16949         NULL value to reset it.
16950         (my_set_filename): Copy the filename.
16951         (my_set_header_lines): Removed.  Nothing uses it, it doesn't
16952         actually serve any purpose.
16953         (camel_mime_part_set_header_lines): Ditto.
16954         (my_get_header_lines): Ditto.
16955         (camel_mime_part_get_header_lines): Ditto.
16956         (camel_mime_part_class_init): Remove *_header_lines setup.
16957         (camel_mime_part_init): Remove header_lines init.
16958         (my_finalize): Remove header_lines finalise.
16959         (my_write_to_stream): Write the headers here.  This is just WRONG,
16960         camel_medium should be doing this.
16961         (my_get_output_stream): Kill a warning.
16962         (camel_mime_part_encoding_to_string): Ditto.
16963         (camel_mime_part_set_description): Unvirtualiase, use add_header()
16964         to do the processing.
16965         (my_set_description): Removed.
16966         (set_disposition): Renamed from my_set_disposition.
16967         (camel_mime_part_get_description): Get the descriptionf rom the
16968         get_header method.
16969         (my_get_description): Removed.
16970         (my_set_filename): Removed.
16971         (camel_mime_part_get_filename): Get the parameter from the
16972         disposition.
16973         (camel_mime_part_encoding_from_string): Handle NULL string.
16974         (camel_mime_part_init): Remove reference to filename.
16975         (my_finalize): Dont free filename.
16976
16977         * camel-mime-part.h (CamelMimePartClass): Removed
16978         parse_header_pair() method, it doesn't add anything that
16979         add_header() can't be used for.
16980         (CamelMimePartClass): Remove *_header_lines methods.
16981         (struct _CamelMimePart): Remove header_lines list.
16982         (struct _CamelMimePart): Removed filename attribute.
16983
16984         * camel-medium.c (camel_medium_init): Init headers to null, not a
16985         hashtable.
16986         (add_header): Append the headers as a list.
16987         (remove_header): Remove headers as a list.
16988         (get_header): Likewise for lookup.
16989         (free_header): Removed, no longer needed.
16990         (finalize): Free headers using header_raw_clear().
16991         (camel_medium_set_header): New function, to reset and override all
16992         values of a header with a new value.
16993
16994         * camel-medium.h (struct _CamelMedium): Changed to use a
16995         header_raw struct rather than a hash table, to store headers
16996         (many headers can occur multiple times).
16997
16998         * camel-mime-utils.c (header_raw_find_next): New function, allows
16999         you to find multi-valued header fields.
17000         (header_disposition_format): New function to format/create
17001         content-disposition header string.
17002         (header_param_list_format_append): Function to format parameter
17003         lists into a GString.
17004         (header_content_type_format): Function to format content-type into
17005         a usable format.
17006         (header_set_param): allow NULL value to remove the parameter.
17007         (decode_token): Renamed from header_decode_token.
17008         (header_decode_token): New interface for external use.
17009         (quoted_decode): Made static to kill annoying warnings.
17010         (g_strdup_len): Killed, replaced with calls to g_strndup().
17011         (rfc2047_decode_word): Made static to kill warnings.
17012         (decode_coded_string): Terminated.
17013         (g_string_append_len): Made static to kill warnings.
17014         (header_decode_text): Made static to kill warnings.
17015         (header_decode_text): Constify.
17016         (rfc2047_decode_word): Constify.
17017         (header_param): Constify.
17018         (header_content_type_new): Copy the type/subtype strings.
17019         (header_param_list_decode): Made static.
17020         (header_param_list_format_append): Made static.
17021         (quoted_decode): Constify.
17022         (g_string_append_len): Constify.
17023         (header_token_decode): New function to decode a single token.
17024
17025         * providers/mbox/camel-mbox-summary.c (header_write): Append a
17026         trailing \n when writing headers.
17027         (strdup_trim): Killed a warning.
17028         (camel_mbox_summary_set_uid): Make sure the next uid is at least 1
17029         higher than any existing one.
17030         (header_evolution_decode): Use header_token_decode to get the
17031         token.
17032
17033         * camel-mime-parser.c (folder_scan_header): Strip the trailing \n
17034         of the end of all header lines.
17035
17036 2000-04-20  NotZed  <NotZed@HelixCode.com>
17037
17038         * providers/mbox/camel-mbox-utils.[ch]: Removed.
17039
17040         * providers/mbox/camel-mbox-parser.[ch]: Removed.  Removed
17041         references to it.
17042
17043 2000-04-20  Dan Winship  <danw@helixcode.com>
17044
17045         * camel-mime-utils.c (rfc2047_decode_word): use libunicode iconv
17046         functions rather than libc ones (since libc might not have them).
17047         (header_decode_date): add autoconfiscation on timezone code
17048
17049         * camel.c (camel_init): call unicode_init ()
17050
17051 2000-04-20  NotZed  <NotZed@HelixCode.com>
17052
17053         * providers/mbox/camel-mbox-summary.c (message_struct_new): Trim
17054         leading/trailing spaces off the raw headers.
17055
17056         * MERGE NEW_PARSER branch into HEAD, fixed conflicts.
17057         
17058         * gmime-content-field.c (_print_parameter): Duh, removed again
17059         (@@#$@ cvs merge).
17060
17061         * camel-mime-utils.c (header_content_type_is): Constify.
17062         (header_content_type_unref): Killed a couple warnings.
17063
17064         * camel-folder.c (_init): Removed more log crap.
17065
17066         * providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for
17067         summary changes.
17068
17069         * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
17070         Fixed for new summary interface.  Added a warning for using this
17071         broken api.
17072         (_get_message_by_uid): Fixed for message new with session
17073         vanishing.
17074
17075 2000-04-19  Dan Winship  <danw@helixcode.com>
17076
17077         * camel-simple-data-wrapper-stream.c
17078         (camel_simple_data_wrapper_stream_get_type): This is a subtype of
17079         CamelSeekableStream, not CamelStream.
17080
17081         * camel-seekable-substream.c: clean up a lot.
17082         (eos): When testing for end-of-stream, reset the parent position
17083         before testing if it is at end-of-stream, since either (a) it may
17084         have been seek'ed to eos by someone else, or (b) we may have been
17085         seek'ed away from eos and it hasn't been synced yet.
17086
17087         * camel-medium.[ch] (camel_medium_add_header): const poison.
17088         (Belatedly goes with my change of 2000-02-23.)
17089         (camel_medium_init): Use g_strcase_{hash,equal} on the header
17090         array.
17091         
17092 2000-04-18  Dan Winship  <danw@helixcode.com>
17093
17094         * camel-mime-part.c (my_set_input_stream): 
17095         * camel-data-wrapper.c (set_input_stream, set_output_stream): do
17096         better reference counting of streams so they actually go away
17097         when they should.
17098
17099         * camel-log.[ch], *: Nuke camel log stuff. Replace calls to
17100         CAMEL_LOG_WARNING with calls to g_warning.
17101
17102         * camel-data-wrapper.[ch]:
17103         * camel-simple-data-wrapper.[ch]:
17104         * camel-medium.[ch]: Clean, polish, document. Most of the gtk-doc
17105         comments added to camel-data-wrapper.c note serious problems that
17106         need to be fixed.
17107
17108 2000-04-17  Dan Winship  <danw@helixcode.com>
17109
17110         * camel-mime-message.[ch]: Remove the "session" field from
17111         CamelMimeMessage. Nothing uses it, about half of the existing
17112         calls to camel_mime_message_new_with_session pass NULL, and
17113         there's no obvious reason for it to be there.
17114
17115         * providers/MH/camel-mh-folder.c:
17116         * providers/maildir/camel-maildir-folder.c:
17117         * providers/mbox/camel-mbox-folder.c:
17118         * providers/mbox/camel-mbox-utils.c:
17119         * providers/nntp/camel-nntp-folder.c:
17120         * providers/pop3/camel-pop3-folder.c: Use camel_mime_message_new
17121         instead of camel_mime_message_new_with_session.
17122
17123         * camel-session.c (get_store_for_protocol_with_url): Set the
17124         exception if no provider is found.
17125
17126         * camel-url.c: Add code to encode and decode %-escapes in URLs,
17127         and do some additional correctness-checking on URL syntax. From
17128         Tiago Antào with modifications by me.
17129
17130 2000-04-14  Chris Toshok  <toshok@helixcode.com>
17131
17132         * providers/Makefile.am (SUBDIRS): add nntp
17133
17134 2000-04-14  Christopher James Lahey  <clahey@helixcode.com>
17135
17136         * providers/mbox/camel-mbox-folder.c: Fix switch statement.
17137
17138 2000-04-14  Chris Toshok  <toshok@helixcode.com>
17139
17140         * providers/nntp/camel-nntp-folder.c (_exists): always return TRUE
17141         for now.  we need to check the server response to make sure the
17142         group exists.
17143         (_get_message_by_uid): make sure to account for the \n we add to
17144         the string after every line.
17145
17146         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): function
17147         to get the headers using the XOVER command.
17148         (get_HEAD_headers): function to get the headers using the HEAD
17149         command on each message. slooooooow.
17150         (camel_nntp_get_headers): make this function use either XOVER or HEAD
17151         versions depending on whether or not the server extension is present.
17152
17153 2000-04-14  Dan Winship  <danw@helixcode.com>
17154
17155         * camel-formatter.[ch]: This didn't belong in Camel. Move to mail/
17156
17157         * Makefile.am, camel-types.h: remove references to
17158         camel-formatter.
17159
17160 2000-04-12  Matt Loper  <matt@helixcode.com>
17161
17162         * camel-folder-pt-proxy.c (_folder_open_cb): Print warning message
17163         for broken function.
17164         (_folder_close_cb): Same.
17165
17166 2000-04-12  Miguel de Icaza  <miguel@gnu.org>
17167
17168         * Makefile.am (pthread_SRC): Use correct names for the pthread
17169         source variables.
17170
17171 2000-04-10  Dan Winship  <danw@helixcode.com>
17172
17173         * providers/pop3/camel-pop3-store.c (pop3_connect): fix various
17174         bugs in APOP code (still untested) and some of the error cases.
17175
17176         * camel-provider.h: Clarify what provider.protocol, provider.name,
17177         and provider.description should be.
17178
17179         * providers/mbox/camel-mbox-provider.c: 
17180         * providers/pop3/camel-pop3-provider.c: 
17181         * providers/sendmail/camel-sendmail-provider.c: 
17182         * providers/smtp/camel-smtp-provider.c: update protocols, names,
17183         and descriptions
17184
17185         * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
17186         implement get_message_by_number for the mail fetch code.
17187
17188 2000-04-09  Jeffrey Stedfast  <fejj@stampede.org>
17189
17190         * providers/smtp/camel-smtp-transport.c: reformatted to fit
17191         the standard indent format used by helix code
17192
17193 2000-04-09  Dan Winship  <danw@helixcode.com>
17194
17195         * camel-movemail.c: New file with new function to dot-lock an mbox
17196         file and copy it to a safe private directory.
17197
17198 2000-04-08  Christopher James Lahey  <clahey@helixcode.com>
17199
17200         * providers/smtp/.cvsignore: Added a .cvsignore file.
17201
17202 2000-04-08  Dan Winship  <danw@helixcode.com>
17203
17204         * providers/sendmail/camel-sendmail-transport.c (_send_internal):
17205         actually record the pid returned by fork(). Noticed by clahey.
17206
17207         * providers/smtp/camel-smtp-transport.c: #include <sys/param.h>
17208         for MAXHOSTNAMELEN. (This is a stopgap: some of the uses of
17209         MAXHOSTNAMELEN are wrong anyway...)
17210
17211 2000-04-07  Jeffrey Stedfast  <fejj@stampede.org>
17212
17213         * providers/smtp/camel-smtp-transport.c: fixes to numerous bugs;
17214         should now build fine.
17215         * providers/Makefile.am: Readded smtp now that smtp builds without
17216         error.
17217
17218 2000-04-20  NotZed  <NotZed@HelixCode.com>
17219
17220         * providers/mbox/camel-mbox-summary.c
17221         (camel_mbox_summary_next_uid): Public function to get the next
17222         uid, makes sure its saved to disk too.
17223
17224         * camel-mime-part.c (my_finalize): Fix disposition crap with a
17225         real disposition.
17226         (my_set_disposition): Likewise.
17227         (my_get_disposition): And here.
17228         (my_write_to_stream): And here, needs more cleanup.
17229
17230         * providers/mbox/camel-mbox-folder.c (_append_message): Assign a
17231         new uid at this point.
17232
17233         * gmime-content-field.c (gmime_content_field_write_to_stream):
17234         Make something up if we have an invalid/missing content type
17235         (i.e. text/plain).
17236
17237 2000-04-19  NotZed  <NotZed@HelixCode.com>
17238
17239         * providers/mbox/camel-mbox-folder.c (_delete): Fixed completely
17240         broken switch() syntax, only compiled because errno is a macro on
17241         some systems.
17242         (_list_subfolders): Likewise.
17243
17244 2000-04-18  NotZed  <NotZed@HelixCode.com>
17245
17246         * camel-mime-parser.c (folder_scan_init): init stream to null.
17247
17248         * providers/mbox/camel-mbox-summary.c
17249         (CAMEL_MBOX_SUMMARY_VERSION): Moved to .c file, incremented.
17250         (index_folder): Changed to have index passed via the summary.
17251         (decode_string): Do a sanity check on the string size, so we dont
17252         visit g_malloc()'s friendly abort().
17253
17254         * camel-folder-pt-proxy.c (camel_folder_pt_proxy_class_init):
17255         Removed reference to set_name.
17256         (_set_name): Removed.
17257
17258         * providers/mbox/camel-mbox-utils.c
17259         (parsed_information_to_mbox_summary): Removed.  Most of this file
17260         is about to be binned.
17261
17262         * providers/mbox/camel-mbox-search.c (func_header_contains): Fixes
17263         for changes to summary interface.
17264         (struct _searchcontext): Remove pointer to message info, get it
17265         straight from the mboxsummary.
17266         (camel_mbox_folder_search_by_expression): New summary interface.
17267         (camel_mbox_folder_search_by_expression): Uh, the summary is not
17268         an object anymore (well not yet).
17269
17270         * providers/mbox/camel-mbox-folder.c
17271         (camel_mbox_folder_class_init): Removed set_name init.
17272         (_set_name): Removed.
17273         (_open): Call new summary interface.
17274         (_close): Use new summary interface.
17275         (_create): Removed a summary object leak.
17276         (_get_message_count): New summary interface.
17277         (_get_uid_list): Use new summary interface. FIXME: this is leaky.
17278         (_get_message_by_uid): Use the new summary interface, some
17279         cleanup.
17280         (_append_message): Totally changed, basically just appends the
17281         message directly, ignores the summary (for now), the summary will
17282         fix itself up if it needs to.
17283         (_check_get_or_maybe_generate_summary_file): Bye bye old code.
17284         (summary_get_message_info): Implement get_message_info again, for
17285         folder.
17286
17287         * camel-folder.c (camel_folder_class_init): Removed set_name
17288         setup.
17289         (_set_name): Moved contents into _init.
17290         (_init): Perform the old functions of set_name here.
17291
17292         * camel-folder.h: Removed the set_name internal interface.
17293
17294 2000-04-14  NotZed  <NotZed@HelixCode.com>
17295
17296         * providers/mbox/camel-mbox-summary.[ch]: Completely replaced with
17297         new code.
17298
17299         * Makefile.am (libcamel_la_SOURCES): Removed
17300         camel-folder-summary.[ch].
17301
17302         * camel-folder.h (struct _CamelFolder): Removed summary.
17303         (struct _CamelFolder): Changed flags to be 1 bit bitfields.
17304
17305         * camel-folder-summary.[ch]: Class removed entirely.
17306
17307         * camel-folder.c (camel_folder_get_summary): Removed.
17308         (camel_folder_summary_get_message_info): Moved from
17309         camel-folder-summary.c
17310         (camel_folder_summary_get_subfolder_info): Moved from
17311         camel-folder-summary.c
17312
17313         * camel-mime-parser.c (folder_scan_step): Store the start of
17314         headers and start of from in the scan state.
17315         (camel_mime_parser_tell_start_headers): Query the start of the
17316         headers.
17317         (camel_mime_parser_tell_start_from): Query the cached start of
17318         from marker.
17319
17320 2000-04-13  NotZed  <NotZed@HelixCode.com>
17321
17322         * gmime-content-field.c (gmime_content_field_free): Removed this
17323         function.  If its too dangerous to use, it shouldn't be here.
17324         (gmime_content_field_ref): Also ref the embedded content-type.
17325         (gmime_content_field_unref): Ditto to unref it.
17326
17327         * camel-mime-utils.h: Add a refcount for content-type header.
17328
17329         * camel-mime-utils.c (header_content_type_unref): Implement unref
17330         for content-type.
17331         (header_content_type_ref): Implement ref for header content type.
17332
17333 2000-04-12  NotZed  <NotZed@HelixCode.com>
17334
17335         * gmime-content-field.h: Changed to use a _header_content_type.
17336         Added type/subtype back for compatability with clients.
17337         
17338         * gmime-content-field.c: Basically a total rewrite, and now just a
17339         thin wrapper ontop of header_content_type.
17340         (_free_parameter): Got rid of it.
17341         (gmime_content_field_new): Use header_content_type_* functions.
17342         (gmime_content_field_set_parameter): Likewise.
17343         (_print_parameter): Blow away.
17344         (gmime_content_field_write_to_stream): Get details from the
17345         content_type field.  Should check if it needs to escape chars in
17346         the paramter value.
17347         (gmime_content_field_get_mime_type): Likewise.
17348         (___debug_print_parameter): Get rid of this rather annoyingly
17349         named function.
17350         (gmime_content_field_get_parameter): Simplified function.
17351         (gmime_content_field_construct_from_string): Fixed this to use a
17352         real parser.
17353         (gmime_content_field_is_type): New function to test if a type matches.
17354         (gmime_content_field_construct_from_string): Track type/subtype
17355         from subordinate content_type header struct.
17356
17357         * gmime-rfc2047.[ch]: Removed.  Unused.
17358
17359         * camel-stream-b64.[ch]: Blown away more duplicated code.
17360
17361         * Makefile.am: Removed camel-stream-b64.[ch], and
17362         gmime-base64.[ch].
17363
17364         * camel-mime-part.c (my_get_content_object): Replaced
17365         camel-stream-b64 with camel-stream-filter/camel-mime-filter-basic.
17366         (my_write_content_to_stream): Replaced camel-stream-b64 with the
17367         camel-stream-filter with an encoder.
17368         (my_get_content_object): Also implement quoted-printable decoding.
17369         (my_write_content_to_stream): Also implement quoted-printable
17370         encoding.
17371         (my_get_output_stream): Took out stream-b64 code (nothing's being
17372         executed yet anyway).
17373
17374         * gmime-base64.[ch]: Blown away.  Not used, dont need it.
17375
17376         * camel-mime-utils.h: Added offset for this header.  Records where
17377         it is in the source.
17378
17379         * camel-mime-utils.c (header_raw_append_parse): Add offset
17380         parameter, to store where the header is stored in the stream.
17381         (header_raw_append): Added offset param.
17382         (header_raw_find): Return offset, if a pointer supplied for it.
17383         (header_raw_replace): Add offset param.
17384         (header_content_type_new): New function, to create an empty
17385         content type.
17386         (header_content_type_set_param): Set a parameter in the
17387         content-type.
17388         (header_set_param): Generic header parameter setting function.
17389         (header_decode_string): Handle NULL input.
17390
17391         * camel-mime-parser.c (camel_mime_parser_headers_raw): New
17392         function to get access to all the raw headers.
17393         (folder_scan_header): Keep track of the header start position, and
17394         store it when saving the header.
17395
17396 2000-04-11  NotZed  <NotZed@HelixCode.com>
17397
17398         * camel-mime-utils.c: Moved a bunch of printf's to debug.
17399
17400         * camel-mime-parser.c: Moved a bunch of printf's to debug.
17401         (folder_scan_header): Detect end of each header line using the
17402         last scanned char, and not the last scanned position.
17403
17404         * camel-mime-filter-index.[ch]: Indexing filter.  Indexes unicode
17405         sequences into ibex files.
17406
17407 2000-04-09  NotZed  <NotZed@HelixCode.com>
17408
17409         * camel-mime-part.c: Dont include gmime-base64.h
17410
17411         * camel-mime-filter-charset.c (complete): Implement the completion
17412         function.
17413
17414         * camel-mime-parser.c (folder_scan_step): If we get to the end of
17415         the body data, check any filters for outstanding completion data.
17416         (camel_mime_parser_scan_from): Set whether we scan for "From "
17417         headers or not.
17418
17419         * camel-stream-filter.c (do_read): If we get to end of stream on
17420         the source, then call the filtering completion function to see if
17421         we have any more data to return.
17422
17423         * camel-mime-filter-basic.c (filter): Implement quoted printable
17424         encoding and decoding filters.
17425         (complete): And the complete function as well.
17426
17427         * camel-mime-utils.c (base64_encode_close): Also take an input
17428         buffer, allow closing of filters.
17429         (quoted_encode_step): First cut, simple quoted-printable encoder.
17430         Doesn't handle trailing spaces/tabs on end of line properly yet.
17431         (quoted_encode_close): Complete a quoted-encoding.
17432         (is_qpsafe): New type check, for quoted-printable safe characters
17433         (that do not need encoding).  Thats all bits used in the type
17434         table!  Rebuilt the types table.
17435         (header_content_type_is): Checks a content type against at
17436         type/subtype match.
17437         (header_content_type_param): Handle NULL content type pointer.
17438
17439 2000-04-08  NotZed  <NotZed@HelixCode.com>
17440
17441         * camel-mime-filter-basic.c (filter): Implement the base64
17442         encoder.  Problem is, there is no way to know when to close it.
17443         Close/Reset will have to provide the same args as filter, so it can
17444         flush remaining data *sigh*
17445
17446         * camel-mime-utils.c (base64_encode_step): A rather complex base64
17447         encoder, fast?
17448         (base64_step_close): Companion function to finish off the base64
17449         sequence.
17450
17451         * camel-mime-part.c (my_write_content_to_stream): Changed to use
17452         camel_stream_write_to_stream().
17453
17454         * camel-stream.[ch] (camel_stream_write_to_stream): From
17455         camel_stream_b64_write_to_stream().  Fixed some infinite loop
17456         bugs with error conditions.
17457
17458         * camel-stream-b64.[ch] (camel_stream_b64_write_to_stream): Removed.
17459         This has nothing to do with stream-b64, so i've moved it to
17460         CamelStream.
17461
17462         * camel-mime-utils.h: Add a comment about refcounting
17463         header_content_type struct.
17464
17465         * Makefile.am: Added camel-stream-filter*.[ch].
17466
17467         * camel-stream-filter.[ch]: Class to implement a generic
17468         (multipass) filter ontop of a stream.  Only implements a read-only
17469         stream.
17470
17471         * camel-mime-parser.c (camel_mime_parser_filter_add): Ref the
17472         filter we just added.
17473
17474         * Makefile.am: Added camel-mime-filter*.[ch].
17475
17476         * camel-mime-filter-charset.[ch]: A filter to preform character set
17477         conversion (uses unicode_iconv).
17478
17479         * camel-mime-filter-save.[ch]: A simple filter which will save all
17480         data directly to a file or file descriptor.
17481
17482         * camel-mime-filter-basic.[ch]: Implements the basic mime filters,
17483         base64 and quoted-printable decoding (encoding not implemented yet).
17484
17485         * camel-mime-filter.[ch]: A filtering class, which can filter streams
17486         of data without having to copy them.  Simpler than stream classes,
17487         and can be plugged into a single stream class (when i write it).
17488
17489 2000-04-07  Dan Winship  <danw@helixcode.com>
17490
17491         * providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error
17492         messages.
17493         (finalize): fix a bug in camel_exception usage
17494         (pop3_connect): Remember the password after asking for it the
17495         first time.
17496
17497 2000-04-07  NotZed  <NotZed@HelixCode.com>
17498
17499         * Makefile.am: Added camel-mime-parser/camel-mime-utils.
17500
17501         * camel-mime-parser.c: Fast mime parser.
17502
17503         * camel-mime-utils.c: Mime utility functions, and email header
17504         parsers.
17505
17506 2000-04-07  NotZed  <NotZed@HelixCode.com>
17507
17508         * providers/Makefile.am: Removed smtp for now, its a long way from
17509         building.
17510         * providers/smtp/Makefile.in: Removed file that shouldn't have been
17511         checked in.
17512
17513 2000-04-06  Matt Loper  <matt@helixcode.com>
17514
17515         * camel-folder-pt-proxy.c (_get_full_name): Remove exception param
17516         from get_full_name() called, since get_full_name() was changed to
17517         not have an exception in the last param (see dan's notes below).
17518         (_get_name): same.
17519
17520 2000-04-06  Dan Winship  <danw@helixcode.com>
17521
17522         * camel-store.[ch]: Reorganize the folder-fetching methods and
17523         implement a folder cache so that multiple requests for the same
17524         folder will yield the same CamelFolder object (as long as it
17525         remains active). Includes some code to remove no-longer-active
17526         folders from the cache, but it doesn't get used since nothing is
17527         ever unref'ed in Camel right now...
17528         
17529         * providers/mbox/camel-mbox-store.c:
17530         * providers/pop3/camel-pop3-store.c: update for CamelStore
17531         changes.
17532
17533         * camel-folder.[ch]: Remove the (unused) CamelException argument
17534         from camel_folder_get_name and camel_folder_get_full_name.
17535         (camel_folder_set_name): make this go away since changing a
17536         folder's name after it has been created could result in it
17537         conflicting with a separately-issued folder.
17538         
17539 2000-04-05  Dan Winship  <danw@helixcode.com>
17540
17541         * g_url_new really wanted to take a CamelException. So, rename
17542         Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new
17543         taking an exception), and url-util.[ch] to camel-url.[ch]. Also
17544         force url->port to be numeric and remove camel_service_getport. (I
17545         was confused before: the URL RFC says the port must be numeric, so
17546         we don't want to do getportbyname.)
17547
17548 2000-04-01  Dan Winship  <danw@helixcode.com>
17549
17550         * providers/mbox/camel-mbox-folder.c
17551         (_check_get_or_maybe_generate_summary_file): Compare
17552         mbox_file_size and mbox_modtime to the results of stat()ing the
17553         mbox file, not the summary file. Duh.
17554         (_close): Update the summary's mbox_file_size and mbox_modtime
17555         before writing it to disk.
17556
17557         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_save,
17558         camel_mbox_summary_load): Wow. I must have been tired when I wrote
17559         this code. First, the comparison bug above. Second, it was using
17560         ntohs and htons instead of ntohl and htonl. Third, I was reading
17561         the status flag byte in two different places and thus getting out
17562         of sync. Fourth, it was writing out field_length bytes of each
17563         header field after having converted field_length to network byte
17564         order, resulting in lots of random crap being appended, and the
17565         summary files being huge. (Fortunately, since the size/modtime
17566         comparison was biffed, the garbage summary read from disk was
17567         always immediately discarded.)
17568
17569         * providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): fix
17570         an off-by-one error that caused the last-used UID to be reused if
17571         the summary file was regenerated. (That one wasn't my fault. :-)
17572
17573 2000-03-31  Dan Winship  <danw@helixcode.com>
17574
17575         * camel-stream-mem.c: implement unimplemented methods
17576
17577         * gmime-content-field.c
17578         (gmime_content_field_construct_from_string):
17579         * data-wrapper-repository.c
17580         (data_wrapper_repository_get_data_wrapper_type):
17581         * camel-simple-data-wrapper.c (my_write_to_stream):
17582         * camel-mime-part.c (my_set_input_stream):
17583         remove debugging printf()s that no longer seem useful.
17584
17585 2000-03-31  Matt Loper  <matt@helixcode.com>
17586
17587         * camel-formatter.c (text_to_html): Added "convert_newlines_to_br"
17588         boolean param, to give the option of not converting '\n's to <br>
17589         tags. This way, when we stick stuff in a <pre> tag, newlines stay
17590         newlines.
17591
17592 2000-03-30  Matt Loper  <matt@helixcode.com>
17593
17594         * camel-formatter.c (handle_text_plain): Use <pre> tag to force
17595         the use of monospaced fonts.
17596
17597 2000-03-30  Dan Winship  <danw@helixcode.com>
17598
17599         * camel-service.c (camel_service_getport): Add a htons in the
17600         default_number case, and document the fact that the function
17601         returns the port in network byte order.
17602
17603         * providers/pop3/camel-pop3-store.c (pop3_connect): Revert
17604         Miguel's change. The port number bug was actually somewhere
17605         else, and the IP address copying code was fine already.
17606         
17607 2000-03-29  Miguel de Icaza  <miguel@gnu.org>
17608
17609         * providers/pop3/camel-pop3-store.c (pop3_connect): Add htons
17610         (port), and only copy 4 bytes for the IP address to prevent a DNS
17611         attack. 
17612
17613 2000-03-28  Dan Winship  <danw@helixcode.com>
17614
17615         * camel-seekable-substream.c
17616         (camel_seekable_substream_new_with_seekable_stream_and_bounds):
17617         make this return a CamelStream rather than a
17618         CamelSeekableSubstream, because that's the way Gtk objects tend to
17619         work.
17620
17621         * camel-service.c (camel_service_gethost,
17622         camel_service_getport): convenience functions to canonicalize
17623         the host and port values of a service's URL.
17624         * providers/pop3/camel-pop3-store.c: use them
17625
17626         * providers/mbox/camel-mbox-folder.c
17627         (_check_get_or_maybe_generate_summary_file): Make this work when
17628         the inbox file doesn't yet exist.
17629
17630 2000-03-27  Dan Winship  <danw@helixcode.com>
17631
17632         * providers/mbox/camel-mbox-folder.c (_append_message): uncomment
17633         the call to unlink the temp file: there's no way to tell
17634         camel_stream_fs to truncate a file, so reusing the same file was
17635         resulting in junk at the ends of messages.
17636
17637         * camel-folder.[ch]: add delete_message_by_{number,uid}.
17638
17639         * providers/pop3/camel-pop3-folder.[ch]: implement
17640         delete_message_by_uid. Add a close method to do expunging
17641         of deleted messages if requested.
17642
17643         * providers/pop3/camel-pop3-store.[ch]: support for
17644         CamelPop3Folder::close. (You have to close the connection
17645         in order to expunge the folder, thus the store may be
17646         connected in the CamelService::is_connected sense when it
17647         is not actually connected to the server.) Also some bugfixes.
17648
17649 2000-03-27  NotZed  <NotZed@HelixCode.com>
17650
17651         * providers/mbox/camel-mbox-folder.c (_append_message): Unref the
17652         output_stream when done, close doesn't do it.
17653         (_append_message): Clear all uid's from the appending messages, so
17654         they are reassigned proper unique id's.
17655
17656         * gmime-utils.c (get_header_array_from_stream): Actually free the
17657         header, it is copied elsewhere.
17658
17659 2000-03-26  NotZed  <NotZed@HelixCode.com>
17660
17661         * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Added
17662         folder parameter to function.  Fixed callers.
17663         (index_message): Index a message as it is assigned a unique id.
17664
17665         * camel-mime-part.c (my_set_content_id): Make sure we malloc and
17666         copy the content_id, otherwise *poof*
17667
17668 2000-03-25  NotZed  <NotZed@HelixCode.com>
17669
17670         * camel-medium.c (_finalize): Another leak, unref the content if
17671         finished with it.
17672
17673         * camel-recipient.c (camel_recipient_table_free): Plug another
17674         memory leak - actually free the recipient table.
17675
17676         * camel-mime-message.c (_finalize): Plugged a memory leak with the
17677         flags table.
17678
17679         * gmime-utils.c (_store_header_pair_from_string): A simpler, more
17680         debuggable and functionally identical header extraction function.
17681
17682 2000-03-24  NotZed  <NotZed@HelixCode.com>
17683
17684         * gmime-content-field.c (gmime_content_field_set_parameter):
17685         Remove the hash table entry before freeing its key and data.
17686
17687 2000-03-27  Dan Winship  <danw@helixcode.com>
17688
17689         * providers/Makefile.am (SUBDIRS): Add pop3.
17690
17691         * providers/pop3/camel-pop3-store.c: keep separate input and
17692         output streams so the output doesn't end up being buffered.
17693
17694         * providers/pop3/camel-pop3-folder.c (get_message_by_number):
17695         finish implementing this.
17696
17697 2000-03-27  Michael Meeks  <michael@helixcode.com>
17698
17699         * camel-mime-part.c (my_set_disposition): fix so less broken.
17700         (my_finalize): remove dodgy disposition free.
17701
17702         * camel-data-wrapper.c (my_set_mime_type_field): unref instead of
17703         free on mime_type.
17704
17705 2000-03-27  Dan Winship  <danw@helixcode.com>
17706
17707         * camel-service.c (camel_service_free_auth_types): new routine to
17708         free the data allocated by camel_service_query_auth_types.
17709
17710         * providers/pop3/camel-pop3-store.c (free_auth_types): implement
17711
17712         * camel-stream-mem.c (camel_stream_mem_new_with_buffer): rename
17713         camel_stream_mem_new_with_buffer to ..._with_byte_array and add a
17714         new ..._with_buffer that takes a char * rather than a GByteArray.
17715
17716         * Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it
17717         redundant.
17718
17719 2000-03-25  Dan Winship  <danw@helixcode.com>
17720
17721         * camel-folder-summary.[ch]: change the CamelFolderSummary
17722         interfaces to allow partial summary queries (for dealing
17723         with very large folders). Remove the "extended_fields" from
17724         CamelFolderInfo and CamelMessageInfo: this is better dealt
17725         with by subtyping.
17726
17727         * providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
17728         subclass of CamelFolderSummary. Update interfaces for that. Remove
17729         the internal/external summary distinction. Remove the (unused) md5
17730         checksum in the folder summary. Change the summary file format
17731         (primarily to make it no longer byte-order dependent) and add a
17732         version number to it so it will be easier to change in the future.
17733         
17734         * providers/mbox/camel-mbox-folder.[ch]
17735         * providers/mbox/camel-mbox-search.c
17736         * providers/mbox/camel-mbox-utils.c: update for summary changes
17737
17738         * camel-exception-list.def: add
17739         CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID
17740         
17741 2000-03-23  NotZed  <NotZed@HelixCode.com>
17742
17743         * providers/mbox/camel-mbox-provider.c: Added flag to provider
17744         initialisation, to match changed structure.
17745
17746 2000-03-22  NotZed  <NotZed@HelixCode.com>
17747
17748         * camel-folder.[ch]: Added async search api.
17749
17750         * providers/mbox/camel-mbox-search.c
17751         (camel_mbox_folder_search_by_expression): Changed to use an
17752         asynchronous interface.
17753         (camel_mbox_folder_search_cancel): Cancel function for async
17754         interface.
17755
17756 2000-03-23  Dan Winship  <danw@helixcode.com>
17757
17758         * camel-stream-buffer.c (camel_stream_buffer_read_line): Function
17759         to read one line of any size from a stream and return it in
17760         allocated memory.
17761
17762 2000-03-22  Dan Winship  <danw@helixcode.com>
17763
17764         * camel-service.c (camel_service_query_auth_types): New function
17765         to query a service for the authentication protocols it supports.
17766         * providers/pop3/camel-pop3-store.c (query_auth_types): implement
17767
17768         * camel-provider.c (camel_provider_scan): New function to
17769         scan the provider dir and return a list of all providers.
17770
17771         * providers/pop3/camel-pop3-folder.c: fill this in partially
17772         * providers/pop3/camel-pop3-store.c: make camel_pop3_command
17773         return the text after "+OK"/"-ERR" and add a separate
17774         camel_pop3_get_additional_data to get the message body or
17775         whatever. Also make them take a CamelPop3Store rather than
17776         a CamelStreamBuffer.
17777
17778 2000-03-22  Matt Loper  <matt@helixcode.com>
17779
17780         * camel-formatter.c (debug): Disabled some useless debug
17781         messaging.
17782
17783 2000-03-21  Dan Winship  <danw@helixcode.com>
17784
17785         * providers/pop3: some initial bits of the POP3 provider, to
17786         make Matt happy. Incomplete, untested, etc.
17787
17788 2000-03-21  bertrand  <bertrand@helixcode.com>
17789
17790         * providers/mbox/camel-mbox-summary.c 
17791         (camel_mbox_summary_append_internal_to_external): copy the size field
17792
17793         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize 
17794         message_info to NULL
17795
17796         * camel-folder-summary.h: added the size field.
17797
17798         * providers/mbox/camel-mbox-summary.h: 
17799         added the received_date field.
17800
17801         * providers/mbox/camel-mbox-summary.c:
17802         documented all functions.
17803
17804         * camel-folder-summary.h: name change and 
17805         new fields.
17806
17807         * providers/mbox/camel-mbox-search.c: update to 
17808         conform to name change in the summary fields.
17809
17810 2000-03-10  bertrand  <bertrand@helixcode.com>
17811
17812         * camel-service.h: cosmetic changes.
17813
17814 2000-03-09  Dan Winship  <danw@helixcode.com>
17815
17816         * s/HelixCode/Helix Code, Inc./ in the copyrights
17817
17818 2000-03-07  bertrand  <bertrand@helixcode.com>
17819
17820         * camel-formatter.c (handle_mime_part): 
17821         plug mem leaks due to bad documentation
17822         of camel_content_field_get_mime_type
17823         (print_camel_body_part): idem
17824         (handle_multipart_alternative): idem
17825
17826         * gmime-content-field.c (gmime_content_field_get_mime_type): 
17827         documentation fix.
17828
17829
17830         * camel-mime-part.c (my_finalize): unref the 
17831         content_input_stream if any. 
17832
17833 2000-03-06  bertrand  <bertrand@helixcode.com>
17834
17835         * camel-stream-fs.c (_seek): fix a bogus calculation
17836         in the return position.
17837
17838 2000-03-05  bertrand  <bertrand@helixcode.com>
17839
17840         * camel-session.h: cosmetic fixes.
17841
17842         * camel-stream-fs.c (_read): 
17843         (_seek): fixed the current position so that it refers
17844         to the current position in the stream, not in its parent.
17845
17846 2000-03-04  NotZed  <NotZed@HelixCode.com>
17847
17848         * providers/mbox/camel-mbox-search.c
17849         (camel_mbox_folder_search_by_expression): Ref the summary
17850         after we have got it.
17851
17852 2000-03-04  bertrand  <bertrand@helixcode.com>
17853
17854         * camel-mime-part.c (my_write_content_to_stream): 
17855         stream the raw content instead of nothing if the encoding
17856         is not supported.
17857
17858         * camel-stream-fs.c (_seek): handle eos more
17859         properly.
17860
17861         * camel-formatter.c (get_bonobo_tag_for_object): 
17862         bonobo-goad-id is the good key to look for. 
17863         (get_bonobo_tag_for_object): close the <object> tag.
17864         (get_bonobo_tag_for_object): the correct syntax for the
17865         to set a parameter inside an <object> tag is :
17866         <object classid="..."> <param name="uid" value="..."> <param ...>
17867         </object>
17868
17869 2000-03-03  bertrand  <bertrand@helixcode.com>
17870
17871         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): 
17872         use set_input_stream instead of construct_from_stream
17873         to feed the message object. 
17874
17875         * camel-data-wrapper.c (my_write_to_stream): reset output stream.
17876         (my_set_input_stream): unref the previous input stream.
17877         use the set_output_stream for default behaviour.
17878         (my_set_output_stream): unref previous output stream.
17879
17880         * camel-mime-part.c (my_write_content_to_stream): reset content
17881         object output stream.
17882
17883 2000-03-03  NotZed  <NotZed@HelixCode.com>
17884
17885         * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Make
17886         sure we open with create with a creation mask.
17887
17888 2000-03-01  NotZed  <NotZed@HelixCode.com>
17889
17890         * camel-mime-part-utils.c
17891         (camel_mime_part_construct_content_from_stream): DO NOT assert on
17892         content type, we have fallback code 4 lines below it ... *sigh*
17893
17894 2000-02-29  NotZed  <NotZed@HelixCode.com>
17895
17896         * Makefile.am (libcamelinclude_HEADERS): Added camel-stream-buffer
17897         to build.
17898
17899         * camel-stream-buffer.[ch]: Generic buffer which can be applied to
17900         any stream.
17901
17902 2000-03-03  bertrand  <bertrand@helixcode.com>
17903
17904         * camel-formatter.c (handle_image): in the case
17905         of images, put the content object output stream
17906         in the url. This allows the message browser
17907         to show inline images.
17908
17909         * camel-stream-b64.c (my_read_encode): fixed state
17910         0 keep value. 
17911
17912 2000-03-02  bertrand  <bertrand@helixcode.com>
17913
17914         * camel-stream-b64.c (my_read_encode): don't forget to 
17915         set the state to 0 after 3.
17916         (my_read_encode): don't forget to encode, even in state 3.
17917
17918         * camel-simple-data-wrapper.c: static functions are prefixed 
17919         with my_ instead of _
17920         * camel-multipart.c: static functions are prefixed 
17921         with my_ instead of _
17922         (my_write_to_stream): commented.
17923         (my_write_to_stream): warning in case the boudary is set
17924         but is a zero length string.
17925
17926         * camel-mime-part.c (camel_mime_part_encoding_from_string): 
17927         remove debug trace. 
17928         
17929         * camel-mime-part.c: Replaced all static functions
17930         with name begining with _ by the same name begining
17931         with "my_" to prevent the possible conflicts 
17932         with system symbols Dan warned us about. 
17933         
17934         * camel-stream-b64.c (camel_stream_b64_write_to_stream): 
17935         use CamelStreamB64 type for the input stream.
17936
17937         * camel-mime-part.c (_get_content_object): remove 
17938         debugging trace
17939         (_write_content_to_stream): implement the b64 
17940         encoding the new way (that is using camel_stream_b64)
17941
17942         * camel-data-wrapper.c (my_write_to_stream): 
17943         fix implementation so that it writes properly
17944         to the output stream even.
17945
17946         * camel-stream-b64.c (camel_stream_b64_write_to_stream): 
17947         fix implementation. 
17948
17949 2000-02-29  bertrand  <bertrand@helixcode.com>
17950
17951         * camel-stream-b64.c (camel_stream_b64_write_to_stream): new
17952         utility function. 
17953
17954         * camel-data-wrapper.c (_write_to_stream): default
17955         implementation. 
17956
17957         * gmime-utils.c (_store_header_pair_from_string): 
17958         revert strange changes. 
17959
17960         * camel-stream-b64.c (my_read_decode): set eos to true when we
17961         have read the whole input stream. 
17962         (my_reset): set eos to FALSE.
17963
17964 2000-02-28  NotZed  <NotZed@HelixCode.com>
17965
17966         * camel-mime-part.c (_parse_header_pair): Dont free this either.
17967
17968         * camel-medium.c (_remove_header): Ugh, dont free the header
17969         before we actually remove it.
17970         (_add_header): Ugh, dont free hashtable entries which may be
17971         duplicated (hash_insert _will_ reference that memory).
17972
17973         * string-utils.c (string_trim): Trimming a 0-length string is not
17974         an error.
17975
17976         * camel-mime-message.c (_parse_header_pair): Fixed very broken
17977         memory handling of header_name/value.
17978
17979         * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev):
17980         Initialise end_of_last_message always.
17981         (camel_mbox_copy_file_chunk): Stop trying to read if we run out of
17982         data, rather than looping forever.
17983         (camel_mbox_write_xev): Use an open flag when opening with create.
17984
17985         * camel-folder.c (camel_folder_search_by_expression): No, its not
17986         a fatal error to search on a non-searchable folder, you just dont
17987         get any matches.
17988         (_open): Dont open an opened folder (i dont see why this is really
17989         a bug, but what the hell ...)
17990
17991         * providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
17992         (_open): Call parent class to perform open.  Remove folder-open
17993         check to parent instead.
17994         (_create): open takes a creation mask, dont use umask to try and
17995         set the open mode.
17996         (_delete): Dont bother checking folder==NULL, its already been
17997         checked on the external interface (changed to an assertion, this
17998         would have to be a camel bug).
17999         (_delete_messages): Likewise.
18000         (_create): Ditto.
18001         (_init): Dont go and clear all the paths and shit that the parent
18002         open just setup for us.
18003         (_delete_messages): Get rid of more umask stuff.
18004         (_append_message): Make sure we pass file mode to open with create.
18005         (_append_message): Cleaned up some indenting to make it readable.
18006
18007         * camel-stream-b64.c (my_read_encode): Fixed a typo.
18008
18009         * providers/mbox/camel-mbox-search.c: Changed to use e-sexp,
18010         rather than filter-sexp.
18011
18012 2000-02-28  bertrand  <bertrand@helixcode.com>
18013
18014         * camel-stream-b64.c (my_read_encode): encoding
18015         filter.
18016
18017 2000-02-23  bertrand  <Bertrand.Guiheneuf@aful.org>
18018
18019         * camel-stream-b64.c: changed the __static 
18020         suffix into a my_ prefix. 
18021         (camel_stream_b64_set_mode): reset the persistent
18022         status. 
18023         (my_read_decode): remove superfluous %
18024         
18025         * providers/mbox/camel-mbox-utils.c (camel_mbox_copy_file_chunk): 
18026         fix exception description message.
18027
18028 2000-02-24  Dan Winship  <danw@helixcode.com>
18029
18030         * camel-session.c: Add camel_session_get_transport_for_protocol.
18031
18032         * camel-transport.h:
18033         * camel-transport.c: Add an abstract CamelTransport class.
18034
18035         * providers/sendmail/*: A CamelTransport that uses sendmail
18036         to deliver mail.
18037
18038 2000-02-24  Dan Winship  <danw@helixcode.com>
18039
18040         * camel-folder.c: use CamelExceptions for run-time errors, not
18041         incorrect code. Don't bother validating that an object exists from
18042         inside one of its methods, since you couldn't have gotten there if
18043         it didn't. Fix some code style bugs.
18044
18045         (_init): Rename init_with_store to init and add parent_folder,
18046         separator, and name arguments.
18047         (_set_name): Get separator from self, not parent_store now.
18048
18049         * camel-store.h:
18050         * camel-store.c: Remove get/set_separator.
18051
18052         * providers/mbox/: Update for above.
18053
18054 2000-02-23  Dan Winship  <danw@helixcode.com>
18055
18056         * camel-medium.c (_finalize): Free the data in the headers hash
18057         table.
18058         (_add_header): g_strdup the header name and value when adding it.
18059
18060         * camel-mime-part-utils.c
18061         (camel_mime_part_construct_headers_from_stream): Free the header
18062         data after calling camel_medium_add_header, since it will have
18063         g_strdup()ed it itself.
18064
18065 2000-02-22  NotZed  <NotZed@HelixCode.com>
18066
18067         * providers/mbox/camel-mbox-search.c: Dont compile by default.
18068
18069         * providers/mbox/Makefile.am: Fuck off the filter code.
18070
18071 2000-02-22  bertrand  <Bertrand.Guiheneuf@aful.org>
18072
18073         * camel-stream-b64.c (read_decode__static): 
18074         don't read the char if we reached the length
18075         of the output buffer. Hours lost on this
18076         %$!@# bug : 3.5
18077
18078         * camel-folder.c (camel_folder_get_subfolder): 
18079         (camel_folder_create): 
18080         (camel_folder_delete): 
18081         (camel_folder_delete_messages): 
18082         (camel_folder_list_subfolders): 
18083         (camel_folder_expunge): 
18084         (camel_folder_get_message_by_number): 
18085         (camel_folder_get_message_count): 
18086         (camel_folder_append_message): 
18087         (camel_folder_copy_message_to): 
18088         (camel_folder_get_summary): 
18089         (camel_folder_get_message_uid): 
18090         (camel_folder_get_message_by_uid): 
18091         (camel_folder_get_uid_list): 
18092         Check folder state (open/close) and raise an
18093         exception if it is not ok. 
18094         
18095         * providers/mbox/camel-mbox-folder.c (_create): 
18096         create the file and the path with two different
18097         names.
18098
18099         * camel-folder.c (_create): handle the case 
18100         when the folder name starts with '/'
18101
18102         * camel-exception.c (camel_exception_new): use 
18103         (void) instead of () in decl.
18104
18105         * camel-exception.h: cosmetic fixes.
18106
18107         * camel-exception.c (camel_exception_init): new routine.
18108         Fix a bug in mail/message-list.c
18109         
18110
18111         * camel-folder.h: cosmetic changes.
18112
18113         * camel-stream-b64.c (reset__static): added a
18114         reset method. Thanks message-browser to find
18115         so much bugs :)
18116
18117         * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
18118         Unicode libs.
18119
18120 2000-02-21  bertrand  <Bertrand.Guiheneuf@aful.org>
18121
18122         * camel-formatter.c (lookup_unique_id): 
18123         awful hack to test get_output_stream.
18124         * camel-stream-b64.[ch] :
18125         b64 encoding/decoding is now implemented as
18126         a stream. 
18127         
18128
18129 2000-02-21  bertrand  <Bertrand.Guiheneuf@aful.org>
18130
18131         * camel-seekable-substream.c (_reemit_parent_signal): 
18132         emit "data_available" when parent stream emits it. 
18133
18134
18135 2000-02-21  NotZed  <NotZed@HelixCode.com>
18136
18137         * providers/mbox/Makefile.am: Uh, fixed LIBADD again.  What was
18138         there was never ever going to work, wasn't it tested?
18139
18140
18141 2000-02-21  Dan Winship  <danw@helixcode.com>
18142
18143         * camel-session.h: (struct _CamelSession): Add authenticator.
18144
18145         * camel-session.c (camel_session_new): Add authenticator.
18146         (camel_session_query_authenticator): New function to query the
18147         session authenticator for password, etc, information.
18148
18149 2000-02-21  Dan Winship  <danw@helixcode.com>
18150
18151         * camel-session.c: add CamelExceptions to several functions. Use
18152         camel_session_new to initialize the session and URL fields of
18153         created CamelStores as appropriate.
18154
18155         * camel-store.h:
18156         * camel-store.c
18157         * camel-service.h:
18158         * camel-service.c: Move the session and url (and associated
18159         functions) from CamelStore to CamelService. Add url_flags to
18160         CamelService so subclasses can specify which URL components
18161         are mandatory for them. Add camel_session_new for
18162         camel_session_get_store* to use.
18163
18164         * providers/mbox/camel-mbox-folder.c:
18165         * providers/mbox/camel-mbox-store.c:
18166         * providers/mbox/camel-mbox-store.h: Update for above changes.
18167
18168         * camel-exception-list.def: Once camel is being used for real,
18169         exceptions won't be renumberable. So renumber them now to make
18170         more room to add exceptions to the various categories later, and
18171         add a big warning message.
18172
18173 2000-02-20  Dan Winship  <danw@helixcode.com>
18174
18175         * providers/mbox/Makefile.am: add libibex back to
18176         libcamelmbox_la_LIBADD
18177
18178 2000-02-18  NotZed  <NotZed@HelixCode.com>
18179
18180         * providers/mbox/camel-mbox-search.h
18181         (camel_mbox_folder_search_by_expression): Added exception to call,
18182         and fixed caller.
18183
18184         * providers/mbox/camel-mbox-search.c
18185         (camel_mbox_folder_search_by_expression): Major changes, to use
18186         the sexp evaluator from filter/filter-sexp.c to implement the
18187         searching.
18188         (func_body_contains): Changed to support multiple strings in 1
18189         command (results or'd together)
18190
18191         * url-util.c (g_url_new): Fixed a typo (colon == 0 isn't right),
18192         and made it so full url's are absolute pathed (Dan, this is how it
18193         has to work!).  Also, always include a path part, even if it is an
18194         empty string.
18195
18196 2000-02-18  Dan Winship  <danw@helixcode.com>
18197
18198         * camel/camel-types.h: New header with the typedefs for all camel
18199         classes. Now the class headers can just include this and the
18200         header for the parent type. This makes it possible for
18201         CamelService to include a CamelSession without creating an
18202         #include loop.
18203
18204         * camel/*:      
18205         * composer/e-msg-composer-attachment-bar.h:
18206         * mail/folder-browser.c:
18207         * mail/message-list.c: frob #includes to match the new reality
18208
18209 2000-02-17  Dan Winship  <danw@helixcode.com>
18210
18211         * camel/camel-service.h:
18212         * camel/camel-service.c: Make camel-service us a Gurl internally.
18213         Remove the login/password interfaces and instead provide
18214         camel_service_connect_with_url. Add CamelExceptions
18215
18216 2000-02-17  bertrand  <Bertrand.Guiheneuf@aful.org>
18217
18218         * camel/camel-formatter.c (handle_text_plain): 
18219         (handle_text_html): use camel_stream_reset instead
18220         of seek. The formatter should be able to work 
18221         with all streams, not only seekable streams. 
18222         In the case where some provider implementation
18223         would not be able to provide a reset method 
18224         to their stream, implementors would have
18225         to find a workaround.
18226
18227         * camel/camel-session.c (camel_session_new): use
18228         (void) instean of () in function decl.
18229
18230         * camel/camel-folder.c: ifdef async operation 
18231         related code. 
18232
18233         * camel/camel-seekable-stream.c (_seek): added a warning.
18234         (_reset): default implementation of reset for seekable
18235         stream.
18236
18237         * camel/camel-mime-message.h: set_received_date declaration fix.
18238         cosmetic changes.
18239
18240         * camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init): 
18241         use (void) instead of ().
18242
18243         * camel/camel-stream.c (camel_stream_reset): 
18244         new method for CamelStream.
18245
18246 2000-02-17  Dan Winship  <danw@helixcode.com>
18247
18248         * camel/url-util.c (g_url_to_string): New function to convert
18249         a Gurl back into a char *.
18250
18251 2000-02-17  bertrand  <Bertrand.Guiheneuf@aful.org>
18252
18253         * camel/camel-formatter.c (handle_text_plain): 
18254         revamped so that it uses the output stream
18255         of the data wrapper
18256         (handle_text_html): ditto.
18257         
18258         
18259         * camel/camel-simple-data-wrapper.h: 
18260         * camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_new): 
18261         use (void) instead of ().
18262         (_get_output_stream): simple implementation. 
18263
18264 2000-02-16  bertrand  <Bertrand.Guiheneuf@aful.org>
18265
18266         * camel/camel-data-wrapper.c (_set_input_stream): ref input stream
18267         (_set_output_stream): ref output stream
18268         (_finalize): unref input and output streams
18269
18270         * camel/camel-seekable-substream.c (_set_bounds): don't
18271         seek the begining of the substream.
18272         (_eos): fix eos condition testing. 
18273         (_finalize): unref parent stream
18274         (_init_with_seekable_stream_and_bounds): ref parent stream
18275
18276         * camel/gstring-util.c (g_string_equal_for_hash): 
18277         (g_string_equal_for_glist): return type is int.
18278
18279         * camel/camel.h: 
18280         * camel/camel.c (camel_init): use (void) 
18281         instead of ().
18282         
18283 2000-02-16  NotZed  <NotZed@HelixCode.com>
18284
18285         * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Added
18286         libfilter to link line (temporarily?).  Required for
18287         filter-sexp.
18288
18289 2000-02-15  bertrand  <bertrand@helixcode.com>
18290
18291         * camel/camel-multipart.c (_localize_part): 
18292         this routine replaces the _read_part routine
18293         and does not store the part in a buffer. 
18294         (_set_input_stream): use the set_input_stream
18295         instead of the construct_from_stream.
18296         each bodypart is given an input stream. 
18297
18298         * camel/camel-mime-part-utils.c: 
18299         include the data-wrapper-repository header. 
18300         (camel_mime_part_construct_content_from_stream): 
18301         use the set_input_stream instead of the 
18302         construct_from_stream method. 
18303
18304         * camel/camel-seekable-substream.c (_set_bounds): 
18305         cur position is set to 0 not to inf_bound.
18306
18307 2000-02-15  bertrand  <Bertrand.Guiheneuf@aful.org>
18308
18309         * camel/camel-mime-part.c: include gmime-base64.h
18310         various compilation and runtime fixes.
18311         (_set_input_stream): store the input substream 
18312         for the content object.
18313
18314         * camel/camel-data-wrapper.h: declare the 
18315         set/get function on input/output stream.
18316
18317         * camel/camel-mime-part.c (_get_content_object): 
18318         don't use a temporary mem stream.       
18319
18320         * camel/camel-seekable-substream.c (_seek): 
18321         (_eos): 
18322         (_read): the substream can be unlimited in length
18323
18324         * camel/camel-data-wrapper.c (camel_data_wrapper_class_init): 
18325         set the get/set_input/output_stream methods.    
18326
18327         * camel/camel-multipart.c (_construct_from_stream): 
18328         camel_stream_seek -> camel_seekable_stream_seek
18329
18330 2000-02-14  Miguel de Icaza  <miguel@gnu.org>
18331
18332         * camel/providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Add
18333         the unicode libraries as well.
18334
18335         * camel/camel-provider.c (camel_provider_register_as_module): Add
18336         error reporting here.  Desire to use Solaris increases.  Hair loss
18337         in the last two hours: 5,400.
18338
18339         * camel/providers/mbox/camel-mbox-provider.c
18340         (camel_mbox_get_provider): Renamed function.
18341
18342         * camel/camel.h: All include files use camel/ now here.
18343
18344         * camel/providers/mbox/Makefile.am: Drop all the dynamism from
18345         Camel, and make this a standard library.
18346
18347 2000-02-14  bertrand  <Bertrand.Guiheneuf@aful.org>
18348
18349         * camel/gmime-utils.c (get_header_array_from_stream): use the 
18350         eos stream method. 
18351         (gmime_read_line_from_stream): ditto.
18352
18353         * camel/camel-stream-fs.h (struct ): add the eof field
18354         cosmetics changes. 
18355
18356         * camel/camel-stream-fs.c (camel_stream_fs_init): set eof.
18357         (_read): set eof on end of file.
18358         (_eos): implemented.
18359
18360         * camel/gmime-utils.c (get_header_array_from_stream): 
18361         make a blocking version of the header parser. 
18362         When the fs stream uses gnome-vfs, this should
18363         be changed. 
18364         (gmime_read_line_from_stream): ditto. 
18365
18366 2000-02-11  bertrand  <Bertrand.Guiheneuf@aful.org>
18367
18368         * camel/camel-stream-fs.c: 
18369         everywhere, when using the cur_pos field, do it
18370         on the CamelSeekableStream object.
18371         (_seek): small fix. 
18372
18373         * camel/camel-seekable-stream.c (camel_seekable_stream_seek): 
18374         s/camel_stream_seek/camel_seekable_stream_seek/g
18375
18376         * camel/camel-seekable-stream.h: 
18377         (struct ): added a field to store the
18378         current position.
18379
18380         * camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position): 
18381         New function. Allows to get the current position 
18382         of a seekable stream.
18383         
18384
18385 2000-02-13  NotZed  <notzed@zedzone.helixcode.com>
18386
18387         * providers/mbox/camel-mbox-search.c: New file, implements the
18388         search api for mbox folders.
18389
18390         * providers/mbox/Makefile.am: Link with ibex.
18391
18392         * camel-folder.c (camel_folder_has_search_capability): Api
18393         additions.
18394         (camel_folder_search_by_expression): Ditto.
18395
18396 2000-02-12  NotZed  <notzed@zedzone.helixcode.com>
18397
18398         * providers/mbox/camel-mbox-folder.c (_set_name): Setup index
18399         filename as well.
18400         (_init_with_store): Init index filename.  Hmm, none of these
18401         names ever seem to get free'd (FIXME?)
18402
18403         * providers/mbox/camel-mbox-folder.h: Add index file name.
18404
18405 2000-02-12  NotZed  <notzed@helixcode.com>
18406
18407         * camel-folder.h: Add folder search functions.
18408
18409         ** Created ChangeLog just for camel **
18410          - refer to ../ChangeLog for changes prior to this date.