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