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