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