If the url path is "/" and the folder path is "/", just LIST "" "*" (this
[platform/upstream/evolution-data-server.git] / camel / ChangeLog
1 2000-08-25  Jeffrey Stedfast  <fejj@helixcode.com>
2
3         * providers/imap/camel-imap-folder.c
4         (imap_get_subfolder_names_internal): If the url path is "/" and
5         the folder path is "/", just LIST "" "*" (this should fix some
6         cyrus imapd problems). Also, INBOX is case insensitive so use
7         g_strcasecmp
8
9 2000-08-24  Lauris Kaplinski  <lauris@helixcode.com>
10
11         * camel-folder-summary.c (summary_build_content_info):
12         Use UTF-8 as default
13         * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
14         Use UTF-8 as default
15         * camel-mime-utils.c (rfc2047_decode_word): Use UTF-8
16         
17 2000-08-17  Not Zed  <NotZed@HelixCode.com>
18
19         * providers/mh/camel-mh-folder.c (mh_finalize): And here too.
20
21         * providers/mbox/camel-mbox-folder.c (mbox_finalize): Close index
22         on exit.
23
24 2000-08-23  Dan Winship  <danw@helixcode.com>
25
26         * camel-mime-utils.c (header_address_list_format_append): put
27         commas between addresses.
28
29 2000-08-22  Dan Winship  <danw@helixcode.com>
30
31         * providers/imap/camel-imap-folder.c
32         (imap_protocol_get_summary_specifier): use BODY.PEEK, not BODY, so
33         we don't set the message \Seen.
34
35 2000-08-22  Christopher James Lahey  <clahey@helixcode.com>
36
37         * providers/pop3/camel-pop3-store.c: Fixed a small warning.
38
39 2000-08-22  Peter Williams  <peterw@helixcode.com>
40
41         * camel-service.c (camel_service_new): Connect automatically if the
42         URL is not empty.
43         (finalize): Disconnect automatically if connected.
44         (camel_service_query_auth_types): Split into two functions; one to
45         be called if we're connected to an actual server (_connected), one
46         to be called if we're just gauging the general authtypes supported
47         (_generic).
48         (is_connected): Remove.
49
50         * camel-store.c (camel_store_get_folder): Don't connect explicitly to
51         the service.
52
53         * providers/nntp/camel-nntp-store.c (query_auth_types_generic): Split
54         the query_auth_types function. Hook it up in _new.
55         (finalize): Don't try to disconnect here.
56         
57         * providers/pop3/camel-pop3-store.c (query_auth_types_generic): Same.
58         (finalize): Don't try to disconnect here.
59
60         * providers/imap/camel-imap-store.c (query_auth_types_generic): Same.
61         (finalize): Don't try to disconnect here.
62
63         * providers/smtp/camel-smtp-transport.c (query_auth_types_generic): Split
64         the query_auth_types (dummy, in this case) function. Hook it up in _new.
65         (finalize): Don't try to disconnect here.
66
67 2000-08-21  JP Rosevear  <jpr@helixcode.com>
68         
69         * providers/nntp/camel-nntp-folder.c (nntp_folder_get_subfolder_names):
70         Make sure newsrc is not null
71         (nntp_folder_get_subfolder_names): ditto
72
73         * providers/nntp/camel-nntp-newsrc.c 
74         (camel_nntp_newsrc_get_subscribed_group_names): Programming check
75         for newsrc == NULL
76         (camel_nntp_newsrc_get_all_group_names): ditto
77         (camel_nntp_newsrc_write_to_file): ditto
78         (camel_nntp_newsrc_write): ditto
79
80 2000-08-21  JP Rosevear  <jpr@helixcode.com>
81
82         * providers/nntp/camel-nntp-store.c (camel_nntp_command): 
83         Make sure respbuffer is not null before manipulating it.
84         If it is null, return CAMEL_NNTP_FAIL and a decent error
85         message.
86         
87 2000-08-18  Peter Williams  <peterw@helixcode.com>
88
89         * camel-internet-address.c (internet_encode): If the name is "" we
90         weren't outputting anything; output the address at least.
91
92 2000-08-16  Peter Williams  <peterw@helixcode.com>
93
94         * camel-internet-address.c (internet_encode): Fix a leak when
95         name = "". It's a single-byte leak, but it's the little things
96         that count.
97
98         * camel-object.c (camel_type_lock_up): Don't leave the type
99         system locked when a bad unlock happens.
100
101         * providers/mbox/camel-mbox-store.c (get_folder): Fix a leak.
102
103 2000-08-15  Peter Williams  <peterw@helixcode.com>
104
105         * providers/imap/camel-imap-folder.c (imap_copy_message_to): Typo fix.
106
107 2000-08-14  Peter Williams  <peterw@helixcode.com>
108
109         * camel-folder-search.c (search_get_sent_date): New search function;
110         returns the time_t when the message was sent.
111         (search_get_receive_date): Same for when it was received.
112         (search_get_current_date): Gets the current time for use with the
113         above two. Is this in the right place?
114
115         * camel-folder-search.h: Add the new functions above to the class.
116
117 2000-08-13  Dan Winship  <danw@helixcode.com>
118
119         * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): Add
120         camel-nntp-utils.h
121
122         * providers/imap/camel-imap-folder.c
123         (imap_get_subfolder_names_internal): do a strcasecmp rather than
124         just a strcmp when checking if a folder is "INBOX", since it is
125         a case-insensitive name.
126
127 2000-08-12  Dan Winship  <danw@helixcode.com>
128
129         * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
130         Don't assume the FETCH results will come back in the order they
131         were requested.
132         (imap_get_subfolder_names_internal): Add "INBOX" to the list as
133         g_malloc'ed memory, not a static string.
134
135 2000-08-12  Jeffrey Stedfast  <fejj@helixcode.com>
136
137         * providers/imap/camel-imap-store.c
138         (camel_imap_command_continuation): Now takes a char * parameter
139         rather than a stream
140         (camel_imap_command_continuation_with_stream): Same function as
141         above but takes a stream parameter instead
142
143         * providers/imap/camel-imap-folder.c (imap_append_message): Use
144         camel_imap_command_continuation_with_stream
145
146 2000-08-12  Dan Winship  <danw@helixcode.com>
147
148         * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): New
149         function to do one round of attempted authentication.
150         (pop3_connect): Move a bunch of code out into
151         pop3_try_authenticate and fix some bugs in the edge cases.
152
153 2000-08-12  Jeffrey Stedfast  <fejj@helixcode.com>
154
155         * providers/imap/camel-imap-store.c (query_auth_types): No longer
156         calls try_connect() to get authtypes
157
158 2000-08-11  Jeffrey Stedfast  <fejj@helixcode.com>
159
160         * providers/imap/camel-imap-store.c
161         (camel_imap_command_continuation): Changed param order a bit and
162         fixed some logic
163
164         * providers/imap/camel-imap-folder.c (imap_append_message): Use
165         the new multi-transactional convenience functions
166
167 2000-08-11  Jeffrey Stedfast  <fejj@helixcode.com>
168         
169         * providers/imap/camel-imap-store.c
170         (camel_imap_command_preliminary): New convenience function for
171         multi-transactional commands (opening request)
172         (camel_imap_command_continuation): New convenience function for
173         multi-transactional commands (followup data)
174
175 2000-08-11  Christopher James Lahey  <clahey@helixcode.com>
176
177         * providers/mh/camel-mh-folder.c: Fixed a warning.
178
179 2000-08-11  Chris Toshok  <toshok@helixcode.com>
180
181         * providers/nntp/camel-nntp-folder.c
182         (camel_nntp_folder_class_init): remove get_name and get_full_name
183         assignments, since the camel-folder.c implementation does what we
184         need.
185
186 2000-08-11  Chris Toshok  <toshok@helixcode.com>
187
188         * providers/nntp/camel-nntp-store.c
189         (camel_nntp_store_get_toplevel_dir): use g_get_home_dir, since
190         evolution_dir isn't available in the providers.
191
192 2000-08-11  Peter Williams  <peterw@helixcode.com>
193
194         * camel-folder.c (thaw): Fix a bug where the message_changed
195         signal wasn't being emitted.
196
197 2000-08-11  Not Zed  <NotZed@HelixCode.com>
198
199         * providers/mh/camel-mh-folder.c (mh_set_message_user_tag):
200         Implement.
201         (mh_get_message_user_tag): Implement.
202
203         * providers/mbox/camel-mbox-folder.c (mbox_get_message_user_tag):
204         (mbox_set_message_user_tag): Implement.
205
206         * camel-folder.c (move_message_to): Yay so lets fix an already
207         fixed fix, again.
208         (copy_message_to): and here too ... update for api change to append().
209         And removed another warning.
210         (camel_folder_set_message_user_tag): Routine to set message tags.
211         (camel_folder_get_message_user_tag): And accessor.
212
213 2000-08-10  Christopher James Lahey  <clahey@helixcode.com>
214
215         * camel-folder-search.c, camel-folder-summary.c, camel-medium.c,
216         camel-mime-filter-charset.c, camel-mime-filter.c,
217         camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c,
218         camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c,
219         camel-movemail.c, camel-multipart.c, camel-object.c,
220         camel-stream-mem.c, providers/mbox/camel-mbox-folder.c,
221         providers/mbox/camel-mbox-summary.c,
222         providers/mh/camel-mh-folder.c,
223         providers/smtp/camel-smtp-transport.c: Fixed some warnings.
224
225 2000-08-11  Not Zed  <NotZed@HelixCode.com>
226
227         * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Free
228         the search properly.
229         (vee_folder_build): And here too.
230
231 2000-08-10  Jeffrey Stedfast  <fejj@helixcode.com>
232
233         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
234         If we go over the max number of messages, don't keep requesting
235         new message summaries, just break.
236
237 2000-08-11  Not Zed  <NotZed@HelixCode.com>
238
239         * camel-mime-parser.c (folder_scan_header): A better way to
240         compress leading whitespace.  The code is probably invalid anyway,
241         I dont think it will work across buffer boundaries.
242
243         * providers/mbox/camel-mbox-folder.c (mbox_append_message): And
244         write out proper format From lines here too.
245
246         * providers/mbox/camel-mbox-summary.c
247         (camel_mbox_summary_build_from): New function to build a more
248         compatible mbox "From " line.
249         (camel_mbox_summary_sync): Write From lines in the proper format.
250
251 2000-08-10  Not Zed  <NotZed@HelixCode.com>
252
253         * providers/mh/camel-mh-store.c (get_folder): Remove warnin g.
254
255         * providers/mbox/camel-mbox-store.c (xrename): Kill some warnings
256         with constification.
257
258         * providers/imap/camel-imap-folder.c (imap_append_message): Fixed
259         for append api change.  Eek this routine seriously wastes memory.
260
261         * providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt.
262         (mh_append_message): Fix for api change, and include user flags
263         and tags in new message.
264
265         * providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix
266         for search api change.
267
268         * camel-folder.c (camel_folder_search_free): New function for
269         freeing search results.
270         (search_free): Changed my mind, implement a default that actually
271         does something.  Free as to the old interface.
272         (camel_folder_append_message): Changed to accept a
273         camelmessageinfo rather than flags, which just doesn't have enough
274         info in it.
275         (copy_message_to): Change for append_message api change.
276         (move_message_to): Likewise.
277
278         * providers/mbox/camel-mbox-folder.c (mbox_search_free):
279         Implement.
280         (mbox_append_message): Fix for api change, and also copy user
281         flags/tags across to new summary.
282
283         * camel-folder-search.c (search_user_tag): A search expression
284         that returns the current use flag by name.
285         (camel_folder_search_free_result): New function to free the result
286         of a search.
287
288         * camel-folder-summary.c: Bump summary version.
289         (message_info_new): 
290         (message_info_load): 
291         (message_info_save): 
292         (camel_message_info_dup_to): 
293         (camel_message_info_free): Added support for arbitrary tag/value
294         pairs (CamelTag's).
295         (camel_tag_get): 
296         (camel_tag_set):
297         (camel_tag_list_size):
298         (camel_tag_list_free): Operations for working with CamelTags.
299
300 2000-08-09  Peter Williams  <peterw@helixcode.com>
301
302         * camel-store.c (camel_store_get_folder): Connect beforehand, if
303         necessary.
304
305         * providers/imap/camel-imap-store.c (camel_imap_store_init): Default
306         the dir_sep to "/" so that certain functions can safely assume that
307         dir_sep is valid (at least, nonnull).
308
309 2000-08-09  Ettore Perazzoli  <ettore@helixcode.com>
310
311         * providers/nntp/camel-nntp-folder.c
312         (nntp_folder_set_message_flags): Get rid of an unused variable.
313
314         * providers/nntp/Makefile.am (INCLUDES): Fix includes so that we
315         don't use installed headers anymore.  [I copied this over from the
316         IMAP provider, that does not seem to have this problem.]
317
318 2000-08-09  Not Zed  <NotZed@HelixCode.com>
319
320         * camel-folder-search.c (camel_folder_search_execute_expression):
321         Reorder search result in summary order if we searched with a
322         summary.
323
324 2000-08-08  Dan Winship  <danw@helixcode.com>
325
326         * camel-uid-cache.c: New code to keep an on-disk cache of what
327         UIDs have been seen in a folder.
328
329         * camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail
330         can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE
331         (you can work with mail directly without needing to copy it local).
332
333         * providers/*/camel-*-provider.c: Add flags as needed: imap and
334         mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is
335         just SOURCE.
336
337         * camel-mime-message.c (process_header): Add another subject
338         g_strstrip that fejj's earlier commit missed.
339
340 2000-08-08  Peter Williams  <peterw@helixcode.com>
341
342         * camel-provider.h: Remove some GTK stuff that I missed.
343
344         * providers/imap/camel-imap-store.c (imap_noop): Turn this
345         back on with the new timeout interface in CamelSession.
346
347         * camel-session.[ch] (camel_session_register_timeout): New
348         interface for Camel to register timeouts. Basically the
349         GTK timeout interface is copied. We do this because Camel isn't
350         allowed to use GTK anymore.
351         
352 2000-08-07  Not Zed  <NotZed@HelixCode.com>
353
354         * providers/mh/camel-mh-folder.c (mh_append_message): Only retry
355         another uid if we had a name clash, otherwise fail.
356
357 2000-08-07  Jeffrey Stedfast  <fejj@helixcode.com>
358
359         * providers/imap/camel-imap-folder.c
360         (imap_get_subfolder_names_internal): If we are trying to get a
361         subfolder listing of the root folder, always make sure INBOX is
362         there...
363
364         * providers/imap/camel-imap-utils.c (imap_parse_list_response): 
365         Check for NIL as a directory separator.
366
367 2000-08-07  Peter Williams  <peterw@helixcode.com>
368
369         * providers/nntp/Makefile.am: Reorder the INCLUDES to pull
370         in the camel headers from the local source tree before
371         the ones in $(includedir). This was causing compile problems
372         because the installed, Gtk-based camel-object.h was included
373         before the uninstall Camel-based one.
374
375 2000-08-07  Jeffrey Stedfast  <fejj@helixcode.com>
376
377         * providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip
378         all \n's from the expression
379
380         * string-utils.c (strip): New convenience function to strip
381         occurences of a single char from a string
382
383         * camel-mime-message.c (camel_mime_message_set_subject): Do a
384         g_strstrip on the subject so we can stop getting those annoying
385         leading spaces
386
387 2000-08-07  Dan Winship  <danw@helixcode.com>
388
389         * camel-folder.c (camel_folder_free_deep): Fix this to not require
390         NULL-termination of the array.
391
392 2000-08-04  Jeffrey Stedfast  <fejj@helixcode.com>
393
394         * providers/imap/camel-imap-store.c (imap_connect): If we fail to
395         get a dir_sep, then supply the default of "/".
396         (get_folder): Undo changes by Peter
397
398 2000-08-04  Peter Williams  <peterw@helixcode.com>
399
400         * providers/imap/camel-imap-store.c (get_folder): Prevent a coredump
401         when get_folder()ing from a store with dir_sep = NULL.
402
403 2000-08-04  Peter Williams  <peterw@helixcode.com>
404
405         * camel-store.h: Include camel-object.h. Ettore said this wasn't
406         compiling.
407
408 2000-08-04  Not Zed  <NotZed@HelixCode.com>
409
410         * camel-url.c (camel_url_set_protocol): 
411         (camel_url_set_host): 
412         (camel_url_set_path): 
413         (camel_url_set_port): Url editing functions.
414
415 2000-08-04  Dan Winship  <danw@helixcode.com>
416
417         * providers/pop3/camel-pop3-folder.c (pop3_set_message_flags): 
418         (pop3_sync): Indexes into the flags array are message_number minus
419         1, not just message_number.
420
421         * providers/pop3/camel-pop3-store.c: add a debugging macro for
422         doing protocol tracing.
423
424 2000-08-03  Jeffrey Stedfast  <fejj@helixcode.com>
425
426         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Only
427         call imap_get_summary_internal if the folder can hold messages
428
429         * providers/nntp/camel-nntp-provider.c (camel_provider_module_init): 
430         Initialize the service_cache for the news/nntp providers
431
432 2000-08-03  Peter Williams  <peterw@helixcode.com>
433
434         * providers/nntp/Makefile.am (INCLUDES): Add -I$(top_srcdir) to
435         pull in libibex/ibex.h
436
437 2000-08-02  Not Zed  <NotZed@HelixCode.com>
438
439         * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Expunge
440         from the end, so the index isn't messed up when you remove a
441         message.
442
443         * providers/mh/camel-mh-folder.c (mh_append_message): Fix a bug
444         where it would never open an output file/uid.
445
446         * providers/mbox/camel-mbox-store.c (rename_folder):
447         Implementation for mbox as well.
448
449         * camel-store.c (camel_store_rename_folder): New method to rename folders.
450         (rename_folder): Default implementation.
451
452         * providers/mh/camel-mh-store.c (delete_folder): Implement this.
453         (rename_folder): Implement a rename operation.
454
455 2000-08-02  Dan Winship  <danw@helixcode.com>
456
457         * providers/MH: Kill this. It doesn't have any code to do anything
458         the new mh provider doesn't do better.
459
460         * providers/Makefile.am: Remove reference to MH subdir, and
461         promote nntp to fully-supported status, since it does compile and
462         all.
463
464         * camel-mime-message.c (camel_mime_message_set_subject): Trim
465         trailing space from the subject. I've now seen replies from two
466         different people that tricked the threading code by (a) not having
467         References/In-Reply-To, and (b) adding an extra space to the end
468         of the subject line so the subject-based threading fails too. Who
469         writes these broken mailers anyway?
470
471 2000-08-01  Jeffrey Stedfast  <fejj@helixcode.com>
472
473         * providers/smtp/camel-smtp-transport.c (smtp_helo): When forced
474         to use the IP, place it in square brackets.
475
476         * providers/imap/camel-imap-utils.c (imap_translate_sexp): New and
477         improved sexp parser. An honest try at using e-sexp is wrapped in
478         a #ifdef at the bottom of the file but is currently not used
479
480         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
481         We want to do a UID SEARCH so we get UIDs back instead of sequence
482         numbers
483
484 2000-08-01  Not Zed  <NotZed@HelixCode.com>
485
486         * providers/mh: New mh provider implementation.
487
488         * providers/Makefile.am (SUBDIRS): Added mh provider.
489
490 2000-07-31  Jeffrey Stedfast  <fejj@helixcode.com>
491
492         * providers/imap/camel-imap-folder.c (imap_get_message_info_internal): 
493         Some IMAP servers don't wrap the UID in ()'s so don't depend on that
494         (imap_get_summary_internal): Same
495
496         * providers/imap/camel-imap-utils.c (free_sexp_node): Oops, forgot to
497         free node->function - not good.
498
499 2000-07-31  Peter Williams  <peterw@helixcode.com>
500
501         * providers/vee/camel-vee-folder.c (vee_search_by_expression): Add
502         a NULL to the matches pointer array so that g_strfreev knows where
503         the end is.
504
505 2000-07-31  Jeffrey Stedfast  <fejj@helixcode.com>
506
507         * providers/imap/camel-imap-utils.c (imap_translate_sexp): New
508         convenience function to translate a Camel sexp into the equivalent
509         IMAP sexp.
510
511         * providers/imap/camel-imap-store.c: More places now use
512         imap_next_word
513
514         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
515         Implemented initial version (this may or may not work quite right)
516
517 2000-07-28  Jeffrey Stedfast  <fejj@helixcode.com>
518
519         * providers/imap/camel-imap-folder.c (imap_expunge): Make sure
520         the third word/token (whatever) is "EXPUNGE" and not something
521         else like "EXISTS" or "RECENT". When removing the message from
522         the summary also make sure to free that data to avoid leakage.
523         Also make sure to subtract 1 from the 'id' since IMAP starts
524         at 1 and our summary starts at 0 :-)
525
526 2000-07-28  Jeffrey Stedfast  <fejj@helixcode.com>
527         
528         * providers/imap/camel-imap-store.c (camel_imap_status): Cleaned
529         up a bit, now uses imap_next_word()
530         (camel_imap_command_extended): Now uses imap_next_word(). When
531         checking for RECENT, allow the first digit of the recent-count
532         be between 0 and 9 inclusive instead of exclusive.
533
534         * providers/imap/camel-imap-folder.c (imap_expunge): Optimized.
535         No longer will it need to reload the summary as it now instead
536         removes the appropriate message summaries from the cache.
537         (camel_imap_folder_changed): If recent == 0 then return. If 
538         recent < 0 then just emit the folder_changed signal, don't reload
539         summaries.
540
541 2000-07-28  Jeffrey Stedfast  <fejj@helixcode.com>
542
543         * providers/imap/camel-imap-folder.c
544         (imap_get_message_count_internal): Get message count when STATUS
545         is not available.
546         (imap_init): folder->has_search_capability is required for IMAP so
547         should always be set to TRUE (is currently being set to FALSE as
548         I've not yet implemented SEARCH support).
549         (camel_imap_folder_changed): Seem to have fixed my optimization
550         hack
551
552 2000-07-28  Jon K Hellan  <hellan@acm.org>
553
554         * providers/imap/camel-imap-store.h (CamelImapServerLevel): New
555         enum.
556         (CamelImapStore): Added server_level and has_status_capability
557         members.
558
559         * providers/imap/camel-imap-store.c (imap_connect): Detect
560         IMAP4REV1, IMAP4 and STATUS in capability response.
561
562         * providers/imap/camel-imap-folder.c
563         (imap_get_message_count_internal): Use STATUS only if server
564         supports it. TODO: Get message count when STATUS not supported.
565         (imap_get_message, imap_get_summary_internal,
566         imap_get_message_info_internal): Handle IMAP4 as well.
567         (imap_protocol_get_summary_specifier): New function: Make a data
568         item specifier for the header lines we need, appropriate to the
569         server level.
570
571 2000-07-27  Peter Williams <peterw@helixcode.com>
572
573         * camel-mime-utils.c (header_decode_lwsp): More
574         checks for end of string.
575
576         * providers/imap/camel-imap-store.c:
577         (imap_command_extended): Free the elements of our
578         array (huge mem leak)
579
580         * providers/imap/camel-imap-folder.c:
581         (summary_get_internal): Same as above.
582         
583
584 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
585
586         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
587         Fixed my routine to only fetch new headers, my IDs were off by 1
588         on the high end, so when it would fetch the last newly arrived
589         message it would fail and end up fetching all of the summaries
590         because of the corruption.
591
592 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
593
594         * camel-url.c (camel_url_to_string): If the path doesn't begin
595         with a / and there is a host, prepend a / to the path.
596
597 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
598         
599         * providers/imap/Makefile.am: Added camel-imap-utils.[c,h]
600         
601         * providers/imap/camel-imap-utils.[c,h]: Utilities for parsing
602         server responses for use in both camel-imap-store.c and
603         camel-imap-folder.c
604         
605         * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
606         Free all the pointers in the headers array.
607         (imap_get_subfolder_names_internal): Updated to use
608         imap_parse_list_response
609         (imap_parse_subfolder_list): Removed in favor of
610         imap_parse_list_response
611
612         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
613         Free all the pointers in the data array.
614         (imap_connect): Updated to use imap_parse_list_response and fixed
615         a leak
616         (folder_is_selectable): Updated.
617
618 2000-07-27  Jeffrey Stedfast  <fejj@helixcode.com>
619         
620         * providers/imap/camel-imap-folder.c (imap_get_message_info): Now
621         uses a hash table for looking up message info rather than a linear
622         search :)
623
624 2000-07-27  Peter Williams  <peterw@helixcode.com>
625
626         * providers/*/Makefile.am: Don't specify SUBDIRS =
627         [nothing]. Messes up distcheck.
628         
629 2000-07-26  Peter Williams  <peterw@helixcode.com>
630         
631         * camel-mime-parser.c (folder_scan_init): Initialize
632         outbuf to be "" -- it's not guaranteed to be zeroed.
633         
634         * camel-mime-utils.c (header_references_decode): Return
635         if the header is NULL -> or "" <-. Don't do our stupid
636         mailer trick if we point to \0.
637         (header_decode_quoted_string): Don't rip past end of 
638         string!
639         
640 2000-07-26  Dan Winship  <danw@helixcode.com>
641
642         * camel-movemail.c (movemail_external): routine to call an
643         external movemail program.
644         (camel_movemail): Nuke return value, use movemail_external when
645         available and useful, and don't delete "dest" on errors, since
646         it might have started non-empty.
647
648 2000-07-26  Jeffrey Stedfast  <fejj@helixcode.com>
649
650         * camel-url.c (camel_url_to_string): Should now always prepend a '/'
651         before the path if it doesn't already exist.
652
653         * providers/imap/camel-imap-folder.c: Fixed a few compiler warnings
654
655 2000-07-25  Jeffrey Stedfast  <fejj@helixcode.com>
656
657         * providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the
658         real problem that Peter was running into.
659
660 2000-07-25  Dan Winship  <danw@helixcode.com>
661
662         * camel-mime-message.c (write_to_stream): Don't add a Mime-Version
663         header to a message that already has one.
664
665         * camel-internet-address.c (internet_encode): Don't put <>s around
666         addresses with no name part.
667
668 2000-07-25  Peter Williams  <peterw@helixcode.com>
669
670         * providers/imap/camel-imap-folder.c (imap_expunge): Set 
671         imap_folder->summary to NULL after calling imap_summary_free,
672         so we don't get stuck with a junk summary pointer. Should
673         we free it at all?
674
675 2000-07-25  Jeffrey Stedfast  <fejj@helixcode.com>
676
677         * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
678         Optimized to try and get the new message headers without reloading
679         the entire summary from scratch.
680         (imap_get_summary_internal): Will now sync() before attempting to
681         reload the summary so that flags are set in the reloaded summary
682         as well.
683
684 2000-07-24  Jeffrey Stedfast  <fejj@helixcode.com>
685
686         * providers/imap/camel-imap-store.c (get_folder): Updated to give
687         special attention to the root folder.
688
689         * providers/imap/camel-imap-folder.c
690         (imap_get_subfolder_names_internal): Updated to handle the root
691         folder
692         (imap_get_message_count_internal): return 0 if folder can't hold
693         messages
694         (camel_imap_folder_new): Change so that root folder gets special
695         attention and always gets can_hold_messages set to FALSE
696
697 2000-07-24  Dan Winship  <danw@helixcode.com>
698
699         * camel-folder.c: Remove exceptions from a number of methods that
700         work on what ought to be static data: get_parent_folder,
701         get_parent_store, get_message_count, get_unread_message_count,
702         get_permanent_flags, get_message_flags, set_message_flags,
703         get_message_user_flag, set_message_user_flag, get_uids,
704         get_summary, get_subfolder_names. Turn camel_folder_delete_message
705         into a macro. (Mostly a pull-up from the camel-async branch.)
706
707         * providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder
708         changes
709
710 2000-07-24  Jeffrey Stedfast  <fejj@helixcode.com>
711
712         * providers/imap/camel-imap-folder.c (imap_get_message_info): Updated
713         to port easily to the new Camel API
714         (imap_init): Don't SELECT INBOX, we don't need to do that
715
716 2000-07-24  Jeffrey Stedfast  <fejj@helixcode.com>
717
718         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): 
719         Initialize the summary and subfolder listing.
720         (imap_summary_free): Now takes a GPtrArray arg rather than a 
721         CamelImapFolder as it increases it's usefullness for free()'ing
722         temporary summaries.
723         (imap_get_message_count_internal): A new convenience function for
724         getting the actual message count on a server to be used by 
725         imap_get_summary_internal)
726         (imap_get_message_count): Since the Camel API is on the move again, 
727         the future version of this function will not be able to make a
728         call to the store, it must only access previously fetched data (thus 
729         the creation of the _internal function)
730         (imap_get_subfolder_names_internal): Again, because the future version
731         of imap_get_subfolder_names will not take an exception, we must rename
732         this function which will be called by camel_imap_folder_new()
733         (imap_get_subfolder_names): We now return the previously collected
734         subfolder listing that the _internal function fetched previously
735         (imap_get_summary_internal): Again, same idea as the previous _internal
736         functions...
737         (imap_get_summary): Again... now returns a previously aquired summary
738
739         * providers/imap/camel-imap-store.c (imap_noop): This will hopefully
740         prevent the imap store from disconnecting.
741         (imap_connect): Modified to add a gtk timeout event that will call
742         imap_noop() every 10 minutes (we may want to change this time value)
743         (imap_disconnect): Modified to remove the NOOP timeout event from the
744         store.
745         (camel_imap_command_extended): Commented out the code that would try
746         and detect if the store was disconnected and then reconnect if it was
747         needed.
748
749 2000-07-24  Dan Winship  <danw@helixcode.com>
750
751         * camel-folder.[ch]: Remove camel_folder_get_message_uid, which
752         was not used, and not implemented by any provider.
753
754         * providers/nntp/camel-nntp-folder.c: Remove get_message_uid
755         non-implementation.
756
757         * camel-folder-pt-proxy.[ch], camel-arg-collector.c,
758         camel-marshal-utils.[ch]: Bye bye bye.
759
760         * Makefile.am: remove reference to camel-arg-collector.c
761
762 2000-07-23  Jeffrey Stedfast  <fejj@helixcode.com>
763
764         * providers/imap/camel-imap-store.c (imap_disconnect): Made it a
765         little more forgiving. Also set current_folder to NULL as there is
766         no selected folder after a disconnect.
767         (stream_is_alive): Detects whether or not a socket is "alive"
768         (camel_imap_command_extended): Use stream_is_alive() to aid in the
769         detection of a disconnected state.
770
771 2000-07-22  Jeffrey Stedfast  <fejj@helixcode.com>
772
773         * providers/imap/camel-imap-store.c (get_folder): Clear
774         CamelExceptions when appropriate (eg when folder is marked as
775         \NoSelect). Still needs some cleanup and perhaps Dan will have a
776         better way of doing this as this seems like a messy way of
777         handling this.
778
779         * providers/imap/camel-imap-folder.c (imap_get_uids): Took out
780         some debug statements as they are no longer needed.
781
782 2000-07-21  Jeffrey Stedfast  <fejj@helixcode.com>
783
784         * providers/imap/camel-imap-folder.c (imap_get_subfolder_names):
785         Updated to not strip out subfolders that are marked as \NoSelect
786         because this will be correctly handled in store->get_folder from
787         now on.
788
789         * providers/imap/camel-imap-store.c (folder_is_selectable): New
790         convenience function for use in get_folder().
791         (parse_list_response): Now takes a char **flags argument which is
792         needed by folder_is_selectable().
793         (imap_connect): Updated to reflect changes to
794         parse_list_response().
795
796 2000-07-21  Jeffrey Stedfast  <fejj@helixcode.com>
797         
798         * providers/imap/camel-imap-stream.c (stream_read): Updated with
799         some of the same fixes I've made to camel-imap-folder.c like
800         recalculating message part lengths.
801
802         * providers/imap/camel-imap-store.c (camel_imap_command_extended):
803         Rewrote the code to check for "* %d RECENT". Still needs to be
804         modified, but should no longer cause an infinite loop by detecting
805         mis-detecting RECENT messages.
806
807 2000-07-20  Jeffrey Stedfast  <fejj@helixcode.com>
808
809         * providers/imap/camel-imap-folder.c (imap_get_summary):
810         (imap_get_message_info): Oops. Fix UID parser to allow 0 and 9 to
811         be in the range of valid UID chars.
812
813 2000-07-20  Peter Williams  <peterw@helixcode.com>
814
815         * camel-object.c (camel_object_unref): Add a new global mutex
816         'refcount' held when refcounting operations occur.
817
818 2000-07-19  Peter Williams  <peterw@helixcode.com>
819
820         * camel-object.c (camel_type_lock_up): Correct the recursiveness;
821         the locklevel is stored as a private, so each thread has its own
822         idea of the locklevel. Thus one thread can relock, but a different
823         one will think that it's a level 0 and try to lock the type_system
824         mutex.
825
826 2000-07-19  Jeffrey Stedfast  <fejj@helixcode.com>
827
828         * providers/imap/camel-imap-folder.c: General cleanup working
829         towards getting Actions->Expunge working correctly.
830
831         * providers/imap/camel-imap-store.c
832         (cammel_imap_command_extended): Added code to look for "* %d
833         RECENT" and to emit the folder_changed signal if there are any
834         recent messages. Note: this is a hack and needs to be rewritten
835         badly.
836
837 2000-07-19  Jeffrey Stedfast  <fejj@helixcode.com>
838
839         * providers/imap/camel-imap-folder.c (imap_get_summary): If the
840         folder's message count is not the same as the number of summaries,
841         free the old summary and create a new summary.
842
843 2000-07-18  Jeffrey Stedfast  <fejj@helixcode.com>
844
845         * providers/imap/camel-imap-folder.c
846         (camel_imap_folder_class_init): Added in
847         imap_[g,s]et_message_user_flag() methods
848         (imap_get_message_info): Rewrote to use the more efficient way of
849         downloading summary information and also added a UID comparison so
850         that if the UID requested doesn't match the UID received, it
851         returns NULL.  FIXME: When the mailer gets NULL when it requested
852         message info, it seems that it displays a row for that message and
853         when you try and select the blank row, it segfaults.
854
855         * providers/imap/camel-imap-store.c (get_folder): Oops, this
856         should not be checking against "/", it should be checking against
857         dir_sep.
858
859         * providers/imap/camel-imap-folder.c (imap_parse_subfolder_line):
860         Updated to trim out the leading namespace.
861         (imap_get_subfolder_names): Let the subfolder parser trim the
862         namespace off the folder name.
863
864 2000-07-17  Peter Williams  <peterw@helixcode.com>
865
866         * camel-object.c (camel_type_lock_up): New function; the
867         Camel type_system lock is now fakey-recursive, being controlled
868         by a semaphore that goes up and down and is protected by another
869         lock. Theoretically all we need is the lock on the semaphore,
870         but this we catch exceptions "better" (by deadlocking).
871         (camel_type_lock_down): Corresponding to above.
872         (all functions): s,G_LOCK,camel_type_lock_up, etc.
873
874 2000-07-17  Jeffrey Stedfast  <fejj@helixcode.com>
875
876         * providers/imap/camel-imap-store.c (imap_disconnect): Send a
877         "LOGOUT" command.
878
879         * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to
880         get IMAP code to work with CommunigatePro and MS Exchange (and any
881         other servers that send back a UID at the end of each FETCH inside
882         of the main body of the message part).
883         (imap_sync): Un-#if 0 the code that sets the flags on the IMAP
884         server for messages that have changed. Oops, don't mask with
885         DELETED to find out if the message has been answered ;-)
886         (imap_expunge): sync before expunging.
887
888 2000-07-16  Jeffrey Stedfast  <fejj@helixcode.com>
889
890         * providers/imap/camel-imap-store.c: All SELECT calls now pass
891         a NULL folder argument to camel_imap_command_extended() since it's
892         not needed.
893         (imap_connect): Moved service_class->connect() to the point right
894         after a connection is established with the server rather than
895         waiting until the end of the function.
896         (camel_imap_command): Updated the documentation comment
897         (camel_imap_command_extended): Before sending a command, first
898         check to make sure we are connected; if we aren't, then reconnect.
899         Don't strncmp() command with "SELECT" as it's redundant.
900
901         * providers/imap/camel-imap-folder.c: All SELECT calls now pass
902         a NULL folder argument to camel_imap_command_extended() since it's
903         not needed. Also s/camel_imap_command/camel_imap_command_extended as
904         I will probably be doing away with camel_imap_command() or at least
905         only using it for LOGIN and similar commands where the server won't
906         notify us of any recent messages.
907
908 2000-07-15  Jeffrey Stedfast  <fejj@helixcode.com>
909
910         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): 
911         One last fix to get rid of hard-coded "/" directory separators
912
913 2000-07-14  Peter Williams  <peterw@helixcode.com>
914
915         * camel-object.c : Implement 'events', which are suspiciously
916         like signals except without all the marshalling baggage, and
917         with quasi-thread-safety.
918         (camel_object_class_declare_event): New func.
919         (camel_object_hook_event): Ditto.
920         (camel_object_trigger_event): Ditto.
921         (obj_class_init): Declare the "finalize" event.
922         (obj_class_finalize): Free the hashtable of events->preps
923         (obj_finalize): Free the hashtable of events->hooklists
924         (camel_object_unref): Trigger the finalize event (ourselves,
925         to prevent massively unpleasant looping things.)
926         
927 2000-07-14  Peter Williams  <peterw@helixcode.com>
928         
929         * camel-object.c (make_global_classfuncs): Change to return
930         a CamelObjectClass. Change parents to a GSList and free it
931         when done.
932         (camel_object_new): Don't allocate a classfuncs for every object;
933         merely give it a reference to the global_classfuncs. Convert
934         parents to a GSList and free it when done.
935         (camel_object_unref): Don't free the classfuncs. Free the parents
936         list, which is changed to a GSList.
937
938 2000-07-14  Jeffrey Stedfast  <fejj@helixcode.com>
939
940         * string-utils.c (string_unquote): New convenience function
941         to unquote a string if it's encapsulated by "'s
942         
943         * providers/imap/camel-imap-folder.c:
944         * providers/imap/camel-imap-store.c: Made the necessary changes
945         to stop using hard coded directory separators.
946
947 2000-07-13  Dan Winship  <danw@helixcode.com>
948
949         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
950         If the summary is for a smaller mbox, and rebuilding from the
951         last-known end position fails, try rebuilding from the beginning.
952         Deals with the case where the user edits the mbox and makes it
953         bigger, without adding new messages.
954
955 2000-07-13  Peter Williams  <peterw@helixcode.com>
956
957         * camel-object.c: Rewritten to not be based on GtkObject,
958         but a tiny threadsafe ripoff thereof. Objects still cannot
959         be shared across threads, but ref/unref/destroy/new/etc
960         will work. Signals are not implemented because doing it
961         robustly would be a major pain in the butt, but class
962         functions are. There's a small demonstration that it doesn't
963         crash in ./temp-test.c: build it with ./make-test.sh.
964         * camel-stream.c, camel-seekable-stream.c, camel-stream-mem.c:
965         moved over to CamelObject. Proof of concept: two levels of
966         subclass and class functions, all working without coredumps.
967         To port to CamelObject:
968         - s,GTK_,CAMEL_,g in the cast checks
969         - s,gtk_type_new,camel_object_new,g
970         - s,GtkType,CamelType,g
971         - Change get_type function over to camel_type_declare
972         - instead of hooking to finalize function, it goes into the
973           type declaration.
974         - remove signals.
975         - instead of GTK_OBJECT(so)->klass, CAMEL_OBJECT_GET_CLASS(so)
976         - s,gtk_type_class,camel_type_get_global_classfuncs,g
977         - don't chain finalize handlers; it will be done for you
978         
979 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
980
981         * providers/imap/camel-imap-folder.c: 
982         * providers/imap/camel-imap-store.c: If a SELECT fails, set
983         imap_store->current_folder to NULL so a SELECT is forced before
984         any message/folder operations are requested. Also, because some
985         users don't use a namespace, make sure that if the url->path is 
986         "/" we don't use it when creating the folder_path.
987         (camel_imap_command[_extended]): Since we allow the passing of
988         a NULL folder which we can use to bypass a forced SELECT, no need
989         to check for the individual commands that don't require a folder
990         to be selected.
991
992 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
993
994         * providers/imap/camel-imap-folder.c: 
995         * providers/imap/camel-imap-store.c: Updated to use CAMEL_IMAP_OK, 
996         CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and CAMEL_IMAP_FAIL rather than the 
997         ones copied from the POP3 provider. 
998
999 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
1000
1001         * providers/imap/camel-imap-folder.c (imap_get_summary): Oops.
1002         If the number of messages in the folder is 0, don't fetch
1003         summaries 1 thru 0, just return an empty summary.
1004         (imap_copy_message_to): Fixed to use message UID and also send
1005         the source folder as an arg to camel_imap_command rather than NULL.
1006         (imap_move_message_to): Same.
1007         (imap_init): If SELECT is successful, we need to set the current
1008         folder to the one selected, this was causing problems with move/copy
1009
1010 2000-07-13  Dan Winship  <danw@helixcode.com>
1011
1012         * camel-service.h: define a set of CAMEL_SERVICE_URL_ALLOW_* flags
1013         parallel to the _NEED_* flags, and make the _NEED_* flags imply
1014         the _ALLOW_* ones.
1015
1016         * providers/imap/camel-imap-store.c (camel_imap_store_init): imap
1017         urls ALLOW_PATH
1018
1019 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
1020
1021         * providers/imap/camel-imap-folder.c (imap_get_summary): New
1022         and improved approach to fetching an entire folder summary
1023         that should be much much faster than the old way as it gets
1024         the entire folder summary in 1 shot rather than requesting
1025         message by message. As with the last update, this version
1026         also only fetches the minimum number of header fields.
1027         (imap_get_summary): Oops, forgot to free the temp 
1028         GPtrArray *headers
1029
1030 2000-07-13  Jeffrey Stedfast  <fejj@helixcode.com>
1031
1032         * providers/imap/camel-imap-folder.c (imap_get_summary): Don't
1033         fetch the entire RFC822 header, just fetch the fields we want.
1034         (imap_get_message_info): Same.
1035
1036 2000-07-13  Not Zed  <NotZed@HelixCode.com>
1037
1038         * camel-mime-filter-basic.c (camel_mime_filter_basic_new_type):
1039         Reset filter on setup.
1040         (reset): When resetting qp encoding, set the state to -1, instead
1041         of 0.
1042
1043         * camel-mime-utils.c (quoted_encode_step): Actually count the
1044         characters output sofar (it never counted any).  Bunch of other
1045         fixes.
1046         (quoted_encode_close): Also flush out final character, if there's
1047         one.
1048
1049 2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>
1050
1051         Chris forgot to add #include <e-util/e-util.h> to the source files
1052         
1053         * providers/imap/camel-imap-store.c (imap_connect): Fixed Peter's 
1054         fix, we don't want to send a string to a %d.
1055
1056 2000-07-12  Christopher James Lahey  <clahey@helixcode.com>
1057
1058         * camel-folder-search.c, providers/imap/camel-imap-store.c:
1059         Changed from strstrcase to e_strstrcase.
1060
1061         * string-utils.c, string-utils.h: Removed strstrcase (in favor of
1062         e_strstrcase in e-util/e-util.c.)
1063
1064 2000-07-12  Chris Toshok  <toshok@helixcode.com>
1065
1066         * providers/nntp/camel-nntp-folder.c
1067         (nntp_folder_set_message_flags): get the article num out of our
1068         uid and mark it read in the newsrc.
1069         (nntp_folder_get_message): get the message id out of the uid to
1070         fetch the article.
1071
1072         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): the uid
1073         is now <article-num>,<messageid>
1074         (get_HEAD_headers): same.
1075
1076         * camel-mime-parser.c (folder_scan_step): go to HSCAN_MESSAGE
1077         state when ct->subtype is "news" as well as "rfc822".  this makes
1078         attachments of type "message/news" display properly.
1079
1080 2000-07-12  Dan Winship  <danw@helixcode.com>
1081
1082         * camel-folder.c (camel_folder_free_deep,
1083         camel_folder_free_shallow, camel_folder_free_nop): Useful default
1084         implementations for free_{uids,subfolder_names,summary}.
1085         (free_subfolder_names, free_uids): Make these g_warning-ing
1086         default implementations.
1087
1088         * providers/*/camel-*-folder.c: Use the new functions where
1089         appropriate, remove duplicated code.
1090
1091 2000-07-12  Peter Williams  <peterw@helixcode.com>
1092
1093         * providers/imap/camel-imap-store.c (query_auth_types): Check for
1094         NULL parameters when setting the exception so as to not crash on
1095         Solaris (can't handle a %s passed NULL).
1096         (imap_connect): Same.
1097         
1098 2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>
1099
1100         * providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use
1101         mbox_set_message_flags () instead of setting the flags by hand. This
1102         fixes the problem of the "message_changed" signal not being emitted
1103         at the correct time.
1104
1105         * providers/imap/camel-imap-folder.c: "folder_changed" signals should
1106         pass a third argument (which is ignored).
1107
1108         * camel-folder.c: Undo gtk signal emits done in set_flags and 
1109         expunge.
1110         (move_message_to): 
1111         (copy_message_to): Create info as a const CamelMessageInfo
1112
1113 2000-07-12  Chris Toshok  <toshok@helixcode.com>
1114
1115         * providers/nntp/Makefile.am: don't add test-newsrc to the build
1116         since it needs libcamel (which isn't built at the time test-newsrc
1117         needs linking.)
1118
1119         * providers/nntp/camel-nntp-utils.c (get_HEAD_headers): fill in
1120         MessageInfo->message_id.
1121         (get_XOVER_headers): same.
1122
1123         * providers/nntp/camel-nntp-folder.c (nntp_folder_init): move
1124         summary loading here.
1125         (nntp_folder_sync): summary/newsrc changes should be stored here.
1126         put a comment to that effect.
1127         (nntp_folder_set_message_flags): don't save the newsrc here.
1128         (nntp_folder_get_uids): use g_ptr_array_index instead of the
1129         cast/addition.
1130         (nntp_folder_get_summary): no need to check if we should generate
1131         the summary here.  already done.
1132         (nntp_folder_get_message_info): implement.
1133
1134         * providers/nntp/camel-nntp-store.c
1135         (camel_nntp_store_get_toplevel_dir): use evolution_dir instead of
1136         computing it ourselves.
1137         (nntp_store_disconnect): call camel_nntp_newsrc_write.
1138         (ensure_news_dir_exists): new function to create the news/<news
1139         server> subdir.
1140         (camel_nntp_store_class_init): hook up connect/disconnect and
1141         finalize.
1142         (nntp_store_connect): if ensure_news_dir_exists fails throw an
1143         exception.
1144
1145 2000-07-12  Peter Williams  <peterw@helixcode.com>
1146
1147         * camel-folder.c (camel_folder_set_message_flags): Emit a message_changed
1148         signal once the flags are set on the message.
1149         (camel_folder_set_user_flag): Ditto.
1150         (camel_folder_expunge): Emit a folder_changed if no exception.
1151
1152 2000-07-12  Jeffrey Stedfast  <fejj@helixcode.com>
1153
1154         * camel-stream.c: Use size_t and ssize_t for read/write methods
1155         
1156         * providers/imap/camel-imap-folder.c (imap_set_message_flags): 
1157         Updated to emit the message_changed signal.
1158         (imap_delete_message): Updated to use imap_set_message_flags ().
1159         (imap_move_message_to): Updated to use imap_set_message_flags ()
1160         and to emit the folder_changed signal on the destination folder.
1161         (imap_copy_message_to): Updated to emit the folder_changed signal 
1162         on the destination folder.
1163         (imap_append_message): Updated to emit the folder_changed signal 
1164         on the destination folder.
1165
1166 2000-07-11  Jeffrey Stedfast  <fejj@helixcode.com>
1167
1168         * camel-folder.c (camel_folder_append_message): Now takes a
1169         flags argument to specify the flags to be set on the message
1170         since we might not necessarily want the flags to be wiped clean.
1171         (move_message_to):
1172         (copy_message_to): Updated to send a flags argument to 
1173         append_message (); currently sends the original message's flags.
1174
1175         * providers/mbox/camel-mbox-folder.c (mbox_append_message): 
1176         * providers/imap/camel-imap-folder.c (imap_append_message): 
1177         Updated.
1178
1179 2000-07-11  Dan Winship  <danw@helixcode.com>
1180
1181         * camel-folder.c: Remove exceptions from a number of methods
1182         that work on what ought to be static data: get_parent_folder,
1183         get_parent_store, get_message_count, get_unread_message_count,
1184         get_permanent_flags, get_message_flags, set_message_flags,
1185         get_message_user_flag, set_message_user_flag, get_message_uid,
1186         get_uids, get_summary, get_subfolder_names. Turn
1187         camel_folder_delete_message into a macro.
1188
1189         * providers/{mbox,pop3,vee}: Update for CamelFolder changes
1190
1191         * providers/Makefile.am: Disable imap and nntp for now
1192
1193 2000-07-11  Jeffrey Stedfast  <fejj@helixcode.com>
1194
1195         * providers/imap/camel-imap-folder.c (imap_search_by_expression): 
1196         This shouldn't return NULL, it should return g_ptr_array_new ()
1197         so the mailer gets what it expects.
1198
1199 2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>
1200
1201         * camel-folder-summary.c (camel_folder_summary_decode_string): 
1202         Oops, an unsigned integer can never be < 0
1203
1204 2000-07-10  Dan Winship  <danw@helixcode.com>
1205
1206         * providers/vee/camel-vee-folder.c (vee_search_by_expression):
1207         Initialize a variable to make this not crash again. And fix a bug
1208         so it actually does something.
1209
1210 2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>
1211
1212         * camel-folder-summary.c: Cleaned up a bunch of compile warnings
1213
1214 2000-07-10  Dan Winship  <danw@helixcode.com>
1215
1216         * providers/vee: kill more debugging messages
1217
1218 2000-07-10  Jeffrey Stedfast  <fejj@helixcode.com>
1219
1220         * providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count): 
1221         * providers/vee/camel-vee-folder.c (vee_get_unread_message_count): 
1222         * providers/imap/camel-imap-folder.c (imap_get_unread_message_count):
1223         Implemented.
1224
1225         * camel-folder.c (camel_folder_get_unread_message_count): New
1226         convenience function to allow the mailer to query the number
1227         of unread messages in a folder (for displaying message stats
1228         in a folder tree?).
1229
1230 2000-07-09  Dan Winship  <danw@helixcode.com>
1231
1232         * camel-mime-utils.c (header_references_dup): New function to copy
1233         a header_references structure.
1234
1235         * camel-folder-summary.c (camel_message_info_dup_to): New function
1236         to (deep) copy the data from one CamelMessageInfo into another.
1237         (camel_message_info_free): And free the data.
1238
1239         * providers/vee/camel-vee-folder.c (vee_sync): Implement. (empty).
1240         (vee_search_by_expression): belatedly update for
1241         camel_folder_search change.
1242         (vee_folder_build): belatedly update for camel_folder_search
1243         change. Use camel_message_info_dup_to and camel_message_info_free
1244         (in particular, so that we get message_id and references info so
1245         vfolders can be threaded).
1246         (vee_folder_build_folder): Ditto.
1247
1248 2000-07-08  Jeffrey Stedfast  <fejj@helixcode.com>
1249
1250         * providers/nntp/camel-nntp-folder.c: 
1251         * providers/nntp/camel-nntp-utils.c: 
1252         * providers/nntp/camel-nntp-store.c: Update to reflect past changes
1253         in the Camel API. Use gtk macro casts wherever possible and use glib's
1254         memory functions instead of standard c's (since they are not 
1255         compatable)
1256
1257         * providers/smtp/camel-smtp-transport.c: 
1258         * providers/imap/camel-imap-store.c: Wrap debug print statements
1259         in a macro
1260
1261         * providers/imap/camel-imap-stream.c (stream_read): Make sure
1262         that we get up to and including the last \n of the mime part.
1263
1264         * providers/imap/camel-imap-folder.c (imap_get_message): Make sure
1265         that we get up to and including the last \n of the mime part.
1266         Wrap debug print statements in a macro.
1267
1268         * providers/imap/camel-imap-stream.c (stream_read): Only cache
1269         the important data (aka the mime part requested and no extra
1270         server response stuff)
1271
1272 2000-07-07  Dan Winship  <danw@helixcode.com>
1273
1274         * camel-mime-utils.c (header_references_decode): Work around
1275         In-Reply-To's with unquoted punctuation. So many broken mailers.
1276
1277         * camel-folder.c (camel_folder_search_by_expression): Make this
1278         return a GPtrArray rather than a GList.
1279
1280         * camel-folder-search.c (camel_folder_search_execute_expression):
1281         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
1282         * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
1283         * providers/nntp/camel-nntp-folder.c (nntp_search_by_expression):
1284         Update to return a GPtrArray rather than a GList.
1285
1286 2000-07-07  Jeffrey Stedfast  <fejj@helixcode.com>
1287
1288         * providers/smtp/camel-smtp-transport.c (esmtp_get_authtypes): 
1289         Fixed the parser to actually work
1290
1291 2000-07-06  Dan Winship  <danw@helixcode.com>
1292
1293         * camel-mime-utils.c (header_references_decode): Make this deal
1294         with the full RFC822 References/In-Reply-To format rather than
1295         just the more-nicely-behaved RFC1036 version. (Needed to parse
1296         In-Reply-To headers with extra junk in them.)
1297
1298 2000-07-06  Jeffrey Stedfast  <fejj@helixcode.com>
1299
1300         * providers/imap/camel-imap-folder.c (imap_get_summary): Parse for
1301         more header information to allow message threading in IMAP.
1302         (imap_get_message_info): Same.
1303
1304         * camel-folder-summary.c: Renamed summary_format_* to
1305         camel_summary_format_* and moved them into public scope.
1306
1307         * providers/smtp/camel-smtp-transport.c (smtp_connect): Oops. Don't
1308         pass port # as a string in the error code (if it fails to connect).
1309
1310         * providers/imap/camel-imap-folder.c (imap_append_message): Changed
1311         over to camel_imap_command_extended as that was the source of the
1312         problems - apparently appending replies with more than just 1 line.
1313
1314 2000-07-05  Dan Winship  <danw@helixcode.com>
1315
1316         * camel-folder-search.c (search_header_contains): make header
1317         matching case-insensitive
1318
1319         * camel-folder-summary.c:
1320         * camel-session.c:
1321         * providers/mbox/camel-mbox-folder.c:
1322         * providers/mbox/camel-mbox-summary.c: Remove some non-error case
1323         debugging-type messages.
1324
1325 2000-07-05  Ettore Perazzoli  <ettore@helixcode.com>
1326
1327         * providers/mbox/camel-mbox-summary.c (d): Define to empty so that
1328         we get rid of a ton of debugging messages.
1329
1330 2000-07-05  Jeffrey Stedfast  <fejj@helixcode.com>
1331
1332         * camel-mime-utils.h: Added prototype for uudecode_step
1333
1334         * camel-mime-utils.c (uudecode_step): Cleaned up some junk that
1335         should have been cleaned up when debugging printf's were taken out.
1336
1337 2000-07-05  Ettore Perazzoli  <ettore@helixcode.com>
1338
1339         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
1340         Update the X-Evolution: header even if the in-memory UID and the
1341         saved UID are not the same.  Otherwise mboxes with clashing UIDs
1342         can never be fixed.
1343
1344         * camel-folder-summary.c
1345         (camel_folder_summary_add_from_parser): Add the message to the
1346         summary before doing any ibex stuff.  In fact, this might also
1347         have the side effect of reassigning the UID so it needs to be done
1348         before we start using the UID.
1349
1350         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Add
1351         debugging message to keep track of the UIDs we add.
1352
1353 2000-07-05  Dan Winship  <danw@helixcode.com>
1354
1355         * camel-folder-summary.c: Add "Cc" to summary and bump summary
1356         version number.
1357
1358         * camel-folder-search.c (search_header_contains): make "Cc" a
1359         searchable header.
1360
1361 2000-07-03  Ettore Perazzoli  <ettore@helixcode.com>
1362
1363         * camel-folder-summary.c (camel_folder_summary_next_uid_string):
1364         New.
1365         (camel_folder_summary_add): Use
1366         `camel_folder_summary_next_uid_string()' instead of recomputing
1367         the UID manually here.
1368         (camel_folder_summary_add_from_parser): Likewise.
1369
1370 2000-07-03  Ettore Perazzoli  <ettore@helixcode.com>
1371
1372         * camel-folder-summary.c (camel_folder_summary_set_uid): Removed.
1373
1374 2000-07-03  Dan Winship  <danw@helixcode.com>
1375
1376         * camel-folder-summary.c (message_info_new): Parse In-Reply-To
1377         with header_references_decode, not header_msgid_decode.
1378
1379         * camel-mime-message.c (camel_mime_message_class_init): message
1380         headers are case-insensitive.
1381
1382         * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fix a
1383         bug in error-setting code.
1384         (pop3_connect): Don't re-prompt for password in the KPOP case.
1385         (pop3_get_response): New function, split out from
1386         camel_pop3_command.
1387         (connect_to_server): Use pop3_get_response to parse the greeting
1388         message, and error out appropriately if it's -ERR.
1389
1390 2000-07-02  Dan Winship  <danw@helixcode.com>
1391
1392         * camel-folder.c (camel_folder_freeze, camel_folder_thaw): New
1393         functions to freeze and thaw a folder (to prevent message/folder
1394         changed signals in the middle of a long series of operations).
1395         (camel_folder_class_init): Change signals to GTK_RUN_FIRST.
1396         (message_changed, folder_changed): Add default implementations
1397         that stop the emission and record info for later if the folder is
1398         frozen.
1399
1400         * providers/mbox/camel-mbox-folder.c (mbox_sync): leftover fixes
1401         from the close->sync change: don't destroy the ibex, summary, and
1402         search when syncing.
1403         (append_message): emit "folder_changed" on a successful append.
1404
1405 2000-07-02  Jeffrey Stedfast  <fejj@helixcode.com>
1406
1407         * camel-mime-utils.c (uudecode_step): A rather complex uudecoder
1408         written in the spirit of Zucchi-ness, is it up to par? Only the 
1409         Z-man can tell us :-)
1410
1411 2000-07-01  Dan Winship  <danw@helixcode.com>
1412
1413         * camel-service.c (camel_service_get_name): New method, to return
1414         an end-user-friendly name corresponding to a service. (eg, "POP
1415         service for danw on trna.helixcode.com").
1416
1417         * providers/imap/camel-imap-store.c,
1418         providers/mbox/camel-mbox-store.c,
1419         providers/nntp/camel-nntp-store.c,
1420         providers/pop3/camel-pop3-store.c,
1421         providers/sendmail/camel-sendmail-transport.c,
1422         providers/smtp/camel-smtp-transport.c: Implement.
1423
1424         * providers/imap/Makefile.am: remove unneeded
1425         libcamelimap_la_LDADD.
1426
1427         * providers/pop3/camel-pop3-store.c (connect_to_server): fix the
1428         CAPA-parsing code to not get into an infinite loop.
1429
1430 2000-07-01  Jeffrey Stedfast  <fejj@helixcode.com>
1431
1432         * providers/imap/camel-imap-folder.c (imap_get_message): Fixed
1433         the bug that would sometimes leave part of the server response
1434         tacked on to the end of the message.
1435
1436         * camel-folder.c: Renamed _by_uid methods. Since we no longer
1437         have get-by-number methods, no need to have the _by_uid 
1438         extensions. 
1439         (get_message_by_uid): Renamed to get_message
1440         (delete_message_by_uid): Renamed to delete_message
1441         (summary_get_by_uid): Renamed to get_message_info
1442
1443         * providers/mbox/camel-mbox-folder.c: 
1444         * providers/pop3/camel-pop3-folder.c:
1445         * providers/imap/camel-imap-folder.c:
1446         * providers/vee/camel-vee-folder.c: Updated to reflect
1447         camel-folder changes.
1448
1449 2000-06-30  Jeffrey Stedfast  <fejj@helixcode.com>
1450
1451         * camel-folder.c (camel_folder_copy_message_to): New function, to
1452         copy a message from one folder to another. The default
1453         implementation just uses append_message, but providers can 
1454         implement more efficient versions for use when both folders are on 
1455         the same store.
1456
1457         * broken-date-parser.[c,h]: Utilities for parsing broken
1458         date strings.
1459         
1460         * providers/imap/camel-imap-folder.c (imap_move_message_to): 
1461         (imap_copy_message_to): Implemented.
1462
1463         * camel-mime-utils.c (header_decode_date): Wrote some code to try
1464         and un-mangle broken date formats and then parse that new string 
1465         instead.
1466
1467 2000-06-30  Dan Winship  <danw@helixcode.com>
1468
1469         * camel-folder.c (camel_folder_move_message_to): New function, to
1470         move a message from one folder to another. The default
1471         implementation just uses append_message and delete_message, but
1472         providers can implement more efficient versions for use when both
1473         folders are on the same store.
1474
1475 2000-06-29  Jeffrey Stedfast  <fejj@helixcode.com>
1476
1477         * providers/imap/camel-imap-folder.c (imap_expunge): Should now
1478         print a meaningful error message when it doesn't succeed
1479
1480 2000-06-28  Jeffrey Stedfast  <fejj@helixcode.com>
1481
1482         * providers/imap/camel-imap-store.c (imap_connect): Changed to
1483         keep prompting user for a valid password until it either
1484         authenticates or until Canceled by the user.
1485         (camel_imap_command_extended): Improved speed (replaced the
1486         g_strjoinv call with a faster implementation)
1487
1488         * providers/pop3/camel-pop3-store.c 
1489         (camel_pop3_command_get_additional_data): Fixed.
1490         (pop3_connect): Changed to keep prompting the user for a
1491         password until it either works or until Canceled by the user.
1492
1493         * providers/mbox/camel-mbox-summary.c: General cleanup
1494         (camel_mbox_summary_sync): Fixed a memory leak and added
1495         CamelException handling.
1496
1497         * providers/mbox/camel-mbox-store.c (delete_folder): Fixed a 
1498         memory leak
1499
1500         * providers/mbox/camel-mbox-folder.c (mbox_append_message): 
1501         Default 'off_t seek' to -1 so as to make sure it's initialized
1502         before it's used in the case of a bad stat() call.
1503         (mbox_sync): Updated
1504         (mbox_expunge): Updated
1505
1506 2000-06-27  Jeffrey Stedfast  <fejj@helixcode.com>
1507
1508         * providers/imap/camel-imap-store.c (imap_connect): Move the 
1509         CAPABILITY command here so we don't have to keep checking
1510         each time we open a folder.
1511         (camel_imap_command_extended): If we are doing an EXAMINE,
1512         don't bother doing a SELECT first.
1513
1514         * providers/imap/camel-imap-folder.c (imap_init): Update so
1515         folder->has_search_capability depends on the parent IMAP store
1516         (since this is really dependant on the IMAP implementation and
1517         not the folder)
1518
1519 2000-06-27  Christopher James Lahey  <clahey@helixcode.com>
1520
1521         * providers/smtp/camel-smtp-transport.c: Don't close the filter
1522         stream when done with it (this causes the source stream to close);
1523         Instead, just flush it when done.
1524
1525 2000-06-27  Michael Zucchi  <zucchi@zedzone.mmc.com.au>
1526
1527         * camel-folder-search.c (search_header_contains): Make header
1528         search 'to' match 'to', and not 'from', small typo, fixes #317.
1529
1530 2000-06-26  Christopher James Lahey  <clahey@helixcode.com>
1531
1532         * providers/mbox/camel-mbox-summary.c: Added debugging
1533         information.
1534
1535 2000-06-23  Jeffrey Stedfast  <fejj@helixcode.com>
1536
1537         * providers/imap/camel-imap-store.c: 
1538         * providers/imap/camel-imap-folder.c: Improved folder parsing.
1539         Not specifying a namespace should no longer list the entire
1540         filesystem.
1541
1542 2000-06-22  Chris Toshok  <toshok@helixcode.com>
1543
1544         * providers/nntp/.cvsignore: ignore test-newsrc
1545
1546         * providers/nntp/camel-nntp-store.c,
1547         providers/nntp/camel-nntp-store.h,
1548         providers/nntp/camel-nntp-folder.c,
1549         providers/nntp/camel-nntp-folder.h,
1550         providers/nntp/camel-nntp-utils.c: Bring the nntp provider up to a
1551         state where it builds and is usable with the current camel.  there
1552         are still warts (semi-broken .newsrc file handling, and a lack of
1553         a subscribe ui -- in fact no way to add a new server, really), but
1554         it'll display news messages.
1555
1556         * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
1557         camel-nntp-newsrc.c
1558         (libcamelnntpinclude_HEADERS): add camel-nntp-newsrc.h
1559         also, add test-newsrc stuff.
1560         
1561         * providers/nntp/test-newsrc.c: new file that tests the newsrc
1562         stuff by parsing and regurgitating a .newsrc file for a particular
1563         server.
1564
1565         * providers/nntp/camel-nntp-newsrc.c,
1566         providers/nntp/camel-nntp-newsrc.h: new files, initial support for .newsrc files.
1567
1568 2000-06-22  Jeffrey Stedfast  <fejj@helixcode.com>
1569
1570         * providers/imap/camel-imap-folder.c (imap_get_message_count): 
1571         Oops. Now appends the namespace to the folder before querying
1572         for the number of messages.
1573
1574         * providers/imap/camel-imap-store.c (imap_folder_exists): New
1575         convenience function for use by imap_create().
1576         (get_folder): If folder is specified as "/", we really want
1577         "INBOX".
1578
1579         * providers/sendmail/camel-sendmail-provider.c:
1580         * providers/vee/camel-vee-provider.c:
1581         * providers/smtp/camel-smtp-provider.c:
1582         * providers/mbox/camel-mbox-provider.c:
1583         * providers/pop3/camel-pop3-provider.c:
1584         * providers/imap/camel-imap-provider.c: Updated
1585         
1586         * camel-session.c: Moved service_cache hash table into the
1587         providers.
1588         (service_cache_remove): Updated.
1589         (camel_session_get_service): Updated.
1590
1591         * camel-url.c (camel_url_hash): Took out the hashing of
1592         url->passwd. We don't want this anymore.
1593
1594         * providers/imap/camel-imap-folder.c (imap_init): Took out
1595         references to 'namespace'
1596         (camel_imap_folder_init): Same
1597
1598         * providers/imap/camel-imap-folder.h: No more namespace. We are
1599         instead going to use url->path as the namespace.
1600
1601 2000-06-21  Jeffrey Stedfast  <fejj@helixcode.com>
1602
1603         * providers/imap/camel-imap-store.c (imap_create): Modified to
1604         use the "namespace" (url->path) if it exists.
1605
1606         * providers/imap/camel-imap-folder.c (imap_delete_message_by_uid):
1607         Now just sets the deleted flag on the summary rather than speaking 
1608         directly to the IMAP server. This is both faster and cleaner.
1609
1610 2000-06-21  Dan Winship  <danw@helixcode.com>
1611
1612         * providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb
1613         bug.
1614
1615 2000-06-21  Jeffrey Stedfast  <fejj@helixcode.com>
1616
1617         * providers/imap/camel-imap-folder.c (imap_get_message_by_uid): 
1618         We are getting mail in IMAP now!! whoo-hoo!. Stripped out the 
1619         filtering so messages may have some dot-stuffing, but the 
1620         filtering can always be added back in later when we know it 
1621         works and isn't the problem.
1622
1623 2000-06-21  Peter Williams  <peterw@curious-george.helixcode.com>
1624
1625         * providers/mbox/camel-mbox-folder.c (mbox_init): Use the basename
1626         of the mailbox so we don't get pathnames like ~/evolution/inbox///movemail.ibex
1627
1628 2000-06-21  Dan Winship  <danw@helixcode.com>
1629
1630         * camel-folder-summary.c (message_info_new): Set date_received
1631         based on the first (most recent) "Received" header.
1632
1633 2000-06-20  Dan Winship  <danw@helixcode.com>
1634
1635         * camel-mime-part.c (write_to_stream): flush the filter stream
1636         before unreffing it, so it will camel_mime_filter_complete.
1637
1638         * camel-stream-filter.c (camel_stream_filter_class_init): Fix a
1639         braino so camel_stream_flush works here.
1640
1641         * camel-stream-mem.c (stream_seek): Fix a bug that resulted in
1642         large attachments being silently dropped.
1643
1644         * providers/pop3/camel-pop3-store.c
1645         (camel_pop3_command_get_additional_data): Don't use g_strjoinv
1646         here, since it is O(n^2) on the length of the output string, and
1647         we can do O(n).
1648
1649         * camel-mime-part-utils.c
1650         (simple_data_wrapper_construct_from_parser): add a CRLF decoder
1651         after the QP/B64 decoder if it's text.
1652
1653 2000-06-20  Jeffrey Stedfast  <fejj@helixcode.com>
1654
1655         * providers/imap/camel-imap-folder.c (imap_get_summary): Only
1656         fetch the summary if the folder summary doesn't already exist.
1657         When the summary *does* exist, start fetching from 1, not 0.
1658         (imap_free_summary): Don't do anything here.
1659         (imap_finalize): Free the summary here instead of in
1660         imap_free_summary().
1661         (imap_set_message_flags): Implemented
1662         (imap_sync): Added code to set flags on messages that have had
1663         their flags changed (however I #if'd it out until we are more
1664         confidant in the IMAP code :)
1665         (imap_summary_get_by_uid): Now parese flags correctly.
1666         (imap_get_summary): Now parese flags correctly. Also correctly
1667         parses the UID correctly.
1668
1669         * camel-url.c (check_equal): No need to check s1 if s2 is NULL
1670         (camel_url_equal): Don't check the passwd component of the url.
1671
1672 2000-06-20  Dan Winship  <danw@helixcode.com>
1673
1674         * camel-folder-summary.c (camel_folder_summary_add): mark the
1675         message info with CAMEL_MESSAGE_FOLDER_FLAGGED if we change the
1676         uid, so the folder will know that it's dirty.
1677
1678 2000-06-20  Jeffrey Stedfast  <fejj@helixcode.com>
1679
1680         * providers/imap/camel-imap-store.c (camel_imap_command_extended): 
1681         Now returns the last line of data that the server sends back as
1682         well. This is needed for commands like SELECT (like Peter pointed
1683         out).
1684         (camel_imap_command): No longer checks for SELECT (no need)
1685
1686         * providers/imap/camel-imap-folder.c: Added namespace stuff
1687         which we will need later on...
1688         (imap_parse_subfolder_line): Convenience function for use in
1689         get_subfolder_names()
1690         (imap_get_subfolder_names): Updated. Also changed it to use LIST
1691         instead of LSUB (temporary change).
1692
1693 2000-06-19  Jeffrey Stedfast  <fejj@helixcode.com>
1694
1695         * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set
1696         summary equal to NULL.
1697         (imap_get_summary): Store the summary in the ImapFolder
1698         (imap_summary_get_by_uid): If we have a summary cache in the
1699         ImapFolder, first check to see if that message info is in the
1700         cached summary first, if not fetch it directly from the IMAP
1701         server and append it to the summary cache.
1702         (imap_get_message_flags): Don't free the message info that we get
1703         back from summary_get_by_uid as we don't want to be corrupting our
1704         cached summary.
1705
1706 2000-06-19  Peter Williams  <peterw@curious-george.helixcode.com>
1707
1708         * providers/imap/camel-imap-store.c (camel_imap_command{,_extended}): When
1709         SELECT'ing a folder for an IMAP command, use _extended to grab the entire
1710         response (before we just used camel_imap_command and missed the OK codes)
1711
1712 2000-06-18  Jeffrey Stedfast  <fejj@helixcode.com>
1713
1714         * providers/imap/camel-imap-folder.c (imap_summary_get_by_uid): 
1715         Now gets the message flags as it should.
1716         (imap_get_summary): Same as imap_summary_get_by_uid
1717         (imap_get_permanent_flags): Return the permanent flags stored
1718         on the folder.
1719         (imap_get_message_flags): Return message flags associated with
1720         given uid. Note: we may want to somehow cache summary info so
1721         that we don't have to keep querying the IMAP provider in
1722         imap_summary_get_by_uid().
1723
1724 2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>
1725
1726         * providers/imap/camel-imap-folder.c (imap_free_summary): We were
1727         leaking memory - but not anymore!
1728         (imap_get_summary): We now get the UIDs and the beginnings of the
1729         code to get the message flags as well.
1730
1731 2000-06-17  Dan Winship  <danw@helixcode.com>
1732
1733         * camel-mime-parser.c (folder_scan_header): Don't copy newlines
1734         into the parsed header text, and turn any number of tabs and
1735         spaces after a newline into a single space.
1736
1737 2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>
1738
1739         * providers/imap/camel-imap-folder.c (imap_init): Should now
1740         correctly do CAPABILITY.
1741
1742 2000-06-17  Dan Winship  <danw@helixcode.com>
1743
1744         * providers/mbox/camel-mbox-summary.c: Add some debugging printfs
1745         when rebulding summary to help figure out why people's summaries
1746         are always being rebuilt.
1747
1748 2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>
1749
1750         * providers/imap/camel-imap-folder.c (imap_search_by_expression):
1751         Began to implement, need to get information on how to
1752         deconstruct @expression into an IMAP search expression and
1753         parse the results.
1754         (imap_init): Now queries the IMAP provider for CAPABILITY to
1755         determine if SEARCH is implemented or not.
1756
1757         * providers/imap/imap.c: Removed - no longer a need to have
1758         this as an example for anyone interesting to help mecode IMAP
1759         support.
1760         
1761 2000-06-16  Jeffrey Stedfast  <fejj@helixcode.com>
1762
1763         * providers/imap/camel-imap-folder.c (imap_sync): Added code
1764         to expunge if called for (still need to finish coding this).
1765         (imap_get_uids): Implemented.
1766         (imap_get_summary): Found a way to get the date
1767         (imap_summary_get_by_uid): Same.
1768         (imap_free_summary): Implemented.
1769
1770         * string-utils.c (strstrcase): Fixed a compile warning
1771
1772         * providers/imap/camel-imap-summary.c: Removed - we don't
1773         need a CamelImapSummary structure.
1774
1775 2000-06-16  Dan Winship  <danw@helixcode.com>
1776
1777         Move flag handling from CamelMimeMessage to CamelFolder. This
1778         simplifies several flag-handling pieces of code in the mailer, and
1779         lets you change a message's flags without having to fetch the
1780         message body. It also means that fully-constructed
1781         CamelMimeMessages are now essentially constant, which will help
1782         simplify locking issues later since it means two threads
1783         interested in the same message can just work with separate copies
1784         of it.
1785
1786         * camel-mime-message.h (struct _CamelMimeMessage): Removed flags
1787         and user_flags (moved to summary). Removed expunged and
1788         message_number which were unused. Removed message_uid and folder
1789         which are no longer needed in the new scheme.
1790         (struct CamelMimeMessageClass): Removed message_changed signal and
1791         get/set_message_number methods.
1792
1793         * camel-mime-message.c: Updates for CamelMimeMessage changes.
1794         (camel_mime_message_get/set_flags,
1795         camel_mime_message_get/set_user_flag): Replaced with methods in
1796         CamelFolder.
1797         (camel_flag_get, camel_flag_set, camel_flag_list_size,
1798         camel_flag_list_free): Moved verbatim to camel-folder-summary.c
1799         
1800         * camel-folder.c (camel_folder_get/set_message_flags,
1801         camel_folder_get/set_message_user_flag): New methods (and
1802         corresponding useless default implementations)
1803         (camel_folder_class_init): add a message_changed signal
1804
1805         * camel-folder-summary.c (camel_flag_get, camel_flag_set,
1806         camel_flag_list_size, camel_flag_list_free): Moved here from
1807         camel-mime-message.c
1808
1809         * providers/mbox/camel-mbox-folder.c (message_changed): Removed.
1810         (mbox_get_message_flags, mbox_set_message_flags,
1811         mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak
1812         summary bits as appropriate. (Functionality moved here from
1813         message_changed.)
1814         (mbox_get_message_by_uid): Update for CamelMimeMessage changes
1815         (less stuff to initialize).
1816
1817         * providers/imap/camel-imap-folder.c (message_changed): Remove
1818         this. It was just copied from the mbox provider and doesn't deal
1819         with the real IMAP flag stuff anyway. (So there's currently no
1820         flag support in the IMAP provider.)
1821         (imap_get_message_by_uid): Update for CamelMimeMessage changes.
1822
1823         * providers/vee/camel-vee-folder.c: (message_changed): Remove old
1824         one. Add a new one to listen for message_changed on each folder
1825         and re-emit message_changed signals that correspond to messages in
1826         the vfolder.
1827         (vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy
1828         flag setting to the underlying real messages.
1829         (vee_append_message): Removed for now; there's no way to translate
1830         this into the new CamelMimeMessage/CamelFolder scheme, but (a)
1831         there's also no code which would ever call it and (b) we're
1832         probably going want a better interface than append_message for
1833         message drag and drop to work anyway. To be revisited.
1834
1835 2000-06-16  Dan Winship  <danw@helixcode.com>
1836
1837         * camel-mime-utils.c (rfc2047_decode_word): 
1838         * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): 
1839         * camel-folder-summary.c (summary_build_content_info): 
1840         KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet,
1841         output ISO-8859-1 instead, so Ettore can read his Italian mail. :)
1842         This will be reverted later.
1843
1844 2000-06-15  Jeffrey Stedfast  <fejj@helixcode.com>
1845
1846         * providers/imap/camel-imap-folder.c (imap_get_summary): Started to 
1847         implement - may want to use ENVELOPE instead of BODY.PEEK[HEADER]
1848         (imap_summary_get_by_uid): Started to code, I've got to find a way to 
1849         get the date in time_t format and also get the flags
1850
1851         * string-utils.c (strstrcase): Added this convenience function - I
1852         know about strcasestr() but it's not portable.
1853
1854 2000-06-15  Dan Winship  <danw@helixcode.com>
1855
1856         * camel-service.c: Remove camel_service_connect_with_url. (URLs
1857         must be specified when the service is requested from the session,
1858         so that there can only ever be one service for any URL.)
1859
1860         * camel-folder.c: (camel_folder_open, camel_folder_is_open,
1861         camel_folder_get_mode): Kill. Folders are now always open, and
1862         handle "closing" sorts of operations at sync or finalize time.
1863         (camel_folder_sync): renamed from camel_folder_close. Syncs state
1864         to the store but doesn't necessarily close/disconnect.
1865
1866         * providers/*/camel-*-folder.c: Merge "open" methods into "init"
1867         methods. Rename close to sync and update appropriately.
1868
1869         * providers/imap/camel-imap-store.c: Remove camel_imap_store_open
1870         and camel_imap_store_close, which should not have been copied from
1871         the POP provider (where the exist to work around limitations of
1872         the POP protocol).
1873
1874         * providers/mbox/camel-mbox-summary.c: fix a bug. (don't expunge
1875         deleted messages if called with expunge == FALSE)
1876         
1877         * providers/pop3/camel-pop3-store.c (connect_to_server): Check
1878         server for various interesting extensions.
1879
1880         * providers/pop3/camel-pop3-folder.c (get_uids): If the server
1881         supports UIDL, use real UIDs rather than fake ones.
1882         (etc): Map uids back to numbers appropriately
1883
1884         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Fix to
1885         previous change: make sure the "seek" variable ends up with the
1886         value it should.
1887
1888         * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
1889         summary mtime as well as size.
1890
1891 2000-06-14  Dan Winship  <danw@helixcode.com>
1892
1893         * providers/mbox/camel-mbox-folder.c (mbox_append_message): if the
1894         mbox doesn't end with a '\n', write one before appending the new
1895         message.
1896
1897 2000-06-14  Jeffrey Stedfast  <fejj@helixcode.com>
1898
1899         * camel-mime-filter-crlf.c (filter): Updated the encoder to allocate 
1900         more memory (since we are also now adding dots). Also updated the
1901         decoder as we have found that it sometimes passes the end of the 
1902         buffer.
1903
1904         * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Took out the
1905         filter code (we already filter in 
1906         camel_pop3_command_get_additional_data)
1907
1908         * camel-folder.c (init): Updated: a separator is now a char* rather 
1909         than a single char because IMAP can have a string for a directory 
1910         separator. Also, since IMAP does not begin with a directory separator,
1911         there is a new argument (path_begins_with_sep) which decides if a 
1912         directory should begin with a directory separator.
1913
1914         * providers/imap/camel-imap-store.c (imap_create): Since, on connect,
1915         Camel tries to create INBOX (which already exists on every IMAP 
1916         provider) we can return TRUE when the folder name is "INBOX".
1917
1918         * providers/vee/camel-vee-folder.c (vee_init): Updated.
1919
1920         * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated.
1921
1922         * providers/mbox/camel-mbox-store.c (get_folder): Updated.
1923
1924         * providers/mbox/camel-mbox-folder.c (mbox_init): Updated.
1925
1926         * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated.
1927
1928 2000-06-14  Dan Winship  <danw@helixcode.com>
1929
1930         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
1931         Renamed from camel_mbox_summary_expunge. Takes a gboolean saying
1932         whether to expunge or just sync the mbox file. Change some
1933         g_errors to g_warning so we don't abort. Make the quick
1934         X-Evolution updating code lseek around correctly. Update the
1935         mbox mtime in the summary file even in the quick case.
1936
1937         * providers/mbox/camel-mbox-summary.h: make
1938         CAMEL_MESSAGE_FOLDER_NOXEV not conflict with
1939         CAMEL_MESSAGE_FOLDER_FLAGGED defined in camel-mime-message.h
1940
1941         * providers/mbox/camel-mbox-folder.c (mbox_close): call
1942         camel_mbox_summary_sync to save flag state if not expunging.
1943         (mbox_expunge): Update for camel_mbox_summary_expunge rename.
1944
1945 2000-06-13  Jeffrey Stedfast  <fejj@helixcode.com>
1946
1947         * providers/imap/camel-imap-store.c (camel_imap_store_open): 
1948         (camel_imap_store_close): Added.
1949         (camel_imap_command_extended): Fixed a segfault and updated
1950         to use camel_imap_status()
1951         (camel_imap_command): Updated to use camel_imap_status()
1952         (camel_imap_status): New convenience function for parsing
1953         the return status of an IMAP command
1954
1955 2000-06-12  Jeffrey Stedfast  <fejj@helixcode.com>
1956
1957         * providers/imap/camel-imap-folder.c (imap_get_message_by_uid): 
1958         Works like the POP fetch code, should work temporarily until
1959         we get around to coding it the way it "Should Be".
1960
1961         * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Now uses
1962         the camel-mime-filter-crlf decoder when retrieving messages.
1963
1964         * camel-mime-filter-smtp.c: Deprecated.
1965
1966         * providers/smtp/camel-smtp-transport.c (smtp_data): Updated to use
1967         camel-mime-filter-crlf with my 'dot' extension in place of
1968         camel-mime-filter-smtp
1969
1970         * camel-mime-part.c (write_to_stream): Updated to reflect changes
1971         made to camel-mime-filter-crlf.c
1972
1973         * camel-mime-filter-crlf.c (filter): Modified to be able to
1974         encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder
1975         so that it should no longer get caught in an infinite loop.
1976
1977 2000-06-12  Dan Winship  <danw@helixcode.com>
1978
1979         * providers/*/Makefile.am: don't pass a second (incorrect) -rpath
1980         in addition to the (correct) one automatically provided by
1981         automake.
1982
1983         * camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion.
1984         (Currently only tested in the LF->CRLF direction.)
1985
1986         * camel-mime-part.c (write_to_stream): if content-type is text,
1987         and it's QP or B64 encoded, pass through the CRLF filter before
1988         the other filter to satisfy the "canonical encoding" rules in the
1989         MIME spec.
1990
1991 2000-06-09  Dan Winship  <danw@helixcode.com>
1992
1993         * camel-session.c (camel_session_query_authenticator): Add another
1994         argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
1995         CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache
1996         bad info.
1997
1998         * providers/pop3/camel-pop3-store.c (pop3_connect): uncache the
1999         password if it doesn't work.
2000
2001 2000-06-09  Jeffrey Stedfast  <fejj@helixcode.com>
2002
2003         * providers/imap/camel-imap-stream.c (stream_read): Updated to reflect
2004         changes made in camel-imap-store.c
2005
2006         * providers/imap/camel-imap-store.c (imap_create): No longer checks to
2007         make sure a folder doesn't already exists (as this is no longer needed)
2008         (camel_imap_command): Now takes a CamelFolder argument so it can detect
2009         whether or not it needs to SELECT a folder or not
2010         (camel_imap_command_extended): Same.
2011
2012         * providers/smtp/camel-smtp-transport.c (smtp_connect): Will now always
2013         send EHLO first, if that fails it will fall back on HELO.
2014         (esmtp_get_authtypes): Should now correctly parse authtypes.
2015
2016 2000-06-07  Jeffrey Stedfast  <fejj@helixcode.com>
2017
2018         * providers/imap/camel-imap-summary.c: Now builds (not that it's worth
2019         much yet).
2020         
2021         * providers/imap/camel-imap-folder.c (imap_get_uids): Now uses the 
2022         correct cast to a CamelImapMessageInfo structure (should get rid of 
2023         compile warnings).
2024
2025         * providers/imap/Makefile.am: Added rules to build 
2026         camel-imap-stream
2027         
2028         * providers/imap/camel-imap-store.c (get_folder): Update.
2029         Moved imap_create here.
2030
2031         * providers/imap/camel-imap-folder.c (delete_messages): Remove.
2032         (imap_create): Removed.
2033         (imap_delete): Removed.
2034         (imap_exists): Removed.
2035
2036         * providers/imap/camel-imap-stream.h: Added typedef's for the stream
2037
2038         * providers/imap/camel-imap-stream.c: Modified to build cleanly
2039
2040 2000-06-07  Not Zed  <NotZed@HelixCode.com>
2041
2042         * camel-mime-utils.c (header_msgid_decode_internal): Properly
2043         dereference warning/debug messages.
2044         (header_references_decode): Check we actually have msgid stuff
2045         before trying to decode it ...
2046
2047 2000-06-06  Jeffrey Stedfast  <fejj@helixcode.com>
2048
2049         * camel-imap-stream.[c,h]: Removed
2050
2051         * providers/imap/camel-imap-stream.[c,h]: Relocated to this
2052         location
2053
2054         * providers/imap/camel-imap-summary.c: Added
2055
2056 2000-06-06  Dan Winship  <danw@helixcode.com>
2057
2058         * camel-folder.c: Remove exists, create, delete. A CamelFolder
2059         now always references an existing folder. Remove delete_messages
2060         too since it wasn't being used. Add a "create" flag to
2061         get_subfolder saying whether or not to create the subfolder if it
2062         doesn't yet exist.
2063
2064         * camel-store.c (camel_store_get_folder): Add a "create" flag to
2065         say whether or not to create the folder if it doesn't yet exist.
2066         (camel_store_delete_folder): New method, moved from CamelFolder.
2067         (cache_folder, uncache_folder): Fix up a bit.
2068         (get_folder_name): Explain what this is for.
2069
2070         * providers/mbox/camel-mbox-folder.c: 
2071         * providers/mbox/camel-mbox-store.c: Update. Remove support for
2072         hierarchical folders to simplify this for now, since we're not
2073         using it, and it's not completely clear how they should work in an
2074         ELocalStorage world. Needs to be revisited.
2075
2076         * providers/pop3/camel-pop3-folder.c (delete_messages): Remove.
2077         * providers/pop3/camel-pop3-store.c (get_folder): Update.
2078
2079         * providers/vee/camel-vee-folder.c (exists): Remove.
2080         * providers/vee/camel-vee-store.c (vee_get_folder): Update.
2081
2082 2000-06-06  Jeffrey Stedfast  <fejj@helixcode.com>
2083
2084         * providers/imap/camel-imap-*.[c,h]: Started on getting 
2085         imap to build cleanly (tho some work has not been completed
2086         so it still won't build until camel-imap-summary is finished
2087         along with a few methods in camel-imap-folder)
2088
2089         * camel-stream.[c,h]: Changed the read and write method prototypes
2090         to return an ssize_t type rather than an int and also changed
2091         the 'number of bytes' to read or write to a size_t type
2092
2093         * camel-stream-fs.c: same as above
2094
2095         * camel-stream-mem.c: again, same as above
2096
2097         * camel-stream-buffer.c: same
2098
2099         * camel-imap-stream.[c,h]: Added this new stream, cache's previously 
2100         read data so each successive call will instead read from the cache
2101         
2102 2000-06-05  Dan Winship  <danw@helixcode.com>
2103
2104         * camel-mime-part.c (camel_mime_part_set_disposition): fix
2105         typo/braino (set "Content-Disposition", not "Content-Description")
2106         (camel_mime_part_set_filename): const poison
2107
2108 2000-06-02  Not Zed  <NotZed@HelixCode.com>
2109
2110         * camel-mime-utils.c (base64_encode_step): Ick, damn signs!  Fix a
2111         bug with sign extended bytes.
2112
2113         * camel-mime-filter-smtp.c (filter): Changed layout/logic slightly
2114         (to match From filter)
2115
2116 2000-06-02  Jeffrey Stedfast  <fejj@helixcode.com>
2117
2118         * camel-mime-filter-smtp.c (filter): Fixed the filter so that it 
2119         wouldn't insert garbage under certain conditions.
2120
2121 2000-06-02  Christopher James Lahey  <clahey@helixcode.com>
2122
2123         * camel-session.c: Don't ref the services in the cache.
2124
2125 2000-06-02  Jeffrey Stedfast  <fejj@helixcode.com>
2126
2127         * providers/smtp/camel-smtp-transport.c: Rearanged where debug
2128         fprintf statements we placed so that any data the server sends 
2129         back is printed out before an exception is set and the function
2130         returns.
2131
2132 2000-06-02  Not Zed  <NotZed@HelixCode.com>
2133
2134         * camel-mime-utils.c (header_decode_date): If we get a funny
2135         result, just throw it out.  Basically a fix for the one true
2136         broken TradeClient.
2137
2138 2000-06-01  Not Zed  <NotZed@HelixCode.com>
2139
2140         * camel-folder-summary.c (message_info_free): Free
2141         references/messsage id.
2142         (message_info_save): Save them.
2143         (message_info_load): Load them.
2144         (message_info_new): And get them from the new message.
2145         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped for new changes.
2146
2147         * camel-folder-summary.h: Added references and messageid to
2148         summary.
2149
2150 2000-06-02  Christopher James Lahey  <clahey@helixcode.com>
2151
2152         * camel-session.c: Ref and unref objects in the service cache
2153         properly.
2154
2155         * camel-store.c: Ref the folder when returning it using
2156         lookup_folder.  Used the folder's full name for the key for the
2157         folder cache since that's used to uncache it.
2158
2159 2000-06-02  Dan Winship  <danw@helixcode.com>
2160
2161         Fun with purify.
2162
2163         * providers/pop3/camel-pop3-store.c (pop3_connect): free msg on
2164         success as well as failure.
2165         (camel_pop3_command_get_additional_data): free buf after reading
2166         the last line (".").
2167
2168         * providers/pop3/camel-pop3-folder.c (get_message_by_uid): free
2169         body data after creating the memstream from it (which will copy
2170         the data).
2171
2172         * providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary
2173         and index paths.
2174
2175         * camel-data-wrapper.c (finalize): unref the stream, if it exists.
2176
2177 2000-06-01  Not Zed  <NotZed@HelixCode.com>
2178
2179         * camel-mime-part.c (construct_from_parser): For a message part,
2180         set the default content-type to message/rfc822.  Maybe needs to be
2181         done for multiparts too?
2182
2183 2000-05-31  Not Zed  <NotZed@HelixCode.com>
2184
2185         * camel-mime-message.c (construct_from_parser): Typo in assersion.
2186
2187         * camel-mime-parser.c (folder_scan_step): Use a default type of
2188         message/rfc822 for multipart/digest.  Bug Z192.
2189         (folder_scan_drop_step): Remove warning.
2190
2191 2000-05-30  Not Zed  <NotZed@HelixCode.com>
2192
2193         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Init
2194         filter_from to NULL, for exception case.
2195         (mbox_get_message_by_uid): Cast off_t to long int for diagnostics.
2196
2197         * camel-url.c (camel_url_hash): Hash funciton for using camel
2198         url's as hash keys.
2199         (camel_url_equal): equal function for same.
2200
2201         * camel-session.c (camel_session_finalise): Free cached services.
2202         (camel_session_init): Init service cache.
2203         (service_cache_remove): destroy callback to remove a service from
2204         the cache.
2205
2206         * camel-store.c (get_folder_internal): Remove the extra ref of the
2207         folder.  That seems the right behaviour ...?
2208         (camel_store_get_type): Doh, actually call store init, so the
2209         cache works.
2210         (cache_folder): strdup the folder name!  no wonder it never found
2211         it again.
2212
2213 2000-05-30  Jeffrey Stedfast  <fejj@helixcode.com>
2214
2215         * providers/imap/camel-imap-folder.c: Implemented a few more
2216         methods like imap_append and 1 or 2 others
2217
2218 2000-05-29  Not Zed  <NotZed@HelixCode.com>
2219
2220         * camel-store.c (camel_store_init): Move it to here.  If this
2221         level is going to maintain it, it should set it up.  Lets see what
2222         caching folders breaks :(
2223
2224         * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Dont
2225         init folder cache here.
2226
2227         * providers/mbox/camel-mbox-summary.c
2228         (camel_mbox_summary_expunge): Make sure we copy messages which are
2229         still intact to the new folder.
2230         (camel_mbox_summary_expunge): Update the frompos as well when
2231         moving the content.
2232         (camel_mbox_summary_expunge): Remove some debug, and dont offset
2233         frompos?
2234
2235         * providers/vee/camel-vee-folder.c (vee_folder_build): Check the
2236         searched folder is open before trying to search it.
2237         (message_changed): Track changes to the source message in the
2238         summary.
2239         (folder_changed): Track folder changes, re-query the folder that
2240         changed, and cascade the changed event as well.
2241         (camel_vee_folder_finalise): Free subfolder and subfolder summary.
2242
2243 2000-05-29  Dan Winship  <danw@helixcode.com>
2244
2245         * camel-service.c (camel_service_new): Fix up some glib
2246         precondition stuff. Try to set the URL in camel_service_new before
2247         checking whether or not it's "empty" so that you can successfully
2248         set "sendmail:" as a URL.
2249
2250 2000-05-28  Dan Winship  <danw@helixcode.com>
2251
2252         * camel-provider.h: Add a domain field to CamelProvider, to say
2253         what kind of data it provides.
2254
2255         * providers/imap/camel-imap-provider.c: 
2256         * providers/mbox/camel-mbox-provider.c: 
2257         * providers/pop3/camel-pop3-provider.c: 
2258         * providers/sendmail/camel-sendmail-provider.c: 
2259         * providers/smtp/camel-smtp-provider.c: Set domain to "mail".
2260
2261         * providers/nntp/camel-nntp-provider.c: Set domain to "news".
2262
2263         * providers/vee/camel-vee-provider.c: Set domain to "vfolder". (So
2264         it doesn't end up being listed as a potential mail source in the
2265         mail config wizard.)
2266
2267         * providers/pop3/camel-pop3-store.c: Split apart password and APOP
2268         auth, since some servers seem to do both, but don't really.
2269         (connect_to_server): Renamed from try_connect. Now actually does
2270         the connection up to the point of checking the greeting for APOP
2271         support.
2272         (query_auth_types): Return APOP, if appropriate. Call
2273         pop3_disconnect after connect_to_server since we don't really want
2274         to be connected.
2275         (pop3_connect): Use connect_to_server rather than duplicating
2276         code. Fix a one-byte buffer overrun in the APOP code.
2277         (pop3_disconnect): Make this able to clean up after a partial
2278         connect.
2279         (connect_to_server): Remove port number from error message since
2280         it's not terribly useful and we were getting it from the wrong
2281         place anyway.
2282
2283         * camel-mime-utils.c (header_address_list_format_append): Use
2284         `foo@bar' rather than `"" <foo@bar>' for email addresses with no
2285         name component.
2286
2287 2000-05-27  Jeffrey Stedfast  <fejj@helixcode.com>
2288
2289         * providers/imap/camel-imap-store.c: Removed 
2290         camel_imap_command_get_additional_data() as it was
2291         completely useless, replaced with 
2292         camel_imap_command_extended() which may eventually replace
2293         camel_imap_command() as well.
2294
2295         * providers/imap/camel-imap-store.h: Modified to reflect
2296         changes made to camel-imap-store.c
2297
2298         * providers/imap/camel-imap-folder.c: Wrote the first of many
2299         methods: camel_imap_init(), imap_open(), imap_expunge(), 
2300         imap_get_message_count(), and imap_get_subfolder_names()
2301
2302 2000-05-26  Dan Winship  <danw@helixcode.com>
2303
2304         * camel-multipart.c (camel_multipart_init): Don't set a default
2305         boundary. Require the caller to do that.
2306         (set_boundary): if boundary is NULL, generate a "random" boundary.
2307
2308         * camel-mime-part-utils.c
2309         (camel_mime_part_construct_content_from_parser): Add a call to
2310         camel_multipart_set_boundary after creating a new multipart.
2311
2312 2000-05-25  Jeffrey Stedfast  <fejj@helixcode.com>
2313
2314         * providers/imap/camel-imap-store.c (try_connect): Removed
2315         Exception code - Pop doesn't seem to set exceptions
2316
2317         * providers/imap/camel-imap-folder.c: Initial code, mostly
2318         just a template for future code
2319
2320         * providers/imap/imap.[c,h]: Source code from my personal
2321         mailer - for reference only!
2322
2323 2000-05-25  NotZed  <NotZed@HelixCode.com>
2324
2325         * camel-mime-part-utils.c
2326         (camel_mime_part_construct_content_from_parser): Replace simple
2327         data wrapper here too, oops.
2328
2329         * Makefile.am (libcamel_la_SOURCES): Removed
2330         camel-simple-data-wrapper again.  Less code to maintain == better
2331         code.
2332         
2333         * camel-data-wrapper.c (construct_from_stream): Fixes for bug
2334         where text attachments dont work.  Made data-wrapper concrete for
2335         the second time.
2336
2337 2000-05-23  NotZed  <NotZed@HelixCode.com>
2338
2339         * providers/vee/camel-vee-folder.c (vee_folder_build_folder):
2340         Update the vfolder details for a single folder.
2341
2342 2000-05-25  Jeffrey Stedfast  <fejj@helixcode.com>
2343
2344         * providers/smtp/camel-smtp-transport.c (_send_to): Took out code
2345         that had been there to reconnect to the server if it was not
2346         already connected - Mailer code was fixed so that this should not
2347         be needed.
2348
2349         * providers/imap/camel-imap-store.[c,h]: Initial code.
2350
2351 2000-05-24  Dan Winship  <danw@helixcode.com>
2352
2353         * camel.h: Re-add camel-simple-data-wrapper.h, which was removed
2354         for some reason.
2355
2356 2000-05-24  Jeffrey Stedfast  <fejj@helixcode.com>
2357
2358         * providers/smtp/camel-smtp-transport.[c,h]: Moved global
2359         variables into struct CamelSmtpTransport to make SMTP
2360         thread-safe
2361
2362         * providers/imap/camel-imap-*.h: Stolen from Mbox. Rough structure
2363         for Imap.
2364         
2365 2000-05-23  Jeffrey Stedfast  <fejj@helixcode.com>
2366
2367         * providers/imap: Added some initial code to the camel tree
2368         for IMAPv4
2369
2370         * providers/imap/.cvsignore: Added to repository
2371
2372         * providers/smtp/camel-smtp-transport.c: Added debug fprintf's
2373         so that testers can provide more information. Tested with simple
2374         messages and a reply to the hello@helixcode.com default message
2375         but should really be tested more.
2376         (smtp_data): Fixed to use data_wrapper_write_to_stream.
2377
2378         * camel-mime-filter-smtp.c (filter): Modified to escape all lines
2379         beginning with a '.' and to place a \r before each \n if one did
2380         not previously exist. Removed code to escape "From " as it was
2381         found to not be needed for SMTP.
2382
2383 2000-05-22  Jeffrey Stedfast  <fejj@helixcode.com>
2384
2385         * providers/smtp/camel-smtp-transport.c (smtp_data): Fixed the 
2386         filtered stream. Fixes for stream changes, updated to use 
2387         camel-mime-filter-smtp.
2388
2389         * Makefile.am: Added camel-mime-filter-smtp.c
2390         
2391         * camel-mime-filter-smtp.[c,h]: Added to camel tree
2392         Smtp filter used to change \n into \r\n, escape lone dots,
2393         and escape "From "'s.
2394
2395 2000-05-19  NotZed  <NotZed@HelixCode.com>
2396
2397         * camel-simple-data-wrapper.c (construct_from_stream): If we
2398         already have been constructed, unref our content.
2399         (write_to_stream): Check we've been constructued, and change for
2400         stream api changes.
2401
2402         * camel-mime-parser.c: Removed exception stuff.
2403
2404         * md5-utils.c (md5_get_digest_from_stream): repaired.
2405
2406         * camel-mime-message.c: Remove exception from write_to_stream, and
2407         fix, and fix formatting.
2408
2409         * providers/sendmail/camel-sendmail-transport.c (_send_internal):
2410         Fix for stream changes.
2411
2412         * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fixes
2413         for stream changes.
2414
2415         * providers/mbox/camel-mbox-folder.c, and elsewhere, fix all
2416         stream api changes.
2417         (mbox_append_message): Use stream_close() now its back.
2418         (mbox_append_message): unref the from filter.
2419
2420         * camel-stream-mem.c: And here.
2421
2422         * camel-stream-fs.[ch]: Here too.
2423
2424         * camel-stream-filter.c: Likewise.  This is getting tedious.
2425
2426         * camel-stream-buffer.c (stream_write): Fix a few little problems.
2427         (stream_close): Reimplement.
2428         (camel_stream_buffer_read_line): Slightly more efficient version,
2429         that also only allocates the right amount of memory for strings.
2430
2431         * camel-seekable-substream.c: Likewise.
2432
2433         * camel-seekable-stream.[ch]: Remove exceptions, fix formatting,
2434         changes for stream (re)fixes.  set_bounds returns an error.
2435
2436         * camel-stream.[ch]: Remove exceptions.  Make flush and reset return
2437         an error code, repair all the screwed up formatting, and put back
2438         close.
2439
2440         * camel-mime-part-utils.c
2441         (camel_mime_part_construct_content_from_parser): And here.
2442
2443         * camel-mime-part.c (camel_mime_part_set_content): And this too.
2444         (write_to_stream): Fixed for stream changes.
2445
2446         * camel.h: Fixed.
2447
2448         * providers/vee/camel-vee-folder.c (vee_search_by_expression):
2449         Implement.  Performs an intersection of the two searches.
2450         (camel_vee_folder_finalise): Unref search folders.
2451         (vee_append_message): Implement append.
2452
2453 2000-05-18  Dan Winship  <danw@helixcode.com>
2454
2455         * camel-folder.c: remove message_number_capability and require uid
2456         capatibility.
2457         (camel_folder_list_subfolders, camel_folder_get_uid_list,
2458         camel_folder_get_subfolder_info, camel_folder_get_message_info):
2459         removed
2460         (camel_folder_get_subfolder_names,
2461         camel_folder_free_subfolder_names): new subfolder interfaces.
2462         (camel_folder_get_uids, camel_folder_free_uids): new uid
2463         interfaces
2464         (camel_folder_get_summary, camel_folder_free_summary): new summary
2465         interfaces
2466
2467         * providers/mbox/camel-mbox-folder.c,
2468         * providers/nntp/camel-nntp-folder.c:
2469         * providers/vee/camel-vee-folder.c: Update for changes
2470
2471         * providers/pop3/camel-pop3-folder.c: Implement get_uids, update
2472         for other changes.
2473
2474 2000-05-18  NotZed  <NotZed@HelixCode.com>
2475
2476         * providers/vee/camel-vee-folder.c: Guess!
2477
2478         * camel-folder-search.c (search_user_flag): Implement user_flag
2479         search term.
2480
2481         * camel-folder-search.h: Added user_flag search capability
2482         (user-flag "blah")
2483
2484         * providers/mbox/camel-mbox-folder.c (mbox_init): Set USER flag in
2485         permanent flags for the folder.
2486
2487 2000-05-17  Dan Winship  <danw@helixcode.com>
2488
2489         * camel-folder.c: Remove unused async open/close and
2490         copy_message_to functions.
2491         Rename functions without initial _. Fix glib preconditions and
2492         gtk-doc comments.
2493
2494 2000-05-17  Dan Winship  <danw@helixcode.com>
2495
2496         * camel-data-wrapper.c: remove get/set_output_stream operations.
2497         They're redundant with write_to_stream, and CamelMimePart and
2498         CamelMimeMessage only implement the latter, meaning that trying to
2499         get_output_stream on a CamelMimeMessage that was built from pieces
2500         rather than being parsed from a stream doesn't work. Anything that
2501         uses get_output_stream can be rewritten to use write_to_stream, so
2502         we'll standardize on that.
2503         (camel_data_wrapper_new): remove this: CamelDataWrapper is
2504         supposed to be an abstract class.
2505         (write_to_stream): remove default implementation. (Moved to
2506         CamelSimpleDataWrapper)
2507         
2508         * camel-simple-data-wrapper.c: resurrect, although it's not really
2509         the same thing it was before. A simple data wrapper, which is
2510         backed by a CamelStream.
2511
2512         * camel-mime-part-utils.c
2513         (simple_data_wrapper_construct_from_parser): Use
2514         construct_from_stream rather than set_output_stream.
2515         (camel_mime_part_construct_content_from_parser): Change
2516         camel_data_wrapper_new to camel_simple_data_wrapper_new.
2517
2518         * camel-mime-part.c (camel_mime_part_set_content): Change
2519         camel_data_wrapper_new to camel_simple_data_wrapper_new.
2520         
2521
2522 2000-05-17  Darin Adler  <darin@eazel.com>
2523
2524         * camel-folder-summary.c: (message_info_load):
2525         Quick fix to get it to compile. I hope I don't get into trouble.
2526
2527 2000-05-17  Dan Winship  <danw@helixcode.com>
2528
2529         * camel.h: Don't include the no-longer-distributed
2530         possibly-to-be-removed headers.
2531
2532         * providers/smtp/camel-smtp-transport.c
2533         (smtp_get_email_addr_from_text): fix an off-by-one error in
2534         address parsing
2535         (smtp_data): use camel_data_wrapper_get_output_stream rather than
2536         data_wrapper->output_stream
2537
2538 2000-05-17  NotZed  <NotZed@HelixCode.com>
2539
2540         * providers/mbox/camel-mbox-folder.c (message_changed): Snoop
2541         changes to user flags on the message into the summary as well.
2542
2543         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_init):
2544         Changed version init to include the parent class version info
2545         (i.e. add it not overwrite it).
2546
2547         * camel-folder-summary.c (message_info_new): Initialise user_flags
2548         to empty.
2549         (message_info_load): And load user flags.
2550         (message_info_save): And save user flags.
2551         (message_info_free): And free them.
2552         (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
2553
2554         * camel-folder-summary.h: Added user-flags to summary.
2555
2556         * camel-mime-message.c (camel_mime_message_set_user_flag): Dont
2557         use a hashtable for user flags.
2558         (camel_mime_message_get_user_flag): And changed here too.
2559         (camel_flag_get): New interface to get a flag from a flag
2560         list.  Flag lists are easier to work with than hash tables, and
2561         save memory too.
2562         (camel_flag_set): And set.
2563         (camel_flag_list_free): And free.
2564         (free_key_only): Discard.
2565         (finalize): Remove the flag list.
2566
2567 2000-05-17  Jeffrey Stedfast  <fejj@stampede.org>
2568
2569         * providers/smtp/camel-smtp-transport.c: (smtp_helo): Error
2570         checking on gethostbyaddr() eliminating a possible segfault.
2571
2572 2000-05-16  NotZed  <NotZed@HelixCode.com>
2573
2574         * providers/mbox/camel-mbox-folder.c (mbox_delete_message_by_uid):
2575         Implement.
2576
2577 2000-05-12  NotZed  <NotZed@HelixCode.com>
2578
2579         * camel-movemail.c (camel_movemail): Open the destination with
2580         O_APPEND, so we dont blow away a partially transferred mbox.
2581         (camel_movemail): Loop if we get errno=INTR, and not fail.
2582
2583 2000-05-11  NotZed  <NotZed@HelixCode.com>
2584
2585         * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
2586         the summarised file size, if everything went ok.
2587         (camel_mbox_summary_expunge): Clear header flags after updating.
2588
2589 2000-05-16  Chris Toshok  <toshok@helixcode.com>
2590
2591         * providers/nntp/camel-nntp-folder.c:
2592         * providers/nntp/camel-nntp-folder.h:
2593         * providers/nntp/camel-nntp-provider.c: 
2594         * providers/nntp/camel-nntp-store.c: 
2595         * providers/nntp/camel-nntp-utils.c: 
2596         * providers/nntp/camel-nntp-utils.h: 
2597         get things working with new camel summary stuff.
2598
2599         * providers/nntp/camel-nntp-summary.c: 
2600         * providers/nntp/camel-nntp-summary.h: 
2601         removed files since camel-folder-summary does all we need.
2602
2603 2000-05-15  Jeffrey Stedfast  <fejj@stampede.org>
2604
2605         * providers/smtp/camel-smtp-transport.c: Added some preliminary
2606         AUTH support.
2607
2608 2000-05-15  Dan Winship  <danw@helixcode.com>
2609
2610         * camel-folder.h: Remove camel_folder_get_summary, which no longer
2611         exists.
2612
2613 2000-05-11  Dan Winship  <danw@helixcode.com>
2614
2615         * Makefile.am: remove some cruft that we're not currently using.
2616
2617         * camel-stream-mem.c (camel_stream_mem_new_with_buffer): Change
2618         to match prototype (size_t vs unsigned int) so it works on 64-bit
2619         machines. Noted by msw.
2620
2621 2000-05-11  NotZed  <NotZed@HelixCode.com>
2622
2623         * providers/mbox/camel-mbox-folder.c (message_changed): Indicate
2624         the summary changed also.
2625
2626 2000-05-11  Jeffrey Stedfast  <fejj@stampede.org>
2627
2628         * providers/smtp/camel-smtp-transport.c: (smtp_helo): 
2629         Updated to more closely comply with RFC 821 standards
2630
2631 2000-05-11  NotZed  <NotZed@HelixCode.com>
2632
2633         * camel-mime-part.c (write_to_stream): Unref the filter after
2634         adding it to the filtering stream.
2635
2636         * providers/mbox/camel-mbox-summary.c
2637         (camel_mbox_summary_finalise): Free the folder path.
2638         (camel_mbox_summary_update): Also save summary when done.
2639         (camel_mbox_summary_expunge): Unindex items when deleting them.
2640         (camel_mbox_summary_expunge): Save the index as well as the
2641         summary.
2642
2643         * camel-folder-summary.c (camel_folder_summary_finalise): Free the
2644         summary path.
2645         (camel_folder_summary_touch): New function, indicate the summary
2646         info changed.
2647         (camel_folder_summary_remove): Dirty here.
2648
2649         * camel-internet-address.c (internet_decode): Free multiple entry
2650         addresses properly.
2651
2652         * camel-mime-utils.c (header_decode_mailbox): Plugged another
2653         memleak, free text after converting it.
2654         (header_decode_addrspec): More leaks plugged.
2655
2656         * camel-mime-message.c (finalize): Free message_uid.
2657         (finalize): Free the recipients hashtable.
2658
2659 2000-05-11    <notzed@helixcode.com>
2660
2661         * camel-folder-summary.c (camel_folder_summary_finalise): Free
2662         summary items and charset filters.
2663
2664 2000-05-10    <notzed@helixcode.com>
2665
2666         * camel-folder-summary.c (camel_folder_summary_finalise): Don't
2667         free stuff in p, after we've free'd p.
2668
2669         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Unref
2670         the stream we created for appending.
2671
2672 2000-05-10  Jeffrey Stedfast  <fejj@stampede.org>
2673
2674         * providers/smtp/camel-smtp-transport.c: (camel_smtp_transport_class_init):
2675         Added initialization for service_class
2676
2677 2000-05-10  Dan Winship  <danw@helixcode.com>
2678
2679         * camel-multipart.c (write_to_stream): fix a stupid typo. Thank
2680         you, C.
2681
2682         * camel-mime-part.c (write_to_stream): don't ref the stream before
2683         wrapper a filter around it, since nothing will ever unref it.
2684
2685 2000-05-10  Christopher James Lahey  <clahey@helixcode.com>
2686
2687         * Makefile.am: Added camel-types.h, camel-folder-pt-proxy.h, and
2688         camel-thread-proxy.h.
2689
2690 2000-05-09  Dan Winship  <danw@helixcode.com>
2691
2692         * providers/sendmail/camel-sendmail-transport.c (_send_internal):
2693         Bleah. Can't fsync a pipe. As a quick kludge, just don't
2694         stream_flush it. The right fix will require bringing back
2695         stream_close though.
2696
2697 2000-05-09  Jeffrey Stedfast  <fejj@stampede.org>
2698         * camel-internet-address.[c,h]: Undid my changes (moved
2699         struct _address back into came-internet-address.c)
2700         * providers/smtp/camel-smtp-transport.c: (_send): changed
2701         from using it's own address manipulation (using struct _address)
2702         to using camel_internet_address_get(). Also some format changes
2703         to keep consistant with the rest of Camel
2704
2705 2000-05-09  Jeffrey Stedfast  <fejj@stampede.org>
2706
2707         * camel-internet-address.[c,h]: Moved struct _address from
2708         camel-internet-address.c to camel-internet-address.h
2709         (hopefully this doesn't break anything...)
2710         * providers/smtp/camel-smtp-transport.c: (_send): now
2711         populates the recipient list with To, Cc, and Bcc addresses.
2712         Should now be able to use this module.
2713
2714 2000-05-09  Dan Winship  <danw@helixcode.com>
2715
2716         * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
2717         one more refcounting fix I missed before.
2718
2719 2000-05-08  Jeffrey Stedfast  <fejj@stampede.org>
2720
2721         * providers/smtp/camel-smtp-transport.c: no longer frees memory it
2722         shouldn't, updated to reflect camel-stream changes involving
2723         CamelException (perhaps it should use a different CamelException
2724         variable than is passed to the camel smtp module?)
2725
2726 2000-05-08  Dan Winship  <danw@helixcode.com>
2727
2728         * camel-stream.c (camel_stream_read, camel_stream_write,
2729         camel_stream_flush, camel_stream_reset, camel_stream_printf,
2730         camel_stream_write_to_stream): Use CamelException to signal
2731         failure.
2732         (camel_stream_write_strings): Remove. camel_stream_printf is more
2733         useful in most of the places that used this.
2734         (camel_stream_write_string): Change from macro to function to
2735         prevent problems with double-evaluation.
2736
2737         * camel-seekable-stream.c (camel_seekable_stream_seek,
2738         camel_seekable_stream_set_bounds): Use CamelException.
2739         (reset): Update.
2740
2741         * camel-seekable-substream.c, camel-stream-buffer.c,
2742         camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c:
2743         Update.
2744
2745         * camel-stream-fs.c: Remove the virtual init functions and move
2746         the code into the creator functions. Add CamelExceptions to
2747         creation functions that could fail.
2748
2749         * camel-data-wrapper.c (camel_data_wrapper_write_to_stream): Use
2750         CamelException.
2751         * camel-mime-message.c, camel-mime-part.c, camel-multipart.c
2752         (write_to_stream): Update.
2753
2754         * camel-mime-parser.c: add an exception to the mime parser private
2755         data and pass that to stream functions as needed.
2756         
2757         * gmime-content-field.c, md5-utils.c: Update (badly) for stream
2758         changes.
2759         
2760         * camel-exception.h (camel_exception_is_set): convenience macro.
2761
2762         * providers/Makefile.am: disable SMTP for now
2763
2764         * providers/mbox/camel-mbox-folder.c (mbox_append_message): Pass
2765         CamelException to the functions that now need it. Check the
2766         exception after calling camel_stream_flush, and fail if it fails.
2767         (mbox_get_message_by_uid): More updates.
2768
2769         * providers/pop/camel-pop3-folder.c,
2770         providers/pop/camel-pop3-store.c,
2771         providers/sendmail/camel-sendmail/transport.c: Update.
2772
2773
2774 2000-05-08  NotZed  <NotZed@HelixCode.com>
2775
2776         * camel-mime-message.c (process_header): Format From and Reply-To
2777         to at least a decoded string.  Should probably store them as an
2778         camelinternetaddress.
2779
2780         * Merged NEW_SUMMARY branch back to trunk, and resolved conflicts.
2781         
2782         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
2783         Return status.
2784         (camel_mbox_summary_expunge): Force an update of the summary
2785         before we do anything.
2786         (camel_mbox_summary_expunge): Build new xev line in xevnew, and
2787         free that, and consify xev.
2788         (camel_mbox_summary_load): If we are rebuilding from scratch, make
2789         sure we clear the summary content.
2790
2791         * camel-stream-filter.c (do_close): We NEED a stream close.
2792
2793 2000-05-07  Dan Winship  <danw@helixcode.com>
2794
2795         Make camel not leak like a sieve.
2796
2797         * camel-object.c: New subclass of GtkObject which is now the base
2798         of the Camel object hierarchy. Currently the only difference
2799         between CamelObject and GtkObject is that CamelObjects don't start
2800         out floating.
2801
2802         * *.h: Move a bunch of typedefs to camel-types.h. Standardize on
2803         using <camel/foo.h> in header files rather than <foo.h>, "foo.h",
2804         or "camel/foo.h". Remove some unneeded includes.
2805
2806         * camel-address.c, camel-data-wrapper.c, camel-folder-search.c,
2807         camel-folder-summary.c, camel-folder.c, camel-mime-filter.c,
2808         camel-mime-parser.c, camel-service.c, camel-session.c,
2809         camel-stream.c: These are now subclasses of CamelObject.
2810
2811         * camel-data-wrapper.c (set_output_stream):
2812         * camel-medium.c (set_content_object):
2813         * camel-seekable-substream.c
2814         (init_with_seekable_stream_and_bounds):
2815         * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid): 
2816         remove gtk_object_sink calls.
2817
2818         * camel-stream-buffer.c (init_vbuf): 
2819         * camel-stream-filter.c (camel_stream_filter_new_with_stream):
2820         ref the original stream.
2821
2822         * camel-folder-summary.c (camel_folder_summary_finalise): unref
2823         the filters when finalizing.
2824
2825         * camel-mime-part-utils.c
2826         (simple_data_wrapper_construct_from_parser,
2827         camel_mime_part_construct_content_from_parser):
2828         * camel-mime-part.c (camel_mime_part_set_content): Unref objects
2829         that are created only to be handed off to other objects. If
2830         they're going to be needed later, they will have been additionally
2831         ref'ed by the object that needs them.
2832
2833         * providers/pop3/camel-pop3-folder.c (get_message_by_number):
2834         unref the message stream after creating the data from it.
2835
2836         * camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c,
2837         camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close,
2838         since its semantics are dubious (what happens when you close a
2839         stream other people still have references on?).
2840
2841         * providers/nntp/camel-nntp-store.c:
2842         * providers/smtp/camel-smtp-transport.c:
2843         * providers/pop3/camel-pop3-store.c:
2844         replace camel_stream_close calls with gtk_object_unref.
2845
2846         * providers/mbox/camel-mbox-folder.c:
2847         * providers/nntp/camel-nntp-folder.c:
2848         * providers/sendmail/camel-sendmail-transport.c:
2849         replace camel_stream_close with camel_stream_flush +
2850         gtk_object_unref
2851
2852 2000-05-06  Dan Winship  <danw@helixcode.com>
2853
2854         * providers/pop3/camel-pop3-store.c (query_auth_types): A machine
2855         which serves neither POP nor KPOP is not a POP server.
2856
2857         * providers/smtp/camel-smtp-provider.c: Note in the description
2858         that this provider is not yet tested.
2859
2860 2000-05-08    <notzed@helixcode.com>
2861
2862         * camel-mime-part.c (write_to_stream): Free the filter stream when
2863         done.
2864
2865         * camel-mime-parser.c (folder_seek): Make sure we add the \n
2866         terminal when we seek as well (frob!).
2867
2868         * camel-mime-utils.c (header_decode_addrspec): Plug minor memleak.
2869
2870         * camel-mime-part.c (finalize): Free header tables once finished.
2871
2872         * camel-folder-summary.c (camel_folder_summary_remove): Dont try
2873         to access info after its free'd.
2874
2875 2000-05-07  NotZed  <NotZed@HelixCode.com>
2876
2877         * camel-mime-part.c (write_to_stream): Apply encoding to content
2878         part, when writing to a stream *sigh*.
2879
2880         * camel-stream-filter.c (do_write): implement write for the
2881         filtering stream.  Writes shouldn't be mixed with reads.
2882         (do_flush): Implemented flush.  Again write/flush shouldn't be
2883         mixed with reads.  Only flushes if the last op was write.
2884         (do_close): Force flush on close.
2885
2886         * camel-mime-filter.c (filter_run): Oops, make sure we include the
2887         backlen in the total length before passing onto the filter.
2888
2889         * camel-mime-filter-from.c: New filter, munges 'From ' lines into
2890         '>From ', for mbox.
2891
2892         * camel-mime-parser.c (camel_mime_parser_header_remove): New
2893         function to remove the parser's raw header, rather than
2894         manipulating the header directly (wich doesn't work with
2895         mempools).
2896
2897         * camel-mime-utils.c (header_address_list_clear): Fixed some
2898         broken(tm) logic, which would leak entries on multivalued lists.
2899
2900         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
2901         Use ibex_save() to save the ibex.  Makes a big difference to
2902         startup times for very large mailboxes.
2903         (camel_mbox_summary_expunge): Dum de dum, reimplemented.  Designed
2904         to be much more robust, and to stop immediately if anything awry
2905         happens.
2906         (copy_block): Utility function to copy n bytes from one fd to
2907         another.
2908         (header_write): Utility function to write out raw headers to an
2909         fd.
2910         (camel_mbox_summary_update): Incremental summary updater.
2911
2912         * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
2913         Dont unref the stream, because of the broken(tm) ref model of gtk
2914         widget that for some odd reason is being perpetuated in camel.  
2915         (mbox_expunge): Reenable expunge again.
2916         (mbox_append_message): Removed the optimised mbox append.  If its
2917         an issue, it can go back later.  Cleaned up a lot, checks error
2918         returns, and automagically translates 'From ' into '>From' as
2919         necessary.
2920
2921 2000-05-07    <notzed@helixcode.com>
2922
2923         * camel-mime-filter.c (filter_run): Oops, forgot to add the
2924         backlen to the pre-buffer (*poof*).
2925
2926 2000-05-07  NotZed  <NotZed@HelixCode.com>
2927
2928         * camel-mime-message.c (construct_from_parser): Allow
2929         HSCAN_FROM_END to terminate the processing of a message.
2930
2931         * camel-folder-summary.c (perform_content_info_load): Ick, dont
2932         try and append a node onto its own list.
2933         (camel_folder_summary_clear): Actually clear the indexes after
2934         we've removed the messages.
2935         (camel_folder_summary_clear): Set dirty if it changes.
2936         (camel_folder_summary_load): Clear dirty.
2937         (camel_folder_summary_save): Only save if dirty.
2938
2939         * providers/mbox/camel-mbox-summary.c (summary_header_load): Oops,
2940         remember to call that parent class first ...
2941         (summary_header_save): Here too.
2942         (camel_mbox_summary_load): Do more checking to verify the index
2943         contents as well as teh summary contents, against the mbox
2944         contents.
2945         (camel_mbox_summary_load): Removed some fo that checking, it needs
2946         more code to work reliably.
2947
2948 2000-05-07    <notzed@helixcode.com>
2949
2950         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
2951         Set the size and mtime of the mbox we indexed once done.
2952
2953         * camel-folder-summary.c (camel_folder_summary_set_index): Dont
2954         write the index if it changes - let the claler fix it (uh, kind of
2955         impacts performance).
2956         (camel_folder_summary_load): close in.
2957
2958         * camel-folder-summary.c (summary_format_string): Check header
2959         exists before trying to strip its leading spaces.
2960
2961 2000-05-06  NotZed  <NotZed@HelixCode.com>
2962
2963         * camel-folder.h: Removed summary info from here, and include
2964         camel-folder-summary.h as well.
2965         
2966         * camel-mime-parser.c (camel_mime_parser_step): Allow it to accept
2967         a NULL databuffer.
2968
2969         * providers/mbox/camel-mbox-summary.c: Totally new file, now
2970         subclasses camel-folder-summary.
2971
2972         * camel-folder-summary.c (message_info_load): Load the uid as a
2973         string.
2974         (message_info_save): And save too.
2975         (camel_folder_summary_clear): New function, clears the contents of
2976         the summary.
2977
2978         * providers/mbox/camel-mbox-folder.c: Fixes for summary changes.
2979         (mbox_get_message_by_uid): Completely redone.  Now cross-checks
2980         the summary information to make sure we get a real message.
2981         (mbox_append_message): Disabled the copy version of append for
2982         now.
2983         (mbox_expunge): Temporarily disabled the expunge function, until
2984         it is put back in camel-mbox-summary.c
2985
2986 2000-05-05  NotZed  <NotZed@HelixCode.com>
2987
2988         * camel-folder-summary.c: And same here ...
2989         (camel_folder_summary_encode_fixed_int32): Ugh, fwrite doesn't
2990         return -1 on error ..
2991         (camel_folder_summary_decode_fixed_int32): Neither deos fread.
2992         (camel_folder_summary_encode_token): Fix here too.
2993         (summary_build_content_info): Use start-headers to get the pos of
2994         the message, not parser_tell(), which might not be what we
2995         expected because of parser_unstep().
2996         (camel_folder_summary_encode_token): Use bserch() to tokenise the
2997         values, rather than a linear search.
2998
2999         * camel-mime-utils.c: Defined out some memory profiling stuff I
3000         left there by mistake.
3001         (header_decode_mailbox): Dont try to append the word part of a
3002         local address if we ran out of words.
3003
3004         * camel-mime-parser.c (folder_scan_content): Apply the fix from
3005         the header scanner to here too.
3006         (folder_scan_header): Only check for end of header if we have
3007         space for it (didn't end the read with a newline)
3008         (folder_scan_header): inptr is the only real thing we need
3009         registerised for performance.  Try to help the compiler be smart
3010         about it ..
3011         (folder_scan_header): Simplified the save header case a tad.
3012
3013         Commented out some memory profiling stuff.
3014
3015 2000-05-05    <notzed@helixcode.com>
3016
3017         * camel-mime-utils.c (header_decode_mailbox): Plug a memory leak.
3018         (header_decode_text): Fixed memory leaks with g_string_append().
3019         (header_encode_string): And here too, and a few other places.  The
3020         glib api is so awful ...
3021         (header_content_type_decode): More memory leaks.
3022
3023 2000-05-05    <notzed@helixcode.com>
3024
3025         * camel-mime-parser.c (folder_scan_init_with_fd): Make sure we
3026         init the end of buffer sentinal!
3027         (folder_scan_init_with_stream): And here too ...
3028
3029 2000-05-04  NotZed  <NotZed@HelixCode.com>
3030
3031         * providers/mbox/camel-mbox-folder.c (summary_get_message_info):
3032         Maxcount is minimum of the max and the requested count, not the
3033         maximum :)
3034
3035         * camel-mime-parser.c (folder_scan_content): Properly set midline,
3036         so we dont falsely catch offset boundary markers (i.e. From inside
3037         content).
3038         (folder_read): Set a sentinal on the end of the read data (\n) so
3039         we dont have to check the buffer boundary in the inner loop.
3040         (mempool_*): New experimental memory management routines, speed
3041         up simple structure parsing by about 25% ... not compiled in by
3042         default.  Something similar may be needed for camel-mime-utils to
3043         address performance issues with g_malloc and friends.
3044
3045         * camel-mime-utils.c: Added a macro w(x) used to wrap all warnings
3046         about mime/rfc violations, so they can be turned off.
3047
3048         * camel-folder-summary.c (summary_build_content_info): Step after
3049         the end of a message ...
3050         Turn into a stand-alone program for testing and profiling.
3051
3052 2000-05-04  Dan Winship  <danw@helixcode.com>
3053
3054         * providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall
3055         back to plaintext passwords if APOP fails, since it should also
3056         fail.
3057
3058 2000-05-04  Dan Winship  <danw@helixcode.com>
3059
3060         * camel-session.c (camel_session_list_providers): New function to
3061         replace camel_provider_scan. Returns a list of either (a) all
3062         currently-loaded providers, or (b) all available providers.
3063
3064         * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that
3065         it contains only a protocol).
3066
3067         * camel-service.c (camel_service_query_auth_types): Make this take
3068         a CamelException (since it may have to try to connect to the
3069         server, and it might not able to.)
3070
3071         * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP)
3072         support. This is mostly so I have two kinds of authmech to play
3073         with instead of just one. (But it does actually work.)
3074
3075         * providers/smtp/camel-smtp-transport.c (query_auth_types): update
3076         for prototype change, but disable the functionality, since it
3077         doesn't really support any auth types yet.
3078         (camel_smtp_transport_get_type): add an object init function to
3079         set the service url_flags.
3080
3081 2000-05-04  NotZed  <NotZed@HelixCode.com>
3082
3083         * providers/mbox/camel-mbox-summary.c: Yes, and anotherone.
3084
3085         * camel-mime-utils.c: And another one.
3086
3087         * camel-mime-part.c: And another one.
3088
3089         * camel-mime-part-utils.c: And another one.
3090
3091         * camel-folder-search.c: And another one.
3092
3093         * camel-mime-parser.c: Reverted a change wihtout a ChangeLog entry.
3094
3095 2000-05-04  NotZed  <NotZed@HelixCode.com>
3096
3097         * camel-folder-summary.[hc]: Yes, CamelFolderSummary is back ...
3098         ... re-usable class to summarise and index any stream or message
3099         and to manage/load/save the created summaries.
3100         
3101         * camel-folder.c: Include string.h to kill a warning.
3102
3103 2000-05-03  Jason Leach  <leach@wam.umd.edu>
3104
3105         * Makefile.am (INCLUDES): add $(UNICODE_CFLAGS) to the INCLUDES,
3106         people who installed libunicde in non-standard include paths need
3107         this.
3108
3109 2000-05-03  NotZed  <NotZed@HelixCode.com>
3110
3111         * camel-folder.h: Added pos/bodypos/endpos to the basic message
3112         content info object.  Size to be removed?  Moved the
3113         messageconentinfo and messageinfo back to camel-folder-summary.h.
3114
3115         * camel-mime-filter-index.c (camel_mime_filter_index_set_ibex):
3116         New function to (re)set the index to use on a filter.
3117
3118         * camel-mime-parser.c (camel_mime_parser_scan_from): Whole bunch
3119         of inline docs.
3120         (camel_mime_parser_drop_step): New function to drop a state from
3121         the parser.  Needs more testing.
3122
3123         * camel-mime-utils.c (rfc2047_decode_word): If the iconv handle is
3124         -1, then dont try and convert (crashes unicode_iconv?).
3125         (rfc2047_decode_word): Use alloca for variables instead of
3126         g_malloc - by the rfc they should always be short.
3127         (rfc2047_decode_word): If we can't do the charset conversion, undo
3128         the quoted-printable/base64 at least?  Should probably convert
3129         unknown characters to the utf-8 unknown character.
3130
3131 2000-05-02  Larry Ewing  <lewing@helixcode.com>
3132
3133         * camel-mime-utils.c (header_decode_date): fix typo when
3134         dereferencing saveoffset.
3135
3136 2000-05-02  NotZed  <NotZed@HelixCode.com>
3137
3138         * camel-folder-search.c: Added some header doco.
3139
3140         * camel.h: REmove gmime-utils.h from here.
3141
3142         * providers/mbox/camel-mbox-search.[ch]: Removed.  Functionally
3143         redundant.
3144
3145         * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
3146         Use the new CamelFolderSearch class to do the actual searching,
3147         just setup the search here.
3148
3149         * camel-folder-search.[ch]: A helper class that providers may
3150         subclass to provide their own search functionality, or they can
3151         simply use as is, it supports body searches if an ibex is
3152         supplied, and header searches if a summary is supplied.
3153
3154 2000-05-02  Matt Loper  <matt@helixcode.com>
3155
3156         * Makefile.am: set G_LOG_DOMAIN.
3157         * providers/MH/Makefile.am: same.
3158         * providers/maildir/Makefile.am: same.
3159         * providers/mbox/Makefile.am: same.
3160         * providers/nntp/Makefile.am: same.
3161         * providers/pop3/Makefile.am: same.
3162         * providers/sendmail/Makefile.am: same. 
3163         * providers/smtp/Makefile.am: same.             
3164
3165 2000-05-02  NotZed  <NotZed@HelixCode.com>
3166
3167         * providers/mbox/camel-mbox-search.c
3168         (camel_mbox_folder_search_by_expression): Dont store/remove
3169         current search from the search list.
3170         
3171         * providers/mbox/camel-mbox-folder.h: Removed searches list,
3172         searches are all sync now.
3173
3174         * gmime-utils.[ch]: What the hell, remove it.  This will break the
3175         nntp provider.  The mime parser can be used instead though.
3176         Removed from all code including it (but none were using it).
3177
3178         * gmime-utils.c (_store_header_pair_from_string): Removed bizarre
3179         string_dichotomy version of this.  This code is somewhat redundant
3180         now, and is headed for death anyway.
3181
3182         * gstring-util.c (g_string_dichotomy): Same with this one.
3183         (g_string_clone): Removed a memory leak, g_string_new() allocates
3184         its own memory.
3185         (g_string_append_g_string): Allow to append an empty gstring onto
3186         another gstring, dont abort()!
3187
3188         * string-utils.c (string_dichotomy): Removed this incredibly weird
3189         function.
3190
3191         * camel-folder.c (_create): Replaced the rather obtuse use of
3192         "string_dichotomy" function with a simple strrchr().  Still not
3193         sure it'll work.
3194
3195         * camel-folder-summary.c: cvs removed a long-removed file.
3196
3197         * camel-mime-parser.c (folder_scan_header): Fix the previous
3198         overflow problem properly (can happen in 2 places).
3199         (header_append): A new macro to include the code changed above, so
3200         it only appears in one place.
3201         (folder_scan_step): Change the content type to text/plain if the
3202         multipart is broken.  Doesn't actually change the header though.
3203         (header_append): Also move the header-start tracking stuff here.
3204         Could be a static function to save code.
3205
3206 2000-05-02    <notzed@helixcode.com>
3207
3208         * camel-mime-part-utils.c
3209         (simple_data_wrapper_construct_from_parser): Dont use autofill on
3210         these fucking long function anmes!!!!!!
3211
3212 2000-05-02  NotZed  <NotZed@HelixCode.com>
3213
3214         * providers/mbox/camel-mbox-summary.c
3215         (camel_mbox_summary_expunge): Fix the offset for the summary when
3216         an item is expunged to take account of the From line.
3217
3218 2000-05-01  NotZed  <NotZed@HelixCode.com>
3219
3220         * providers/mbox/camel-mbox-folder.h (CamelMboxFolder): Removed
3221         search_id.
3222
3223         * providers/mbox/camel-mbox-search.c
3224         (camel_mbox_folder_search_cancel): Remove.d
3225         (camel_mbox_folder_search_complete): Removed.
3226         (camel_mbox_folder_search_by_expression): Changed back to sync
3227         api.
3228         (struct _searchcontext): Removed cancelled flag.
3229         (find_context): Removed.
3230         (func_header_contains): Debug out some search stuff.
3231
3232         * providers/mbox/camel-mbox-search.h
3233         (camel_mbox_folder_search_by_expression): Moved back to sync api.
3234
3235         * providers/mbox/camel-mbox-summary.c
3236         (camel_mbox_summary_set_flags_by_uid): New function to update the
3237         flags in the summary.
3238         (camel_mbox_summary_expunge): Expunge messages from a folder.
3239         (offset_content): Re-align offsets of summary when messages
3240         added/removed to an existing summary.
3241         (camel_mbox_summary_remove_uid): Remove a message summary entry by
3242         uid.
3243         (index_folder): Restore flags from X-Evolution header, if they are set.
3244         (index_folder): Make sure we index using a decimal uid, since
3245         thats what everything else indexes off (oops).
3246         Upped SUMMARY_VERSION as a result.
3247         (camel_mbox_summary_expunge): Oops, my wrong, use the string uid
3248         to unindex on.
3249
3250         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
3251         Connect to the message_changed signal.
3252         (_init): Set permanent flags to something reasonable.  No user
3253         flags yet ...
3254         (message_changed): If the flags of the message change, update the
3255         flags in the summary.
3256         (mbox_expunge): Implement the expunge.
3257         (camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s
3258         (mbox_expunge): Emit a folder_changed signal on expunge (uh, even
3259         if it didn't ...)
3260
3261         * camel-folder.c (_finalize): Uh, dont free permanent_flags
3262         anymore (this wouldn't failed anyway, it was a GList !!!)
3263         (camel_folder_search_complete): Removed.
3264         (camel_folder_search_cancel): Removed.
3265         (camel_folder_expunge): Changed to only allow expunge on an open
3266         folder.  It doesn't make sense for mbox, otherwise (?)
3267         (camel_folder_class_init): Added a folder_changed signal.
3268
3269         * camel-folder.h (struct _CamelFolder): Change permanent_flags to
3270         a bitfield.
3271         (list_permanent_flags): Renamed to get_permanent_flags, and
3272         returns a bitfield.
3273         (camel_folder_expunge): Changed expunge to a void type.  The
3274         messages would no longer be useful after they have been removed
3275         ...
3276         (CamelFolderClass): New function summary_get_by_uid() to get a single
3277         summary.
3278         (*search*): Moved back to synchronous search api ... *sigh*
3279         
3280         * camel-folder.h: Removed CamelSearchFunc.
3281
3282         * camel-mime-message.c (set_flag): Removed.
3283         (camel_mime_message_set_flag): Removed.
3284         (get_flag): Removed.
3285         (camel_mime_message_get_flag): Removed.
3286         (add_flag_to_list): Removed.
3287         (get_flag_list): Removed.
3288         (camel_mime_message_get_flag_list): Removed.
3289         (camel_mime_message_get_flags): New interface to get system flags.
3290         (camel_mime_message_set_flags):  " to set ".
3291         (camel_mime_message_get_user_flag): To get a user flag.
3292         (camel_mime_message_set_user_flag): To set a user flag.
3293         (finalize): Hmm, the old one free'd the key and data, not good
3294         when the data is a boolean ...
3295
3296 2000-04-30  Dan Winship  <danw@helixcode.com>
3297
3298         * camel-provider.h: Tweak the definition of CamelProvider. Among
3299         other things, a provider may now be both a store and a transport.
3300
3301         * camel-provider.c: Remove a lot of code we had no intention of
3302         using. This now only contains two functions: camel_provider_init
3303         to read the installed .urls files, and camel_provider_load to
3304         load and register a new provider.
3305
3306         * camel-session.c: Remove more unused code and simplify some of
3307         the remaining code. The list of available provider modules is now
3308         stored in the session, and it handles calling camel_provider_load
3309         to load them as needed. Provider registration is now done by
3310         calling back from the module init routine, which allows a single
3311         module to register providers for multiple URL types.
3312
3313         * providers/*: Update provider structures and init routines for
3314         the new stuff. Add a .urls file to each provider specifying what
3315         urls it handles, and install that with the library.
3316
3317         * providers/nntp/camel-nntp-provider.c: Add hints towards
3318         supporting both news: and nntp: URLs, and using nntp as both a
3319         store and a transport.
3320
3321 2000-04-29  Dan Winship  <danw@helixcode.com>
3322
3323         * camel-internet-address.c (camel_internet_address_get): const
3324         poison
3325
3326         * camel-mime-part-utils.c
3327         (simple_data_wrapper_construct_from_parser):
3328         camel_mime_parser_tell() returns an offset from where it started
3329         parsing, not necessarily from the start of data. Since we're
3330         parsing a bounded seekable_stream, we need to add the stream's
3331         starting bound to camel_mime_parser_tell's return value to
3332         create the substream in the right place.
3333
3334         * camel-seekable-substream.c
3335         (camel_seekable_substream_new_with_seekable_stream_and_bounds):
3336         say CAMEL_STREAM_UNBOUND rather than -1 in doc.
3337
3338         * camel-seekable-stream.c (camel_seekable_stream_seek): Add more
3339         info to docs.
3340
3341 2000-04-28  Dan Winship  <danw@helixcode.com>
3342
3343         * camel-mime-parser.c (folder_scan_header): fix a bug that would
3344         cause corruption with very long headers.
3345
3346 2000-04-27  Ettore Perazzoli  <ettore@helixcode.com>
3347
3348         * providers/pop3/Makefile.am (INCLUDES): Add `-I$(srcdir)/../../..'
3349         to pick the Camel includes.
3350         * providers/sendmail/Makefile.am (INCLUDES): Likewise.
3351
3352         * camel.h: Don't #include <camel/data-wrapper-repository.h> anymore.
3353
3354 2000-04-27  NotZed  <NotZed@HelixCode.com>
3355
3356         * camel-mime-utils.c (check_header): Dont try and check a NULL
3357         header.
3358
3359         * camel-recipient.[ch]: Dead.  Its not pining.
3360
3361         * camel-mime-message.h: Dont include recipients.h anymore.
3362
3363         * camel-mime-message.c (camel_mime_message_add_recipient): Accept
3364         name/address separately, and store in an CamelInternetAddress.
3365         (add_recipient): Removed.
3366         (remove_recipient): Removed.
3367         (remove_recipient_address): Renamed from remove_receipient, works
3368         via address.
3369         (camel_mime_message_remove_recipient_name): New function to remove
3370         by name.
3371         (get_recipients): Removed.
3372         (camel_mime_message_get_recipients): Return a camel-internet-address.
3373         (write_to_stream): No longer write receipients directly.
3374         (write_recipients_to_stream): Removed.
3375         (write_one_recipient_to_stream): Removed.
3376         (camel_mime_message_init): Setup recipients hashtable, rather than
3377         usign the recipients stuff.
3378         (set_recipient_list_from_string): Killed, a violent and lengthy
3379         death.
3380         (process_header): Simplified recipient handling code a lot.
3381         (received_date_str, sent_date_str, reply_to_str, subject_str,
3382         from_str): Removed some oddly-defined global statics.
3383         (camel_mime_message_class_init): Dont initialise above variables
3384         anymore.
3385         (init_header_name_table): Removed, use a table to init this, and
3386         do it in class init (2 lines of code ...).
3387
3388         * camel-news-address.c: Class to represent news addresses -
3389         currently empty, and not built.
3390
3391         * camel-internet-address.h: Class to represent internet (email)
3392         addresses.
3393
3394         * camel-address.h: Abstract class to represent (lists of)
3395         addresses.
3396
3397 2000-04-27  Dan Winship  <danw@helixcode.com>
3398
3399         * camel-mime-part.c (write_to_stream): Revert previous change. I
3400         was confused.
3401
3402         * camel-url.[ch] (camel_url_encode, camel_url_decode): expose
3403         these routines.
3404
3405 2000-04-26  Dan Winship  <danw@helixcode.com>
3406
3407         * camel-mime-part.c (write_to_stream): Only write a newline
3408         between the headers and the content object if the content object
3409         is not a CamelMedium. (If the content is a medium, it may have its
3410         own headers, which then need to go before the blank line.)
3411
3412         * camel-mime-body-part.[ch]: Remove. We weren't using the fields
3413         that made this different from camel-mime-part, so it basically
3414         just forced us to do lots of gratuitous typecasting.
3415
3416         * camel-multipart.[ch]: Use CamelMimePart. Remove the multipart
3417         parent stuff, since we weren't using that either.
3418
3419         * etc: update for CamelMimeBodyPart -> CamelMimePart
3420
3421 2000-04-26  Dan Winship  <danw@helixcode.com>
3422
3423         * camel-medium.c (set_content_object): sink the content object
3424         after referencing it.
3425
3426         * camel-mime-part.c: fix various little things in the handling
3427         of CamelMedium methods. Change camel_mime_part_set_text to the
3428         more generic camel_mime_part_set_content.
3429
3430         * camel.h: sync to current reality
3431
3432         * camel-folder-utils.[ch]: removed
3433
3434         * camel-mime-utils.c (header_format_date): fix format specifier
3435         for time zone. Fix typo in month names array.
3436
3437 2000-04-26  NotZed  <NotZed@HelixCode.com>
3438
3439         * camel-seekable-substream.c (stream_seek): Changed to have
3440         absolute seek semantics, not relative to the bounds.
3441
3442         * camel-seekable-stream.c (reset): When we reset, seek to the
3443         start of the bound, if there is one.
3444         (stream_tell): Make tell virtual.
3445
3446         * camel-stream-filter.c (do_available): Removed.
3447
3448         * camel-stream-buffer.c: Remove leading _'s from static functions.
3449         (stream_read): Renamed from read().  Fancy that conflicting!  (my
3450         boo!)  Others too.
3451
3452         * providers/pop3/camel-pop3-folder.c (get_message_by_number):
3453         Changed to stream_mem interface.
3454
3455         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed
3456         for streamfs interface changes, and implement a failure case.
3457         (_append_message): Changed for fs stream interface change.
3458
3459         * camel-multipart.c (print_part): Iterate rahter than callback.  I
3460         hate glists's interface (hence, move this to write_to_stream).
3461         (write_to_stream): Return an error (yuck, this is a royal PITA to
3462         do with the stream write interface).
3463
3464         * camel-mime-message.c: Removed leading _ from static names.
3465
3466         * camel-mime-part.h: construct_from_parser() now returns an error
3467         code.
3468
3469         * camel-mime-part-utils.c
3470         (camel_mime_part_construct_content_from_parser): Changed to use a
3471         camel-data-wrapper instead of a camel-simple-data-wrapper (no
3472         change needed elsewhere?).
3473         (simple_data_wrapper_construct_from_parser): Fixes for stream-mem
3474         interface changes.
3475
3476         * camel-simple-data-wrapper.[ch],
3477         camel-simple-data-wrapper-stream.[ch],
3478         camel-stream-data-wrapper.[ch], removed.  Fixed including of these
3479         files.
3480         
3481         * camel-mime-part.c (camel_mime_part_set_text): Remove the use of
3482         the camel-simple-data-wrapper-stream, just use a mem stream.
3483         (write_to_stream): Renamed from my_*
3484         (construct_from_stream): Return an error on error.
3485
3486         * camel-stream-mem.c (camel_stream_mem_new*): Remove mode
3487         parameter.
3488
3489         * camel-stream-mem.h (enum CamelStreamMemMode): Removed.  It
3490         wasn't used at all.
3491
3492         * camel-data-wrapper.h: Add camel_data_wrapper_new() to create
3493         these.
3494         (write_to_stream, construct_from_stream): Return an error
3495         indicator for success.  Fixed all methods to match (ICK).
3496
3497         * Makefile.am (libcamel_la_SOURCES): Remove
3498         camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c,
3499         camel-stream-data-wrapper.c.  Obsoleted by code re-use!
3500
3501         * camel-data-wrapper.c (construct_from_stream): Change the default
3502         implementation to just set the output stream == construction
3503         stream.  Well, this lets me get rid of both simple-data-wrapper
3504         and stream-data-wrapper (unused anyway), and
3505         simple-data-wrapper-stream in one hit.  CamelDataWrapper is now
3506         also a concrete class.
3507         (write_to_stream): Use camel_stream_write_to_stream() to
3508         calculate/return values (and save code).
3509         Include <errno.h> for obvious reasons.
3510
3511         * camel-stream.c (eos): Provide a default implementation of .eos().
3512         (camel_stream_write_to_stream): Make it return an error code on
3513         error.
3514         (camel_stream_printf): Changed to return the number of bytes
3515         written/error.
3516         (camel_stream_available): Removed.
3517
3518         * camel-stream-fs.h (enum CamelStreamFsMode): Removed.  Changed to
3519         use unix modes and so forth (wasn't used for anything but new file
3520         creation and didn't work well either).
3521
3522         * camel-stream-fs.c: Removed leading _'s for names.  And removed
3523         some virtual method 'documentation'.
3524         (destroy): Dont try and close a closed/error fd.  Only report
3525         error if close returns -1.  Moved all the code to finalise(), and
3526         killed this function.
3527         (init_with_fd): Properly setup the seek offset, if it is a
3528         valid and seekable file descriptor.
3529         (init_with_fd_and_bounds): Use off_t for bounds, set bounds on the
3530         seekable stream.
3531         (init_with_name): Return error codes.
3532         (init_with_name_and_bounds): Ditto.
3533         (camel_stream_fs_new_with_name): REturn NULL object if it failed.
3534         (camel_stream_fs_new_with_name_and_bounds): Return NULL object on
3535         failure.  Changed with_name* api's to take unix open style args
3536         and flags.
3537         (read): The bounded stream bounds checking seemed off, simplified
3538         code a bit.
3539         (write): Implement bounds checking for writing, the comment was
3540         wrong, it could make sense to bound writing.  Cleaned up a little.
3541         (available): Gone.
3542         (eos): Removed.  Use CamelStream's implementation now.
3543         (close): Reset the fd to -1, provide a warning for bad usage.
3544         (seek): Cleaned up.  Changed the behaviour a little, the returned
3545         offset is the absolute position in the file, even in bounded
3546         streams.        
3547         (seek): Seek from end mirrors lseek() behaviour (reverse seeking).
3548
3549 2000-04-25  NotZed  <NotZed@HelixCode.com>
3550
3551         * camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof
3552         indicator to other parent classes.
3553
3554         * camel-stream.c (camel_stream_printf): New utility
3555         function.  Obvious use.
3556
3557         * camel-stream-mem.c: Removed leading _'s from static func's.
3558         (camel_stream_mem_new_with_byte_array): Fixed for api changes, set
3559         the owner for the byte array to us.
3560         : Removed A bunch of gtk doc stuff for static (implementation) functions.
3561         (available): Removed.
3562         (write): Fixed the write implementation so that seek() works on a
3563         seekable memory stream, as expected.  Seeking past the end of the
3564         buffer has unix semantics (filling with 0).
3565         (available): Removed.
3566         (write): Implement seekable stream bounded stream.
3567         (read): Implement seekable stream bounded stream.
3568         (close): Dont free the stream_mem if we're not the owner.
3569         (seek): Allow to seek beyond the end of memory area,
3570         implement bounds checking.
3571         (seek): Set errno on bad policy.
3572
3573         * camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t.
3574         (new_with_buffer): Changed len to be a size_t.
3575         (set_buffer, set_byte_array): New interface functions.
3576         (struct _CamelStreamMem): Removed position, it is stored in the
3577         superclass.
3578
3579         * camel-stream.h: Removed some of the seemingly random
3580         whitespace.  Removed the available method (its not
3581         impelemented/useful enough).
3582
3583         * camel-seekable-substream.c
3584         (init_with_seekable_stream_and_bounds): Remove the data_available
3585         stuff, it hasn't been properly implemented/finished, and may never
3586         work (unfortunately *sigh).
3587         (reemit_parent_signal): Removed part of the above change.
3588         (set_bounds): Removed (moved to seekable-stream).
3589         : Fixed up some of the generally unreadable indenting (sorry,
3590         wrapping at 80 characters with
3591         camels_really_long_function_names()
3592         just_doesnt_work_very_well_does_it().
3593         (available): Removed.
3594         (stream_seek): Fixup for object changes.  Make sure we return -1
3595         if the parent stream can't seek.
3596
3597         * camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New
3598         function to bound any seekable stream.
3599         : Removed _'s.
3600         (camel_seekable_stream_class_init): Implement an init function, to
3601         setup the stream bounds to unbound.
3602
3603         * camel-seekable-stream.h (CamelSeekableStreamClass): New virtual
3604         method set_bounds for seekable streams.
3605         (CAMEL_STREAM_UNBOUND): New define for no bound.
3606
3607         * camel-seekable-substream.h (struct _CamelSeekableSubstream):
3608         Removed sup_bound and inf_bound, moved to CamelSeekableStream (and
3609         renamed, and changed to off_t's).
3610         (new_with_seekable_stream_and_bounds): Use off_t as the bounds.
3611         (CamelSeekableSubstreamClass): Uh, why was the intialiser virtual?
3612         Removed.
3613
3614         * camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek
3615         to accept an off_t as the offset.
3616         (struct _CamelSeekableStream): Renamed cur_pos to position and
3617         changed it to an off_t type.
3618         (enum CamelStreamSeekPolicy): Set to match the SEEK_* constants
3619         from lseek().
3620         (get_current_position): Renamed to tell().
3621
3622         * camel-stream-buffer.h: Commented out set_vbuf - never implemented.
3623
3624 2000-04-25  Dan Winship  <danw@helixcode.com>
3625
3626         * camel-stream-buffer.c (_eos): only return TRUE if the parent is
3627         at eos AND the buffer has been exhausted
3628
3629         * camel-mime-message.c: fix some incorrect macro usage that
3630         resulted in bogus casts
3631
3632 2000-04-24  Dan Winship  <danw@helixcode.com>
3633
3634         * camel-mime-part-utils.c
3635         (simple_data_wrapper_construct_from_parser): fix a cut-and-pasto.
3636
3637         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): ref
3638         (and sink) the message stream if we're going to unref it later.
3639         Otherwise it could get destroyed while there are still substreams
3640         attached to it. This needs a cleaner solution.
3641
3642         * camel.h: remove data-wrapper-repository.h include(s)
3643
3644 2000-04-24  NotZed  <NotZed@HelixCode.com>
3645
3646         * camel-mime-message.c (construct_from_parser): Allow MESSAGE_END
3647         _or_ EOF as valid termination conditions.
3648
3649         * providers/mbox/camel-mbox-summary.c (message_struct_new): Decode
3650         and then re-encode the addresses, so they are consistently
3651         formatted.
3652
3653         * camel-mime-utils.c (header_decode_mailbox): Store the address in
3654         a _header_address.  And try to get a comment-stored name if there
3655         is one.
3656         (header_decode_address): Actually return an address.
3657         (header_to_decode): Renamed to header_address_decode()
3658         (header_mailbox_decode): New function to get a single mailbox.
3659         (header_mime_decode): Return the major/minor value, as
3660         appropriate.
3661         (header_address_new, and friends): Whole bunch of utility
3662         functions for working with the address thingies.
3663         (header_decode_domain): Free the string header, and dont expand
3664         '.' into ' . '.
3665
3666         * camel.c (camel_init): No longer call
3667         data_wrapper_repository_init.
3668
3669         * camel-medium.c (write_to_stream): Moved (back) to
3670         camel-mime-part.
3671         (add_header):
3672         (set_header):
3673         (remove_header): 
3674         (get_header): Make all these abstract, and spit warnings if
3675         called.  I guess it could manage the list, but well, it doesn't.
3676
3677         * camel-medium.h (struct _CamelMedium): Dont store headers here,
3678         the implementor is the only one who knows their format.
3679         (CamelMediumClass): Changed header values to be void *'s.  They
3680         need not be strings?
3681
3682         * camel-simple-data-wrapper.c (construct_from_stream): And we're
3683         back.  Set the output stream.
3684         (construct_from_parser): Moved to camel-mime-part-utils.
3685
3686         * camel-mime-part-utils.c
3687         (camel_mime_part_construct_content_from_parser): Create the
3688         contents of multipart and simple messages.
3689         (camel_mime_part_construct_content_from_parser): Oops, this was
3690         totally screwed up, try creating the right cotnent on the right
3691         object.
3692
3693         * camel-multipart.c (construct_from_parser): Moved to
3694         camel-mime-part-utils.
3695         (separate_part): Removed.
3696
3697         * camel-mime-part.c (construct_from_stream): Back again!  This now
3698         switches over to using a mime parser for any mime parts, only.
3699         (my_write_to_stream): Write our headers and so forth here.
3700         (add_header): Add header directly, parent class is abstract.
3701         (remove_header): Ditto.
3702         (set_header): Ditto.
3703
3704         * camel-data-wrapper.c (camel_data_wrapper_construct_from_stream):
3705         Remade abstract.
3706         (camel_data_wrapper_construct_from_parser): Moved to
3707         camel_mime_part.
3708
3709         * camel-data-wrapper.h: Put back construct_from_stream.
3710
3711         * camel-mime-part.h: Put construct_from_parser in here, the
3712         data-wrapper shouldn't know about mime.  Ok, so now to undo half
3713         of the last hours changes ... duh.
3714         
3715 2000-04-23  Dan Winship  <danw@helixcode.com>
3716
3717         * camel-mime-utils.c (header_to_decode, header_mime_decode): fix
3718         some obvious minor bugs noted by -Wall.
3719
3720 2000-04-23  NotZed  <NotZed@HelixCode.com>
3721
3722         * providers/pop3/camel-pop3-folder.c (get_message_by_number): Use
3723         construct_from_stream instead of set_input_stream().
3724
3725         * camel-simple-data-wrapper-stream.c
3726         (camel_simple_data_wrapper_stream_construct): REmoved the destroy
3727         callback code.
3728         (wrapper_destroy_cb): Removed.
3729
3730         * camel-simple-data-wrapper.h: Add prototype for _construct()
3731         method.
3732
3733         * camel.c: Include unicode.h to kill a warning.
3734
3735         * camel-data-wrapper.h (CameldataWrapperClass): Removed
3736         construct_from_stream virtual method.
3737         Removed get/set input stream.
3738
3739         * data-wrapper-repository.[ch]: Removed&from build.  Obsoleted?
3740         The justification as is follows: It is mixing storage
3741         protocol/format with message architecture.  It really just doesn't
3742         serve any purpose, as each medium implementor will have to have its
3743         own type->handler mapping, and the only current implementor,
3744         mimepart has a very simple structure and no need for this.
3745
3746         * camel-medium.c (write_to_stream): Moved here from most of the
3747         stuff in camel-mime-part.  Well, the MEDIUM is the one that knows
3748         what the headers are, and the content is, let it write it out.
3749
3750         * camel-mime-part-utils.c (camel_mime_part_construct_content):
3751         Copied from camel-mime-part.c, removed handling of message
3752         followon state (moved to camel-mime-message).
3753         (camel_mime_part_construct_content_from_parser): Renamed from
3754         construct_content.
3755         (camel_mime_part_construct_headers_from_stream):
3756         (camel_mime_part_construct_content_from_stream):
3757         (camel_mime_part_store_stream_in_buffer): Removed.  Replaced by
3758         the new construct from parser stuff.
3759
3760         * camel-mime-message.c (construct_from_parser): Do
3761         construct_from_parser for mime-message.
3762         (_write_to_stream): Set the mime-version header for medium to
3763         write out, rather than writing it out ourselves.
3764
3765         * camel-data-wrapper.c (set_mime_type_field): Ref the
3766         content_field when we get it?
3767         (construct_from_stream): Removed.
3768         (camel_data_wrapper_construct_from_stream): Changed to a helper
3769         function, creates a mime_parser, and constructs from that.
3770         (set_input_stream): Removed.
3771         (camel_data_wrapper_set_input_stream): Removed.
3772         (get_input_stream): Removed.
3773         (camel_data_wrapper_get_input_stream): Removed.
3774
3775         * camel-mime-parser.c (camel_mime_parser_unstep): New function.
3776         Cause a subsequent call to mime_parser_step() to return the same
3777         state over again.
3778
3779         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
3780         Initial test code using the mime parser to construct the message.
3781         (_get_message_by_uid): Use construct_from_stream() instead of
3782         creating our own parser.
3783
3784         * camel-mime-part.c (construct_from_parser): part constructor.
3785         (camel_mime_part_construct_content): Basically a simpler
3786         replacement for the datawrapper repository.
3787         (camel_mime_part_init): Set the default type to text/plain.
3788         (camel_mime_part_construct_content): Removed to
3789         camel-mime-part-utils.c
3790         (my_get_output_stream): Removed.  The streeam is in the
3791         data-wrapper.
3792         (my_get_content_object): Removed.  The content object is stored in
3793         the medium.  If none is there, the object wasn't created properly.
3794         (my_write_content_to_stream): Removed.  The content object is the
3795         one that knows how to write itself out!!!!!!!!
3796         (my_write_to_stream): Remove the base header writing stuff - has
3797         been moved to camel-medium, where it belongs.  This can just be
3798         used to check for mandatory headers.
3799         (my_construct_from_stream): Removed.
3800         (my_set_input_stream): What the hell, i'll remove this too.
3801         Nobody seems to understand how it differs from create from stream,
3802         and they both seem to serve the same purpose ...
3803
3804         * camel-simple-data-wrapper.c (construct_from_parser): Initial
3805         implementation of a content constructor.
3806         (construct_from_stream): Removed!  Job taken over by
3807         construct_from_parser.
3808
3809         * camel-multipart.c (construct_from_parser): Multipart
3810         construction routine.
3811         (camel_multipart_init): Set the default multipart type to
3812         multipart/mixed.  Duh, no subtype is not allowed anyway.
3813         (set_input_stream): REmoved.  Replaced by construct_from_parser.
3814
3815 2000-04-22  Dan Winship  <danw@helixcode.com>
3816
3817         * camel-multipart.[ch]: clean, document, etc.
3818         (camel_multipart_init): pick a prettier default boundary. Still
3819         need to deal with the larger problem
3820
3821 2000-04-22  NotZed  <NotZed@HelixCode.com>
3822
3823         * camel-mime-message.h (struct _CamelMimeMessage): Removed
3824         send_date, and received_date, and replaced it with a time_t
3825         'date' (this is what the header is called), and date_offset to
3826         store the GMT offset of the date.
3827
3828         * camel-mime-message.c (camel_mime_message_set_from): Update raw
3829         header as we go.
3830         (_set_from): Removed.
3831         (_get_from): Removed.
3832         (camel_mime_message_get_from): Moved implementation here.
3833         (camel_mime_message_get_subject): Move implementation here.
3834         (_get_subject): Nuked.
3835         (camel_mime_message_set_subject): Handle utf-8 input, and also
3836         update raw header when changed.
3837         (_set_subject): Removed.
3838         (_set_received_date): Removed.
3839         (camel_mime_message_set_received_date): Removed.
3840         (_get_received_date): Removed.
3841         (camel_mime_message_get_received_date): Removed.
3842         (_get_sent_date): Removed.
3843         (camel_mime_message_get_sent_date): Removed.
3844         (camel_mime_message_get_date): New function to get the date as a
3845         time_t/offset.
3846         (camel_mime_message_set_date): Set the date as a time_t/offset.
3847         (camel_mime_message_get_date_string): Get the date as a string.
3848         (camel_mime_message_init): Initialise the current date as
3849         'CMAEL_MESSAGE_DATE_CURRENT'.
3850         (_set_reply_to): Removed.
3851         (camel_mime_message_set_reply_to): Moved implementation here.
3852         This is still broken, reply-to can have multiple addresses.
3853         (_get_reply_to): Removed.
3854         (_set_field): Removed, no longer used anywhere.
3855         (_get_field): Also removed.
3856         (_init_header_name_table): Add the Date header.
3857         (process_header): Also handle snooping of Date header here.
3858
3859         * camel-stream-filter.c (finalise): Unref the source stream on
3860         finalise, and also call the parent class (oops).
3861
3862         * camel-mime-parser.c (camel_mime_parser_state): New function to
3863         get the current parser state.
3864         (camel_mime_parser_stream): Allow you to get the stream back from
3865         the mime_parser.
3866         (camel_mime_parser_fd): Alternative to allow you to get the fd
3867         back from the mime_parser.
3868         (folder_scan_init_with_stream): Properly ref/unref the stream.
3869         (folder_scan_close): Properly unref the stream/close the fd on
3870         exit.
3871         (folder_scan_init_with_fd): Close the old fd if there is one.
3872
3873         * camel-data-wrapper.c (camel_data_wrapper_construct_from_parser):
3874         New method, construct a data wrapper from an initialised parser.
3875         (construct_from_parser): Empty implementation.
3876         
3877         * providers/mbox/camel-mbox-summary.c (message_struct_new):
3878         Convert subject line to unicode, before storing in the summary.
3879         (strdup_trim): Removed, no longer needed.
3880
3881         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref
3882         the folder after setting it in the new message.
3883
3884         * camel-mime-part.c (my_set_content_object): Have the headers
3885         follow the content-type change here too.
3886         (my_write_to_stream): Dont write content-type here, automatically
3887         stored in the headers ...
3888         (my_write_to_stream): Use header_disposition_format() to format
3889         the content-disposition header.
3890         (my_write_to_stream): Removed old code, all headers are now stored
3891         in the camel-medium level, always.  Need to do the same with
3892         camel-mime-message i suppose ...
3893         (my_write_to_stream): Write the content using the parent class,
3894         not some weird function.
3895         (camel_mime_part_class_init): Dont override get_output_stream.
3896         (camel_mime_part_encoding_from_string): Bleh, make it
3897         case-insensitive.
3898
3899         * camel-mime-utils.c (header_content_type_is): Handle empty types.
3900         (header_encode_string): Start of an implementation of the rfc2047
3901         encoder.  It does iso-8859-1, and us-ascii, and utf-8 (others get
3902         tricky *sigh*)
3903         (rfc2047_encode_word): Convert a single word/string into rfc2047
3904         encoding.
3905         (quoted_encode): Different quoted-printable encoding for rfc2047
3906         encoding of headers.
3907
3908         * gmime-content-field.c (gmime_content_field_write_to_stream): Use
3909         header_content_type_format() to format it.
3910
3911 2000-04-21  NotZed  <NotZed@HelixCode.com>
3912
3913         * camel-mime-utils.h: Add prototype for header_param_list_free.
3914
3915         * camel-recipient.c: New function to remove all the types of a
3916         recipient list.  I think this whole object needs a major review.
3917
3918         * camel-mime-message.c (camel_mime_message_class_init): Removed
3919         parse_header_pair override, override add_header instead.
3920         (_parse_header_pair): Renamed to add_header.
3921         (remove_header): Add this method, to make sure we keep upto date
3922         with removed headers too.
3923         (_set_field): If given a NULL value, clear it out.
3924         (_set_recipient_list_from_string): Constify.
3925         (set_header): Override set_header from camel_medium.
3926         (process_header): Local function to handle set/add/remove of each
3927         header we know about.
3928
3929         * camel-mime-part.c (camel_mime_part_class_init): Removed
3930         parse_header_pair setup.
3931         (my_parse_header_pair): Moved into add_header(), removed.
3932         (my_set_disposition): Allow a NULL disposition to clear it.
3933         (my_set_content_id): Allow NULL content id to clear it.
3934         (remove_header): Track removed headers.
3935         (my_set_description): Allow NULL description to clear it.
3936         (my_set_content_MD5): Make sure we copy the md5 value, and allow a
3937         NULL value to reset it.
3938         (my_set_filename): Copy the filename.
3939         (my_set_header_lines): Removed.  Nothing uses it, it doesn't
3940         actually serve any purpose.
3941         (camel_mime_part_set_header_lines): Ditto.
3942         (my_get_header_lines): Ditto.
3943         (camel_mime_part_get_header_lines): Ditto.
3944         (camel_mime_part_class_init): Remove *_header_lines setup.
3945         (camel_mime_part_init): Remove header_lines init.
3946         (my_finalize): Remove header_lines finalise.
3947         (my_write_to_stream): Write the headers here.  This is just WRONG,
3948         camel_medium should be doing this.
3949         (my_get_output_stream): Kill a warning.
3950         (camel_mime_part_encoding_to_string): Ditto.
3951         (camel_mime_part_set_description): Unvirtualiase, use add_header()
3952         to do the processing.
3953         (my_set_description): Removed.
3954         (set_disposition): Renamed from my_set_disposition.
3955         (camel_mime_part_get_description): Get the descriptionf rom the
3956         get_header method.
3957         (my_get_description): Removed.
3958         (my_set_filename): Removed.
3959         (camel_mime_part_get_filename): Get the parameter from the
3960         disposition.
3961         (camel_mime_part_encoding_from_string): Handle NULL string.
3962         (camel_mime_part_init): Remove reference to filename.
3963         (my_finalize): Dont free filename.
3964
3965         * camel-mime-part.h (CamelMimePartClass): Removed
3966         parse_header_pair() method, it doesn't add anything that
3967         add_header() can't be used for.
3968         (CamelMimePartClass): Remove *_header_lines methods.
3969         (struct _CamelMimePart): Remove header_lines list.
3970         (struct _CamelMimePart): Removed filename attribute.
3971
3972         * camel-medium.c (camel_medium_init): Init headers to null, not a
3973         hashtable.
3974         (add_header): Append the headers as a list.
3975         (remove_header): Remove headers as a list.
3976         (get_header): Likewise for lookup.
3977         (free_header): Removed, no longer needed.
3978         (finalize): Free headers using header_raw_clear().
3979         (camel_medium_set_header): New function, to reset and override all
3980         values of a header with a new value.
3981
3982         * camel-medium.h (struct _CamelMedium): Changed to use a
3983         header_raw struct rather than a hash table, to store headers
3984         (many headers can occur multiple times).
3985
3986         * camel-mime-utils.c (header_raw_find_next): New function, allows
3987         you to find multi-valued header fields.
3988         (header_disposition_format): New function to format/create
3989         content-disposition header string.
3990         (header_param_list_format_append): Function to format parameter
3991         lists into a GString.
3992         (header_content_type_format): Function to format content-type into
3993         a usable format.
3994         (header_set_param): allow NULL value to remove the parameter.
3995         (decode_token): Renamed from header_decode_token.
3996         (header_decode_token): New interface for external use.
3997         (quoted_decode): Made static to kill annoying warnings.
3998         (g_strdup_len): Killed, replaced with calls to g_strndup().
3999         (rfc2047_decode_word): Made static to kill warnings.
4000         (decode_coded_string): Terminated.
4001         (g_string_append_len): Made static to kill warnings.
4002         (header_decode_text): Made static to kill warnings.
4003         (header_decode_text): Constify.
4004         (rfc2047_decode_word): Constify.
4005         (header_param): Constify.
4006         (header_content_type_new): Copy the type/subtype strings.
4007         (header_param_list_decode): Made static.
4008         (header_param_list_format_append): Made static.
4009         (quoted_decode): Constify.
4010         (g_string_append_len): Constify.
4011         (header_token_decode): New function to decode a single token.
4012
4013         * providers/mbox/camel-mbox-summary.c (header_write): Append a
4014         trailing \n when writing headers.
4015         (strdup_trim): Killed a warning.
4016         (camel_mbox_summary_set_uid): Make sure the next uid is at least 1
4017         higher than any existing one.
4018         (header_evolution_decode): Use header_token_decode to get the
4019         token.
4020
4021         * camel-mime-parser.c (folder_scan_header): Strip the trailing \n
4022         of the end of all header lines.
4023
4024 2000-04-20  NotZed  <NotZed@HelixCode.com>
4025
4026         * providers/mbox/camel-mbox-utils.[ch]: Removed.
4027
4028         * providers/mbox/camel-mbox-parser.[ch]: Removed.  Removed
4029         references to it.
4030
4031 2000-04-20  Dan Winship  <danw@helixcode.com>
4032
4033         * camel-mime-utils.c (rfc2047_decode_word): use libunicode iconv
4034         functions rather than libc ones (since libc might not have them).
4035         (header_decode_date): add autoconfiscation on timezone code
4036
4037         * camel.c (camel_init): call unicode_init ()
4038
4039 2000-04-20  NotZed  <NotZed@HelixCode.com>
4040
4041         * providers/mbox/camel-mbox-summary.c (message_struct_new): Trim
4042         leading/trailing spaces off the raw headers.
4043
4044         * MERGE NEW_PARSER branch into HEAD, fixed conflicts.
4045         
4046         * gmime-content-field.c (_print_parameter): Duh, removed again
4047         (@@#$@ cvs merge).
4048
4049         * camel-mime-utils.c (header_content_type_is): Constify.
4050         (header_content_type_unref): Killed a couple warnings.
4051
4052         * camel-folder.c (_init): Removed more log crap.
4053
4054         * providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for
4055         summary changes.
4056
4057         * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
4058         Fixed for new summary interface.  Added a warning for using this
4059         broken api.
4060         (_get_message_by_uid): Fixed for message new with session
4061         vanishing.
4062
4063 2000-04-19  Dan Winship  <danw@helixcode.com>
4064
4065         * camel-simple-data-wrapper-stream.c
4066         (camel_simple_data_wrapper_stream_get_type): This is a subtype of
4067         CamelSeekableStream, not CamelStream.
4068
4069         * camel-seekable-substream.c: clean up a lot.
4070         (eos): When testing for end-of-stream, reset the parent position
4071         before testing if it is at end-of-stream, since either (a) it may
4072         have been seek'ed to eos by someone else, or (b) we may have been
4073         seek'ed away from eos and it hasn't been synced yet.
4074
4075         * camel-medium.[ch] (camel_medium_add_header): const poison.
4076         (Belatedly goes with my change of 2000-02-23.)
4077         (camel_medium_init): Use g_strcase_{hash,equal} on the header
4078         array.
4079         
4080 2000-04-18  Dan Winship  <danw@helixcode.com>
4081
4082         * camel-mime-part.c (my_set_input_stream): 
4083         * camel-data-wrapper.c (set_input_stream, set_output_stream): do
4084         better reference counting of streams so they actually go away
4085         when they should.
4086
4087         * camel-log.[ch], *: Nuke camel log stuff. Replace calls to
4088         CAMEL_LOG_WARNING with calls to g_warning.
4089
4090         * camel-data-wrapper.[ch]:
4091         * camel-simple-data-wrapper.[ch]:
4092         * camel-medium.[ch]: Clean, polish, document. Most of the gtk-doc
4093         comments added to camel-data-wrapper.c note serious problems that
4094         need to be fixed.
4095
4096 2000-04-17  Dan Winship  <danw@helixcode.com>
4097
4098         * camel-mime-message.[ch]: Remove the "session" field from
4099         CamelMimeMessage. Nothing uses it, about half of the existing
4100         calls to camel_mime_message_new_with_session pass NULL, and
4101         there's no obvious reason for it to be there.
4102
4103         * providers/MH/camel-mh-folder.c:
4104         * providers/maildir/camel-maildir-folder.c:
4105         * providers/mbox/camel-mbox-folder.c:
4106         * providers/mbox/camel-mbox-utils.c:
4107         * providers/nntp/camel-nntp-folder.c:
4108         * providers/pop3/camel-pop3-folder.c: Use camel_mime_message_new
4109         instead of camel_mime_message_new_with_session.
4110
4111         * camel-session.c (get_store_for_protocol_with_url): Set the
4112         exception if no provider is found.
4113
4114         * camel-url.c: Add code to encode and decode %-escapes in URLs,
4115         and do some additional correctness-checking on URL syntax. From
4116         Tiago Antào with modifications by me.
4117
4118 2000-04-14  Chris Toshok  <toshok@helixcode.com>
4119
4120         * providers/Makefile.am (SUBDIRS): add nntp
4121
4122 2000-04-14  Christopher James Lahey  <clahey@helixcode.com>
4123
4124         * providers/mbox/camel-mbox-folder.c: Fix switch statement.
4125
4126 2000-04-14  Chris Toshok  <toshok@helixcode.com>
4127
4128         * providers/nntp/camel-nntp-folder.c (_exists): always return TRUE
4129         for now.  we need to check the server response to make sure the
4130         group exists.
4131         (_get_message_by_uid): make sure to account for the \n we add to
4132         the string after every line.
4133
4134         * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): function
4135         to get the headers using the XOVER command.
4136         (get_HEAD_headers): function to get the headers using the HEAD
4137         command on each message. slooooooow.
4138         (camel_nntp_get_headers): make this function use either XOVER or HEAD
4139         versions depending on whether or not the server extension is present.
4140
4141 2000-04-14  Dan Winship  <danw@helixcode.com>
4142
4143         * camel-formatter.[ch]: This didn't belong in Camel. Move to mail/
4144
4145         * Makefile.am, camel-types.h: remove references to
4146         camel-formatter.
4147
4148 2000-04-12  Matt Loper  <matt@helixcode.com>
4149
4150         * camel-folder-pt-proxy.c (_folder_open_cb): Print warning message
4151         for broken function.
4152         (_folder_close_cb): Same.
4153
4154 2000-04-12  Miguel de Icaza  <miguel@gnu.org>
4155
4156         * Makefile.am (pthread_SRC): Use correct names for the pthread
4157         source variables.
4158
4159 2000-04-10  Dan Winship  <danw@helixcode.com>
4160
4161         * providers/pop3/camel-pop3-store.c (pop3_connect): fix various
4162         bugs in APOP code (still untested) and some of the error cases.
4163
4164         * camel-provider.h: Clarify what provider.protocol, provider.name,
4165         and provider.description should be.
4166
4167         * providers/mbox/camel-mbox-provider.c: 
4168         * providers/pop3/camel-pop3-provider.c: 
4169         * providers/sendmail/camel-sendmail-provider.c: 
4170         * providers/smtp/camel-smtp-provider.c: update protocols, names,
4171         and descriptions
4172
4173         * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
4174         implement get_message_by_number for the mail fetch code.
4175
4176 2000-04-09  Jeffrey Stedfast  <fejj@stampede.org>
4177
4178         * providers/smtp/camel-smtp-transport.c: reformatted to fit
4179         the standard indent format used by helix code
4180
4181 2000-04-09  Dan Winship  <danw@helixcode.com>
4182
4183         * camel-movemail.c: New file with new function to dot-lock an mbox
4184         file and copy it to a safe private directory.
4185
4186 2000-04-08  Christopher James Lahey  <clahey@helixcode.com>
4187
4188         * providers/smtp/.cvsignore: Added a .cvsignore file.
4189
4190 2000-04-08  Dan Winship  <danw@helixcode.com>
4191
4192         * providers/sendmail/camel-sendmail-transport.c (_send_internal):
4193         actually record the pid returned by fork(). Noticed by clahey.
4194
4195         * providers/smtp/camel-smtp-transport.c: #include <sys/param.h>
4196         for MAXHOSTNAMELEN. (This is a stopgap: some of the uses of
4197         MAXHOSTNAMELEN are wrong anyway...)
4198
4199 2000-04-07  Jeffrey Stedfast  <fejj@stampede.org>
4200
4201         * providers/smtp/camel-smtp-transport.c: fixes to numerous bugs;
4202         should now build fine.
4203         * providers/Makefile.am: Readded smtp now that smtp builds without
4204         error.
4205
4206 2000-04-20  NotZed  <NotZed@HelixCode.com>
4207
4208         * providers/mbox/camel-mbox-summary.c
4209         (camel_mbox_summary_next_uid): Public function to get the next
4210         uid, makes sure its saved to disk too.
4211
4212         * camel-mime-part.c (my_finalize): Fix disposition crap with a
4213         real disposition.
4214         (my_set_disposition): Likewise.
4215         (my_get_disposition): And here.
4216         (my_write_to_stream): And here, needs more cleanup.
4217
4218         * providers/mbox/camel-mbox-folder.c (_append_message): Assign a
4219         new uid at this point.
4220
4221         * gmime-content-field.c (gmime_content_field_write_to_stream):
4222         Make something up if we have an invalid/missing content type
4223         (i.e. text/plain).
4224
4225 2000-04-19  NotZed  <NotZed@HelixCode.com>
4226
4227         * providers/mbox/camel-mbox-folder.c (_delete): Fixed completely
4228         broken switch() syntax, only compiled because errno is a macro on
4229         some systems.
4230         (_list_subfolders): Likewise.
4231
4232 2000-04-18  NotZed  <NotZed@HelixCode.com>
4233
4234         * camel-mime-parser.c (folder_scan_init): init stream to null.
4235
4236         * providers/mbox/camel-mbox-summary.c
4237         (CAMEL_MBOX_SUMMARY_VERSION): Moved to .c file, incremented.
4238         (index_folder): Changed to have index passed via the summary.
4239         (decode_string): Do a sanity check on the string size, so we dont
4240         visit g_malloc()'s friendly abort().
4241
4242         * camel-folder-pt-proxy.c (camel_folder_pt_proxy_class_init):
4243         Removed reference to set_name.
4244         (_set_name): Removed.
4245
4246         * providers/mbox/camel-mbox-utils.c
4247         (parsed_information_to_mbox_summary): Removed.  Most of this file
4248         is about to be binned.
4249
4250         * providers/mbox/camel-mbox-search.c (func_header_contains): Fixes
4251         for changes to summary interface.
4252         (struct _searchcontext): Remove pointer to message info, get it
4253         straight from the mboxsummary.
4254         (camel_mbox_folder_search_by_expression): New summary interface.
4255         (camel_mbox_folder_search_by_expression): Uh, the summary is not
4256         an object anymore (well not yet).
4257
4258         * providers/mbox/camel-mbox-folder.c
4259         (camel_mbox_folder_class_init): Removed set_name init.
4260         (_set_name): Removed.
4261         (_open): Call new summary interface.
4262         (_close): Use new summary interface.
4263         (_create): Removed a summary object leak.
4264         (_get_message_count): New summary interface.
4265         (_get_uid_list): Use new summary interface. FIXME: this is leaky.
4266         (_get_message_by_uid): Use the new summary interface, some
4267         cleanup.
4268         (_append_message): Totally changed, basically just appends the
4269         message directly, ignores the summary (for now), the summary will
4270         fix itself up if it needs to.
4271         (_check_get_or_maybe_generate_summary_file): Bye bye old code.
4272         (summary_get_message_info): Implement get_message_info again, for
4273         folder.
4274
4275         * camel-folder.c (camel_folder_class_init): Removed set_name
4276         setup.
4277         (_set_name): Moved contents into _init.
4278         (_init): Perform the old functions of set_name here.
4279
4280         * camel-folder.h: Removed the set_name internal interface.
4281
4282 2000-04-14  NotZed  <NotZed@HelixCode.com>
4283
4284         * providers/mbox/camel-mbox-summary.[ch]: Completely replaced with
4285         new code.
4286
4287         * Makefile.am (libcamel_la_SOURCES): Removed
4288         camel-folder-summary.[ch].
4289
4290         * camel-folder.h (struct _CamelFolder): Removed summary.
4291         (struct _CamelFolder): Changed flags to be 1 bit bitfields.
4292
4293         * camel-folder-summary.[ch]: Class removed entirely.
4294
4295         * camel-folder.c (camel_folder_get_summary): Removed.
4296         (camel_folder_summary_get_message_info): Moved from
4297         camel-folder-summary.c
4298         (camel_folder_summary_get_subfolder_info): Moved from
4299         camel-folder-summary.c
4300
4301         * camel-mime-parser.c (folder_scan_step): Store the start of
4302         headers and start of from in the scan state.
4303         (camel_mime_parser_tell_start_headers): Query the start of the
4304         headers.
4305         (camel_mime_parser_tell_start_from): Query the cached start of
4306         from marker.
4307
4308 2000-04-13  NotZed  <NotZed@HelixCode.com>
4309
4310         * gmime-content-field.c (gmime_content_field_free): Removed this
4311         function.  If its too dangerous to use, it shouldn't be here.
4312         (gmime_content_field_ref): Also ref the embedded content-type.
4313         (gmime_content_field_unref): Ditto to unref it.
4314
4315         * camel-mime-utils.h: Add a refcount for content-type header.
4316
4317         * camel-mime-utils.c (header_content_type_unref): Implement unref
4318         for content-type.
4319         (header_content_type_ref): Implement ref for header content type.
4320
4321 2000-04-12  NotZed  <NotZed@HelixCode.com>
4322
4323         * gmime-content-field.h: Changed to use a _header_content_type.
4324         Added type/subtype back for compatability with clients.
4325         
4326         * gmime-content-field.c: Basically a total rewrite, and now just a
4327         thin wrapper ontop of header_content_type.
4328         (_free_parameter): Got rid of it.
4329         (gmime_content_field_new): Use header_content_type_* functions.
4330         (gmime_content_field_set_parameter): Likewise.
4331         (_print_parameter): Blow away.
4332         (gmime_content_field_write_to_stream): Get details from the
4333         content_type field.  Should check if it needs to escape chars in
4334         the paramter value.
4335         (gmime_content_field_get_mime_type): Likewise.
4336         (___debug_print_parameter): Get rid of this rather annoyingly
4337         named function.
4338         (gmime_content_field_get_parameter): Simplified function.
4339         (gmime_content_field_construct_from_string): Fixed this to use a
4340         real parser.
4341         (gmime_content_field_is_type): New function to test if a type matches.
4342         (gmime_content_field_construct_from_string): Track type/subtype
4343         from subordinate content_type header struct.
4344
4345         * gmime-rfc2047.[ch]: Removed.  Unused.
4346
4347         * camel-stream-b64.[ch]: Blown away more duplicated code.
4348
4349         * Makefile.am: Removed camel-stream-b64.[ch], and
4350         gmime-base64.[ch].
4351
4352         * camel-mime-part.c (my_get_content_object): Replaced
4353         camel-stream-b64 with camel-stream-filter/camel-mime-filter-basic.
4354         (my_write_content_to_stream): Replaced camel-stream-b64 with the
4355         camel-stream-filter with an encoder.
4356         (my_get_content_object): Also implement quoted-printable decoding.
4357         (my_write_content_to_stream): Also implement quoted-printable
4358         encoding.
4359         (my_get_output_stream): Took out stream-b64 code (nothing's being
4360         executed yet anyway).
4361
4362         * gmime-base64.[ch]: Blown away.  Not used, dont need it.
4363
4364         * camel-mime-utils.h: Added offset for this header.  Records where
4365         it is in the source.
4366
4367         * camel-mime-utils.c (header_raw_append_parse): Add offset
4368         parameter, to store where the header is stored in the stream.
4369         (header_raw_append): Added offset param.
4370         (header_raw_find): Return offset, if a pointer supplied for it.
4371         (header_raw_replace): Add offset param.
4372         (header_content_type_new): New function, to create an empty
4373         content type.
4374         (header_content_type_set_param): Set a parameter in the
4375         content-type.
4376         (header_set_param): Generic header parameter setting function.
4377         (header_decode_string): Handle NULL input.
4378
4379         * camel-mime-parser.c (camel_mime_parser_headers_raw): New
4380         function to get access to all the raw headers.
4381         (folder_scan_header): Keep track of the header start position, and
4382         store it when saving the header.
4383
4384 2000-04-11  NotZed  <NotZed@HelixCode.com>
4385
4386         * camel-mime-utils.c: Moved a bunch of printf's to debug.
4387
4388         * camel-mime-parser.c: Moved a bunch of printf's to debug.
4389         (folder_scan_header): Detect end of each header line using the
4390         last scanned char, and not the last scanned position.
4391
4392         * camel-mime-filter-index.[ch]: Indexing filter.  Indexes unicode
4393         sequences into ibex files.
4394
4395 2000-04-09  NotZed  <NotZed@HelixCode.com>
4396
4397         * camel-mime-part.c: Dont include gmime-base64.h
4398
4399         * camel-mime-filter-charset.c (complete): Implement the completion
4400         function.
4401
4402         * camel-mime-parser.c (folder_scan_step): If we get to the end of
4403         the body data, check any filters for outstanding completion data.
4404         (camel_mime_parser_scan_from): Set whether we scan for "From "
4405         headers or not.
4406
4407         * camel-stream-filter.c (do_read): If we get to end of stream on
4408         the source, then call the filtering completion function to see if
4409         we have any more data to return.
4410
4411         * camel-mime-filter-basic.c (filter): Implement quoted printable
4412         encoding and decoding filters.
4413         (complete): And the complete function as well.
4414
4415         * camel-mime-utils.c (base64_encode_close): Also take an input
4416         buffer, allow closing of filters.
4417         (quoted_encode_step): First cut, simple quoted-printable encoder.
4418         Doesn't handle trailing spaces/tabs on end of line properly yet.
4419         (quoted_encode_close): Complete a quoted-encoding.
4420         (is_qpsafe): New type check, for quoted-printable safe characters
4421         (that do not need encoding).  Thats all bits used in the type
4422         table!  Rebuilt the types table.
4423         (header_content_type_is): Checks a content type against at
4424         type/subtype match.
4425         (header_content_type_param): Handle NULL content type pointer.
4426
4427 2000-04-08  NotZed  <NotZed@HelixCode.com>
4428
4429         * camel-mime-filter-basic.c (filter): Implement the base64
4430         encoder.  Problem is, there is no way to know when to close it.
4431         Close/Reset will have to provide the same args as filter, so it can
4432         flush remaining data *sigh*
4433
4434         * camel-mime-utils.c (base64_encode_step): A rather complex base64
4435         encoder, fast?
4436         (base64_step_close): Companion function to finish off the base64
4437         sequence.
4438
4439         * camel-mime-part.c (my_write_content_to_stream): Changed to use
4440         camel_stream_write_to_stream().
4441
4442         * camel-stream.[ch] (camel_stream_write_to_stream): From
4443         camel_stream_b64_write_to_stream().  Fixed some infinite loop
4444         bugs with error conditions.
4445
4446         * camel-stream-b64.[ch] (camel_stream_b64_write_to_stream): Removed.
4447         This has nothing to do with stream-b64, so i've moved it to
4448         CamelStream.
4449
4450         * camel-mime-utils.h: Add a comment about refcounting
4451         header_content_type struct.
4452
4453         * Makefile.am: Added camel-stream-filter*.[ch].
4454
4455         * camel-stream-filter.[ch]: Class to implement a generic
4456         (multipass) filter ontop of a stream.  Only implements a read-only
4457         stream.
4458
4459         * camel-mime-parser.c (camel_mime_parser_filter_add): Ref the
4460         filter we just added.
4461
4462         * Makefile.am: Added camel-mime-filter*.[ch].
4463
4464         * camel-mime-filter-charset.[ch]: A filter to preform character set
4465         conversion (uses unicode_iconv).
4466
4467         * camel-mime-filter-save.[ch]: A simple filter which will save all
4468         data directly to a file or file descriptor.
4469
4470         * camel-mime-filter-basic.[ch]: Implements the basic mime filters,
4471         base64 and quoted-printable decoding (encoding not implemented yet).
4472
4473         * camel-mime-filter.[ch]: A filtering class, which can filter streams
4474         of data without having to copy them.  Simpler than stream classes,
4475         and can be plugged into a single stream class (when i write it).
4476
4477 2000-04-07  Dan Winship  <danw@helixcode.com>
4478
4479         * providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error
4480         messages.
4481         (finalize): fix a bug in camel_exception usage
4482         (pop3_connect): Remember the password after asking for it the
4483         first time.
4484
4485 2000-04-07  NotZed  <NotZed@HelixCode.com>
4486
4487         * Makefile.am: Added camel-mime-parser/camel-mime-utils.
4488
4489         * camel-mime-parser.c: Fast mime parser.
4490
4491         * camel-mime-utils.c: Mime utility functions, and email header
4492         parsers.
4493
4494 2000-04-07  NotZed  <NotZed@HelixCode.com>
4495
4496         * providers/Makefile.am: Removed smtp for now, its a long way from
4497         building.
4498         * providers/smtp/Makefile.in: Removed file that shouldn't have been
4499         checked in.
4500
4501 2000-04-06  Matt Loper  <matt@helixcode.com>
4502
4503         * camel-folder-pt-proxy.c (_get_full_name): Remove exception param
4504         from get_full_name() called, since get_full_name() was changed to
4505         not have an exception in the last param (see dan's notes below).
4506         (_get_name): same.
4507
4508 2000-04-06  Dan Winship  <danw@helixcode.com>
4509
4510         * camel-store.[ch]: Reorganize the folder-fetching methods and
4511         implement a folder cache so that multiple requests for the same
4512         folder will yield the same CamelFolder object (as long as it
4513         remains active). Includes some code to remove no-longer-active
4514         folders from the cache, but it doesn't get used since nothing is
4515         ever unref'ed in Camel right now...
4516         
4517         * providers/mbox/camel-mbox-store.c:
4518         * providers/pop3/camel-pop3-store.c: update for CamelStore
4519         changes.
4520
4521         * camel-folder.[ch]: Remove the (unused) CamelException argument
4522         from camel_folder_get_name and camel_folder_get_full_name.
4523         (camel_folder_set_name): make this go away since changing a
4524         folder's name after it has been created could result in it
4525         conflicting with a separately-issued folder.
4526         
4527 2000-04-05  Dan Winship  <danw@helixcode.com>
4528
4529         * g_url_new really wanted to take a CamelException. So, rename
4530         Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new
4531         taking an exception), and url-util.[ch] to camel-url.[ch]. Also
4532         force url->port to be numeric and remove camel_service_getport. (I
4533         was confused before: the URL RFC says the port must be numeric, so
4534         we don't want to do getportbyname.)
4535
4536 2000-04-01  Dan Winship  <danw@helixcode.com>
4537
4538         * providers/mbox/camel-mbox-folder.c
4539         (_check_get_or_maybe_generate_summary_file): Compare
4540         mbox_file_size and mbox_modtime to the results of stat()ing the
4541         mbox file, not the summary file. Duh.
4542         (_close): Update the summary's mbox_file_size and mbox_modtime
4543         before writing it to disk.
4544
4545         * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_save,
4546         camel_mbox_summary_load): Wow. I must have been tired when I wrote
4547         this code. First, the comparison bug above. Second, it was using
4548         ntohs and htons instead of ntohl and htonl. Third, I was reading
4549         the status flag byte in two different places and thus getting out
4550         of sync. Fourth, it was writing out field_length bytes of each
4551         header field after having converted field_length to network byte
4552         order, resulting in lots of random crap being appended, and the
4553         summary files being huge. (Fortunately, since the size/modtime
4554         comparison was biffed, the garbage summary read from disk was
4555         always immediately discarded.)
4556
4557         * providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): fix
4558         an off-by-one error that caused the last-used UID to be reused if
4559         the summary file was regenerated. (That one wasn't my fault. :-)
4560
4561 2000-03-31  Dan Winship  <danw@helixcode.com>
4562
4563         * camel-stream-mem.c: implement unimplemented methods
4564
4565         * gmime-content-field.c
4566         (gmime_content_field_construct_from_string):
4567         * data-wrapper-repository.c
4568         (data_wrapper_repository_get_data_wrapper_type):
4569         * camel-simple-data-wrapper.c (my_write_to_stream):
4570         * camel-mime-part.c (my_set_input_stream):
4571         remove debugging printf()s that no longer seem useful.
4572
4573 2000-03-31  Matt Loper  <matt@helixcode.com>
4574
4575         * camel-formatter.c (text_to_html): Added "convert_newlines_to_br"
4576         boolean param, to give the option of not converting '\n's to <br>
4577         tags. This way, when we stick stuff in a <pre> tag, newlines stay
4578         newlines.
4579
4580 2000-03-30  Matt Loper  <matt@helixcode.com>
4581
4582         * camel-formatter.c (handle_text_plain): Use <pre> tag to force
4583         the use of monospaced fonts.
4584
4585 2000-03-30  Dan Winship  <danw@helixcode.com>
4586
4587         * camel-service.c (camel_service_getport): Add a htons in the
4588         default_number case, and document the fact that the function
4589         returns the port in network byte order.
4590
4591         * providers/pop3/camel-pop3-store.c (pop3_connect): Revert
4592         Miguel's change. The port number bug was actually somewhere
4593         else, and the IP address copying code was fine already.
4594         
4595 2000-03-29  Miguel de Icaza  <miguel@gnu.org>
4596
4597         * providers/pop3/camel-pop3-store.c (pop3_connect): Add htons
4598         (port), and only copy 4 bytes for the IP address to prevent a DNS
4599         attack. 
4600
4601 2000-03-28  Dan Winship  <danw@helixcode.com>
4602
4603         * camel-seekable-substream.c
4604         (camel_seekable_substream_new_with_seekable_stream_and_bounds):
4605         make this return a CamelStream rather than a
4606         CamelSeekableSubstream, because that's the way Gtk objects tend to
4607         work.
4608
4609         * camel-service.c (camel_service_gethost,
4610         camel_service_getport): convenience functions to canonicalize
4611         the host and port values of a service's URL.
4612         * providers/pop3/camel-pop3-store.c: use them
4613
4614         * providers/mbox/camel-mbox-folder.c
4615         (_check_get_or_maybe_generate_summary_file): Make this work when
4616         the inbox file doesn't yet exist.
4617
4618 2000-03-27  Dan Winship  <danw@helixcode.com>
4619
4620         * providers/mbox/camel-mbox-folder.c (_append_message): uncomment
4621         the call to unlink the temp file: there's no way to tell
4622         camel_stream_fs to truncate a file, so reusing the same file was
4623         resulting in junk at the ends of messages.
4624
4625         * camel-folder.[ch]: add delete_message_by_{number,uid}.
4626
4627         * providers/pop3/camel-pop3-folder.[ch]: implement
4628         delete_message_by_uid. Add a close method to do expunging
4629         of deleted messages if requested.
4630
4631         * providers/pop3/camel-pop3-store.[ch]: support for
4632         CamelPop3Folder::close. (You have to close the connection
4633         in order to expunge the folder, thus the store may be
4634         connected in the CamelService::is_connected sense when it
4635         is not actually connected to the server.) Also some bugfixes.
4636
4637 2000-03-27  NotZed  <NotZed@HelixCode.com>
4638
4639         * providers/mbox/camel-mbox-folder.c (_append_message): Unref the
4640         output_stream when done, close doesn't do it.
4641         (_append_message): Clear all uid's from the appending messages, so
4642         they are reassigned proper unique id's.
4643
4644         * gmime-utils.c (get_header_array_from_stream): Actually free the
4645         header, it is copied elsewhere.
4646
4647 2000-03-26  NotZed  <NotZed@HelixCode.com>
4648
4649         * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Added
4650         folder parameter to function.  Fixed callers.
4651         (index_message): Index a message as it is assigned a unique id.
4652
4653         * camel-mime-part.c (my_set_content_id): Make sure we malloc and
4654         copy the content_id, otherwise *poof*
4655
4656 2000-03-25  NotZed  <NotZed@HelixCode.com>
4657
4658         * camel-medium.c (_finalize): Another leak, unref the content if
4659         finished with it.
4660
4661         * camel-recipient.c (camel_recipient_table_free): Plug another
4662         memory leak - actually free the recipient table.
4663
4664         * camel-mime-message.c (_finalize): Plugged a memory leak with the
4665         flags table.
4666
4667         * gmime-utils.c (_store_header_pair_from_string): A simpler, more
4668         debuggable and functionally identical header extraction function.
4669
4670 2000-03-24  NotZed  <NotZed@HelixCode.com>
4671
4672         * gmime-content-field.c (gmime_content_field_set_parameter):
4673         Remove the hash table entry before freeing its key and data.
4674
4675 2000-03-27  Dan Winship  <danw@helixcode.com>
4676
4677         * providers/Makefile.am (SUBDIRS): Add pop3.
4678
4679         * providers/pop3/camel-pop3-store.c: keep separate input and
4680         output streams so the output doesn't end up being buffered.
4681
4682         * providers/pop3/camel-pop3-folder.c (get_message_by_number):
4683         finish implementing this.
4684
4685 2000-03-27  Michael Meeks  <michael@helixcode.com>
4686
4687         * camel-mime-part.c (my_set_disposition): fix so less broken.
4688         (my_finalize): remove dodgy disposition free.
4689
4690         * camel-data-wrapper.c (my_set_mime_type_field): unref instead of
4691         free on mime_type.
4692
4693 2000-03-27  Dan Winship  <danw@helixcode.com>
4694
4695         * camel-service.c (camel_service_free_auth_types): new routine to
4696         free the data allocated by camel_service_query_auth_types.
4697
4698         * providers/pop3/camel-pop3-store.c (free_auth_types): implement
4699
4700         * camel-stream-mem.c (camel_stream_mem_new_with_buffer): rename
4701         camel_stream_mem_new_with_buffer to ..._with_byte_array and add a
4702         new ..._with_buffer that takes a char * rather than a GByteArray.
4703
4704         * Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it
4705         redundant.
4706
4707 2000-03-25  Dan Winship  <danw@helixcode.com>
4708
4709         * camel-folder-summary.[ch]: change the CamelFolderSummary
4710         interfaces to allow partial summary queries (for dealing
4711         with very large folders). Remove the "extended_fields" from
4712         CamelFolderInfo and CamelMessageInfo: this is better dealt
4713         with by subtyping.
4714
4715         * providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
4716         subclass of CamelFolderSummary. Update interfaces for that. Remove
4717         the internal/external summary distinction. Remove the (unused) md5
4718         checksum in the folder summary. Change the summary file format
4719         (primarily to make it no longer byte-order dependent) and add a
4720         version number to it so it will be easier to change in the future.
4721         
4722         * providers/mbox/camel-mbox-folder.[ch]
4723         * providers/mbox/camel-mbox-search.c
4724         * providers/mbox/camel-mbox-utils.c: update for summary changes
4725
4726         * camel-exception-list.def: add
4727         CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID
4728         
4729 2000-03-23  NotZed  <NotZed@HelixCode.com>
4730
4731         * providers/mbox/camel-mbox-provider.c: Added flag to provider
4732         initialisation, to match changed structure.
4733
4734 2000-03-22  NotZed  <NotZed@HelixCode.com>
4735
4736         * camel-folder.[ch]: Added async search api.
4737
4738         * providers/mbox/camel-mbox-search.c
4739         (camel_mbox_folder_search_by_expression): Changed to use an
4740         asynchronous interface.
4741         (camel_mbox_folder_search_cancel): Cancel function for async
4742         interface.
4743
4744 2000-03-23  Dan Winship  <danw@helixcode.com>
4745
4746         * camel-stream-buffer.c (camel_stream_buffer_read_line): Function
4747         to read one line of any size from a stream and return it in
4748         allocated memory.
4749
4750 2000-03-22  Dan Winship  <danw@helixcode.com>
4751
4752         * camel-service.c (camel_service_query_auth_types): New function
4753         to query a service for the authentication protocols it supports.
4754         * providers/pop3/camel-pop3-store.c (query_auth_types): implement
4755
4756         * camel-provider.c (camel_provider_scan): New function to
4757         scan the provider dir and return a list of all providers.
4758
4759         * providers/pop3/camel-pop3-folder.c: fill this in partially
4760         * providers/pop3/camel-pop3-store.c: make camel_pop3_command
4761         return the text after "+OK"/"-ERR" and add a separate
4762         camel_pop3_get_additional_data to get the message body or
4763         whatever. Also make them take a CamelPop3Store rather than
4764         a CamelStreamBuffer.
4765
4766 2000-03-22  Matt Loper  <matt@helixcode.com>
4767
4768         * camel-formatter.c (debug): Disabled some useless debug
4769         messaging.
4770
4771 2000-03-21  Dan Winship  <danw@helixcode.com>
4772
4773         * providers/pop3: some initial bits of the POP3 provider, to
4774         make Matt happy. Incomplete, untested, etc.
4775
4776 2000-03-21  bertrand  <bertrand@helixcode.com>
4777
4778         * providers/mbox/camel-mbox-summary.c 
4779         (camel_mbox_summary_append_internal_to_external): copy the size field
4780
4781         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize 
4782         message_info to NULL
4783
4784         * camel-folder-summary.h: added the size field.
4785
4786         * providers/mbox/camel-mbox-summary.h: 
4787         added the received_date field.
4788
4789         * providers/mbox/camel-mbox-summary.c:
4790         documented all functions.
4791
4792         * camel-folder-summary.h: name change and 
4793         new fields.
4794
4795         * providers/mbox/camel-mbox-search.c: update to 
4796         conform to name change in the summary fields.
4797
4798 2000-03-10  bertrand  <bertrand@helixcode.com>
4799
4800         * camel-service.h: cosmetic changes.
4801
4802 2000-03-09  Dan Winship  <danw@helixcode.com>
4803
4804         * s/HelixCode/Helix Code, Inc./ in the copyrights
4805
4806 2000-03-07  bertrand  <bertrand@helixcode.com>
4807
4808         * camel-formatter.c (handle_mime_part): 
4809         plug mem leaks due to bad documentation
4810         of camel_content_field_get_mime_type
4811         (print_camel_body_part): idem
4812         (handle_multipart_alternative): idem
4813
4814         * gmime-content-field.c (gmime_content_field_get_mime_type): 
4815         documentation fix.
4816
4817
4818         * camel-mime-part.c (my_finalize): unref the 
4819         content_input_stream if any. 
4820
4821 2000-03-06  bertrand  <bertrand@helixcode.com>
4822
4823         * camel-stream-fs.c (_seek): fix a bogus calculation
4824         in the return position.
4825
4826 2000-03-05  bertrand  <bertrand@helixcode.com>
4827
4828         * camel-session.h: cosmetic fixes.
4829
4830         * camel-stream-fs.c (_read): 
4831         (_seek): fixed the current position so that it refers
4832         to the current position in the stream, not in its parent.
4833
4834 2000-03-04  NotZed  <NotZed@HelixCode.com>
4835
4836         * providers/mbox/camel-mbox-search.c
4837         (camel_mbox_folder_search_by_expression): Ref the summary
4838         after we have got it.
4839
4840 2000-03-04  bertrand  <bertrand@helixcode.com>
4841
4842         * camel-mime-part.c (my_write_content_to_stream): 
4843         stream the raw content instead of nothing if the encoding
4844         is not supported.
4845
4846         * camel-stream-fs.c (_seek): handle eos more
4847         properly.
4848
4849         * camel-formatter.c (get_bonobo_tag_for_object): 
4850         bonobo-goad-id is the good key to look for. 
4851         (get_bonobo_tag_for_object): close the <object> tag.
4852         (get_bonobo_tag_for_object): the correct syntax for the
4853         to set a parameter inside an <object> tag is :
4854         <object classid="..."> <param name="uid" value="..."> <param ...>
4855         </object>
4856
4857 2000-03-03  bertrand  <bertrand@helixcode.com>
4858
4859         * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): 
4860         use set_input_stream instead of construct_from_stream
4861         to feed the message object. 
4862
4863         * camel-data-wrapper.c (my_write_to_stream): reset output stream.
4864         (my_set_input_stream): unref the previous input stream.
4865         use the set_output_stream for default behaviour.
4866         (my_set_output_stream): unref previous output stream.
4867
4868         * camel-mime-part.c (my_write_content_to_stream): reset content
4869         object output stream.
4870
4871 2000-03-03  NotZed  <NotZed@HelixCode.com>
4872
4873         * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Make
4874         sure we open with create with a creation mask.
4875
4876 2000-03-01  NotZed  <NotZed@HelixCode.com>
4877
4878         * camel-mime-part-utils.c
4879         (camel_mime_part_construct_content_from_stream): DO NOT assert on
4880         content type, we have fallback code 4 lines below it ... *sigh*
4881
4882 2000-02-29  NotZed  <NotZed@HelixCode.com>
4883
4884         * Makefile.am (libcamelinclude_HEADERS): Added camel-stream-buffer
4885         to build.
4886
4887         * camel-stream-buffer.[ch]: Generic buffer which can be applied to
4888         any stream.
4889
4890 2000-03-03  bertrand  <bertrand@helixcode.com>
4891
4892         * camel-formatter.c (handle_image): in the case
4893         of images, put the content object output stream
4894         in the url. This allows the message browser
4895         to show inline images.
4896
4897         * camel-stream-b64.c (my_read_encode): fixed state
4898         0 keep value. 
4899
4900 2000-03-02  bertrand  <bertrand@helixcode.com>
4901
4902         * camel-stream-b64.c (my_read_encode): don't forget to 
4903         set the state to 0 after 3.
4904         (my_read_encode): don't forget to encode, even in state 3.
4905
4906         * camel-simple-data-wrapper.c: static functions are prefixed 
4907         with my_ instead of _
4908         * camel-multipart.c: static functions are prefixed 
4909         with my_ instead of _
4910         (my_write_to_stream): commented.
4911         (my_write_to_stream): warning in case the boudary is set
4912         but is a zero length string.
4913
4914         * camel-mime-part.c (camel_mime_part_encoding_from_string): 
4915         remove debug trace. 
4916         
4917         * camel-mime-part.c: Replaced all static functions
4918         with name begining with _ by the same name begining
4919         with "my_" to prevent the possible conflicts 
4920         with system symbols Dan warned us about. 
4921         
4922         * camel-stream-b64.c (camel_stream_b64_write_to_stream): 
4923         use CamelStreamB64 type for the input stream.
4924
4925         * camel-mime-part.c (_get_content_object): remove 
4926         debugging trace
4927         (_write_content_to_stream): implement the b64 
4928         encoding the new way (that is using camel_stream_b64)
4929
4930         * camel-data-wrapper.c (my_write_to_stream): 
4931         fix implementation so that it writes properly
4932         to the output stream even.
4933
4934         * camel-stream-b64.c (camel_stream_b64_write_to_stream): 
4935         fix implementation. 
4936
4937 2000-02-29  bertrand  <bertrand@helixcode.com>
4938
4939         * camel-stream-b64.c (camel_stream_b64_write_to_stream): new
4940         utility function. 
4941
4942         * camel-data-wrapper.c (_write_to_stream): default
4943         implementation. 
4944
4945         * gmime-utils.c (_store_header_pair_from_string): 
4946         revert strange changes. 
4947
4948         * camel-stream-b64.c (my_read_decode): set eos to true when we
4949         have read the whole input stream. 
4950         (my_reset): set eos to FALSE.
4951
4952 2000-02-28  NotZed  <NotZed@HelixCode.com>
4953
4954         * camel-mime-part.c (_parse_header_pair): Dont free this either.
4955
4956         * camel-medium.c (_remove_header): Ugh, dont free the header
4957         before we actually remove it.
4958         (_add_header): Ugh, dont free hashtable entries which may be
4959         duplicated (hash_insert _will_ reference that memory).
4960
4961         * string-utils.c (string_trim): Trimming a 0-length string is not
4962         an error.
4963
4964         * camel-mime-message.c (_parse_header_pair): Fixed very broken
4965         memory handling of header_name/value.
4966
4967         * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev):
4968         Initialise end_of_last_message always.
4969         (camel_mbox_copy_file_chunk): Stop trying to read if we run out of
4970         data, rather than looping forever.
4971         (camel_mbox_write_xev): Use an open flag when opening with create.
4972
4973         * camel-folder.c (camel_folder_search_by_expression): No, its not
4974         a fatal error to search on a non-searchable folder, you just dont
4975         get any matches.
4976         (_open): Dont open an opened folder (i dont see why this is really
4977         a bug, but what the hell ...)
4978
4979         * providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
4980         (_open): Call parent class to perform open.  Remove folder-open
4981         check to parent instead.
4982         (_create): open takes a creation mask, dont use umask to try and
4983         set the open mode.
4984         (_delete): Dont bother checking folder==NULL, its already been
4985         checked on the external interface (changed to an assertion, this
4986         would have to be a camel bug).
4987         (_delete_messages): Likewise.
4988         (_create): Ditto.
4989         (_init): Dont go and clear all the paths and shit that the parent
4990         open just setup for us.
4991         (_delete_messages): Get rid of more umask stuff.
4992         (_append_message): Make sure we pass file mode to open with create.
4993         (_append_message): Cleaned up some indenting to make it readable.
4994
4995         * camel-stream-b64.c (my_read_encode): Fixed a typo.
4996
4997         * providers/mbox/camel-mbox-search.c: Changed to use e-sexp,
4998         rather than filter-sexp.
4999
5000 2000-02-28  bertrand  <bertrand@helixcode.com>
5001
5002         * camel-stream-b64.c (my_read_encode): encoding
5003         filter.
5004
5005 2000-02-23  bertrand  <Bertrand.Guiheneuf@aful.org>
5006
5007         * camel-stream-b64.c: changed the __static 
5008         suffix into a my_ prefix. 
5009         (camel_stream_b64_set_mode): reset the persistent
5010         status. 
5011         (my_read_decode): remove superfluous %
5012         
5013         * providers/mbox/camel-mbox-utils.c (camel_mbox_copy_file_chunk): 
5014         fix exception description message.
5015
5016 2000-02-24  Dan Winship  <danw@helixcode.com>
5017
5018         * camel-session.c: Add camel_session_get_transport_for_protocol.
5019
5020         * camel-transport.h:
5021         * camel-transport.c: Add an abstract CamelTransport class.
5022
5023         * providers/sendmail/*: A CamelTransport that uses sendmail
5024         to deliver mail.
5025
5026 2000-02-24  Dan Winship  <danw@helixcode.com>
5027
5028         * camel-folder.c: use CamelExceptions for run-time errors, not
5029         incorrect code. Don't bother validating that an object exists from
5030         inside one of its methods, since you couldn't have gotten there if
5031         it didn't. Fix some code style bugs.
5032
5033         (_init): Rename init_with_store to init and add parent_folder,
5034         separator, and name arguments.
5035         (_set_name): Get separator from self, not parent_store now.
5036
5037         * camel-store.h:
5038         * camel-store.c: Remove get/set_separator.
5039
5040         * providers/mbox/: Update for above.
5041
5042 2000-02-23  Dan Winship  <danw@helixcode.com>
5043
5044         * camel-medium.c (_finalize): Free the data in the headers hash
5045         table.
5046         (_add_header): g_strdup the header name and value when adding it.
5047
5048         * camel-mime-part-utils.c
5049         (camel_mime_part_construct_headers_from_stream): Free the header
5050         data after calling camel_medium_add_header, since it will have
5051         g_strdup()ed it itself.
5052
5053 2000-02-22  NotZed  <NotZed@HelixCode.com>
5054
5055         * providers/mbox/camel-mbox-search.c: Dont compile by default.
5056
5057         * providers/mbox/Makefile.am: Fuck off the filter code.
5058
5059 2000-02-22  bertrand  <Bertrand.Guiheneuf@aful.org>
5060
5061         * camel-stream-b64.c (read_decode__static): 
5062         don't read the char if we reached the length
5063         of the output buffer. Hours lost on this
5064         %$!@# bug : 3.5
5065
5066         * camel-folder.c (camel_folder_get_subfolder): 
5067         (camel_folder_create): 
5068         (camel_folder_delete): 
5069         (camel_folder_delete_messages): 
5070         (camel_folder_list_subfolders): 
5071         (camel_folder_expunge): 
5072         (camel_folder_get_message_by_number): 
5073         (camel_folder_get_message_count): 
5074         (camel_folder_append_message): 
5075         (camel_folder_copy_message_to): 
5076         (camel_folder_get_summary): 
5077         (camel_folder_get_message_uid): 
5078         (camel_folder_get_message_by_uid): 
5079         (camel_folder_get_uid_list): 
5080         Check folder state (open/close) and raise an
5081         exception if it is not ok. 
5082         
5083         * providers/mbox/camel-mbox-folder.c (_create): 
5084         create the file and the path with two different
5085         names.
5086
5087         * camel-folder.c (_create): handle the case 
5088         when the folder name starts with '/'
5089
5090         * camel-exception.c (camel_exception_new): use 
5091         (void) instead of () in decl.
5092
5093         * camel-exception.h: cosmetic fixes.
5094
5095         * camel-exception.c (camel_exception_init): new routine.
5096         Fix a bug in mail/message-list.c
5097         
5098
5099         * camel-folder.h: cosmetic changes.
5100
5101         * camel-stream-b64.c (reset__static): added a
5102         reset method. Thanks message-browser to find
5103         so much bugs :)
5104
5105         * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
5106         Unicode libs.
5107
5108 2000-02-21  bertrand  <Bertrand.Guiheneuf@aful.org>
5109
5110         * camel-formatter.c (lookup_unique_id): 
5111         awful hack to test get_output_stream.
5112         * camel-stream-b64.[ch] :
5113         b64 encoding/decoding is now implemented as
5114         a stream. 
5115         
5116
5117 2000-02-21  bertrand  <Bertrand.Guiheneuf@aful.org>
5118
5119         * camel-seekable-substream.c (_reemit_parent_signal): 
5120         emit "data_available" when parent stream emits it. 
5121
5122
5123 2000-02-21  NotZed  <NotZed@HelixCode.com>
5124
5125         * providers/mbox/Makefile.am: Uh, fixed LIBADD again.  What was
5126         there was never ever going to work, wasn't it tested?
5127
5128
5129 2000-02-21  Dan Winship  <danw@helixcode.com>
5130
5131         * camel-session.h: (struct _CamelSession): Add authenticator.
5132
5133         * camel-session.c (camel_session_new): Add authenticator.
5134         (camel_session_query_authenticator): New function to query the
5135         session authenticator for password, etc, information.
5136
5137 2000-02-21  Dan Winship  <danw@helixcode.com>
5138
5139         * camel-session.c: add CamelExceptions to several functions. Use
5140         camel_session_new to initialize the session and URL fields of
5141         created CamelStores as appropriate.
5142
5143         * camel-store.h:
5144         * camel-store.c
5145         * camel-service.h:
5146         * camel-service.c: Move the session and url (and associated
5147         functions) from CamelStore to CamelService. Add url_flags to
5148         CamelService so subclasses can specify which URL components
5149         are mandatory for them. Add camel_session_new for
5150         camel_session_get_store* to use.
5151
5152         * providers/mbox/camel-mbox-folder.c:
5153         * providers/mbox/camel-mbox-store.c:
5154         * providers/mbox/camel-mbox-store.h: Update for above changes.
5155
5156         * camel-exception-list.def: Once camel is being used for real,
5157         exceptions won't be renumberable. So renumber them now to make
5158         more room to add exceptions to the various categories later, and
5159         add a big warning message.
5160
5161 2000-02-20  Dan Winship  <danw@helixcode.com>
5162
5163         * providers/mbox/Makefile.am: add libibex back to
5164         libcamelmbox_la_LIBADD
5165
5166 2000-02-18  NotZed  <NotZed@HelixCode.com>
5167
5168         * providers/mbox/camel-mbox-search.h
5169         (camel_mbox_folder_search_by_expression): Added exception to call,
5170         and fixed caller.
5171
5172         * providers/mbox/camel-mbox-search.c
5173         (camel_mbox_folder_search_by_expression): Major changes, to use
5174         the sexp evaluator from filter/filter-sexp.c to implement the
5175         searching.
5176         (func_body_contains): Changed to support multiple strings in 1
5177         command (results or'd together)
5178
5179         * url-util.c (g_url_new): Fixed a typo (colon == 0 isn't right),
5180         and made it so full url's are absolute pathed (Dan, this is how it
5181         has to work!).  Also, always include a path part, even if it is an
5182         empty string.
5183
5184 2000-02-18  Dan Winship  <danw@helixcode.com>
5185
5186         * camel/camel-types.h: New header with the typedefs for all camel
5187         classes. Now the class headers can just include this and the
5188         header for the parent type. This makes it possible for
5189         CamelService to include a CamelSession without creating an
5190         #include loop.
5191
5192         * camel/*:      
5193         * composer/e-msg-composer-attachment-bar.h:
5194         * mail/folder-browser.c:
5195         * mail/message-list.c: frob #includes to match the new reality
5196
5197 2000-02-17  Dan Winship  <danw@helixcode.com>
5198
5199         * camel/camel-service.h:
5200         * camel/camel-service.c: Make camel-service us a Gurl internally.
5201         Remove the login/password interfaces and instead provide
5202         camel_service_connect_with_url. Add CamelExceptions
5203
5204 2000-02-17  bertrand  <Bertrand.Guiheneuf@aful.org>
5205
5206         * camel/camel-formatter.c (handle_text_plain): 
5207         (handle_text_html): use camel_stream_reset instead
5208         of seek. The formatter should be able to work 
5209         with all streams, not only seekable streams. 
5210         In the case where some provider implementation
5211         would not be able to provide a reset method 
5212         to their stream, implementors would have
5213         to find a workaround.
5214
5215         * camel/camel-session.c (camel_session_new): use
5216         (void) instean of () in function decl.
5217
5218         * camel/camel-folder.c: ifdef async operation 
5219         related code. 
5220
5221         * camel/camel-seekable-stream.c (_seek): added a warning.
5222         (_reset): default implementation of reset for seekable
5223         stream.
5224
5225         * camel/camel-mime-message.h: set_received_date declaration fix.
5226         cosmetic changes.
5227
5228         * camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init): 
5229         use (void) instead of ().
5230
5231         * camel/camel-stream.c (camel_stream_reset): 
5232         new method for CamelStream.
5233
5234 2000-02-17  Dan Winship  <danw@helixcode.com>
5235
5236         * camel/url-util.c (g_url_to_string): New function to convert
5237         a Gurl back into a char *.
5238
5239 2000-02-17  bertrand  <Bertrand.Guiheneuf@aful.org>
5240
5241         * camel/camel-formatter.c (handle_text_plain): 
5242         revamped so that it uses the output stream
5243         of the data wrapper
5244         (handle_text_html): ditto.
5245         
5246         
5247         * camel/camel-simple-data-wrapper.h: 
5248         * camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_new): 
5249         use (void) instead of ().
5250         (_get_output_stream): simple implementation. 
5251
5252 2000-02-16  bertrand  <Bertrand.Guiheneuf@aful.org>
5253
5254         * camel/camel-data-wrapper.c (_set_input_stream): ref input stream
5255         (_set_output_stream): ref output stream
5256         (_finalize): unref input and output streams
5257
5258         * camel/camel-seekable-substream.c (_set_bounds): don't
5259         seek the begining of the substream.
5260         (_eos): fix eos condition testing. 
5261         (_finalize): unref parent stream
5262         (_init_with_seekable_stream_and_bounds): ref parent stream
5263
5264         * camel/gstring-util.c (g_string_equal_for_hash): 
5265         (g_string_equal_for_glist): return type is int.
5266
5267         * camel/camel.h: 
5268         * camel/camel.c (camel_init): use (void) 
5269         instead of ().
5270         
5271 2000-02-16  NotZed  <NotZed@HelixCode.com>
5272
5273         * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Added
5274         libfilter to link line (temporarily?).  Required for
5275         filter-sexp.
5276
5277 2000-02-15  bertrand  <bertrand@helixcode.com>
5278
5279         * camel/camel-multipart.c (_localize_part): 
5280         this routine replaces the _read_part routine
5281         and does not store the part in a buffer. 
5282         (_set_input_stream): use the set_input_stream
5283         instead of the construct_from_stream.
5284         each bodypart is given an input stream. 
5285
5286         * camel/camel-mime-part-utils.c: 
5287         include the data-wrapper-repository header. 
5288         (camel_mime_part_construct_content_from_stream): 
5289         use the set_input_stream instead of the 
5290         construct_from_stream method. 
5291
5292         * camel/camel-seekable-substream.c (_set_bounds): 
5293         cur position is set to 0 not to inf_bound.
5294
5295 2000-02-15  bertrand  <Bertrand.Guiheneuf@aful.org>
5296
5297         * camel/camel-mime-part.c: include gmime-base64.h
5298         various compilation and runtime fixes.
5299         (_set_input_stream): store the input substream 
5300         for the content object.
5301
5302         * camel/camel-data-wrapper.h: declare the 
5303         set/get function on input/output stream.
5304
5305         * camel/camel-mime-part.c (_get_content_object): 
5306         don't use a temporary mem stream.       
5307
5308         * camel/camel-seekable-substream.c (_seek): 
5309         (_eos): 
5310         (_read): the substream can be unlimited in length
5311
5312         * camel/camel-data-wrapper.c (camel_data_wrapper_class_init): 
5313         set the get/set_input/output_stream methods.    
5314
5315         * camel/camel-multipart.c (_construct_from_stream): 
5316         camel_stream_seek -> camel_seekable_stream_seek
5317
5318 2000-02-14  Miguel de Icaza  <miguel@gnu.org>
5319
5320         * camel/providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Add
5321         the unicode libraries as well.
5322
5323         * camel/camel-provider.c (camel_provider_register_as_module): Add
5324         error reporting here.  Desire to use Solaris increases.  Hair loss
5325         in the last two hours: 5,400.
5326
5327         * camel/providers/mbox/camel-mbox-provider.c
5328         (camel_mbox_get_provider): Renamed function.
5329
5330         * camel/camel.h: All include files use camel/ now here.
5331
5332         * camel/providers/mbox/Makefile.am: Drop all the dynamism from
5333         Camel, and make this a standard library.
5334
5335 2000-02-14  bertrand  <Bertrand.Guiheneuf@aful.org>
5336
5337         * camel/gmime-utils.c (get_header_array_from_stream): use the 
5338         eos stream method. 
5339         (gmime_read_line_from_stream): ditto.
5340
5341         * camel/camel-stream-fs.h (struct ): add the eof field
5342         cosmetics changes. 
5343
5344         * camel/camel-stream-fs.c (camel_stream_fs_init): set eof.
5345         (_read): set eof on end of file.
5346         (_eos): implemented.
5347
5348         * camel/gmime-utils.c (get_header_array_from_stream): 
5349         make a blocking version of the header parser. 
5350         When the fs stream uses gnome-vfs, this should
5351         be changed. 
5352         (gmime_read_line_from_stream): ditto. 
5353
5354 2000-02-11  bertrand  <Bertrand.Guiheneuf@aful.org>
5355
5356         * camel/camel-stream-fs.c: 
5357         everywhere, when using the cur_pos field, do it
5358         on the CamelSeekableStream object.
5359         (_seek): small fix. 
5360
5361         * camel/camel-seekable-stream.c (camel_seekable_stream_seek): 
5362         s/camel_stream_seek/camel_seekable_stream_seek/g
5363
5364         * camel/camel-seekable-stream.h: 
5365         (struct ): added a field to store the
5366         current position.
5367
5368         * camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position): 
5369         New function. Allows to get the current position 
5370         of a seekable stream.
5371         
5372
5373 2000-02-13  NotZed  <notzed@zedzone.helixcode.com>
5374
5375         * providers/mbox/camel-mbox-search.c: New file, implements the
5376         search api for mbox folders.
5377
5378         * providers/mbox/Makefile.am: Link with ibex.
5379
5380         * camel-folder.c (camel_folder_has_search_capability): Api
5381         additions.
5382         (camel_folder_search_by_expression): Ditto.
5383
5384 2000-02-12  NotZed  <notzed@zedzone.helixcode.com>
5385
5386         * providers/mbox/camel-mbox-folder.c (_set_name): Setup index
5387         filename as well.
5388         (_init_with_store): Init index filename.  Hmm, none of these
5389         names ever seem to get free'd (FIXME?)
5390
5391         * providers/mbox/camel-mbox-folder.h: Add index file name.
5392
5393 2000-02-12  NotZed  <notzed@helixcode.com>
5394
5395         * camel-folder.h: Add folder search functions.
5396
5397         ** Created ChangeLog just for camel **
5398          - refer to ../ChangeLog for changes prior to this date.