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