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