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