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