1 2000-09-19 Jeffrey Stedfast <fejj@helixcode.com>
3 * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
4 linewrap filter to achieve full RFC0821 compliance.
6 * camel-mime-filter-linewrap.[c,h]: New mime-filter to word-wrap.
8 2000-09-19 Jeffrey Stedfast <fejj@helixcode.com>
10 * camel-internet-address.c (internet_encode): When encoding the
11 internet address, quote the name as the name may have commas or
12 any other token which may later confuse our address parser.
14 2000-09-19 Dan Winship <danw@helixcode.com>
16 * providers/imap/camel-imap-folder.c
17 (imap_get_subfolder_info_internal): Fix the case where INBOX
18 isn't returned in the folder listing.
20 2000-09-19 Dan Winship <danw@helixcode.com>
22 * camel-folder.c: (init): Removed
23 (camel_folder_init, camel_folder_construct): New object init
24 function and public object constructor to replace the old init
25 method in a more Gtk-like fashion.
27 (get_parent_folder, camel_folder_get_parent_folder): Removed. No
28 CamelFolder subclass was ever setting the parent_folder member, no
29 code has ever needed to look at it, and fixing it would actually
32 (get_subfolder_info, camel_folder_get_subfolder_info): Renamed
33 from ..._names. Deals in CamelFolderInfo now.
34 (free_subfolder_info, camel_folder_free_subfolder_info): Likewise.
36 (get_subfolder, camel_folder_get_subfolder): Removed.
37 CamelFolderInfo contains the subfolder's full name, so this is
38 unnecessary now, and removing it lets us get rid of the
39 CamelFolder separator member, which is needed for the default
40 implementation of this function, but not otherwise needed for most
43 Also, lots of code style fixes.
45 * providers/*: Update CamelFolder subclasses for changes, although
46 none of them fill in the message counts in the CamelFolderInfo
49 2000-09-18 Christopher James Lahey <clahey@helixcode.com>
51 * camel-folder-search.c, camel-folder-search.h,
52 camel-remote-store.c, providers/imap/camel-imap-folder.c,
53 providers/imap/camel-imap-store.c: Fixed the #include lines to
54 deal properly with gal.
56 2000-09-17 Dan Winship <danw@helixcode.com>
58 * camel-folder-summary.h: update CamelFolderInfo
59 * camel-folder-summary.c (camel_folder_info_free): New function to
60 free the contents of a CamelFolderInfo
62 2000-09-15 Dan Winship <danw@helixcode.com>
64 * camel.c (camel_init): Set camel_verbose_debug to TRUE if
65 CAMEL_VERBOSE_DEBUG is set in the environment.
67 * camel-remote-store.c (remote_send_line, remote_recv_line): only
68 log if camel_verbose_debug is TRUE.
70 2000-09-14 Jeffrey Stedfast <fejj@helixcode.com>
72 * providers/imap/camel-imap-store.c (get_folder): Don't use
73 dir_sep as top-level directory, use "/".
75 * providers/imap/camel-imap-folder.c (imap_expunge): Get rid of
78 2000-09-13 Dan Winship <danw@helixcode.com>
80 * providers/imap/camel-imap-folder.c (imap_expunge): Don't look at
81 the response of the command. camel_imap_command_extended()
82 processes EXPUNGE responses itself, so if we do it here too we
83 remove twice as many summary items as we should.
85 2000-09-13 Jeffrey Stedfast <fejj@helixcode.com>
87 * providers/imap/camel-imap-store.c (imap_folder_exists): Rewrote
88 to take a third argument (gboolean *selectable) so that we can
89 find out if the folder is selectable or not as we look to see if
90 it exists. Also, don't use EXAMINE because that will not work on
91 non-selectable folders, so use LIST instead.
92 (get_folder): Check to see if the folder exists even vefore
93 calling imap_create as this will save time. If the folder does
94 exist, find out if it's selectable. Moved the call to refresh_info
97 * providers/imap/camel-imap-folder.c (imap_get_uids): Check for a
99 (camel_imap_folder_new): Don't call refresh_info here - call it in
100 get_folder() because we don't know if this folder even exists on
101 the server yet! And even if it does, we don't know if it can hold
104 2000-09-12 Jeffrey Stedfast <fejj@helixcode.com>
106 * camel-mime-parser.c (folder_scan_step): Make sure *datalength is
107 > 0 before calling camel_mime_filter_filter otherwise we will get
108 a segfault if the filter calls iconv().
110 2000-09-08 Christopher James Lahey <clahey@helixcode.com>
112 * providers/nntp/camel-nntp-auth.c,
113 providers/nntp/camel-nntp-auth.h: Fixed a warning.
115 2000-09-07 Dan Winship <danw@helixcode.com>
117 * camel-session.c (camel_session_get_storage_path): Make this not
120 2000-09-07 Dan Winship <danw@helixcode.com>
122 * camel-session.c (camel_session_new): Make this take a path to a
123 directory that Camel can use for its own nefarious purposes.
124 (camel_session_get_storage_path): New function to return a path
125 that a service can use for its own nefarious sub-purposes.
127 * camel-service.c (camel_service_get_path): New method (and
128 useful default implementation) to get a (relative) pathname
129 corresponding to the service.
131 2000-09-06 Dan Winship <danw@helixcode.com>
133 * providers/pop3/camel-pop3-store.c (connect_to_server): Make KPOP
136 2000-09-06 Jeffrey Stedfast <fejj@helixcode.com>
138 * camel-mime-message.c (camel_mime_message_get_received_date):
139 Implemented (someone added these to camel-mime-message.h but never
140 implemented them!!) - though it may not be right.
141 (camel_mime_message_get_sent_date): Same.
143 2000-09-05 Dan Winship <danw@helixcode.com>
145 * camel-mime-part.c (camel_mime_part_get_filename): If a MIME part
146 has no Content-Disposition, but does have a "name" on the
147 Content-Type, return that as the filename.
148 (process_header): strstrip the Content-Description
150 2000-09-05 Chris Toshok <toshok@helixcode.com>
152 * providers/nntp/camel-nntp-utils.c (get_OVER_headers): care about
154 (get_HEAD_headers): same.
155 (camel_nntp_get_headers): same.
157 * providers/nntp/camel-nntp-store.h: get rid of
158 CAMEL_NNTP_OK/ERR/FAIL.
160 * providers/nntp/camel-nntp-store.c
161 (camel_nntp_store_get_extensions): take CamelException arg and
162 pass along to camel_nntp_command.
163 (camel_nntp_store_get_overview_fmt): same.
164 (nntp_store_connect): convert to using constants in
165 camel-nntp-resp-codes.h
166 (nntp_store_get_folder): make use of camel_nntp_folder_new.
167 (camel_nntp_command_send_recv): new function to deal with auth
169 (camel_nntp_command): split out most of this function into
170 camel_nntp_command_send_recv. also, return the actual response
171 code instead of CAMEL_NNTP_OK/ERR/FAIL.
173 * providers/nntp/camel-nntp-resp-codes.h: new file.
175 * providers/nntp/camel-nntp-folder.h: prototype for
176 camel_nntp_folder_new.
178 * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): new
179 convenience function.
180 (nntp_folder_get_message): care more about the actual response
183 * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
185 (libcamelnntpinclude_HEADERS): add camel-nntp-auth.h.
187 * providers/nntp/camel-nntp-auth.h: new file.
189 * providers/nntp/camel-nntp-auth.c: new file.
191 2000-09-05 Peter Williams <peterw@helixcode.com>
193 * providers/imap/camel-imap-store.c (imap_folder_exists): Don't free the
194 result on error; the exception will have the relevant info.
196 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Check for
199 * providers/imap/camel-imap-store.c (imap_connect): Check the exception
200 on the refresh_folders call.
202 * providers/imap/camel-imap-store.h: Clean up some now-unused fields.
204 * camel.c (camel_init): Call unicode_init again, now that libunicode
205 will not initialize itself twice.
207 2000-09-02 Lauris Kaplinski <lauris@helixcode.com>
209 * camel-folder-search (search_header_contains): Use e_utf8_strstrcase
211 2000-09-01 Christopher James Lahey <clahey@helixcode.com>
213 * providers/imap/camel-imap-utils.c: Removed some unused
216 2000-09-01 Peter Williams <peterw@helixcode.com>
218 * providers/nntp/camel-nntp-store.c (camel_nntp_command): Initialize
219 the statically-allocated CamelException so that it doesn't contain
220 junk data that camel_exception_set() may try to free.
221 (camel_nntp_store_get_extensions): Same.
222 (camel_nntp_store_get_overview_fmt): Same.
224 * providers/pop3/camel-pop3-store.c (camel_pop3_command): Typo
225 fix (if (*ret) -> if (ret)).
227 * providers/pop3/camel-pop3-store.c (pop3_connect): Set the
228 port # back to what was specified ASAP, so that the hash of
229 the URL doesn't change (which causes a failure in
230 service_cache_remove that leads to a segfault).
232 * providers/imap/camel-imap-store.c (imap_connect): Clear the
233 exception after a failed LOGIN so that it doesn't pass through
234 to the upper level and make mail think that the login failed.
236 * providers/pop3/camel-pop3-store.c (pop3_connect): As above.
238 2000-08-31 Peter Williams <peterw@helixcode.com>
240 * providers/pop3/camel-pop3-store.c (camel_pop3_store_get_type):
241 Implement POP3 with the CamelRemoteStore now.
242 (connect_to_server): Hack this a bit to get KPOP to work. Obey
243 the new connection semantics of the remote store (implicitly).
244 (query_auth_types_connected): Clear exceptions after attempts
245 to connect; the code at the bottom will catch hard errors.
246 Use camel_service_connect.
247 (camel_pop3_command): Take a CamelException; now, when an error
248 occurs, ret is set to NULL and the exception passes back the
249 appropriate information.
250 (pop3_get_response): Same as above.
251 (pop3_try_authenticate): Give camel_pop3_command its exception
252 and handle it properly.
253 (pop3_connect): Call the parent classfuncs. Don't disconnect
254 on error (done for us).
256 * providers/pop3/camel-pop3-folder.c: Obey the camel_pop3_command
259 * camel-remote-store.c (remote_query_auth_types_connected): Don't
260 warn; just return NULL.
261 (remote_query_auth_types_generic): Same.
262 (remote_send_string): Filter out passwords in debugging output.
264 * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Also
265 set the ALLOW_AUTH flag.
267 * providers/imap/camel-imap-store.c (camel_imap_store_init): Same.
269 2000-08-31 Chris Toshok <toshok@helixcode.com>
271 * providers/nntp/camel-nntp-store.c (camel_nntp_store_class_init):
272 remove get_folder_name.
273 (nntp_store_get_folder_name): remove.
275 2000-08-31 Lauris Kaplinski <lauris@helixcode.com>
277 * camel-mime-part.c (write_to-stream): Use filter only if we have one
279 2000-08-31 Chris Toshok <toshok@helixcode.com>
281 * providers/nntp/camel-nntp-utils.c (get_OVER_headers): use
282 camel_remote_store_recv_line.
284 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message):
285 use camel_remote_store_recv_line to build message. also, free our
286 buffer so we don't leak like mad.
288 * providers/nntp/camel-nntp-store.c:
289 (camel_nntp_store_get_additional_data) remove.
290 (camel_nntp_store_get_extensions): use
291 camel_remote_store_recv_line.
292 (camel_nntp_store_get_overview_fmt): same. also, don't rely on
293 _get_additional_data anymore since it's easier to parse without.
294 (camel_nntp_command): use camel_remote_store_send_string and
295 camel_remote_store_recv_line.
297 * providers/nntp/camel-nntp-store.h: CamelRemoteStore is the
298 parent class now. remove istream/ostream since CamelRemoteStore
299 takes care of that for us. also remove the prototype for
300 camel_nntp_store_get_additional_data.
302 * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_write):
303 make sure to clear dirty bit.
304 (camel_nntp_newsrc_read_for_server): don't worry about continually
305 trying to open the file - if it fails we just return an
306 unpopulated .newsrc file.
308 2000-08-31 Chris Toshok <toshok@helixcode.com>
310 * providers/nntp/camel-nntp-newsrc.c
311 (camel_nntp_newsrc_read_for_server): make this a bit more robust.
312 try to create an empty .newsrc file for the server if we can't
313 open it for reading. also, don't allocate everything until we've
316 * providers/nntp/camel-nntp-utils.c (get_OVER_headers): make use
317 of our overview field indices.
318 (camel_nntp_get_headers): only call get_OVER_headers if the
319 extension is present. warn if it's not - since get_HEAD_headers
320 needs work before it works.
322 * providers/nntp/camel-nntp-store.c
323 (camel_nntp_store_get_extensions): new function - query the server
325 (camel_nntp_store_get_overview_fmt): new function - query the
326 server for the overview format and build our table of the indices
327 we care about. support the "full" suffix on fields.
328 (nntp_store_connect): call camel_nntp_store_get_extensions and
329 camel_nntp_store_get_overview_fmt.
331 * providers/nntp/camel-nntp-store.h: add codes for extensions
332 found on news.mozilla.org. only one that we care about is OVER.
333 also, add CamelNNTPOverField and an enum of the overview fields
336 2000-08-31 Jeffrey Stedfast <fejj@helixcode.com>
338 * providers/imap/camel-imap-utils.c (imap_translate_sexp):
339 Reimplemented. It should now work correctly for most possible
342 2000-08-31 Jeffrey Stedfast <fejj@helixcode.com>
344 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
345 Don't save any exceptions caused by camel_imap_folder_changed
346 (camel_imap_fetch_command): Same.
348 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
349 Using a new way of calculating the first recent message that seems
350 more accurate. Also added code to make sure we don't accidently
351 add a duplicate summary.
353 2000-08-31 Not Zed <NotZed@HelixCode.com>
355 * camel-mime-part.c (write_to_stream): Use the proper type
356 checking function to check for text types.
357 (write_to_stream): If we have a charset on a text type that
358 isn't us-ascii or utf-8, then we need to reencode it, so add a
359 filter to do that too.
360 (write_to_stream): Fix some warnings/use the right constructor,
362 (write_to_stream): Rearrange the logic so it always does charset
363 conversion, and not just if we have a qp/base64 block.
365 * camel-mime-utils.c (append_latin1): New function - even though
366 its broken, we'll assume mailers send latin1 headers instead of
367 us-ascii. We just have to encode high chars into utf-8.
368 (header_decode_text): Call append_latin1 for appending unencoded
370 (append_latin1): Do an additional mask for account for c's
371 undefined behaviour for sign extension whilst shifting right.
373 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
375 * providers/imap/camel-imap-store.c (camel_imap_fetch_command):
376 Rewrote to ignore strings that look like server responses until it
377 is sure that it has finished reading the literal string response.
379 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
381 * camel-remote-store.c (remote_send_string): Don't wrap printed
382 strings in quotes, makes things messy
384 * providers/imap/camel-imap-folder.c (imap_get_message): Updated
385 to use the camel_imap_fetch_command
387 * providers/imap/camel-imap-stream.c (stream_read): Updated to use
388 camel_imap_fetch_command
390 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
391 No longer handles FETCH requests so no longer needs to be
392 concerned with checking to make sure that server responses are
393 valid (they have to be).
394 (camel_imap_fetch_command): New convenience function that handles
397 2000-08-30 Peter Williams <peterw@helixcode.com>
399 * camel-remote-store.c (remote_connect): Unify with remote_post_connect.
400 (remote_disconnect): Unify with remote_pre_disconnect.
401 (camel_remote_store_class_init): Don't use the post_connect and
402 pre_disconnect classfuncs anymore ; they weren't especially useful.
404 * providers/imap/camel-imap-store.c (imap_connect): Use this again
405 instead of implementing post_connect.
406 (imap_disconnect): Analogous to above.
408 * camel-session.c (camel_session_get_service_connected): New function.
409 Like camel_session_get_service() but also connects to the service
410 if needed. camel_session_get_{store,transport} (defined in the header)
411 used this now, preventing annoying when-to-connect problems.
413 * camel-service.c (camel_service_new): Revert to the old behavior
414 of not connecting until told to do so. Otherwise doing auth
415 testing correctly is really hard.
416 (camel_service_connect): Fix behavior here (set the connected
418 (camel_service_disconnect): Unset the connected flag.
420 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
422 * providers/imap/camel-imap-store.c: General cleanup / moving
423 stuff around to make things easier to follow.
425 2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
427 * camel-remote-store.c: Prevent exceptions from being overwritten
429 * providers/imap/camel-imap-folder.c (imap_expunge): Beautified
430 (imap_get_subfolder_names_internal): Removed old code as the
431 replacement code has now been tested and proven to work
433 2000-08-29 Jeffrey Stedfast <fejj@helixcode.com>
435 * providers/imap/camel-imap-utils.c: Removed old code that will
436 never be needed again
438 * providers/imap/camel-imap-store.c: Removed old code for
439 try_connect - will never need this code
440 (slurp_response): Update to make sure we aren't falsely detecting
443 2000-08-29 Peter Williams <peterw@helixcode.com>
445 * camel-service.c (camel_service_connect): Uncomment this.
446 (camel_service_disconnect): Same.
448 * camel-remote-store.[ch]: New files. Abstract remote storages
449 (IMAP, POP3, NNTP) and hides the lower-level networky stuff.
451 * camel-service.c (camel_service_new): Take an extra argument, the
452 provider that created us, cause it's useful.
453 (camel_service_finalize): Unref our new provider member.
455 * camel-session.c (camel_session_get_service): Pass the proper number of
456 arguments to camel_service_new().
458 * camel-imap-store.c: Massive update: 1) use the CamelRemoteService to
459 make our life Very Easy (TM). 2) Change the semantics of all
460 camel_imap_command* functions to take exceptions, centralize tons of
461 duplicate code, and use the handy RemoteStore utility functions
463 * camel-imap-folder.c: Use the new semantics of camel_imap_command*
465 * camel-imap-stream.c: Same.
467 2000-08-29 Jeffrey Stedfast <fejj@helixcode.com>
469 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
470 Updated to check for EXPUNGE notifications
472 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
473 Updated to account for messages which have been expunged (now
474 takes a new arg, a GPtrArray of message id's that have been
476 (imap_expunge): Updated (we may want to just use the code in
477 folder_changed now instead of doing our own summary
478 expunging...but that can be fixed later)
479 (imap_append_message): Updated.
480 (imap_copy_message_to): Updated.
481 (imap_move_message_to): Updated.
483 2000-08-28 Peter Williams <peterw@helixcode.com>
485 * camel-folder.c (camel_folder_refresh_info): New member function,
486 refresh_info, used for rereading folder state after its state has
487 somehow become unknown. Tries to preserve last-known status of
490 * providers/mbox/camel-mbox-folder.c (mbox_refresh_info): Implement
491 ::refresh_info (split up ::init)
493 * providers/mbox/camel-mbox-store.c (get_folder): Call ::refresh_info.
495 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Call
496 ::refresh_info once initialized.
497 (imap_refresh_info): New member function; reads the summary from
498 the server (used to be in camel_imap_folder_new; split out).
500 * providers/imap/camel-imap-store.c (imap_connect): Set
501 CamelService::connected a little early so that
502 camel_imap_command won't try to connect while already
504 (camel_imap_command*): Try to connect if not connected already.
506 * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Same as above.
508 * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Same
511 * providers/pop3/camel-pop3-store.c (pop3_connect): Set
512 CamelService::connected a little early so that
513 camel_pop3_command won't try to connect while already
515 (connect_to_server): Same.
517 * providers/nntp/camel-nntp-folder.c (nntp_folder_refresh_info): Same
520 2000-08-28 Jeffrey Stedfast <fejj@helixcode.com>
522 * providers/imap/camel-imap-folder.c (imap_get_message): Fixed the
523 hack around quoted string responses - should now handle them
524 according to the specifications in the RFC
526 * providers/imap/camel-imap-stream.c (stream_read): Updated to
527 match the code currently used in camel-imap-folder.c
529 2000-08-28 Ettore Perazzoli <ettore@helixcode.com>
531 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
532 Never ever free `tmpname' as it comes from `alloca()'!
534 2000-08-26 Ettore Perazzoli <ettore@helixcode.com>
536 * camel-mime-utils.c (header_decode_text): Use `g_free()', not
537 `free()', to free `decword'.
539 2000-08-25 Peter Williams <peterw@helixcode.com>
541 * camel.c (camel_init): Don't call unicode_init; code in e-util
542 will do it, and if unicode_init is called twice, you get an
543 infinite loop when looking up nonexistant encodings (patch
544 has been submitted to libunicode's maintainer).
546 * camel-provider.h: Add a new field, default_ports, which
547 helps the configuration code guess about how to make CamelURL's
550 * providers/*/camel-*-provider.c: Specify default ports.
552 2000-08-25 Jeffrey Stedfast <fejj@helixcode.com>
554 * providers/imap/camel-imap-folder.c
555 (imap_get_subfolder_names_internal): If the url path is "/" and
556 the folder path is "/", just LIST "" "*" (this should fix some
557 cyrus imapd problems). Also, INBOX is case insensitive so use
560 2000-08-24 Lauris Kaplinski <lauris@helixcode.com>
562 * camel-folder-summary.c (summary_build_content_info):
564 * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
566 * camel-mime-utils.c (rfc2047_decode_word): Use UTF-8
568 2000-08-17 Not Zed <NotZed@HelixCode.com>
570 * providers/mh/camel-mh-folder.c (mh_finalize): And here too.
572 * providers/mbox/camel-mbox-folder.c (mbox_finalize): Close index
575 2000-08-23 Dan Winship <danw@helixcode.com>
577 * camel-mime-utils.c (header_address_list_format_append): put
578 commas between addresses.
580 2000-08-22 Dan Winship <danw@helixcode.com>
582 * providers/imap/camel-imap-folder.c
583 (imap_protocol_get_summary_specifier): use BODY.PEEK, not BODY, so
584 we don't set the message \Seen.
586 2000-08-22 Christopher James Lahey <clahey@helixcode.com>
588 * providers/pop3/camel-pop3-store.c: Fixed a small warning.
590 2000-08-22 Peter Williams <peterw@helixcode.com>
592 * camel-service.c (camel_service_new): Connect automatically if the
594 (finalize): Disconnect automatically if connected.
595 (camel_service_query_auth_types): Split into two functions; one to
596 be called if we're connected to an actual server (_connected), one
597 to be called if we're just gauging the general authtypes supported
599 (is_connected): Remove.
601 * camel-store.c (camel_store_get_folder): Don't connect explicitly to
604 * providers/nntp/camel-nntp-store.c (query_auth_types_generic): Split
605 the query_auth_types function. Hook it up in _new.
606 (finalize): Don't try to disconnect here.
608 * providers/pop3/camel-pop3-store.c (query_auth_types_generic): Same.
609 (finalize): Don't try to disconnect here.
611 * providers/imap/camel-imap-store.c (query_auth_types_generic): Same.
612 (finalize): Don't try to disconnect here.
614 * providers/smtp/camel-smtp-transport.c (query_auth_types_generic): Split
615 the query_auth_types (dummy, in this case) function. Hook it up in _new.
616 (finalize): Don't try to disconnect here.
618 2000-08-21 JP Rosevear <jpr@helixcode.com>
620 * providers/nntp/camel-nntp-folder.c (nntp_folder_get_subfolder_names):
621 Make sure newsrc is not null
622 (nntp_folder_get_subfolder_names): ditto
624 * providers/nntp/camel-nntp-newsrc.c
625 (camel_nntp_newsrc_get_subscribed_group_names): Programming check
627 (camel_nntp_newsrc_get_all_group_names): ditto
628 (camel_nntp_newsrc_write_to_file): ditto
629 (camel_nntp_newsrc_write): ditto
631 2000-08-21 JP Rosevear <jpr@helixcode.com>
633 * providers/nntp/camel-nntp-store.c (camel_nntp_command):
634 Make sure respbuffer is not null before manipulating it.
635 If it is null, return CAMEL_NNTP_FAIL and a decent error
638 2000-08-18 Peter Williams <peterw@helixcode.com>
640 * camel-internet-address.c (internet_encode): If the name is "" we
641 weren't outputting anything; output the address at least.
643 2000-08-16 Peter Williams <peterw@helixcode.com>
645 * camel-internet-address.c (internet_encode): Fix a leak when
646 name = "". It's a single-byte leak, but it's the little things
649 * camel-object.c (camel_type_lock_up): Don't leave the type
650 system locked when a bad unlock happens.
652 * providers/mbox/camel-mbox-store.c (get_folder): Fix a leak.
654 2000-08-15 Peter Williams <peterw@helixcode.com>
656 * providers/imap/camel-imap-folder.c (imap_copy_message_to): Typo fix.
658 2000-08-14 Peter Williams <peterw@helixcode.com>
660 * camel-folder-search.c (search_get_sent_date): New search function;
661 returns the time_t when the message was sent.
662 (search_get_receive_date): Same for when it was received.
663 (search_get_current_date): Gets the current time for use with the
664 above two. Is this in the right place?
666 * camel-folder-search.h: Add the new functions above to the class.
668 2000-08-13 Dan Winship <danw@helixcode.com>
670 * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): Add
673 * providers/imap/camel-imap-folder.c
674 (imap_get_subfolder_names_internal): do a strcasecmp rather than
675 just a strcmp when checking if a folder is "INBOX", since it is
676 a case-insensitive name.
678 2000-08-12 Dan Winship <danw@helixcode.com>
680 * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
681 Don't assume the FETCH results will come back in the order they
683 (imap_get_subfolder_names_internal): Add "INBOX" to the list as
684 g_malloc'ed memory, not a static string.
686 2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
688 * providers/imap/camel-imap-store.c
689 (camel_imap_command_continuation): Now takes a char * parameter
691 (camel_imap_command_continuation_with_stream): Same function as
692 above but takes a stream parameter instead
694 * providers/imap/camel-imap-folder.c (imap_append_message): Use
695 camel_imap_command_continuation_with_stream
697 2000-08-12 Dan Winship <danw@helixcode.com>
699 * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): New
700 function to do one round of attempted authentication.
701 (pop3_connect): Move a bunch of code out into
702 pop3_try_authenticate and fix some bugs in the edge cases.
704 2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
706 * providers/imap/camel-imap-store.c (query_auth_types): No longer
707 calls try_connect() to get authtypes
709 2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
711 * providers/imap/camel-imap-store.c
712 (camel_imap_command_continuation): Changed param order a bit and
715 * providers/imap/camel-imap-folder.c (imap_append_message): Use
716 the new multi-transactional convenience functions
718 2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
720 * providers/imap/camel-imap-store.c
721 (camel_imap_command_preliminary): New convenience function for
722 multi-transactional commands (opening request)
723 (camel_imap_command_continuation): New convenience function for
724 multi-transactional commands (followup data)
726 2000-08-11 Christopher James Lahey <clahey@helixcode.com>
728 * providers/mh/camel-mh-folder.c: Fixed a warning.
730 2000-08-11 Chris Toshok <toshok@helixcode.com>
732 * providers/nntp/camel-nntp-folder.c
733 (camel_nntp_folder_class_init): remove get_name and get_full_name
734 assignments, since the camel-folder.c implementation does what we
737 2000-08-11 Chris Toshok <toshok@helixcode.com>
739 * providers/nntp/camel-nntp-store.c
740 (camel_nntp_store_get_toplevel_dir): use g_get_home_dir, since
741 evolution_dir isn't available in the providers.
743 2000-08-11 Peter Williams <peterw@helixcode.com>
745 * camel-folder.c (thaw): Fix a bug where the message_changed
746 signal wasn't being emitted.
748 2000-08-11 Not Zed <NotZed@HelixCode.com>
750 * providers/mh/camel-mh-folder.c (mh_set_message_user_tag):
752 (mh_get_message_user_tag): Implement.
754 * providers/mbox/camel-mbox-folder.c (mbox_get_message_user_tag):
755 (mbox_set_message_user_tag): Implement.
757 * camel-folder.c (move_message_to): Yay so lets fix an already
759 (copy_message_to): and here too ... update for api change to append().
760 And removed another warning.
761 (camel_folder_set_message_user_tag): Routine to set message tags.
762 (camel_folder_get_message_user_tag): And accessor.
764 2000-08-10 Christopher James Lahey <clahey@helixcode.com>
766 * camel-folder-search.c, camel-folder-summary.c, camel-medium.c,
767 camel-mime-filter-charset.c, camel-mime-filter.c,
768 camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c,
769 camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c,
770 camel-movemail.c, camel-multipart.c, camel-object.c,
771 camel-stream-mem.c, providers/mbox/camel-mbox-folder.c,
772 providers/mbox/camel-mbox-summary.c,
773 providers/mh/camel-mh-folder.c,
774 providers/smtp/camel-smtp-transport.c: Fixed some warnings.
776 2000-08-11 Not Zed <NotZed@HelixCode.com>
778 * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Free
780 (vee_folder_build): And here too.
782 2000-08-10 Jeffrey Stedfast <fejj@helixcode.com>
784 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
785 If we go over the max number of messages, don't keep requesting
786 new message summaries, just break.
788 2000-08-11 Not Zed <NotZed@HelixCode.com>
790 * camel-mime-parser.c (folder_scan_header): A better way to
791 compress leading whitespace. The code is probably invalid anyway,
792 I dont think it will work across buffer boundaries.
794 * providers/mbox/camel-mbox-folder.c (mbox_append_message): And
795 write out proper format From lines here too.
797 * providers/mbox/camel-mbox-summary.c
798 (camel_mbox_summary_build_from): New function to build a more
799 compatible mbox "From " line.
800 (camel_mbox_summary_sync): Write From lines in the proper format.
802 2000-08-10 Not Zed <NotZed@HelixCode.com>
804 * providers/mh/camel-mh-store.c (get_folder): Remove warnin g.
806 * providers/mbox/camel-mbox-store.c (xrename): Kill some warnings
809 * providers/imap/camel-imap-folder.c (imap_append_message): Fixed
810 for append api change. Eek this routine seriously wastes memory.
812 * providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt.
813 (mh_append_message): Fix for api change, and include user flags
814 and tags in new message.
816 * providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix
817 for search api change.
819 * camel-folder.c (camel_folder_search_free): New function for
820 freeing search results.
821 (search_free): Changed my mind, implement a default that actually
822 does something. Free as to the old interface.
823 (camel_folder_append_message): Changed to accept a
824 camelmessageinfo rather than flags, which just doesn't have enough
826 (copy_message_to): Change for append_message api change.
827 (move_message_to): Likewise.
829 * providers/mbox/camel-mbox-folder.c (mbox_search_free):
831 (mbox_append_message): Fix for api change, and also copy user
832 flags/tags across to new summary.
834 * camel-folder-search.c (search_user_tag): A search expression
835 that returns the current use flag by name.
836 (camel_folder_search_free_result): New function to free the result
839 * camel-folder-summary.c: Bump summary version.
843 (camel_message_info_dup_to):
844 (camel_message_info_free): Added support for arbitrary tag/value
848 (camel_tag_list_size):
849 (camel_tag_list_free): Operations for working with CamelTags.
851 2000-08-09 Peter Williams <peterw@helixcode.com>
853 * camel-store.c (camel_store_get_folder): Connect beforehand, if
856 * providers/imap/camel-imap-store.c (camel_imap_store_init): Default
857 the dir_sep to "/" so that certain functions can safely assume that
858 dir_sep is valid (at least, nonnull).
860 2000-08-09 Ettore Perazzoli <ettore@helixcode.com>
862 * providers/nntp/camel-nntp-folder.c
863 (nntp_folder_set_message_flags): Get rid of an unused variable.
865 * providers/nntp/Makefile.am (INCLUDES): Fix includes so that we
866 don't use installed headers anymore. [I copied this over from the
867 IMAP provider, that does not seem to have this problem.]
869 2000-08-09 Not Zed <NotZed@HelixCode.com>
871 * camel-folder-search.c (camel_folder_search_execute_expression):
872 Reorder search result in summary order if we searched with a
875 2000-08-08 Dan Winship <danw@helixcode.com>
877 * camel-uid-cache.c: New code to keep an on-disk cache of what
878 UIDs have been seen in a folder.
880 * camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail
881 can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE
882 (you can work with mail directly without needing to copy it local).
884 * providers/*/camel-*-provider.c: Add flags as needed: imap and
885 mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is
888 * camel-mime-message.c (process_header): Add another subject
889 g_strstrip that fejj's earlier commit missed.
891 2000-08-08 Peter Williams <peterw@helixcode.com>
893 * camel-provider.h: Remove some GTK stuff that I missed.
895 * providers/imap/camel-imap-store.c (imap_noop): Turn this
896 back on with the new timeout interface in CamelSession.
898 * camel-session.[ch] (camel_session_register_timeout): New
899 interface for Camel to register timeouts. Basically the
900 GTK timeout interface is copied. We do this because Camel isn't
901 allowed to use GTK anymore.
903 2000-08-07 Not Zed <NotZed@HelixCode.com>
905 * providers/mh/camel-mh-folder.c (mh_append_message): Only retry
906 another uid if we had a name clash, otherwise fail.
908 2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
910 * providers/imap/camel-imap-folder.c
911 (imap_get_subfolder_names_internal): If we are trying to get a
912 subfolder listing of the root folder, always make sure INBOX is
915 * providers/imap/camel-imap-utils.c (imap_parse_list_response):
916 Check for NIL as a directory separator.
918 2000-08-07 Peter Williams <peterw@helixcode.com>
920 * providers/nntp/Makefile.am: Reorder the INCLUDES to pull
921 in the camel headers from the local source tree before
922 the ones in $(includedir). This was causing compile problems
923 because the installed, Gtk-based camel-object.h was included
924 before the uninstall Camel-based one.
926 2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
928 * providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip
929 all \n's from the expression
931 * string-utils.c (strip): New convenience function to strip
932 occurences of a single char from a string
934 * camel-mime-message.c (camel_mime_message_set_subject): Do a
935 g_strstrip on the subject so we can stop getting those annoying
938 2000-08-07 Dan Winship <danw@helixcode.com>
940 * camel-folder.c (camel_folder_free_deep): Fix this to not require
941 NULL-termination of the array.
943 2000-08-04 Jeffrey Stedfast <fejj@helixcode.com>
945 * providers/imap/camel-imap-store.c (imap_connect): If we fail to
946 get a dir_sep, then supply the default of "/".
947 (get_folder): Undo changes by Peter
949 2000-08-04 Peter Williams <peterw@helixcode.com>
951 * providers/imap/camel-imap-store.c (get_folder): Prevent a coredump
952 when get_folder()ing from a store with dir_sep = NULL.
954 2000-08-04 Peter Williams <peterw@helixcode.com>
956 * camel-store.h: Include camel-object.h. Ettore said this wasn't
959 2000-08-04 Not Zed <NotZed@HelixCode.com>
961 * camel-url.c (camel_url_set_protocol):
962 (camel_url_set_host):
963 (camel_url_set_path):
964 (camel_url_set_port): Url editing functions.
966 2000-08-04 Dan Winship <danw@helixcode.com>
968 * providers/pop3/camel-pop3-folder.c (pop3_set_message_flags):
969 (pop3_sync): Indexes into the flags array are message_number minus
970 1, not just message_number.
972 * providers/pop3/camel-pop3-store.c: add a debugging macro for
973 doing protocol tracing.
975 2000-08-03 Jeffrey Stedfast <fejj@helixcode.com>
977 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Only
978 call imap_get_summary_internal if the folder can hold messages
980 * providers/nntp/camel-nntp-provider.c (camel_provider_module_init):
981 Initialize the service_cache for the news/nntp providers
983 2000-08-03 Peter Williams <peterw@helixcode.com>
985 * providers/nntp/Makefile.am (INCLUDES): Add -I$(top_srcdir) to
986 pull in libibex/ibex.h
988 2000-08-02 Not Zed <NotZed@HelixCode.com>
990 * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Expunge
991 from the end, so the index isn't messed up when you remove a
994 * providers/mh/camel-mh-folder.c (mh_append_message): Fix a bug
995 where it would never open an output file/uid.
997 * providers/mbox/camel-mbox-store.c (rename_folder):
998 Implementation for mbox as well.
1000 * camel-store.c (camel_store_rename_folder): New method to rename folders.
1001 (rename_folder): Default implementation.
1003 * providers/mh/camel-mh-store.c (delete_folder): Implement this.
1004 (rename_folder): Implement a rename operation.
1006 2000-08-02 Dan Winship <danw@helixcode.com>
1008 * providers/MH: Kill this. It doesn't have any code to do anything
1009 the new mh provider doesn't do better.
1011 * providers/Makefile.am: Remove reference to MH subdir, and
1012 promote nntp to fully-supported status, since it does compile and
1015 * camel-mime-message.c (camel_mime_message_set_subject): Trim
1016 trailing space from the subject. I've now seen replies from two
1017 different people that tricked the threading code by (a) not having
1018 References/In-Reply-To, and (b) adding an extra space to the end
1019 of the subject line so the subject-based threading fails too. Who
1020 writes these broken mailers anyway?
1022 2000-08-01 Jeffrey Stedfast <fejj@helixcode.com>
1024 * providers/smtp/camel-smtp-transport.c (smtp_helo): When forced
1025 to use the IP, place it in square brackets.
1027 * providers/imap/camel-imap-utils.c (imap_translate_sexp): New and
1028 improved sexp parser. An honest try at using e-sexp is wrapped in
1029 a #ifdef at the bottom of the file but is currently not used
1031 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
1032 We want to do a UID SEARCH so we get UIDs back instead of sequence
1035 2000-08-01 Not Zed <NotZed@HelixCode.com>
1037 * providers/mh: New mh provider implementation.
1039 * providers/Makefile.am (SUBDIRS): Added mh provider.
1041 2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
1043 * providers/imap/camel-imap-folder.c (imap_get_message_info_internal):
1044 Some IMAP servers don't wrap the UID in ()'s so don't depend on that
1045 (imap_get_summary_internal): Same
1047 * providers/imap/camel-imap-utils.c (free_sexp_node): Oops, forgot to
1048 free node->function - not good.
1050 2000-07-31 Peter Williams <peterw@helixcode.com>
1052 * providers/vee/camel-vee-folder.c (vee_search_by_expression): Add
1053 a NULL to the matches pointer array so that g_strfreev knows where
1056 2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
1058 * providers/imap/camel-imap-utils.c (imap_translate_sexp): New
1059 convenience function to translate a Camel sexp into the equivalent
1062 * providers/imap/camel-imap-store.c: More places now use
1065 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
1066 Implemented initial version (this may or may not work quite right)
1068 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
1070 * providers/imap/camel-imap-folder.c (imap_expunge): Make sure
1071 the third word/token (whatever) is "EXPUNGE" and not something
1072 else like "EXISTS" or "RECENT". When removing the message from
1073 the summary also make sure to free that data to avoid leakage.
1074 Also make sure to subtract 1 from the 'id' since IMAP starts
1075 at 1 and our summary starts at 0 :-)
1077 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
1079 * providers/imap/camel-imap-store.c (camel_imap_status): Cleaned
1080 up a bit, now uses imap_next_word()
1081 (camel_imap_command_extended): Now uses imap_next_word(). When
1082 checking for RECENT, allow the first digit of the recent-count
1083 be between 0 and 9 inclusive instead of exclusive.
1085 * providers/imap/camel-imap-folder.c (imap_expunge): Optimized.
1086 No longer will it need to reload the summary as it now instead
1087 removes the appropriate message summaries from the cache.
1088 (camel_imap_folder_changed): If recent == 0 then return. If
1089 recent < 0 then just emit the folder_changed signal, don't reload
1092 2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
1094 * providers/imap/camel-imap-folder.c
1095 (imap_get_message_count_internal): Get message count when STATUS
1097 (imap_init): folder->has_search_capability is required for IMAP so
1098 should always be set to TRUE (is currently being set to FALSE as
1099 I've not yet implemented SEARCH support).
1100 (camel_imap_folder_changed): Seem to have fixed my optimization
1103 2000-07-28 Jon K Hellan <hellan@acm.org>
1105 * providers/imap/camel-imap-store.h (CamelImapServerLevel): New
1107 (CamelImapStore): Added server_level and has_status_capability
1110 * providers/imap/camel-imap-store.c (imap_connect): Detect
1111 IMAP4REV1, IMAP4 and STATUS in capability response.
1113 * providers/imap/camel-imap-folder.c
1114 (imap_get_message_count_internal): Use STATUS only if server
1115 supports it. TODO: Get message count when STATUS not supported.
1116 (imap_get_message, imap_get_summary_internal,
1117 imap_get_message_info_internal): Handle IMAP4 as well.
1118 (imap_protocol_get_summary_specifier): New function: Make a data
1119 item specifier for the header lines we need, appropriate to the
1122 2000-07-27 Peter Williams <peterw@helixcode.com>
1124 * camel-mime-utils.c (header_decode_lwsp): More
1125 checks for end of string.
1127 * providers/imap/camel-imap-store.c:
1128 (imap_command_extended): Free the elements of our
1129 array (huge mem leak)
1131 * providers/imap/camel-imap-folder.c:
1132 (summary_get_internal): Same as above.
1135 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
1137 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
1138 Fixed my routine to only fetch new headers, my IDs were off by 1
1139 on the high end, so when it would fetch the last newly arrived
1140 message it would fail and end up fetching all of the summaries
1141 because of the corruption.
1143 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
1145 * camel-url.c (camel_url_to_string): If the path doesn't begin
1146 with a / and there is a host, prepend a / to the path.
1148 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
1150 * providers/imap/Makefile.am: Added camel-imap-utils.[c,h]
1152 * providers/imap/camel-imap-utils.[c,h]: Utilities for parsing
1153 server responses for use in both camel-imap-store.c and
1156 * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
1157 Free all the pointers in the headers array.
1158 (imap_get_subfolder_names_internal): Updated to use
1159 imap_parse_list_response
1160 (imap_parse_subfolder_list): Removed in favor of
1161 imap_parse_list_response
1163 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
1164 Free all the pointers in the data array.
1165 (imap_connect): Updated to use imap_parse_list_response and fixed
1167 (folder_is_selectable): Updated.
1169 2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
1171 * providers/imap/camel-imap-folder.c (imap_get_message_info): Now
1172 uses a hash table for looking up message info rather than a linear
1175 2000-07-27 Peter Williams <peterw@helixcode.com>
1177 * providers/*/Makefile.am: Don't specify SUBDIRS =
1178 [nothing]. Messes up distcheck.
1180 2000-07-26 Peter Williams <peterw@helixcode.com>
1182 * camel-mime-parser.c (folder_scan_init): Initialize
1183 outbuf to be "" -- it's not guaranteed to be zeroed.
1185 * camel-mime-utils.c (header_references_decode): Return
1186 if the header is NULL -> or "" <-. Don't do our stupid
1187 mailer trick if we point to \0.
1188 (header_decode_quoted_string): Don't rip past end of
1191 2000-07-26 Dan Winship <danw@helixcode.com>
1193 * camel-movemail.c (movemail_external): routine to call an
1194 external movemail program.
1195 (camel_movemail): Nuke return value, use movemail_external when
1196 available and useful, and don't delete "dest" on errors, since
1197 it might have started non-empty.
1199 2000-07-26 Jeffrey Stedfast <fejj@helixcode.com>
1201 * camel-url.c (camel_url_to_string): Should now always prepend a '/'
1202 before the path if it doesn't already exist.
1204 * providers/imap/camel-imap-folder.c: Fixed a few compiler warnings
1206 2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
1208 * providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the
1209 real problem that Peter was running into.
1211 2000-07-25 Dan Winship <danw@helixcode.com>
1213 * camel-mime-message.c (write_to_stream): Don't add a Mime-Version
1214 header to a message that already has one.
1216 * camel-internet-address.c (internet_encode): Don't put <>s around
1217 addresses with no name part.
1219 2000-07-25 Peter Williams <peterw@helixcode.com>
1221 * providers/imap/camel-imap-folder.c (imap_expunge): Set
1222 imap_folder->summary to NULL after calling imap_summary_free,
1223 so we don't get stuck with a junk summary pointer. Should
1226 2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
1228 * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
1229 Optimized to try and get the new message headers without reloading
1230 the entire summary from scratch.
1231 (imap_get_summary_internal): Will now sync() before attempting to
1232 reload the summary so that flags are set in the reloaded summary
1235 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
1237 * providers/imap/camel-imap-store.c (get_folder): Updated to give
1238 special attention to the root folder.
1240 * providers/imap/camel-imap-folder.c
1241 (imap_get_subfolder_names_internal): Updated to handle the root
1243 (imap_get_message_count_internal): return 0 if folder can't hold
1245 (camel_imap_folder_new): Change so that root folder gets special
1246 attention and always gets can_hold_messages set to FALSE
1248 2000-07-24 Dan Winship <danw@helixcode.com>
1250 * camel-folder.c: Remove exceptions from a number of methods that
1251 work on what ought to be static data: get_parent_folder,
1252 get_parent_store, get_message_count, get_unread_message_count,
1253 get_permanent_flags, get_message_flags, set_message_flags,
1254 get_message_user_flag, set_message_user_flag, get_uids,
1255 get_summary, get_subfolder_names. Turn camel_folder_delete_message
1256 into a macro. (Mostly a pull-up from the camel-async branch.)
1258 * providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder
1261 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
1263 * providers/imap/camel-imap-folder.c (imap_get_message_info): Updated
1264 to port easily to the new Camel API
1265 (imap_init): Don't SELECT INBOX, we don't need to do that
1267 2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
1269 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
1270 Initialize the summary and subfolder listing.
1271 (imap_summary_free): Now takes a GPtrArray arg rather than a
1272 CamelImapFolder as it increases it's usefullness for free()'ing
1273 temporary summaries.
1274 (imap_get_message_count_internal): A new convenience function for
1275 getting the actual message count on a server to be used by
1276 imap_get_summary_internal)
1277 (imap_get_message_count): Since the Camel API is on the move again,
1278 the future version of this function will not be able to make a
1279 call to the store, it must only access previously fetched data (thus
1280 the creation of the _internal function)
1281 (imap_get_subfolder_names_internal): Again, because the future version
1282 of imap_get_subfolder_names will not take an exception, we must rename
1283 this function which will be called by camel_imap_folder_new()
1284 (imap_get_subfolder_names): We now return the previously collected
1285 subfolder listing that the _internal function fetched previously
1286 (imap_get_summary_internal): Again, same idea as the previous _internal
1288 (imap_get_summary): Again... now returns a previously aquired summary
1290 * providers/imap/camel-imap-store.c (imap_noop): This will hopefully
1291 prevent the imap store from disconnecting.
1292 (imap_connect): Modified to add a gtk timeout event that will call
1293 imap_noop() every 10 minutes (we may want to change this time value)
1294 (imap_disconnect): Modified to remove the NOOP timeout event from the
1296 (camel_imap_command_extended): Commented out the code that would try
1297 and detect if the store was disconnected and then reconnect if it was
1300 2000-07-24 Dan Winship <danw@helixcode.com>
1302 * camel-folder.[ch]: Remove camel_folder_get_message_uid, which
1303 was not used, and not implemented by any provider.
1305 * providers/nntp/camel-nntp-folder.c: Remove get_message_uid
1308 * camel-folder-pt-proxy.[ch], camel-arg-collector.c,
1309 camel-marshal-utils.[ch]: Bye bye bye.
1311 * Makefile.am: remove reference to camel-arg-collector.c
1313 2000-07-23 Jeffrey Stedfast <fejj@helixcode.com>
1315 * providers/imap/camel-imap-store.c (imap_disconnect): Made it a
1316 little more forgiving. Also set current_folder to NULL as there is
1317 no selected folder after a disconnect.
1318 (stream_is_alive): Detects whether or not a socket is "alive"
1319 (camel_imap_command_extended): Use stream_is_alive() to aid in the
1320 detection of a disconnected state.
1322 2000-07-22 Jeffrey Stedfast <fejj@helixcode.com>
1324 * providers/imap/camel-imap-store.c (get_folder): Clear
1325 CamelExceptions when appropriate (eg when folder is marked as
1326 \NoSelect). Still needs some cleanup and perhaps Dan will have a
1327 better way of doing this as this seems like a messy way of
1330 * providers/imap/camel-imap-folder.c (imap_get_uids): Took out
1331 some debug statements as they are no longer needed.
1333 2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
1335 * providers/imap/camel-imap-folder.c (imap_get_subfolder_names):
1336 Updated to not strip out subfolders that are marked as \NoSelect
1337 because this will be correctly handled in store->get_folder from
1340 * providers/imap/camel-imap-store.c (folder_is_selectable): New
1341 convenience function for use in get_folder().
1342 (parse_list_response): Now takes a char **flags argument which is
1343 needed by folder_is_selectable().
1344 (imap_connect): Updated to reflect changes to
1345 parse_list_response().
1347 2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
1349 * providers/imap/camel-imap-stream.c (stream_read): Updated with
1350 some of the same fixes I've made to camel-imap-folder.c like
1351 recalculating message part lengths.
1353 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
1354 Rewrote the code to check for "* %d RECENT". Still needs to be
1355 modified, but should no longer cause an infinite loop by detecting
1356 mis-detecting RECENT messages.
1358 2000-07-20 Jeffrey Stedfast <fejj@helixcode.com>
1360 * providers/imap/camel-imap-folder.c (imap_get_summary):
1361 (imap_get_message_info): Oops. Fix UID parser to allow 0 and 9 to
1362 be in the range of valid UID chars.
1364 2000-07-20 Peter Williams <peterw@helixcode.com>
1366 * camel-object.c (camel_object_unref): Add a new global mutex
1367 'refcount' held when refcounting operations occur.
1369 2000-07-19 Peter Williams <peterw@helixcode.com>
1371 * camel-object.c (camel_type_lock_up): Correct the recursiveness;
1372 the locklevel is stored as a private, so each thread has its own
1373 idea of the locklevel. Thus one thread can relock, but a different
1374 one will think that it's a level 0 and try to lock the type_system
1377 2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
1379 * providers/imap/camel-imap-folder.c: General cleanup working
1380 towards getting Actions->Expunge working correctly.
1382 * providers/imap/camel-imap-store.c
1383 (cammel_imap_command_extended): Added code to look for "* %d
1384 RECENT" and to emit the folder_changed signal if there are any
1385 recent messages. Note: this is a hack and needs to be rewritten
1388 2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
1390 * providers/imap/camel-imap-folder.c (imap_get_summary): If the
1391 folder's message count is not the same as the number of summaries,
1392 free the old summary and create a new summary.
1394 2000-07-18 Jeffrey Stedfast <fejj@helixcode.com>
1396 * providers/imap/camel-imap-folder.c
1397 (camel_imap_folder_class_init): Added in
1398 imap_[g,s]et_message_user_flag() methods
1399 (imap_get_message_info): Rewrote to use the more efficient way of
1400 downloading summary information and also added a UID comparison so
1401 that if the UID requested doesn't match the UID received, it
1402 returns NULL. FIXME: When the mailer gets NULL when it requested
1403 message info, it seems that it displays a row for that message and
1404 when you try and select the blank row, it segfaults.
1406 * providers/imap/camel-imap-store.c (get_folder): Oops, this
1407 should not be checking against "/", it should be checking against
1410 * providers/imap/camel-imap-folder.c (imap_parse_subfolder_line):
1411 Updated to trim out the leading namespace.
1412 (imap_get_subfolder_names): Let the subfolder parser trim the
1413 namespace off the folder name.
1415 2000-07-17 Peter Williams <peterw@helixcode.com>
1417 * camel-object.c (camel_type_lock_up): New function; the
1418 Camel type_system lock is now fakey-recursive, being controlled
1419 by a semaphore that goes up and down and is protected by another
1420 lock. Theoretically all we need is the lock on the semaphore,
1421 but this we catch exceptions "better" (by deadlocking).
1422 (camel_type_lock_down): Corresponding to above.
1423 (all functions): s,G_LOCK,camel_type_lock_up, etc.
1425 2000-07-17 Jeffrey Stedfast <fejj@helixcode.com>
1427 * providers/imap/camel-imap-store.c (imap_disconnect): Send a
1430 * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to
1431 get IMAP code to work with CommunigatePro and MS Exchange (and any
1432 other servers that send back a UID at the end of each FETCH inside
1433 of the main body of the message part).
1434 (imap_sync): Un-#if 0 the code that sets the flags on the IMAP
1435 server for messages that have changed. Oops, don't mask with
1436 DELETED to find out if the message has been answered ;-)
1437 (imap_expunge): sync before expunging.
1439 2000-07-16 Jeffrey Stedfast <fejj@helixcode.com>
1441 * providers/imap/camel-imap-store.c: All SELECT calls now pass
1442 a NULL folder argument to camel_imap_command_extended() since it's
1444 (imap_connect): Moved service_class->connect() to the point right
1445 after a connection is established with the server rather than
1446 waiting until the end of the function.
1447 (camel_imap_command): Updated the documentation comment
1448 (camel_imap_command_extended): Before sending a command, first
1449 check to make sure we are connected; if we aren't, then reconnect.
1450 Don't strncmp() command with "SELECT" as it's redundant.
1452 * providers/imap/camel-imap-folder.c: All SELECT calls now pass
1453 a NULL folder argument to camel_imap_command_extended() since it's
1454 not needed. Also s/camel_imap_command/camel_imap_command_extended as
1455 I will probably be doing away with camel_imap_command() or at least
1456 only using it for LOGIN and similar commands where the server won't
1457 notify us of any recent messages.
1459 2000-07-15 Jeffrey Stedfast <fejj@helixcode.com>
1461 * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
1462 One last fix to get rid of hard-coded "/" directory separators
1464 2000-07-14 Peter Williams <peterw@helixcode.com>
1466 * camel-object.c : Implement 'events', which are suspiciously
1467 like signals except without all the marshalling baggage, and
1468 with quasi-thread-safety.
1469 (camel_object_class_declare_event): New func.
1470 (camel_object_hook_event): Ditto.
1471 (camel_object_trigger_event): Ditto.
1472 (obj_class_init): Declare the "finalize" event.
1473 (obj_class_finalize): Free the hashtable of events->preps
1474 (obj_finalize): Free the hashtable of events->hooklists
1475 (camel_object_unref): Trigger the finalize event (ourselves,
1476 to prevent massively unpleasant looping things.)
1478 2000-07-14 Peter Williams <peterw@helixcode.com>
1480 * camel-object.c (make_global_classfuncs): Change to return
1481 a CamelObjectClass. Change parents to a GSList and free it
1483 (camel_object_new): Don't allocate a classfuncs for every object;
1484 merely give it a reference to the global_classfuncs. Convert
1485 parents to a GSList and free it when done.
1486 (camel_object_unref): Don't free the classfuncs. Free the parents
1487 list, which is changed to a GSList.
1489 2000-07-14 Jeffrey Stedfast <fejj@helixcode.com>
1491 * string-utils.c (string_unquote): New convenience function
1492 to unquote a string if it's encapsulated by "'s
1494 * providers/imap/camel-imap-folder.c:
1495 * providers/imap/camel-imap-store.c: Made the necessary changes
1496 to stop using hard coded directory separators.
1498 2000-07-13 Dan Winship <danw@helixcode.com>
1500 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
1501 If the summary is for a smaller mbox, and rebuilding from the
1502 last-known end position fails, try rebuilding from the beginning.
1503 Deals with the case where the user edits the mbox and makes it
1504 bigger, without adding new messages.
1506 2000-07-13 Peter Williams <peterw@helixcode.com>
1508 * camel-object.c: Rewritten to not be based on GtkObject,
1509 but a tiny threadsafe ripoff thereof. Objects still cannot
1510 be shared across threads, but ref/unref/destroy/new/etc
1511 will work. Signals are not implemented because doing it
1512 robustly would be a major pain in the butt, but class
1513 functions are. There's a small demonstration that it doesn't
1514 crash in ./temp-test.c: build it with ./make-test.sh.
1515 * camel-stream.c, camel-seekable-stream.c, camel-stream-mem.c:
1516 moved over to CamelObject. Proof of concept: two levels of
1517 subclass and class functions, all working without coredumps.
1518 To port to CamelObject:
1519 - s,GTK_,CAMEL_,g in the cast checks
1520 - s,gtk_type_new,camel_object_new,g
1521 - s,GtkType,CamelType,g
1522 - Change get_type function over to camel_type_declare
1523 - instead of hooking to finalize function, it goes into the
1526 - instead of GTK_OBJECT(so)->klass, CAMEL_OBJECT_GET_CLASS(so)
1527 - s,gtk_type_class,camel_type_get_global_classfuncs,g
1528 - don't chain finalize handlers; it will be done for you
1530 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
1532 * providers/imap/camel-imap-folder.c:
1533 * providers/imap/camel-imap-store.c: If a SELECT fails, set
1534 imap_store->current_folder to NULL so a SELECT is forced before
1535 any message/folder operations are requested. Also, because some
1536 users don't use a namespace, make sure that if the url->path is
1537 "/" we don't use it when creating the folder_path.
1538 (camel_imap_command[_extended]): Since we allow the passing of
1539 a NULL folder which we can use to bypass a forced SELECT, no need
1540 to check for the individual commands that don't require a folder
1543 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
1545 * providers/imap/camel-imap-folder.c:
1546 * providers/imap/camel-imap-store.c: Updated to use CAMEL_IMAP_OK,
1547 CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and CAMEL_IMAP_FAIL rather than the
1548 ones copied from the POP3 provider.
1550 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
1552 * providers/imap/camel-imap-folder.c (imap_get_summary): Oops.
1553 If the number of messages in the folder is 0, don't fetch
1554 summaries 1 thru 0, just return an empty summary.
1555 (imap_copy_message_to): Fixed to use message UID and also send
1556 the source folder as an arg to camel_imap_command rather than NULL.
1557 (imap_move_message_to): Same.
1558 (imap_init): If SELECT is successful, we need to set the current
1559 folder to the one selected, this was causing problems with move/copy
1561 2000-07-13 Dan Winship <danw@helixcode.com>
1563 * camel-service.h: define a set of CAMEL_SERVICE_URL_ALLOW_* flags
1564 parallel to the _NEED_* flags, and make the _NEED_* flags imply
1567 * providers/imap/camel-imap-store.c (camel_imap_store_init): imap
1570 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
1572 * providers/imap/camel-imap-folder.c (imap_get_summary): New
1573 and improved approach to fetching an entire folder summary
1574 that should be much much faster than the old way as it gets
1575 the entire folder summary in 1 shot rather than requesting
1576 message by message. As with the last update, this version
1577 also only fetches the minimum number of header fields.
1578 (imap_get_summary): Oops, forgot to free the temp
1581 2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
1583 * providers/imap/camel-imap-folder.c (imap_get_summary): Don't
1584 fetch the entire RFC822 header, just fetch the fields we want.
1585 (imap_get_message_info): Same.
1587 2000-07-13 Not Zed <NotZed@HelixCode.com>
1589 * camel-mime-filter-basic.c (camel_mime_filter_basic_new_type):
1590 Reset filter on setup.
1591 (reset): When resetting qp encoding, set the state to -1, instead
1594 * camel-mime-utils.c (quoted_encode_step): Actually count the
1595 characters output sofar (it never counted any). Bunch of other
1597 (quoted_encode_close): Also flush out final character, if there's
1600 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
1602 Chris forgot to add #include <e-util/e-util.h> to the source files
1604 * providers/imap/camel-imap-store.c (imap_connect): Fixed Peter's
1605 fix, we don't want to send a string to a %d.
1607 2000-07-12 Christopher James Lahey <clahey@helixcode.com>
1609 * camel-folder-search.c, providers/imap/camel-imap-store.c:
1610 Changed from strstrcase to e_strstrcase.
1612 * string-utils.c, string-utils.h: Removed strstrcase (in favor of
1613 e_strstrcase in e-util/e-util.c.)
1615 2000-07-12 Chris Toshok <toshok@helixcode.com>
1617 * providers/nntp/camel-nntp-folder.c
1618 (nntp_folder_set_message_flags): get the article num out of our
1619 uid and mark it read in the newsrc.
1620 (nntp_folder_get_message): get the message id out of the uid to
1623 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): the uid
1624 is now <article-num>,<messageid>
1625 (get_HEAD_headers): same.
1627 * camel-mime-parser.c (folder_scan_step): go to HSCAN_MESSAGE
1628 state when ct->subtype is "news" as well as "rfc822". this makes
1629 attachments of type "message/news" display properly.
1631 2000-07-12 Dan Winship <danw@helixcode.com>
1633 * camel-folder.c (camel_folder_free_deep,
1634 camel_folder_free_shallow, camel_folder_free_nop): Useful default
1635 implementations for free_{uids,subfolder_names,summary}.
1636 (free_subfolder_names, free_uids): Make these g_warning-ing
1637 default implementations.
1639 * providers/*/camel-*-folder.c: Use the new functions where
1640 appropriate, remove duplicated code.
1642 2000-07-12 Peter Williams <peterw@helixcode.com>
1644 * providers/imap/camel-imap-store.c (query_auth_types): Check for
1645 NULL parameters when setting the exception so as to not crash on
1646 Solaris (can't handle a %s passed NULL).
1647 (imap_connect): Same.
1649 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
1651 * providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use
1652 mbox_set_message_flags () instead of setting the flags by hand. This
1653 fixes the problem of the "message_changed" signal not being emitted
1654 at the correct time.
1656 * providers/imap/camel-imap-folder.c: "folder_changed" signals should
1657 pass a third argument (which is ignored).
1659 * camel-folder.c: Undo gtk signal emits done in set_flags and
1662 (copy_message_to): Create info as a const CamelMessageInfo
1664 2000-07-12 Chris Toshok <toshok@helixcode.com>
1666 * providers/nntp/Makefile.am: don't add test-newsrc to the build
1667 since it needs libcamel (which isn't built at the time test-newsrc
1670 * providers/nntp/camel-nntp-utils.c (get_HEAD_headers): fill in
1671 MessageInfo->message_id.
1672 (get_XOVER_headers): same.
1674 * providers/nntp/camel-nntp-folder.c (nntp_folder_init): move
1675 summary loading here.
1676 (nntp_folder_sync): summary/newsrc changes should be stored here.
1677 put a comment to that effect.
1678 (nntp_folder_set_message_flags): don't save the newsrc here.
1679 (nntp_folder_get_uids): use g_ptr_array_index instead of the
1681 (nntp_folder_get_summary): no need to check if we should generate
1682 the summary here. already done.
1683 (nntp_folder_get_message_info): implement.
1685 * providers/nntp/camel-nntp-store.c
1686 (camel_nntp_store_get_toplevel_dir): use evolution_dir instead of
1687 computing it ourselves.
1688 (nntp_store_disconnect): call camel_nntp_newsrc_write.
1689 (ensure_news_dir_exists): new function to create the news/<news
1691 (camel_nntp_store_class_init): hook up connect/disconnect and
1693 (nntp_store_connect): if ensure_news_dir_exists fails throw an
1696 2000-07-12 Peter Williams <peterw@helixcode.com>
1698 * camel-folder.c (camel_folder_set_message_flags): Emit a message_changed
1699 signal once the flags are set on the message.
1700 (camel_folder_set_user_flag): Ditto.
1701 (camel_folder_expunge): Emit a folder_changed if no exception.
1703 2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
1705 * camel-stream.c: Use size_t and ssize_t for read/write methods
1707 * providers/imap/camel-imap-folder.c (imap_set_message_flags):
1708 Updated to emit the message_changed signal.
1709 (imap_delete_message): Updated to use imap_set_message_flags ().
1710 (imap_move_message_to): Updated to use imap_set_message_flags ()
1711 and to emit the folder_changed signal on the destination folder.
1712 (imap_copy_message_to): Updated to emit the folder_changed signal
1713 on the destination folder.
1714 (imap_append_message): Updated to emit the folder_changed signal
1715 on the destination folder.
1717 2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
1719 * camel-folder.c (camel_folder_append_message): Now takes a
1720 flags argument to specify the flags to be set on the message
1721 since we might not necessarily want the flags to be wiped clean.
1723 (copy_message_to): Updated to send a flags argument to
1724 append_message (); currently sends the original message's flags.
1726 * providers/mbox/camel-mbox-folder.c (mbox_append_message):
1727 * providers/imap/camel-imap-folder.c (imap_append_message):
1730 2000-07-11 Dan Winship <danw@helixcode.com>
1732 * camel-folder.c: Remove exceptions from a number of methods
1733 that work on what ought to be static data: get_parent_folder,
1734 get_parent_store, get_message_count, get_unread_message_count,
1735 get_permanent_flags, get_message_flags, set_message_flags,
1736 get_message_user_flag, set_message_user_flag, get_message_uid,
1737 get_uids, get_summary, get_subfolder_names. Turn
1738 camel_folder_delete_message into a macro.
1740 * providers/{mbox,pop3,vee}: Update for CamelFolder changes
1742 * providers/Makefile.am: Disable imap and nntp for now
1744 2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
1746 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
1747 This shouldn't return NULL, it should return g_ptr_array_new ()
1748 so the mailer gets what it expects.
1750 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
1752 * camel-folder-summary.c (camel_folder_summary_decode_string):
1753 Oops, an unsigned integer can never be < 0
1755 2000-07-10 Dan Winship <danw@helixcode.com>
1757 * providers/vee/camel-vee-folder.c (vee_search_by_expression):
1758 Initialize a variable to make this not crash again. And fix a bug
1759 so it actually does something.
1761 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
1763 * camel-folder-summary.c: Cleaned up a bunch of compile warnings
1765 2000-07-10 Dan Winship <danw@helixcode.com>
1767 * providers/vee: kill more debugging messages
1769 2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
1771 * providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count):
1772 * providers/vee/camel-vee-folder.c (vee_get_unread_message_count):
1773 * providers/imap/camel-imap-folder.c (imap_get_unread_message_count):
1776 * camel-folder.c (camel_folder_get_unread_message_count): New
1777 convenience function to allow the mailer to query the number
1778 of unread messages in a folder (for displaying message stats
1781 2000-07-09 Dan Winship <danw@helixcode.com>
1783 * camel-mime-utils.c (header_references_dup): New function to copy
1784 a header_references structure.
1786 * camel-folder-summary.c (camel_message_info_dup_to): New function
1787 to (deep) copy the data from one CamelMessageInfo into another.
1788 (camel_message_info_free): And free the data.
1790 * providers/vee/camel-vee-folder.c (vee_sync): Implement. (empty).
1791 (vee_search_by_expression): belatedly update for
1792 camel_folder_search change.
1793 (vee_folder_build): belatedly update for camel_folder_search
1794 change. Use camel_message_info_dup_to and camel_message_info_free
1795 (in particular, so that we get message_id and references info so
1796 vfolders can be threaded).
1797 (vee_folder_build_folder): Ditto.
1799 2000-07-08 Jeffrey Stedfast <fejj@helixcode.com>
1801 * providers/nntp/camel-nntp-folder.c:
1802 * providers/nntp/camel-nntp-utils.c:
1803 * providers/nntp/camel-nntp-store.c: Update to reflect past changes
1804 in the Camel API. Use gtk macro casts wherever possible and use glib's
1805 memory functions instead of standard c's (since they are not
1808 * providers/smtp/camel-smtp-transport.c:
1809 * providers/imap/camel-imap-store.c: Wrap debug print statements
1812 * providers/imap/camel-imap-stream.c (stream_read): Make sure
1813 that we get up to and including the last \n of the mime part.
1815 * providers/imap/camel-imap-folder.c (imap_get_message): Make sure
1816 that we get up to and including the last \n of the mime part.
1817 Wrap debug print statements in a macro.
1819 * providers/imap/camel-imap-stream.c (stream_read): Only cache
1820 the important data (aka the mime part requested and no extra
1821 server response stuff)
1823 2000-07-07 Dan Winship <danw@helixcode.com>
1825 * camel-mime-utils.c (header_references_decode): Work around
1826 In-Reply-To's with unquoted punctuation. So many broken mailers.
1828 * camel-folder.c (camel_folder_search_by_expression): Make this
1829 return a GPtrArray rather than a GList.
1831 * camel-folder-search.c (camel_folder_search_execute_expression):
1832 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
1833 * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
1834 * providers/nntp/camel-nntp-folder.c (nntp_search_by_expression):
1835 Update to return a GPtrArray rather than a GList.
1837 2000-07-07 Jeffrey Stedfast <fejj@helixcode.com>
1839 * providers/smtp/camel-smtp-transport.c (esmtp_get_authtypes):
1840 Fixed the parser to actually work
1842 2000-07-06 Dan Winship <danw@helixcode.com>
1844 * camel-mime-utils.c (header_references_decode): Make this deal
1845 with the full RFC822 References/In-Reply-To format rather than
1846 just the more-nicely-behaved RFC1036 version. (Needed to parse
1847 In-Reply-To headers with extra junk in them.)
1849 2000-07-06 Jeffrey Stedfast <fejj@helixcode.com>
1851 * providers/imap/camel-imap-folder.c (imap_get_summary): Parse for
1852 more header information to allow message threading in IMAP.
1853 (imap_get_message_info): Same.
1855 * camel-folder-summary.c: Renamed summary_format_* to
1856 camel_summary_format_* and moved them into public scope.
1858 * providers/smtp/camel-smtp-transport.c (smtp_connect): Oops. Don't
1859 pass port # as a string in the error code (if it fails to connect).
1861 * providers/imap/camel-imap-folder.c (imap_append_message): Changed
1862 over to camel_imap_command_extended as that was the source of the
1863 problems - apparently appending replies with more than just 1 line.
1865 2000-07-05 Dan Winship <danw@helixcode.com>
1867 * camel-folder-search.c (search_header_contains): make header
1868 matching case-insensitive
1870 * camel-folder-summary.c:
1872 * providers/mbox/camel-mbox-folder.c:
1873 * providers/mbox/camel-mbox-summary.c: Remove some non-error case
1874 debugging-type messages.
1876 2000-07-05 Ettore Perazzoli <ettore@helixcode.com>
1878 * providers/mbox/camel-mbox-summary.c (d): Define to empty so that
1879 we get rid of a ton of debugging messages.
1881 2000-07-05 Jeffrey Stedfast <fejj@helixcode.com>
1883 * camel-mime-utils.h: Added prototype for uudecode_step
1885 * camel-mime-utils.c (uudecode_step): Cleaned up some junk that
1886 should have been cleaned up when debugging printf's were taken out.
1888 2000-07-05 Ettore Perazzoli <ettore@helixcode.com>
1890 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
1891 Update the X-Evolution: header even if the in-memory UID and the
1892 saved UID are not the same. Otherwise mboxes with clashing UIDs
1895 * camel-folder-summary.c
1896 (camel_folder_summary_add_from_parser): Add the message to the
1897 summary before doing any ibex stuff. In fact, this might also
1898 have the side effect of reassigning the UID so it needs to be done
1899 before we start using the UID.
1901 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Add
1902 debugging message to keep track of the UIDs we add.
1904 2000-07-05 Dan Winship <danw@helixcode.com>
1906 * camel-folder-summary.c: Add "Cc" to summary and bump summary
1909 * camel-folder-search.c (search_header_contains): make "Cc" a
1912 2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
1914 * camel-folder-summary.c (camel_folder_summary_next_uid_string):
1916 (camel_folder_summary_add): Use
1917 `camel_folder_summary_next_uid_string()' instead of recomputing
1918 the UID manually here.
1919 (camel_folder_summary_add_from_parser): Likewise.
1921 2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
1923 * camel-folder-summary.c (camel_folder_summary_set_uid): Removed.
1925 2000-07-03 Dan Winship <danw@helixcode.com>
1927 * camel-folder-summary.c (message_info_new): Parse In-Reply-To
1928 with header_references_decode, not header_msgid_decode.
1930 * camel-mime-message.c (camel_mime_message_class_init): message
1931 headers are case-insensitive.
1933 * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fix a
1934 bug in error-setting code.
1935 (pop3_connect): Don't re-prompt for password in the KPOP case.
1936 (pop3_get_response): New function, split out from
1938 (connect_to_server): Use pop3_get_response to parse the greeting
1939 message, and error out appropriately if it's -ERR.
1941 2000-07-02 Dan Winship <danw@helixcode.com>
1943 * camel-folder.c (camel_folder_freeze, camel_folder_thaw): New
1944 functions to freeze and thaw a folder (to prevent message/folder
1945 changed signals in the middle of a long series of operations).
1946 (camel_folder_class_init): Change signals to GTK_RUN_FIRST.
1947 (message_changed, folder_changed): Add default implementations
1948 that stop the emission and record info for later if the folder is
1951 * providers/mbox/camel-mbox-folder.c (mbox_sync): leftover fixes
1952 from the close->sync change: don't destroy the ibex, summary, and
1953 search when syncing.
1954 (append_message): emit "folder_changed" on a successful append.
1956 2000-07-02 Jeffrey Stedfast <fejj@helixcode.com>
1958 * camel-mime-utils.c (uudecode_step): A rather complex uudecoder
1959 written in the spirit of Zucchi-ness, is it up to par? Only the
1960 Z-man can tell us :-)
1962 2000-07-01 Dan Winship <danw@helixcode.com>
1964 * camel-service.c (camel_service_get_name): New method, to return
1965 an end-user-friendly name corresponding to a service. (eg, "POP
1966 service for danw on trna.helixcode.com").
1968 * providers/imap/camel-imap-store.c,
1969 providers/mbox/camel-mbox-store.c,
1970 providers/nntp/camel-nntp-store.c,
1971 providers/pop3/camel-pop3-store.c,
1972 providers/sendmail/camel-sendmail-transport.c,
1973 providers/smtp/camel-smtp-transport.c: Implement.
1975 * providers/imap/Makefile.am: remove unneeded
1976 libcamelimap_la_LDADD.
1978 * providers/pop3/camel-pop3-store.c (connect_to_server): fix the
1979 CAPA-parsing code to not get into an infinite loop.
1981 2000-07-01 Jeffrey Stedfast <fejj@helixcode.com>
1983 * providers/imap/camel-imap-folder.c (imap_get_message): Fixed
1984 the bug that would sometimes leave part of the server response
1985 tacked on to the end of the message.
1987 * camel-folder.c: Renamed _by_uid methods. Since we no longer
1988 have get-by-number methods, no need to have the _by_uid
1990 (get_message_by_uid): Renamed to get_message
1991 (delete_message_by_uid): Renamed to delete_message
1992 (summary_get_by_uid): Renamed to get_message_info
1994 * providers/mbox/camel-mbox-folder.c:
1995 * providers/pop3/camel-pop3-folder.c:
1996 * providers/imap/camel-imap-folder.c:
1997 * providers/vee/camel-vee-folder.c: Updated to reflect
1998 camel-folder changes.
2000 2000-06-30 Jeffrey Stedfast <fejj@helixcode.com>
2002 * camel-folder.c (camel_folder_copy_message_to): New function, to
2003 copy a message from one folder to another. The default
2004 implementation just uses append_message, but providers can
2005 implement more efficient versions for use when both folders are on
2008 * broken-date-parser.[c,h]: Utilities for parsing broken
2011 * providers/imap/camel-imap-folder.c (imap_move_message_to):
2012 (imap_copy_message_to): Implemented.
2014 * camel-mime-utils.c (header_decode_date): Wrote some code to try
2015 and un-mangle broken date formats and then parse that new string
2018 2000-06-30 Dan Winship <danw@helixcode.com>
2020 * camel-folder.c (camel_folder_move_message_to): New function, to
2021 move a message from one folder to another. The default
2022 implementation just uses append_message and delete_message, but
2023 providers can implement more efficient versions for use when both
2024 folders are on the same store.
2026 2000-06-29 Jeffrey Stedfast <fejj@helixcode.com>
2028 * providers/imap/camel-imap-folder.c (imap_expunge): Should now
2029 print a meaningful error message when it doesn't succeed
2031 2000-06-28 Jeffrey Stedfast <fejj@helixcode.com>
2033 * providers/imap/camel-imap-store.c (imap_connect): Changed to
2034 keep prompting user for a valid password until it either
2035 authenticates or until Canceled by the user.
2036 (camel_imap_command_extended): Improved speed (replaced the
2037 g_strjoinv call with a faster implementation)
2039 * providers/pop3/camel-pop3-store.c
2040 (camel_pop3_command_get_additional_data): Fixed.
2041 (pop3_connect): Changed to keep prompting the user for a
2042 password until it either works or until Canceled by the user.
2044 * providers/mbox/camel-mbox-summary.c: General cleanup
2045 (camel_mbox_summary_sync): Fixed a memory leak and added
2046 CamelException handling.
2048 * providers/mbox/camel-mbox-store.c (delete_folder): Fixed a
2051 * providers/mbox/camel-mbox-folder.c (mbox_append_message):
2052 Default 'off_t seek' to -1 so as to make sure it's initialized
2053 before it's used in the case of a bad stat() call.
2054 (mbox_sync): Updated
2055 (mbox_expunge): Updated
2057 2000-06-27 Jeffrey Stedfast <fejj@helixcode.com>
2059 * providers/imap/camel-imap-store.c (imap_connect): Move the
2060 CAPABILITY command here so we don't have to keep checking
2061 each time we open a folder.
2062 (camel_imap_command_extended): If we are doing an EXAMINE,
2063 don't bother doing a SELECT first.
2065 * providers/imap/camel-imap-folder.c (imap_init): Update so
2066 folder->has_search_capability depends on the parent IMAP store
2067 (since this is really dependant on the IMAP implementation and
2070 2000-06-27 Christopher James Lahey <clahey@helixcode.com>
2072 * providers/smtp/camel-smtp-transport.c: Don't close the filter
2073 stream when done with it (this causes the source stream to close);
2074 Instead, just flush it when done.
2076 2000-06-27 Michael Zucchi <zucchi@zedzone.mmc.com.au>
2078 * camel-folder-search.c (search_header_contains): Make header
2079 search 'to' match 'to', and not 'from', small typo, fixes #317.
2081 2000-06-26 Christopher James Lahey <clahey@helixcode.com>
2083 * providers/mbox/camel-mbox-summary.c: Added debugging
2086 2000-06-23 Jeffrey Stedfast <fejj@helixcode.com>
2088 * providers/imap/camel-imap-store.c:
2089 * providers/imap/camel-imap-folder.c: Improved folder parsing.
2090 Not specifying a namespace should no longer list the entire
2093 2000-06-22 Chris Toshok <toshok@helixcode.com>
2095 * providers/nntp/.cvsignore: ignore test-newsrc
2097 * providers/nntp/camel-nntp-store.c,
2098 providers/nntp/camel-nntp-store.h,
2099 providers/nntp/camel-nntp-folder.c,
2100 providers/nntp/camel-nntp-folder.h,
2101 providers/nntp/camel-nntp-utils.c: Bring the nntp provider up to a
2102 state where it builds and is usable with the current camel. there
2103 are still warts (semi-broken .newsrc file handling, and a lack of
2104 a subscribe ui -- in fact no way to add a new server, really), but
2105 it'll display news messages.
2107 * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
2109 (libcamelnntpinclude_HEADERS): add camel-nntp-newsrc.h
2110 also, add test-newsrc stuff.
2112 * providers/nntp/test-newsrc.c: new file that tests the newsrc
2113 stuff by parsing and regurgitating a .newsrc file for a particular
2116 * providers/nntp/camel-nntp-newsrc.c,
2117 providers/nntp/camel-nntp-newsrc.h: new files, initial support for .newsrc files.
2119 2000-06-22 Jeffrey Stedfast <fejj@helixcode.com>
2121 * providers/imap/camel-imap-folder.c (imap_get_message_count):
2122 Oops. Now appends the namespace to the folder before querying
2123 for the number of messages.
2125 * providers/imap/camel-imap-store.c (imap_folder_exists): New
2126 convenience function for use by imap_create().
2127 (get_folder): If folder is specified as "/", we really want
2130 * providers/sendmail/camel-sendmail-provider.c:
2131 * providers/vee/camel-vee-provider.c:
2132 * providers/smtp/camel-smtp-provider.c:
2133 * providers/mbox/camel-mbox-provider.c:
2134 * providers/pop3/camel-pop3-provider.c:
2135 * providers/imap/camel-imap-provider.c: Updated
2137 * camel-session.c: Moved service_cache hash table into the
2139 (service_cache_remove): Updated.
2140 (camel_session_get_service): Updated.
2142 * camel-url.c (camel_url_hash): Took out the hashing of
2143 url->passwd. We don't want this anymore.
2145 * providers/imap/camel-imap-folder.c (imap_init): Took out
2146 references to 'namespace'
2147 (camel_imap_folder_init): Same
2149 * providers/imap/camel-imap-folder.h: No more namespace. We are
2150 instead going to use url->path as the namespace.
2152 2000-06-21 Jeffrey Stedfast <fejj@helixcode.com>
2154 * providers/imap/camel-imap-store.c (imap_create): Modified to
2155 use the "namespace" (url->path) if it exists.
2157 * providers/imap/camel-imap-folder.c (imap_delete_message_by_uid):
2158 Now just sets the deleted flag on the summary rather than speaking
2159 directly to the IMAP server. This is both faster and cleaner.
2161 2000-06-21 Dan Winship <danw@helixcode.com>
2163 * providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb
2166 2000-06-21 Jeffrey Stedfast <fejj@helixcode.com>
2168 * providers/imap/camel-imap-folder.c (imap_get_message_by_uid):
2169 We are getting mail in IMAP now!! whoo-hoo!. Stripped out the
2170 filtering so messages may have some dot-stuffing, but the
2171 filtering can always be added back in later when we know it
2172 works and isn't the problem.
2174 2000-06-21 Peter Williams <peterw@curious-george.helixcode.com>
2176 * providers/mbox/camel-mbox-folder.c (mbox_init): Use the basename
2177 of the mailbox so we don't get pathnames like ~/evolution/inbox///movemail.ibex
2179 2000-06-21 Dan Winship <danw@helixcode.com>
2181 * camel-folder-summary.c (message_info_new): Set date_received
2182 based on the first (most recent) "Received" header.
2184 2000-06-20 Dan Winship <danw@helixcode.com>
2186 * camel-mime-part.c (write_to_stream): flush the filter stream
2187 before unreffing it, so it will camel_mime_filter_complete.
2189 * camel-stream-filter.c (camel_stream_filter_class_init): Fix a
2190 braino so camel_stream_flush works here.
2192 * camel-stream-mem.c (stream_seek): Fix a bug that resulted in
2193 large attachments being silently dropped.
2195 * providers/pop3/camel-pop3-store.c
2196 (camel_pop3_command_get_additional_data): Don't use g_strjoinv
2197 here, since it is O(n^2) on the length of the output string, and
2200 * camel-mime-part-utils.c
2201 (simple_data_wrapper_construct_from_parser): add a CRLF decoder
2202 after the QP/B64 decoder if it's text.
2204 2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
2206 * providers/imap/camel-imap-folder.c (imap_get_summary): Only
2207 fetch the summary if the folder summary doesn't already exist.
2208 When the summary *does* exist, start fetching from 1, not 0.
2209 (imap_free_summary): Don't do anything here.
2210 (imap_finalize): Free the summary here instead of in
2211 imap_free_summary().
2212 (imap_set_message_flags): Implemented
2213 (imap_sync): Added code to set flags on messages that have had
2214 their flags changed (however I #if'd it out until we are more
2215 confidant in the IMAP code :)
2216 (imap_summary_get_by_uid): Now parese flags correctly.
2217 (imap_get_summary): Now parese flags correctly. Also correctly
2218 parses the UID correctly.
2220 * camel-url.c (check_equal): No need to check s1 if s2 is NULL
2221 (camel_url_equal): Don't check the passwd component of the url.
2223 2000-06-20 Dan Winship <danw@helixcode.com>
2225 * camel-folder-summary.c (camel_folder_summary_add): mark the
2226 message info with CAMEL_MESSAGE_FOLDER_FLAGGED if we change the
2227 uid, so the folder will know that it's dirty.
2229 2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
2231 * providers/imap/camel-imap-store.c (camel_imap_command_extended):
2232 Now returns the last line of data that the server sends back as
2233 well. This is needed for commands like SELECT (like Peter pointed
2235 (camel_imap_command): No longer checks for SELECT (no need)
2237 * providers/imap/camel-imap-folder.c: Added namespace stuff
2238 which we will need later on...
2239 (imap_parse_subfolder_line): Convenience function for use in
2240 get_subfolder_names()
2241 (imap_get_subfolder_names): Updated. Also changed it to use LIST
2242 instead of LSUB (temporary change).
2244 2000-06-19 Jeffrey Stedfast <fejj@helixcode.com>
2246 * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set
2247 summary equal to NULL.
2248 (imap_get_summary): Store the summary in the ImapFolder
2249 (imap_summary_get_by_uid): If we have a summary cache in the
2250 ImapFolder, first check to see if that message info is in the
2251 cached summary first, if not fetch it directly from the IMAP
2252 server and append it to the summary cache.
2253 (imap_get_message_flags): Don't free the message info that we get
2254 back from summary_get_by_uid as we don't want to be corrupting our
2257 2000-06-19 Peter Williams <peterw@curious-george.helixcode.com>
2259 * providers/imap/camel-imap-store.c (camel_imap_command{,_extended}): When
2260 SELECT'ing a folder for an IMAP command, use _extended to grab the entire
2261 response (before we just used camel_imap_command and missed the OK codes)
2263 2000-06-18 Jeffrey Stedfast <fejj@helixcode.com>
2265 * providers/imap/camel-imap-folder.c (imap_summary_get_by_uid):
2266 Now gets the message flags as it should.
2267 (imap_get_summary): Same as imap_summary_get_by_uid
2268 (imap_get_permanent_flags): Return the permanent flags stored
2270 (imap_get_message_flags): Return message flags associated with
2271 given uid. Note: we may want to somehow cache summary info so
2272 that we don't have to keep querying the IMAP provider in
2273 imap_summary_get_by_uid().
2275 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
2277 * providers/imap/camel-imap-folder.c (imap_free_summary): We were
2278 leaking memory - but not anymore!
2279 (imap_get_summary): We now get the UIDs and the beginnings of the
2280 code to get the message flags as well.
2282 2000-06-17 Dan Winship <danw@helixcode.com>
2284 * camel-mime-parser.c (folder_scan_header): Don't copy newlines
2285 into the parsed header text, and turn any number of tabs and
2286 spaces after a newline into a single space.
2288 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
2290 * providers/imap/camel-imap-folder.c (imap_init): Should now
2291 correctly do CAPABILITY.
2293 2000-06-17 Dan Winship <danw@helixcode.com>
2295 * providers/mbox/camel-mbox-summary.c: Add some debugging printfs
2296 when rebulding summary to help figure out why people's summaries
2297 are always being rebuilt.
2299 2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
2301 * providers/imap/camel-imap-folder.c (imap_search_by_expression):
2302 Began to implement, need to get information on how to
2303 deconstruct @expression into an IMAP search expression and
2305 (imap_init): Now queries the IMAP provider for CAPABILITY to
2306 determine if SEARCH is implemented or not.
2308 * providers/imap/imap.c: Removed - no longer a need to have
2309 this as an example for anyone interesting to help mecode IMAP
2312 2000-06-16 Jeffrey Stedfast <fejj@helixcode.com>
2314 * providers/imap/camel-imap-folder.c (imap_sync): Added code
2315 to expunge if called for (still need to finish coding this).
2316 (imap_get_uids): Implemented.
2317 (imap_get_summary): Found a way to get the date
2318 (imap_summary_get_by_uid): Same.
2319 (imap_free_summary): Implemented.
2321 * string-utils.c (strstrcase): Fixed a compile warning
2323 * providers/imap/camel-imap-summary.c: Removed - we don't
2324 need a CamelImapSummary structure.
2326 2000-06-16 Dan Winship <danw@helixcode.com>
2328 Move flag handling from CamelMimeMessage to CamelFolder. This
2329 simplifies several flag-handling pieces of code in the mailer, and
2330 lets you change a message's flags without having to fetch the
2331 message body. It also means that fully-constructed
2332 CamelMimeMessages are now essentially constant, which will help
2333 simplify locking issues later since it means two threads
2334 interested in the same message can just work with separate copies
2337 * camel-mime-message.h (struct _CamelMimeMessage): Removed flags
2338 and user_flags (moved to summary). Removed expunged and
2339 message_number which were unused. Removed message_uid and folder
2340 which are no longer needed in the new scheme.
2341 (struct CamelMimeMessageClass): Removed message_changed signal and
2342 get/set_message_number methods.
2344 * camel-mime-message.c: Updates for CamelMimeMessage changes.
2345 (camel_mime_message_get/set_flags,
2346 camel_mime_message_get/set_user_flag): Replaced with methods in
2348 (camel_flag_get, camel_flag_set, camel_flag_list_size,
2349 camel_flag_list_free): Moved verbatim to camel-folder-summary.c
2351 * camel-folder.c (camel_folder_get/set_message_flags,
2352 camel_folder_get/set_message_user_flag): New methods (and
2353 corresponding useless default implementations)
2354 (camel_folder_class_init): add a message_changed signal
2356 * camel-folder-summary.c (camel_flag_get, camel_flag_set,
2357 camel_flag_list_size, camel_flag_list_free): Moved here from
2358 camel-mime-message.c
2360 * providers/mbox/camel-mbox-folder.c (message_changed): Removed.
2361 (mbox_get_message_flags, mbox_set_message_flags,
2362 mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak
2363 summary bits as appropriate. (Functionality moved here from
2365 (mbox_get_message_by_uid): Update for CamelMimeMessage changes
2366 (less stuff to initialize).
2368 * providers/imap/camel-imap-folder.c (message_changed): Remove
2369 this. It was just copied from the mbox provider and doesn't deal
2370 with the real IMAP flag stuff anyway. (So there's currently no
2371 flag support in the IMAP provider.)
2372 (imap_get_message_by_uid): Update for CamelMimeMessage changes.
2374 * providers/vee/camel-vee-folder.c: (message_changed): Remove old
2375 one. Add a new one to listen for message_changed on each folder
2376 and re-emit message_changed signals that correspond to messages in
2378 (vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy
2379 flag setting to the underlying real messages.
2380 (vee_append_message): Removed for now; there's no way to translate
2381 this into the new CamelMimeMessage/CamelFolder scheme, but (a)
2382 there's also no code which would ever call it and (b) we're
2383 probably going want a better interface than append_message for
2384 message drag and drop to work anyway. To be revisited.
2386 2000-06-16 Dan Winship <danw@helixcode.com>
2388 * camel-mime-utils.c (rfc2047_decode_word):
2389 * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
2390 * camel-folder-summary.c (summary_build_content_info):
2391 KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet,
2392 output ISO-8859-1 instead, so Ettore can read his Italian mail. :)
2393 This will be reverted later.
2395 2000-06-15 Jeffrey Stedfast <fejj@helixcode.com>
2397 * providers/imap/camel-imap-folder.c (imap_get_summary): Started to
2398 implement - may want to use ENVELOPE instead of BODY.PEEK[HEADER]
2399 (imap_summary_get_by_uid): Started to code, I've got to find a way to
2400 get the date in time_t format and also get the flags
2402 * string-utils.c (strstrcase): Added this convenience function - I
2403 know about strcasestr() but it's not portable.
2405 2000-06-15 Dan Winship <danw@helixcode.com>
2407 * camel-service.c: Remove camel_service_connect_with_url. (URLs
2408 must be specified when the service is requested from the session,
2409 so that there can only ever be one service for any URL.)
2411 * camel-folder.c: (camel_folder_open, camel_folder_is_open,
2412 camel_folder_get_mode): Kill. Folders are now always open, and
2413 handle "closing" sorts of operations at sync or finalize time.
2414 (camel_folder_sync): renamed from camel_folder_close. Syncs state
2415 to the store but doesn't necessarily close/disconnect.
2417 * providers/*/camel-*-folder.c: Merge "open" methods into "init"
2418 methods. Rename close to sync and update appropriately.
2420 * providers/imap/camel-imap-store.c: Remove camel_imap_store_open
2421 and camel_imap_store_close, which should not have been copied from
2422 the POP provider (where the exist to work around limitations of
2425 * providers/mbox/camel-mbox-summary.c: fix a bug. (don't expunge
2426 deleted messages if called with expunge == FALSE)
2428 * providers/pop3/camel-pop3-store.c (connect_to_server): Check
2429 server for various interesting extensions.
2431 * providers/pop3/camel-pop3-folder.c (get_uids): If the server
2432 supports UIDL, use real UIDs rather than fake ones.
2433 (etc): Map uids back to numbers appropriately
2435 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Fix to
2436 previous change: make sure the "seek" variable ends up with the
2439 * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
2440 summary mtime as well as size.
2442 2000-06-14 Dan Winship <danw@helixcode.com>
2444 * providers/mbox/camel-mbox-folder.c (mbox_append_message): if the
2445 mbox doesn't end with a '\n', write one before appending the new
2448 2000-06-14 Jeffrey Stedfast <fejj@helixcode.com>
2450 * camel-mime-filter-crlf.c (filter): Updated the encoder to allocate
2451 more memory (since we are also now adding dots). Also updated the
2452 decoder as we have found that it sometimes passes the end of the
2455 * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Took out the
2456 filter code (we already filter in
2457 camel_pop3_command_get_additional_data)
2459 * camel-folder.c (init): Updated: a separator is now a char* rather
2460 than a single char because IMAP can have a string for a directory
2461 separator. Also, since IMAP does not begin with a directory separator,
2462 there is a new argument (path_begins_with_sep) which decides if a
2463 directory should begin with a directory separator.
2465 * providers/imap/camel-imap-store.c (imap_create): Since, on connect,
2466 Camel tries to create INBOX (which already exists on every IMAP
2467 provider) we can return TRUE when the folder name is "INBOX".
2469 * providers/vee/camel-vee-folder.c (vee_init): Updated.
2471 * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated.
2473 * providers/mbox/camel-mbox-store.c (get_folder): Updated.
2475 * providers/mbox/camel-mbox-folder.c (mbox_init): Updated.
2477 * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated.
2479 2000-06-14 Dan Winship <danw@helixcode.com>
2481 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
2482 Renamed from camel_mbox_summary_expunge. Takes a gboolean saying
2483 whether to expunge or just sync the mbox file. Change some
2484 g_errors to g_warning so we don't abort. Make the quick
2485 X-Evolution updating code lseek around correctly. Update the
2486 mbox mtime in the summary file even in the quick case.
2488 * providers/mbox/camel-mbox-summary.h: make
2489 CAMEL_MESSAGE_FOLDER_NOXEV not conflict with
2490 CAMEL_MESSAGE_FOLDER_FLAGGED defined in camel-mime-message.h
2492 * providers/mbox/camel-mbox-folder.c (mbox_close): call
2493 camel_mbox_summary_sync to save flag state if not expunging.
2494 (mbox_expunge): Update for camel_mbox_summary_expunge rename.
2496 2000-06-13 Jeffrey Stedfast <fejj@helixcode.com>
2498 * providers/imap/camel-imap-store.c (camel_imap_store_open):
2499 (camel_imap_store_close): Added.
2500 (camel_imap_command_extended): Fixed a segfault and updated
2501 to use camel_imap_status()
2502 (camel_imap_command): Updated to use camel_imap_status()
2503 (camel_imap_status): New convenience function for parsing
2504 the return status of an IMAP command
2506 2000-06-12 Jeffrey Stedfast <fejj@helixcode.com>
2508 * providers/imap/camel-imap-folder.c (imap_get_message_by_uid):
2509 Works like the POP fetch code, should work temporarily until
2510 we get around to coding it the way it "Should Be".
2512 * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Now uses
2513 the camel-mime-filter-crlf decoder when retrieving messages.
2515 * camel-mime-filter-smtp.c: Deprecated.
2517 * providers/smtp/camel-smtp-transport.c (smtp_data): Updated to use
2518 camel-mime-filter-crlf with my 'dot' extension in place of
2519 camel-mime-filter-smtp
2521 * camel-mime-part.c (write_to_stream): Updated to reflect changes
2522 made to camel-mime-filter-crlf.c
2524 * camel-mime-filter-crlf.c (filter): Modified to be able to
2525 encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder
2526 so that it should no longer get caught in an infinite loop.
2528 2000-06-12 Dan Winship <danw@helixcode.com>
2530 * providers/*/Makefile.am: don't pass a second (incorrect) -rpath
2531 in addition to the (correct) one automatically provided by
2534 * camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion.
2535 (Currently only tested in the LF->CRLF direction.)
2537 * camel-mime-part.c (write_to_stream): if content-type is text,
2538 and it's QP or B64 encoded, pass through the CRLF filter before
2539 the other filter to satisfy the "canonical encoding" rules in the
2542 2000-06-09 Dan Winship <danw@helixcode.com>
2544 * camel-session.c (camel_session_query_authenticator): Add another
2545 argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
2546 CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache
2549 * providers/pop3/camel-pop3-store.c (pop3_connect): uncache the
2550 password if it doesn't work.
2552 2000-06-09 Jeffrey Stedfast <fejj@helixcode.com>
2554 * providers/imap/camel-imap-stream.c (stream_read): Updated to reflect
2555 changes made in camel-imap-store.c
2557 * providers/imap/camel-imap-store.c (imap_create): No longer checks to
2558 make sure a folder doesn't already exists (as this is no longer needed)
2559 (camel_imap_command): Now takes a CamelFolder argument so it can detect
2560 whether or not it needs to SELECT a folder or not
2561 (camel_imap_command_extended): Same.
2563 * providers/smtp/camel-smtp-transport.c (smtp_connect): Will now always
2564 send EHLO first, if that fails it will fall back on HELO.
2565 (esmtp_get_authtypes): Should now correctly parse authtypes.
2567 2000-06-07 Jeffrey Stedfast <fejj@helixcode.com>
2569 * providers/imap/camel-imap-summary.c: Now builds (not that it's worth
2572 * providers/imap/camel-imap-folder.c (imap_get_uids): Now uses the
2573 correct cast to a CamelImapMessageInfo structure (should get rid of
2576 * providers/imap/Makefile.am: Added rules to build
2579 * providers/imap/camel-imap-store.c (get_folder): Update.
2580 Moved imap_create here.
2582 * providers/imap/camel-imap-folder.c (delete_messages): Remove.
2583 (imap_create): Removed.
2584 (imap_delete): Removed.
2585 (imap_exists): Removed.
2587 * providers/imap/camel-imap-stream.h: Added typedef's for the stream
2589 * providers/imap/camel-imap-stream.c: Modified to build cleanly
2591 2000-06-07 Not Zed <NotZed@HelixCode.com>
2593 * camel-mime-utils.c (header_msgid_decode_internal): Properly
2594 dereference warning/debug messages.
2595 (header_references_decode): Check we actually have msgid stuff
2596 before trying to decode it ...
2598 2000-06-06 Jeffrey Stedfast <fejj@helixcode.com>
2600 * camel-imap-stream.[c,h]: Removed
2602 * providers/imap/camel-imap-stream.[c,h]: Relocated to this
2605 * providers/imap/camel-imap-summary.c: Added
2607 2000-06-06 Dan Winship <danw@helixcode.com>
2609 * camel-folder.c: Remove exists, create, delete. A CamelFolder
2610 now always references an existing folder. Remove delete_messages
2611 too since it wasn't being used. Add a "create" flag to
2612 get_subfolder saying whether or not to create the subfolder if it
2615 * camel-store.c (camel_store_get_folder): Add a "create" flag to
2616 say whether or not to create the folder if it doesn't yet exist.
2617 (camel_store_delete_folder): New method, moved from CamelFolder.
2618 (cache_folder, uncache_folder): Fix up a bit.
2619 (get_folder_name): Explain what this is for.
2621 * providers/mbox/camel-mbox-folder.c:
2622 * providers/mbox/camel-mbox-store.c: Update. Remove support for
2623 hierarchical folders to simplify this for now, since we're not
2624 using it, and it's not completely clear how they should work in an
2625 ELocalStorage world. Needs to be revisited.
2627 * providers/pop3/camel-pop3-folder.c (delete_messages): Remove.
2628 * providers/pop3/camel-pop3-store.c (get_folder): Update.
2630 * providers/vee/camel-vee-folder.c (exists): Remove.
2631 * providers/vee/camel-vee-store.c (vee_get_folder): Update.
2633 2000-06-06 Jeffrey Stedfast <fejj@helixcode.com>
2635 * providers/imap/camel-imap-*.[c,h]: Started on getting
2636 imap to build cleanly (tho some work has not been completed
2637 so it still won't build until camel-imap-summary is finished
2638 along with a few methods in camel-imap-folder)
2640 * camel-stream.[c,h]: Changed the read and write method prototypes
2641 to return an ssize_t type rather than an int and also changed
2642 the 'number of bytes' to read or write to a size_t type
2644 * camel-stream-fs.c: same as above
2646 * camel-stream-mem.c: again, same as above
2648 * camel-stream-buffer.c: same
2650 * camel-imap-stream.[c,h]: Added this new stream, cache's previously
2651 read data so each successive call will instead read from the cache
2653 2000-06-05 Dan Winship <danw@helixcode.com>
2655 * camel-mime-part.c (camel_mime_part_set_disposition): fix
2656 typo/braino (set "Content-Disposition", not "Content-Description")
2657 (camel_mime_part_set_filename): const poison
2659 2000-06-02 Not Zed <NotZed@HelixCode.com>
2661 * camel-mime-utils.c (base64_encode_step): Ick, damn signs! Fix a
2662 bug with sign extended bytes.
2664 * camel-mime-filter-smtp.c (filter): Changed layout/logic slightly
2665 (to match From filter)
2667 2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
2669 * camel-mime-filter-smtp.c (filter): Fixed the filter so that it
2670 wouldn't insert garbage under certain conditions.
2672 2000-06-02 Christopher James Lahey <clahey@helixcode.com>
2674 * camel-session.c: Don't ref the services in the cache.
2676 2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
2678 * providers/smtp/camel-smtp-transport.c: Rearanged where debug
2679 fprintf statements we placed so that any data the server sends
2680 back is printed out before an exception is set and the function
2683 2000-06-02 Not Zed <NotZed@HelixCode.com>
2685 * camel-mime-utils.c (header_decode_date): If we get a funny
2686 result, just throw it out. Basically a fix for the one true
2689 2000-06-01 Not Zed <NotZed@HelixCode.com>
2691 * camel-folder-summary.c (message_info_free): Free
2692 references/messsage id.
2693 (message_info_save): Save them.
2694 (message_info_load): Load them.
2695 (message_info_new): And get them from the new message.
2696 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped for new changes.
2698 * camel-folder-summary.h: Added references and messageid to
2701 2000-06-02 Christopher James Lahey <clahey@helixcode.com>
2703 * camel-session.c: Ref and unref objects in the service cache
2706 * camel-store.c: Ref the folder when returning it using
2707 lookup_folder. Used the folder's full name for the key for the
2708 folder cache since that's used to uncache it.
2710 2000-06-02 Dan Winship <danw@helixcode.com>
2714 * providers/pop3/camel-pop3-store.c (pop3_connect): free msg on
2715 success as well as failure.
2716 (camel_pop3_command_get_additional_data): free buf after reading
2717 the last line (".").
2719 * providers/pop3/camel-pop3-folder.c (get_message_by_uid): free
2720 body data after creating the memstream from it (which will copy
2723 * providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary
2726 * camel-data-wrapper.c (finalize): unref the stream, if it exists.
2728 2000-06-01 Not Zed <NotZed@HelixCode.com>
2730 * camel-mime-part.c (construct_from_parser): For a message part,
2731 set the default content-type to message/rfc822. Maybe needs to be
2732 done for multiparts too?
2734 2000-05-31 Not Zed <NotZed@HelixCode.com>
2736 * camel-mime-message.c (construct_from_parser): Typo in assersion.
2738 * camel-mime-parser.c (folder_scan_step): Use a default type of
2739 message/rfc822 for multipart/digest. Bug Z192.
2740 (folder_scan_drop_step): Remove warning.
2742 2000-05-30 Not Zed <NotZed@HelixCode.com>
2744 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Init
2745 filter_from to NULL, for exception case.
2746 (mbox_get_message_by_uid): Cast off_t to long int for diagnostics.
2748 * camel-url.c (camel_url_hash): Hash funciton for using camel
2750 (camel_url_equal): equal function for same.
2752 * camel-session.c (camel_session_finalise): Free cached services.
2753 (camel_session_init): Init service cache.
2754 (service_cache_remove): destroy callback to remove a service from
2757 * camel-store.c (get_folder_internal): Remove the extra ref of the
2758 folder. That seems the right behaviour ...?
2759 (camel_store_get_type): Doh, actually call store init, so the
2761 (cache_folder): strdup the folder name! no wonder it never found
2764 2000-05-30 Jeffrey Stedfast <fejj@helixcode.com>
2766 * providers/imap/camel-imap-folder.c: Implemented a few more
2767 methods like imap_append and 1 or 2 others
2769 2000-05-29 Not Zed <NotZed@HelixCode.com>
2771 * camel-store.c (camel_store_init): Move it to here. If this
2772 level is going to maintain it, it should set it up. Lets see what
2773 caching folders breaks :(
2775 * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Dont
2776 init folder cache here.
2778 * providers/mbox/camel-mbox-summary.c
2779 (camel_mbox_summary_expunge): Make sure we copy messages which are
2780 still intact to the new folder.
2781 (camel_mbox_summary_expunge): Update the frompos as well when
2783 (camel_mbox_summary_expunge): Remove some debug, and dont offset
2786 * providers/vee/camel-vee-folder.c (vee_folder_build): Check the
2787 searched folder is open before trying to search it.
2788 (message_changed): Track changes to the source message in the
2790 (folder_changed): Track folder changes, re-query the folder that
2791 changed, and cascade the changed event as well.
2792 (camel_vee_folder_finalise): Free subfolder and subfolder summary.
2794 2000-05-29 Dan Winship <danw@helixcode.com>
2796 * camel-service.c (camel_service_new): Fix up some glib
2797 precondition stuff. Try to set the URL in camel_service_new before
2798 checking whether or not it's "empty" so that you can successfully
2799 set "sendmail:" as a URL.
2801 2000-05-28 Dan Winship <danw@helixcode.com>
2803 * camel-provider.h: Add a domain field to CamelProvider, to say
2804 what kind of data it provides.
2806 * providers/imap/camel-imap-provider.c:
2807 * providers/mbox/camel-mbox-provider.c:
2808 * providers/pop3/camel-pop3-provider.c:
2809 * providers/sendmail/camel-sendmail-provider.c:
2810 * providers/smtp/camel-smtp-provider.c: Set domain to "mail".
2812 * providers/nntp/camel-nntp-provider.c: Set domain to "news".
2814 * providers/vee/camel-vee-provider.c: Set domain to "vfolder". (So
2815 it doesn't end up being listed as a potential mail source in the
2816 mail config wizard.)
2818 * providers/pop3/camel-pop3-store.c: Split apart password and APOP
2819 auth, since some servers seem to do both, but don't really.
2820 (connect_to_server): Renamed from try_connect. Now actually does
2821 the connection up to the point of checking the greeting for APOP
2823 (query_auth_types): Return APOP, if appropriate. Call
2824 pop3_disconnect after connect_to_server since we don't really want
2826 (pop3_connect): Use connect_to_server rather than duplicating
2827 code. Fix a one-byte buffer overrun in the APOP code.
2828 (pop3_disconnect): Make this able to clean up after a partial
2830 (connect_to_server): Remove port number from error message since
2831 it's not terribly useful and we were getting it from the wrong
2834 * camel-mime-utils.c (header_address_list_format_append): Use
2835 `foo@bar' rather than `"" <foo@bar>' for email addresses with no
2838 2000-05-27 Jeffrey Stedfast <fejj@helixcode.com>
2840 * providers/imap/camel-imap-store.c: Removed
2841 camel_imap_command_get_additional_data() as it was
2842 completely useless, replaced with
2843 camel_imap_command_extended() which may eventually replace
2844 camel_imap_command() as well.
2846 * providers/imap/camel-imap-store.h: Modified to reflect
2847 changes made to camel-imap-store.c
2849 * providers/imap/camel-imap-folder.c: Wrote the first of many
2850 methods: camel_imap_init(), imap_open(), imap_expunge(),
2851 imap_get_message_count(), and imap_get_subfolder_names()
2853 2000-05-26 Dan Winship <danw@helixcode.com>
2855 * camel-multipart.c (camel_multipart_init): Don't set a default
2856 boundary. Require the caller to do that.
2857 (set_boundary): if boundary is NULL, generate a "random" boundary.
2859 * camel-mime-part-utils.c
2860 (camel_mime_part_construct_content_from_parser): Add a call to
2861 camel_multipart_set_boundary after creating a new multipart.
2863 2000-05-25 Jeffrey Stedfast <fejj@helixcode.com>
2865 * providers/imap/camel-imap-store.c (try_connect): Removed
2866 Exception code - Pop doesn't seem to set exceptions
2868 * providers/imap/camel-imap-folder.c: Initial code, mostly
2869 just a template for future code
2871 * providers/imap/imap.[c,h]: Source code from my personal
2872 mailer - for reference only!
2874 2000-05-25 NotZed <NotZed@HelixCode.com>
2876 * camel-mime-part-utils.c
2877 (camel_mime_part_construct_content_from_parser): Replace simple
2878 data wrapper here too, oops.
2880 * Makefile.am (libcamel_la_SOURCES): Removed
2881 camel-simple-data-wrapper again. Less code to maintain == better
2884 * camel-data-wrapper.c (construct_from_stream): Fixes for bug
2885 where text attachments dont work. Made data-wrapper concrete for
2888 2000-05-23 NotZed <NotZed@HelixCode.com>
2890 * providers/vee/camel-vee-folder.c (vee_folder_build_folder):
2891 Update the vfolder details for a single folder.
2893 2000-05-25 Jeffrey Stedfast <fejj@helixcode.com>
2895 * providers/smtp/camel-smtp-transport.c (_send_to): Took out code
2896 that had been there to reconnect to the server if it was not
2897 already connected - Mailer code was fixed so that this should not
2900 * providers/imap/camel-imap-store.[c,h]: Initial code.
2902 2000-05-24 Dan Winship <danw@helixcode.com>
2904 * camel.h: Re-add camel-simple-data-wrapper.h, which was removed
2907 2000-05-24 Jeffrey Stedfast <fejj@helixcode.com>
2909 * providers/smtp/camel-smtp-transport.[c,h]: Moved global
2910 variables into struct CamelSmtpTransport to make SMTP
2913 * providers/imap/camel-imap-*.h: Stolen from Mbox. Rough structure
2916 2000-05-23 Jeffrey Stedfast <fejj@helixcode.com>
2918 * providers/imap: Added some initial code to the camel tree
2921 * providers/imap/.cvsignore: Added to repository
2923 * providers/smtp/camel-smtp-transport.c: Added debug fprintf's
2924 so that testers can provide more information. Tested with simple
2925 messages and a reply to the hello@helixcode.com default message
2926 but should really be tested more.
2927 (smtp_data): Fixed to use data_wrapper_write_to_stream.
2929 * camel-mime-filter-smtp.c (filter): Modified to escape all lines
2930 beginning with a '.' and to place a \r before each \n if one did
2931 not previously exist. Removed code to escape "From " as it was
2932 found to not be needed for SMTP.
2934 2000-05-22 Jeffrey Stedfast <fejj@helixcode.com>
2936 * providers/smtp/camel-smtp-transport.c (smtp_data): Fixed the
2937 filtered stream. Fixes for stream changes, updated to use
2938 camel-mime-filter-smtp.
2940 * Makefile.am: Added camel-mime-filter-smtp.c
2942 * camel-mime-filter-smtp.[c,h]: Added to camel tree
2943 Smtp filter used to change \n into \r\n, escape lone dots,
2944 and escape "From "'s.
2946 2000-05-19 NotZed <NotZed@HelixCode.com>
2948 * camel-simple-data-wrapper.c (construct_from_stream): If we
2949 already have been constructed, unref our content.
2950 (write_to_stream): Check we've been constructued, and change for
2953 * camel-mime-parser.c: Removed exception stuff.
2955 * md5-utils.c (md5_get_digest_from_stream): repaired.
2957 * camel-mime-message.c: Remove exception from write_to_stream, and
2958 fix, and fix formatting.
2960 * providers/sendmail/camel-sendmail-transport.c (_send_internal):
2961 Fix for stream changes.
2963 * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fixes
2966 * providers/mbox/camel-mbox-folder.c, and elsewhere, fix all
2968 (mbox_append_message): Use stream_close() now its back.
2969 (mbox_append_message): unref the from filter.
2971 * camel-stream-mem.c: And here.
2973 * camel-stream-fs.[ch]: Here too.
2975 * camel-stream-filter.c: Likewise. This is getting tedious.
2977 * camel-stream-buffer.c (stream_write): Fix a few little problems.
2978 (stream_close): Reimplement.
2979 (camel_stream_buffer_read_line): Slightly more efficient version,
2980 that also only allocates the right amount of memory for strings.
2982 * camel-seekable-substream.c: Likewise.
2984 * camel-seekable-stream.[ch]: Remove exceptions, fix formatting,
2985 changes for stream (re)fixes. set_bounds returns an error.
2987 * camel-stream.[ch]: Remove exceptions. Make flush and reset return
2988 an error code, repair all the screwed up formatting, and put back
2991 * camel-mime-part-utils.c
2992 (camel_mime_part_construct_content_from_parser): And here.
2994 * camel-mime-part.c (camel_mime_part_set_content): And this too.
2995 (write_to_stream): Fixed for stream changes.
2999 * providers/vee/camel-vee-folder.c (vee_search_by_expression):
3000 Implement. Performs an intersection of the two searches.
3001 (camel_vee_folder_finalise): Unref search folders.
3002 (vee_append_message): Implement append.
3004 2000-05-18 Dan Winship <danw@helixcode.com>
3006 * camel-folder.c: remove message_number_capability and require uid
3008 (camel_folder_list_subfolders, camel_folder_get_uid_list,
3009 camel_folder_get_subfolder_info, camel_folder_get_message_info):
3011 (camel_folder_get_subfolder_names,
3012 camel_folder_free_subfolder_names): new subfolder interfaces.
3013 (camel_folder_get_uids, camel_folder_free_uids): new uid
3015 (camel_folder_get_summary, camel_folder_free_summary): new summary
3018 * providers/mbox/camel-mbox-folder.c,
3019 * providers/nntp/camel-nntp-folder.c:
3020 * providers/vee/camel-vee-folder.c: Update for changes
3022 * providers/pop3/camel-pop3-folder.c: Implement get_uids, update
3025 2000-05-18 NotZed <NotZed@HelixCode.com>
3027 * providers/vee/camel-vee-folder.c: Guess!
3029 * camel-folder-search.c (search_user_flag): Implement user_flag
3032 * camel-folder-search.h: Added user_flag search capability
3035 * providers/mbox/camel-mbox-folder.c (mbox_init): Set USER flag in
3036 permanent flags for the folder.
3038 2000-05-17 Dan Winship <danw@helixcode.com>
3040 * camel-folder.c: Remove unused async open/close and
3041 copy_message_to functions.
3042 Rename functions without initial _. Fix glib preconditions and
3045 2000-05-17 Dan Winship <danw@helixcode.com>
3047 * camel-data-wrapper.c: remove get/set_output_stream operations.
3048 They're redundant with write_to_stream, and CamelMimePart and
3049 CamelMimeMessage only implement the latter, meaning that trying to
3050 get_output_stream on a CamelMimeMessage that was built from pieces
3051 rather than being parsed from a stream doesn't work. Anything that
3052 uses get_output_stream can be rewritten to use write_to_stream, so
3053 we'll standardize on that.
3054 (camel_data_wrapper_new): remove this: CamelDataWrapper is
3055 supposed to be an abstract class.
3056 (write_to_stream): remove default implementation. (Moved to
3057 CamelSimpleDataWrapper)
3059 * camel-simple-data-wrapper.c: resurrect, although it's not really
3060 the same thing it was before. A simple data wrapper, which is
3061 backed by a CamelStream.
3063 * camel-mime-part-utils.c
3064 (simple_data_wrapper_construct_from_parser): Use
3065 construct_from_stream rather than set_output_stream.
3066 (camel_mime_part_construct_content_from_parser): Change
3067 camel_data_wrapper_new to camel_simple_data_wrapper_new.
3069 * camel-mime-part.c (camel_mime_part_set_content): Change
3070 camel_data_wrapper_new to camel_simple_data_wrapper_new.
3073 2000-05-17 Darin Adler <darin@eazel.com>
3075 * camel-folder-summary.c: (message_info_load):
3076 Quick fix to get it to compile. I hope I don't get into trouble.
3078 2000-05-17 Dan Winship <danw@helixcode.com>
3080 * camel.h: Don't include the no-longer-distributed
3081 possibly-to-be-removed headers.
3083 * providers/smtp/camel-smtp-transport.c
3084 (smtp_get_email_addr_from_text): fix an off-by-one error in
3086 (smtp_data): use camel_data_wrapper_get_output_stream rather than
3087 data_wrapper->output_stream
3089 2000-05-17 NotZed <NotZed@HelixCode.com>
3091 * providers/mbox/camel-mbox-folder.c (message_changed): Snoop
3092 changes to user flags on the message into the summary as well.
3094 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_init):
3095 Changed version init to include the parent class version info
3096 (i.e. add it not overwrite it).
3098 * camel-folder-summary.c (message_info_new): Initialise user_flags
3100 (message_info_load): And load user flags.
3101 (message_info_save): And save user flags.
3102 (message_info_free): And free them.
3103 (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
3105 * camel-folder-summary.h: Added user-flags to summary.
3107 * camel-mime-message.c (camel_mime_message_set_user_flag): Dont
3108 use a hashtable for user flags.
3109 (camel_mime_message_get_user_flag): And changed here too.
3110 (camel_flag_get): New interface to get a flag from a flag
3111 list. Flag lists are easier to work with than hash tables, and
3113 (camel_flag_set): And set.
3114 (camel_flag_list_free): And free.
3115 (free_key_only): Discard.
3116 (finalize): Remove the flag list.
3118 2000-05-17 Jeffrey Stedfast <fejj@stampede.org>
3120 * providers/smtp/camel-smtp-transport.c: (smtp_helo): Error
3121 checking on gethostbyaddr() eliminating a possible segfault.
3123 2000-05-16 NotZed <NotZed@HelixCode.com>
3125 * providers/mbox/camel-mbox-folder.c (mbox_delete_message_by_uid):
3128 2000-05-12 NotZed <NotZed@HelixCode.com>
3130 * camel-movemail.c (camel_movemail): Open the destination with
3131 O_APPEND, so we dont blow away a partially transferred mbox.
3132 (camel_movemail): Loop if we get errno=INTR, and not fail.
3134 2000-05-11 NotZed <NotZed@HelixCode.com>
3136 * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
3137 the summarised file size, if everything went ok.
3138 (camel_mbox_summary_expunge): Clear header flags after updating.
3140 2000-05-16 Chris Toshok <toshok@helixcode.com>
3142 * providers/nntp/camel-nntp-folder.c:
3143 * providers/nntp/camel-nntp-folder.h:
3144 * providers/nntp/camel-nntp-provider.c:
3145 * providers/nntp/camel-nntp-store.c:
3146 * providers/nntp/camel-nntp-utils.c:
3147 * providers/nntp/camel-nntp-utils.h:
3148 get things working with new camel summary stuff.
3150 * providers/nntp/camel-nntp-summary.c:
3151 * providers/nntp/camel-nntp-summary.h:
3152 removed files since camel-folder-summary does all we need.
3154 2000-05-15 Jeffrey Stedfast <fejj@stampede.org>
3156 * providers/smtp/camel-smtp-transport.c: Added some preliminary
3159 2000-05-15 Dan Winship <danw@helixcode.com>
3161 * camel-folder.h: Remove camel_folder_get_summary, which no longer
3164 2000-05-11 Dan Winship <danw@helixcode.com>
3166 * Makefile.am: remove some cruft that we're not currently using.
3168 * camel-stream-mem.c (camel_stream_mem_new_with_buffer): Change
3169 to match prototype (size_t vs unsigned int) so it works on 64-bit
3170 machines. Noted by msw.
3172 2000-05-11 NotZed <NotZed@HelixCode.com>
3174 * providers/mbox/camel-mbox-folder.c (message_changed): Indicate
3175 the summary changed also.
3177 2000-05-11 Jeffrey Stedfast <fejj@stampede.org>
3179 * providers/smtp/camel-smtp-transport.c: (smtp_helo):
3180 Updated to more closely comply with RFC 821 standards
3182 2000-05-11 NotZed <NotZed@HelixCode.com>
3184 * camel-mime-part.c (write_to_stream): Unref the filter after
3185 adding it to the filtering stream.
3187 * providers/mbox/camel-mbox-summary.c
3188 (camel_mbox_summary_finalise): Free the folder path.
3189 (camel_mbox_summary_update): Also save summary when done.
3190 (camel_mbox_summary_expunge): Unindex items when deleting them.
3191 (camel_mbox_summary_expunge): Save the index as well as the
3194 * camel-folder-summary.c (camel_folder_summary_finalise): Free the
3196 (camel_folder_summary_touch): New function, indicate the summary
3198 (camel_folder_summary_remove): Dirty here.
3200 * camel-internet-address.c (internet_decode): Free multiple entry
3203 * camel-mime-utils.c (header_decode_mailbox): Plugged another
3204 memleak, free text after converting it.
3205 (header_decode_addrspec): More leaks plugged.
3207 * camel-mime-message.c (finalize): Free message_uid.
3208 (finalize): Free the recipients hashtable.
3210 2000-05-11 <notzed@helixcode.com>
3212 * camel-folder-summary.c (camel_folder_summary_finalise): Free
3213 summary items and charset filters.
3215 2000-05-10 <notzed@helixcode.com>
3217 * camel-folder-summary.c (camel_folder_summary_finalise): Don't
3218 free stuff in p, after we've free'd p.
3220 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Unref
3221 the stream we created for appending.
3223 2000-05-10 Jeffrey Stedfast <fejj@stampede.org>
3225 * providers/smtp/camel-smtp-transport.c: (camel_smtp_transport_class_init):
3226 Added initialization for service_class
3228 2000-05-10 Dan Winship <danw@helixcode.com>
3230 * camel-multipart.c (write_to_stream): fix a stupid typo. Thank
3233 * camel-mime-part.c (write_to_stream): don't ref the stream before
3234 wrapper a filter around it, since nothing will ever unref it.
3236 2000-05-10 Christopher James Lahey <clahey@helixcode.com>
3238 * Makefile.am: Added camel-types.h, camel-folder-pt-proxy.h, and
3239 camel-thread-proxy.h.
3241 2000-05-09 Dan Winship <danw@helixcode.com>
3243 * providers/sendmail/camel-sendmail-transport.c (_send_internal):
3244 Bleah. Can't fsync a pipe. As a quick kludge, just don't
3245 stream_flush it. The right fix will require bringing back
3246 stream_close though.
3248 2000-05-09 Jeffrey Stedfast <fejj@stampede.org>
3249 * camel-internet-address.[c,h]: Undid my changes (moved
3250 struct _address back into came-internet-address.c)
3251 * providers/smtp/camel-smtp-transport.c: (_send): changed
3252 from using it's own address manipulation (using struct _address)
3253 to using camel_internet_address_get(). Also some format changes
3254 to keep consistant with the rest of Camel
3256 2000-05-09 Jeffrey Stedfast <fejj@stampede.org>
3258 * camel-internet-address.[c,h]: Moved struct _address from
3259 camel-internet-address.c to camel-internet-address.h
3260 (hopefully this doesn't break anything...)
3261 * providers/smtp/camel-smtp-transport.c: (_send): now
3262 populates the recipient list with To, Cc, and Bcc addresses.
3263 Should now be able to use this module.
3265 2000-05-09 Dan Winship <danw@helixcode.com>
3267 * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
3268 one more refcounting fix I missed before.
3270 2000-05-08 Jeffrey Stedfast <fejj@stampede.org>
3272 * providers/smtp/camel-smtp-transport.c: no longer frees memory it
3273 shouldn't, updated to reflect camel-stream changes involving
3274 CamelException (perhaps it should use a different CamelException
3275 variable than is passed to the camel smtp module?)
3277 2000-05-08 Dan Winship <danw@helixcode.com>
3279 * camel-stream.c (camel_stream_read, camel_stream_write,
3280 camel_stream_flush, camel_stream_reset, camel_stream_printf,
3281 camel_stream_write_to_stream): Use CamelException to signal
3283 (camel_stream_write_strings): Remove. camel_stream_printf is more
3284 useful in most of the places that used this.
3285 (camel_stream_write_string): Change from macro to function to
3286 prevent problems with double-evaluation.
3288 * camel-seekable-stream.c (camel_seekable_stream_seek,
3289 camel_seekable_stream_set_bounds): Use CamelException.
3292 * camel-seekable-substream.c, camel-stream-buffer.c,
3293 camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c:
3296 * camel-stream-fs.c: Remove the virtual init functions and move
3297 the code into the creator functions. Add CamelExceptions to
3298 creation functions that could fail.
3300 * camel-data-wrapper.c (camel_data_wrapper_write_to_stream): Use
3302 * camel-mime-message.c, camel-mime-part.c, camel-multipart.c
3303 (write_to_stream): Update.
3305 * camel-mime-parser.c: add an exception to the mime parser private
3306 data and pass that to stream functions as needed.
3308 * gmime-content-field.c, md5-utils.c: Update (badly) for stream
3311 * camel-exception.h (camel_exception_is_set): convenience macro.
3313 * providers/Makefile.am: disable SMTP for now
3315 * providers/mbox/camel-mbox-folder.c (mbox_append_message): Pass
3316 CamelException to the functions that now need it. Check the
3317 exception after calling camel_stream_flush, and fail if it fails.
3318 (mbox_get_message_by_uid): More updates.
3320 * providers/pop/camel-pop3-folder.c,
3321 providers/pop/camel-pop3-store.c,
3322 providers/sendmail/camel-sendmail/transport.c: Update.
3325 2000-05-08 NotZed <NotZed@HelixCode.com>
3327 * camel-mime-message.c (process_header): Format From and Reply-To
3328 to at least a decoded string. Should probably store them as an
3329 camelinternetaddress.
3331 * Merged NEW_SUMMARY branch back to trunk, and resolved conflicts.
3333 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
3335 (camel_mbox_summary_expunge): Force an update of the summary
3336 before we do anything.
3337 (camel_mbox_summary_expunge): Build new xev line in xevnew, and
3338 free that, and consify xev.
3339 (camel_mbox_summary_load): If we are rebuilding from scratch, make
3340 sure we clear the summary content.
3342 * camel-stream-filter.c (do_close): We NEED a stream close.
3344 2000-05-07 Dan Winship <danw@helixcode.com>
3346 Make camel not leak like a sieve.
3348 * camel-object.c: New subclass of GtkObject which is now the base
3349 of the Camel object hierarchy. Currently the only difference
3350 between CamelObject and GtkObject is that CamelObjects don't start
3353 * *.h: Move a bunch of typedefs to camel-types.h. Standardize on
3354 using <camel/foo.h> in header files rather than <foo.h>, "foo.h",
3355 or "camel/foo.h". Remove some unneeded includes.
3357 * camel-address.c, camel-data-wrapper.c, camel-folder-search.c,
3358 camel-folder-summary.c, camel-folder.c, camel-mime-filter.c,
3359 camel-mime-parser.c, camel-service.c, camel-session.c,
3360 camel-stream.c: These are now subclasses of CamelObject.
3362 * camel-data-wrapper.c (set_output_stream):
3363 * camel-medium.c (set_content_object):
3364 * camel-seekable-substream.c
3365 (init_with_seekable_stream_and_bounds):
3366 * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
3367 remove gtk_object_sink calls.
3369 * camel-stream-buffer.c (init_vbuf):
3370 * camel-stream-filter.c (camel_stream_filter_new_with_stream):
3371 ref the original stream.
3373 * camel-folder-summary.c (camel_folder_summary_finalise): unref
3374 the filters when finalizing.
3376 * camel-mime-part-utils.c
3377 (simple_data_wrapper_construct_from_parser,
3378 camel_mime_part_construct_content_from_parser):
3379 * camel-mime-part.c (camel_mime_part_set_content): Unref objects
3380 that are created only to be handed off to other objects. If
3381 they're going to be needed later, they will have been additionally
3382 ref'ed by the object that needs them.
3384 * providers/pop3/camel-pop3-folder.c (get_message_by_number):
3385 unref the message stream after creating the data from it.
3387 * camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c,
3388 camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close,
3389 since its semantics are dubious (what happens when you close a
3390 stream other people still have references on?).
3392 * providers/nntp/camel-nntp-store.c:
3393 * providers/smtp/camel-smtp-transport.c:
3394 * providers/pop3/camel-pop3-store.c:
3395 replace camel_stream_close calls with gtk_object_unref.
3397 * providers/mbox/camel-mbox-folder.c:
3398 * providers/nntp/camel-nntp-folder.c:
3399 * providers/sendmail/camel-sendmail-transport.c:
3400 replace camel_stream_close with camel_stream_flush +
3403 2000-05-06 Dan Winship <danw@helixcode.com>
3405 * providers/pop3/camel-pop3-store.c (query_auth_types): A machine
3406 which serves neither POP nor KPOP is not a POP server.
3408 * providers/smtp/camel-smtp-provider.c: Note in the description
3409 that this provider is not yet tested.
3411 2000-05-08 <notzed@helixcode.com>
3413 * camel-mime-part.c (write_to_stream): Free the filter stream when
3416 * camel-mime-parser.c (folder_seek): Make sure we add the \n
3417 terminal when we seek as well (frob!).
3419 * camel-mime-utils.c (header_decode_addrspec): Plug minor memleak.
3421 * camel-mime-part.c (finalize): Free header tables once finished.
3423 * camel-folder-summary.c (camel_folder_summary_remove): Dont try
3424 to access info after its free'd.
3426 2000-05-07 NotZed <NotZed@HelixCode.com>
3428 * camel-mime-part.c (write_to_stream): Apply encoding to content
3429 part, when writing to a stream *sigh*.
3431 * camel-stream-filter.c (do_write): implement write for the
3432 filtering stream. Writes shouldn't be mixed with reads.
3433 (do_flush): Implemented flush. Again write/flush shouldn't be
3434 mixed with reads. Only flushes if the last op was write.
3435 (do_close): Force flush on close.
3437 * camel-mime-filter.c (filter_run): Oops, make sure we include the
3438 backlen in the total length before passing onto the filter.
3440 * camel-mime-filter-from.c: New filter, munges 'From ' lines into
3443 * camel-mime-parser.c (camel_mime_parser_header_remove): New
3444 function to remove the parser's raw header, rather than
3445 manipulating the header directly (wich doesn't work with
3448 * camel-mime-utils.c (header_address_list_clear): Fixed some
3449 broken(tm) logic, which would leak entries on multivalued lists.
3451 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
3452 Use ibex_save() to save the ibex. Makes a big difference to
3453 startup times for very large mailboxes.
3454 (camel_mbox_summary_expunge): Dum de dum, reimplemented. Designed
3455 to be much more robust, and to stop immediately if anything awry
3457 (copy_block): Utility function to copy n bytes from one fd to
3459 (header_write): Utility function to write out raw headers to an
3461 (camel_mbox_summary_update): Incremental summary updater.
3463 * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
3464 Dont unref the stream, because of the broken(tm) ref model of gtk
3465 widget that for some odd reason is being perpetuated in camel.
3466 (mbox_expunge): Reenable expunge again.
3467 (mbox_append_message): Removed the optimised mbox append. If its
3468 an issue, it can go back later. Cleaned up a lot, checks error
3469 returns, and automagically translates 'From ' into '>From' as
3472 2000-05-07 <notzed@helixcode.com>
3474 * camel-mime-filter.c (filter_run): Oops, forgot to add the
3475 backlen to the pre-buffer (*poof*).
3477 2000-05-07 NotZed <NotZed@HelixCode.com>
3479 * camel-mime-message.c (construct_from_parser): Allow
3480 HSCAN_FROM_END to terminate the processing of a message.
3482 * camel-folder-summary.c (perform_content_info_load): Ick, dont
3483 try and append a node onto its own list.
3484 (camel_folder_summary_clear): Actually clear the indexes after
3485 we've removed the messages.
3486 (camel_folder_summary_clear): Set dirty if it changes.
3487 (camel_folder_summary_load): Clear dirty.
3488 (camel_folder_summary_save): Only save if dirty.
3490 * providers/mbox/camel-mbox-summary.c (summary_header_load): Oops,
3491 remember to call that parent class first ...
3492 (summary_header_save): Here too.
3493 (camel_mbox_summary_load): Do more checking to verify the index
3494 contents as well as teh summary contents, against the mbox
3496 (camel_mbox_summary_load): Removed some fo that checking, it needs
3497 more code to work reliably.
3499 2000-05-07 <notzed@helixcode.com>
3501 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
3502 Set the size and mtime of the mbox we indexed once done.
3504 * camel-folder-summary.c (camel_folder_summary_set_index): Dont
3505 write the index if it changes - let the claler fix it (uh, kind of
3506 impacts performance).
3507 (camel_folder_summary_load): close in.
3509 * camel-folder-summary.c (summary_format_string): Check header
3510 exists before trying to strip its leading spaces.
3512 2000-05-06 NotZed <NotZed@HelixCode.com>
3514 * camel-folder.h: Removed summary info from here, and include
3515 camel-folder-summary.h as well.
3517 * camel-mime-parser.c (camel_mime_parser_step): Allow it to accept
3520 * providers/mbox/camel-mbox-summary.c: Totally new file, now
3521 subclasses camel-folder-summary.
3523 * camel-folder-summary.c (message_info_load): Load the uid as a
3525 (message_info_save): And save too.
3526 (camel_folder_summary_clear): New function, clears the contents of
3529 * providers/mbox/camel-mbox-folder.c: Fixes for summary changes.
3530 (mbox_get_message_by_uid): Completely redone. Now cross-checks
3531 the summary information to make sure we get a real message.
3532 (mbox_append_message): Disabled the copy version of append for
3534 (mbox_expunge): Temporarily disabled the expunge function, until
3535 it is put back in camel-mbox-summary.c
3537 2000-05-05 NotZed <NotZed@HelixCode.com>
3539 * camel-folder-summary.c: And same here ...
3540 (camel_folder_summary_encode_fixed_int32): Ugh, fwrite doesn't
3541 return -1 on error ..
3542 (camel_folder_summary_decode_fixed_int32): Neither deos fread.
3543 (camel_folder_summary_encode_token): Fix here too.
3544 (summary_build_content_info): Use start-headers to get the pos of
3545 the message, not parser_tell(), which might not be what we
3546 expected because of parser_unstep().
3547 (camel_folder_summary_encode_token): Use bserch() to tokenise the
3548 values, rather than a linear search.
3550 * camel-mime-utils.c: Defined out some memory profiling stuff I
3551 left there by mistake.
3552 (header_decode_mailbox): Dont try to append the word part of a
3553 local address if we ran out of words.
3555 * camel-mime-parser.c (folder_scan_content): Apply the fix from
3556 the header scanner to here too.
3557 (folder_scan_header): Only check for end of header if we have
3558 space for it (didn't end the read with a newline)
3559 (folder_scan_header): inptr is the only real thing we need
3560 registerised for performance. Try to help the compiler be smart
3562 (folder_scan_header): Simplified the save header case a tad.
3564 Commented out some memory profiling stuff.
3566 2000-05-05 <notzed@helixcode.com>
3568 * camel-mime-utils.c (header_decode_mailbox): Plug a memory leak.
3569 (header_decode_text): Fixed memory leaks with g_string_append().
3570 (header_encode_string): And here too, and a few other places. The
3571 glib api is so awful ...
3572 (header_content_type_decode): More memory leaks.
3574 2000-05-05 <notzed@helixcode.com>
3576 * camel-mime-parser.c (folder_scan_init_with_fd): Make sure we
3577 init the end of buffer sentinal!
3578 (folder_scan_init_with_stream): And here too ...
3580 2000-05-04 NotZed <NotZed@HelixCode.com>
3582 * providers/mbox/camel-mbox-folder.c (summary_get_message_info):
3583 Maxcount is minimum of the max and the requested count, not the
3586 * camel-mime-parser.c (folder_scan_content): Properly set midline,
3587 so we dont falsely catch offset boundary markers (i.e. From inside
3589 (folder_read): Set a sentinal on the end of the read data (\n) so
3590 we dont have to check the buffer boundary in the inner loop.
3591 (mempool_*): New experimental memory management routines, speed
3592 up simple structure parsing by about 25% ... not compiled in by
3593 default. Something similar may be needed for camel-mime-utils to
3594 address performance issues with g_malloc and friends.
3596 * camel-mime-utils.c: Added a macro w(x) used to wrap all warnings
3597 about mime/rfc violations, so they can be turned off.
3599 * camel-folder-summary.c (summary_build_content_info): Step after
3600 the end of a message ...
3601 Turn into a stand-alone program for testing and profiling.
3603 2000-05-04 Dan Winship <danw@helixcode.com>
3605 * providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall
3606 back to plaintext passwords if APOP fails, since it should also
3609 2000-05-04 Dan Winship <danw@helixcode.com>
3611 * camel-session.c (camel_session_list_providers): New function to
3612 replace camel_provider_scan. Returns a list of either (a) all
3613 currently-loaded providers, or (b) all available providers.
3615 * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that
3616 it contains only a protocol).
3618 * camel-service.c (camel_service_query_auth_types): Make this take
3619 a CamelException (since it may have to try to connect to the
3620 server, and it might not able to.)
3622 * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP)
3623 support. This is mostly so I have two kinds of authmech to play
3624 with instead of just one. (But it does actually work.)
3626 * providers/smtp/camel-smtp-transport.c (query_auth_types): update
3627 for prototype change, but disable the functionality, since it
3628 doesn't really support any auth types yet.
3629 (camel_smtp_transport_get_type): add an object init function to
3630 set the service url_flags.
3632 2000-05-04 NotZed <NotZed@HelixCode.com>
3634 * providers/mbox/camel-mbox-summary.c: Yes, and anotherone.
3636 * camel-mime-utils.c: And another one.
3638 * camel-mime-part.c: And another one.
3640 * camel-mime-part-utils.c: And another one.
3642 * camel-folder-search.c: And another one.
3644 * camel-mime-parser.c: Reverted a change wihtout a ChangeLog entry.
3646 2000-05-04 NotZed <NotZed@HelixCode.com>
3648 * camel-folder-summary.[hc]: Yes, CamelFolderSummary is back ...
3649 ... re-usable class to summarise and index any stream or message
3650 and to manage/load/save the created summaries.
3652 * camel-folder.c: Include string.h to kill a warning.
3654 2000-05-03 Jason Leach <leach@wam.umd.edu>
3656 * Makefile.am (INCLUDES): add $(UNICODE_CFLAGS) to the INCLUDES,
3657 people who installed libunicde in non-standard include paths need
3660 2000-05-03 NotZed <NotZed@HelixCode.com>
3662 * camel-folder.h: Added pos/bodypos/endpos to the basic message
3663 content info object. Size to be removed? Moved the
3664 messageconentinfo and messageinfo back to camel-folder-summary.h.
3666 * camel-mime-filter-index.c (camel_mime_filter_index_set_ibex):
3667 New function to (re)set the index to use on a filter.
3669 * camel-mime-parser.c (camel_mime_parser_scan_from): Whole bunch
3671 (camel_mime_parser_drop_step): New function to drop a state from
3672 the parser. Needs more testing.
3674 * camel-mime-utils.c (rfc2047_decode_word): If the iconv handle is
3675 -1, then dont try and convert (crashes unicode_iconv?).
3676 (rfc2047_decode_word): Use alloca for variables instead of
3677 g_malloc - by the rfc they should always be short.
3678 (rfc2047_decode_word): If we can't do the charset conversion, undo
3679 the quoted-printable/base64 at least? Should probably convert
3680 unknown characters to the utf-8 unknown character.
3682 2000-05-02 Larry Ewing <lewing@helixcode.com>
3684 * camel-mime-utils.c (header_decode_date): fix typo when
3685 dereferencing saveoffset.
3687 2000-05-02 NotZed <NotZed@HelixCode.com>
3689 * camel-folder-search.c: Added some header doco.
3691 * camel.h: REmove gmime-utils.h from here.
3693 * providers/mbox/camel-mbox-search.[ch]: Removed. Functionally
3696 * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
3697 Use the new CamelFolderSearch class to do the actual searching,
3698 just setup the search here.
3700 * camel-folder-search.[ch]: A helper class that providers may
3701 subclass to provide their own search functionality, or they can
3702 simply use as is, it supports body searches if an ibex is
3703 supplied, and header searches if a summary is supplied.
3705 2000-05-02 Matt Loper <matt@helixcode.com>
3707 * Makefile.am: set G_LOG_DOMAIN.
3708 * providers/MH/Makefile.am: same.
3709 * providers/maildir/Makefile.am: same.
3710 * providers/mbox/Makefile.am: same.
3711 * providers/nntp/Makefile.am: same.
3712 * providers/pop3/Makefile.am: same.
3713 * providers/sendmail/Makefile.am: same.
3714 * providers/smtp/Makefile.am: same.
3716 2000-05-02 NotZed <NotZed@HelixCode.com>
3718 * providers/mbox/camel-mbox-search.c
3719 (camel_mbox_folder_search_by_expression): Dont store/remove
3720 current search from the search list.
3722 * providers/mbox/camel-mbox-folder.h: Removed searches list,
3723 searches are all sync now.
3725 * gmime-utils.[ch]: What the hell, remove it. This will break the
3726 nntp provider. The mime parser can be used instead though.
3727 Removed from all code including it (but none were using it).
3729 * gmime-utils.c (_store_header_pair_from_string): Removed bizarre
3730 string_dichotomy version of this. This code is somewhat redundant
3731 now, and is headed for death anyway.
3733 * gstring-util.c (g_string_dichotomy): Same with this one.
3734 (g_string_clone): Removed a memory leak, g_string_new() allocates
3736 (g_string_append_g_string): Allow to append an empty gstring onto
3737 another gstring, dont abort()!
3739 * string-utils.c (string_dichotomy): Removed this incredibly weird
3742 * camel-folder.c (_create): Replaced the rather obtuse use of
3743 "string_dichotomy" function with a simple strrchr(). Still not
3746 * camel-folder-summary.c: cvs removed a long-removed file.
3748 * camel-mime-parser.c (folder_scan_header): Fix the previous
3749 overflow problem properly (can happen in 2 places).
3750 (header_append): A new macro to include the code changed above, so
3751 it only appears in one place.
3752 (folder_scan_step): Change the content type to text/plain if the
3753 multipart is broken. Doesn't actually change the header though.
3754 (header_append): Also move the header-start tracking stuff here.
3755 Could be a static function to save code.
3757 2000-05-02 <notzed@helixcode.com>
3759 * camel-mime-part-utils.c
3760 (simple_data_wrapper_construct_from_parser): Dont use autofill on
3761 these fucking long function anmes!!!!!!
3763 2000-05-02 NotZed <NotZed@HelixCode.com>
3765 * providers/mbox/camel-mbox-summary.c
3766 (camel_mbox_summary_expunge): Fix the offset for the summary when
3767 an item is expunged to take account of the From line.
3769 2000-05-01 NotZed <NotZed@HelixCode.com>
3771 * providers/mbox/camel-mbox-folder.h (CamelMboxFolder): Removed
3774 * providers/mbox/camel-mbox-search.c
3775 (camel_mbox_folder_search_cancel): Remove.d
3776 (camel_mbox_folder_search_complete): Removed.
3777 (camel_mbox_folder_search_by_expression): Changed back to sync
3779 (struct _searchcontext): Removed cancelled flag.
3780 (find_context): Removed.
3781 (func_header_contains): Debug out some search stuff.
3783 * providers/mbox/camel-mbox-search.h
3784 (camel_mbox_folder_search_by_expression): Moved back to sync api.
3786 * providers/mbox/camel-mbox-summary.c
3787 (camel_mbox_summary_set_flags_by_uid): New function to update the
3788 flags in the summary.
3789 (camel_mbox_summary_expunge): Expunge messages from a folder.
3790 (offset_content): Re-align offsets of summary when messages
3791 added/removed to an existing summary.
3792 (camel_mbox_summary_remove_uid): Remove a message summary entry by
3794 (index_folder): Restore flags from X-Evolution header, if they are set.
3795 (index_folder): Make sure we index using a decimal uid, since
3796 thats what everything else indexes off (oops).
3797 Upped SUMMARY_VERSION as a result.
3798 (camel_mbox_summary_expunge): Oops, my wrong, use the string uid
3801 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
3802 Connect to the message_changed signal.
3803 (_init): Set permanent flags to something reasonable. No user
3805 (message_changed): If the flags of the message change, update the
3806 flags in the summary.
3807 (mbox_expunge): Implement the expunge.
3808 (camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s
3809 (mbox_expunge): Emit a folder_changed signal on expunge (uh, even
3812 * camel-folder.c (_finalize): Uh, dont free permanent_flags
3813 anymore (this wouldn't failed anyway, it was a GList !!!)
3814 (camel_folder_search_complete): Removed.
3815 (camel_folder_search_cancel): Removed.
3816 (camel_folder_expunge): Changed to only allow expunge on an open
3817 folder. It doesn't make sense for mbox, otherwise (?)
3818 (camel_folder_class_init): Added a folder_changed signal.
3820 * camel-folder.h (struct _CamelFolder): Change permanent_flags to
3822 (list_permanent_flags): Renamed to get_permanent_flags, and
3824 (camel_folder_expunge): Changed expunge to a void type. The
3825 messages would no longer be useful after they have been removed
3827 (CamelFolderClass): New function summary_get_by_uid() to get a single
3829 (*search*): Moved back to synchronous search api ... *sigh*
3831 * camel-folder.h: Removed CamelSearchFunc.
3833 * camel-mime-message.c (set_flag): Removed.
3834 (camel_mime_message_set_flag): Removed.
3835 (get_flag): Removed.
3836 (camel_mime_message_get_flag): Removed.
3837 (add_flag_to_list): Removed.
3838 (get_flag_list): Removed.
3839 (camel_mime_message_get_flag_list): Removed.
3840 (camel_mime_message_get_flags): New interface to get system flags.
3841 (camel_mime_message_set_flags): " to set ".
3842 (camel_mime_message_get_user_flag): To get a user flag.
3843 (camel_mime_message_set_user_flag): To set a user flag.
3844 (finalize): Hmm, the old one free'd the key and data, not good
3845 when the data is a boolean ...
3847 2000-04-30 Dan Winship <danw@helixcode.com>
3849 * camel-provider.h: Tweak the definition of CamelProvider. Among
3850 other things, a provider may now be both a store and a transport.
3852 * camel-provider.c: Remove a lot of code we had no intention of
3853 using. This now only contains two functions: camel_provider_init
3854 to read the installed .urls files, and camel_provider_load to
3855 load and register a new provider.
3857 * camel-session.c: Remove more unused code and simplify some of
3858 the remaining code. The list of available provider modules is now
3859 stored in the session, and it handles calling camel_provider_load
3860 to load them as needed. Provider registration is now done by
3861 calling back from the module init routine, which allows a single
3862 module to register providers for multiple URL types.
3864 * providers/*: Update provider structures and init routines for
3865 the new stuff. Add a .urls file to each provider specifying what
3866 urls it handles, and install that with the library.
3868 * providers/nntp/camel-nntp-provider.c: Add hints towards
3869 supporting both news: and nntp: URLs, and using nntp as both a
3870 store and a transport.
3872 2000-04-29 Dan Winship <danw@helixcode.com>
3874 * camel-internet-address.c (camel_internet_address_get): const
3877 * camel-mime-part-utils.c
3878 (simple_data_wrapper_construct_from_parser):
3879 camel_mime_parser_tell() returns an offset from where it started
3880 parsing, not necessarily from the start of data. Since we're
3881 parsing a bounded seekable_stream, we need to add the stream's
3882 starting bound to camel_mime_parser_tell's return value to
3883 create the substream in the right place.
3885 * camel-seekable-substream.c
3886 (camel_seekable_substream_new_with_seekable_stream_and_bounds):
3887 say CAMEL_STREAM_UNBOUND rather than -1 in doc.
3889 * camel-seekable-stream.c (camel_seekable_stream_seek): Add more
3892 2000-04-28 Dan Winship <danw@helixcode.com>
3894 * camel-mime-parser.c (folder_scan_header): fix a bug that would
3895 cause corruption with very long headers.
3897 2000-04-27 Ettore Perazzoli <ettore@helixcode.com>
3899 * providers/pop3/Makefile.am (INCLUDES): Add `-I$(srcdir)/../../..'
3900 to pick the Camel includes.
3901 * providers/sendmail/Makefile.am (INCLUDES): Likewise.
3903 * camel.h: Don't #include <camel/data-wrapper-repository.h> anymore.
3905 2000-04-27 NotZed <NotZed@HelixCode.com>
3907 * camel-mime-utils.c (check_header): Dont try and check a NULL
3910 * camel-recipient.[ch]: Dead. Its not pining.
3912 * camel-mime-message.h: Dont include recipients.h anymore.
3914 * camel-mime-message.c (camel_mime_message_add_recipient): Accept
3915 name/address separately, and store in an CamelInternetAddress.
3916 (add_recipient): Removed.
3917 (remove_recipient): Removed.
3918 (remove_recipient_address): Renamed from remove_receipient, works
3920 (camel_mime_message_remove_recipient_name): New function to remove
3922 (get_recipients): Removed.
3923 (camel_mime_message_get_recipients): Return a camel-internet-address.
3924 (write_to_stream): No longer write receipients directly.
3925 (write_recipients_to_stream): Removed.
3926 (write_one_recipient_to_stream): Removed.
3927 (camel_mime_message_init): Setup recipients hashtable, rather than
3928 usign the recipients stuff.
3929 (set_recipient_list_from_string): Killed, a violent and lengthy
3931 (process_header): Simplified recipient handling code a lot.
3932 (received_date_str, sent_date_str, reply_to_str, subject_str,
3933 from_str): Removed some oddly-defined global statics.
3934 (camel_mime_message_class_init): Dont initialise above variables
3936 (init_header_name_table): Removed, use a table to init this, and
3937 do it in class init (2 lines of code ...).
3939 * camel-news-address.c: Class to represent news addresses -
3940 currently empty, and not built.
3942 * camel-internet-address.h: Class to represent internet (email)
3945 * camel-address.h: Abstract class to represent (lists of)
3948 2000-04-27 Dan Winship <danw@helixcode.com>
3950 * camel-mime-part.c (write_to_stream): Revert previous change. I
3953 * camel-url.[ch] (camel_url_encode, camel_url_decode): expose
3956 2000-04-26 Dan Winship <danw@helixcode.com>
3958 * camel-mime-part.c (write_to_stream): Only write a newline
3959 between the headers and the content object if the content object
3960 is not a CamelMedium. (If the content is a medium, it may have its
3961 own headers, which then need to go before the blank line.)
3963 * camel-mime-body-part.[ch]: Remove. We weren't using the fields
3964 that made this different from camel-mime-part, so it basically
3965 just forced us to do lots of gratuitous typecasting.
3967 * camel-multipart.[ch]: Use CamelMimePart. Remove the multipart
3968 parent stuff, since we weren't using that either.
3970 * etc: update for CamelMimeBodyPart -> CamelMimePart
3972 2000-04-26 Dan Winship <danw@helixcode.com>
3974 * camel-medium.c (set_content_object): sink the content object
3975 after referencing it.
3977 * camel-mime-part.c: fix various little things in the handling
3978 of CamelMedium methods. Change camel_mime_part_set_text to the
3979 more generic camel_mime_part_set_content.
3981 * camel.h: sync to current reality
3983 * camel-folder-utils.[ch]: removed
3985 * camel-mime-utils.c (header_format_date): fix format specifier
3986 for time zone. Fix typo in month names array.
3988 2000-04-26 NotZed <NotZed@HelixCode.com>
3990 * camel-seekable-substream.c (stream_seek): Changed to have
3991 absolute seek semantics, not relative to the bounds.
3993 * camel-seekable-stream.c (reset): When we reset, seek to the
3994 start of the bound, if there is one.
3995 (stream_tell): Make tell virtual.
3997 * camel-stream-filter.c (do_available): Removed.
3999 * camel-stream-buffer.c: Remove leading _'s from static functions.
4000 (stream_read): Renamed from read(). Fancy that conflicting! (my
4003 * providers/pop3/camel-pop3-folder.c (get_message_by_number):
4004 Changed to stream_mem interface.
4006 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed
4007 for streamfs interface changes, and implement a failure case.
4008 (_append_message): Changed for fs stream interface change.
4010 * camel-multipart.c (print_part): Iterate rahter than callback. I
4011 hate glists's interface (hence, move this to write_to_stream).
4012 (write_to_stream): Return an error (yuck, this is a royal PITA to
4013 do with the stream write interface).
4015 * camel-mime-message.c: Removed leading _ from static names.
4017 * camel-mime-part.h: construct_from_parser() now returns an error
4020 * camel-mime-part-utils.c
4021 (camel_mime_part_construct_content_from_parser): Changed to use a
4022 camel-data-wrapper instead of a camel-simple-data-wrapper (no
4023 change needed elsewhere?).
4024 (simple_data_wrapper_construct_from_parser): Fixes for stream-mem
4027 * camel-simple-data-wrapper.[ch],
4028 camel-simple-data-wrapper-stream.[ch],
4029 camel-stream-data-wrapper.[ch], removed. Fixed including of these
4032 * camel-mime-part.c (camel_mime_part_set_text): Remove the use of
4033 the camel-simple-data-wrapper-stream, just use a mem stream.
4034 (write_to_stream): Renamed from my_*
4035 (construct_from_stream): Return an error on error.
4037 * camel-stream-mem.c (camel_stream_mem_new*): Remove mode
4040 * camel-stream-mem.h (enum CamelStreamMemMode): Removed. It
4043 * camel-data-wrapper.h: Add camel_data_wrapper_new() to create
4045 (write_to_stream, construct_from_stream): Return an error
4046 indicator for success. Fixed all methods to match (ICK).
4048 * Makefile.am (libcamel_la_SOURCES): Remove
4049 camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c,
4050 camel-stream-data-wrapper.c. Obsoleted by code re-use!
4052 * camel-data-wrapper.c (construct_from_stream): Change the default
4053 implementation to just set the output stream == construction
4054 stream. Well, this lets me get rid of both simple-data-wrapper
4055 and stream-data-wrapper (unused anyway), and
4056 simple-data-wrapper-stream in one hit. CamelDataWrapper is now
4057 also a concrete class.
4058 (write_to_stream): Use camel_stream_write_to_stream() to
4059 calculate/return values (and save code).
4060 Include <errno.h> for obvious reasons.
4062 * camel-stream.c (eos): Provide a default implementation of .eos().
4063 (camel_stream_write_to_stream): Make it return an error code on
4065 (camel_stream_printf): Changed to return the number of bytes
4067 (camel_stream_available): Removed.
4069 * camel-stream-fs.h (enum CamelStreamFsMode): Removed. Changed to
4070 use unix modes and so forth (wasn't used for anything but new file
4071 creation and didn't work well either).
4073 * camel-stream-fs.c: Removed leading _'s for names. And removed
4074 some virtual method 'documentation'.
4075 (destroy): Dont try and close a closed/error fd. Only report
4076 error if close returns -1. Moved all the code to finalise(), and
4077 killed this function.
4078 (init_with_fd): Properly setup the seek offset, if it is a
4079 valid and seekable file descriptor.
4080 (init_with_fd_and_bounds): Use off_t for bounds, set bounds on the
4082 (init_with_name): Return error codes.
4083 (init_with_name_and_bounds): Ditto.
4084 (camel_stream_fs_new_with_name): REturn NULL object if it failed.
4085 (camel_stream_fs_new_with_name_and_bounds): Return NULL object on
4086 failure. Changed with_name* api's to take unix open style args
4088 (read): The bounded stream bounds checking seemed off, simplified
4090 (write): Implement bounds checking for writing, the comment was
4091 wrong, it could make sense to bound writing. Cleaned up a little.
4093 (eos): Removed. Use CamelStream's implementation now.
4094 (close): Reset the fd to -1, provide a warning for bad usage.
4095 (seek): Cleaned up. Changed the behaviour a little, the returned
4096 offset is the absolute position in the file, even in bounded
4098 (seek): Seek from end mirrors lseek() behaviour (reverse seeking).
4100 2000-04-25 NotZed <NotZed@HelixCode.com>
4102 * camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof
4103 indicator to other parent classes.
4105 * camel-stream.c (camel_stream_printf): New utility
4106 function. Obvious use.
4108 * camel-stream-mem.c: Removed leading _'s from static func's.
4109 (camel_stream_mem_new_with_byte_array): Fixed for api changes, set
4110 the owner for the byte array to us.
4111 : Removed A bunch of gtk doc stuff for static (implementation) functions.
4112 (available): Removed.
4113 (write): Fixed the write implementation so that seek() works on a
4114 seekable memory stream, as expected. Seeking past the end of the
4115 buffer has unix semantics (filling with 0).
4116 (available): Removed.
4117 (write): Implement seekable stream bounded stream.
4118 (read): Implement seekable stream bounded stream.
4119 (close): Dont free the stream_mem if we're not the owner.
4120 (seek): Allow to seek beyond the end of memory area,
4121 implement bounds checking.
4122 (seek): Set errno on bad policy.
4124 * camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t.
4125 (new_with_buffer): Changed len to be a size_t.
4126 (set_buffer, set_byte_array): New interface functions.
4127 (struct _CamelStreamMem): Removed position, it is stored in the
4130 * camel-stream.h: Removed some of the seemingly random
4131 whitespace. Removed the available method (its not
4132 impelemented/useful enough).
4134 * camel-seekable-substream.c
4135 (init_with_seekable_stream_and_bounds): Remove the data_available
4136 stuff, it hasn't been properly implemented/finished, and may never
4137 work (unfortunately *sigh).
4138 (reemit_parent_signal): Removed part of the above change.
4139 (set_bounds): Removed (moved to seekable-stream).
4140 : Fixed up some of the generally unreadable indenting (sorry,
4141 wrapping at 80 characters with
4142 camels_really_long_function_names()
4143 just_doesnt_work_very_well_does_it().
4144 (available): Removed.
4145 (stream_seek): Fixup for object changes. Make sure we return -1
4146 if the parent stream can't seek.
4148 * camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New
4149 function to bound any seekable stream.
4151 (camel_seekable_stream_class_init): Implement an init function, to
4152 setup the stream bounds to unbound.
4154 * camel-seekable-stream.h (CamelSeekableStreamClass): New virtual
4155 method set_bounds for seekable streams.
4156 (CAMEL_STREAM_UNBOUND): New define for no bound.
4158 * camel-seekable-substream.h (struct _CamelSeekableSubstream):
4159 Removed sup_bound and inf_bound, moved to CamelSeekableStream (and
4160 renamed, and changed to off_t's).
4161 (new_with_seekable_stream_and_bounds): Use off_t as the bounds.
4162 (CamelSeekableSubstreamClass): Uh, why was the intialiser virtual?
4165 * camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek
4166 to accept an off_t as the offset.
4167 (struct _CamelSeekableStream): Renamed cur_pos to position and
4168 changed it to an off_t type.
4169 (enum CamelStreamSeekPolicy): Set to match the SEEK_* constants
4171 (get_current_position): Renamed to tell().
4173 * camel-stream-buffer.h: Commented out set_vbuf - never implemented.
4175 2000-04-25 Dan Winship <danw@helixcode.com>
4177 * camel-stream-buffer.c (_eos): only return TRUE if the parent is
4178 at eos AND the buffer has been exhausted
4180 * camel-mime-message.c: fix some incorrect macro usage that
4181 resulted in bogus casts
4183 2000-04-24 Dan Winship <danw@helixcode.com>
4185 * camel-mime-part-utils.c
4186 (simple_data_wrapper_construct_from_parser): fix a cut-and-pasto.
4188 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): ref
4189 (and sink) the message stream if we're going to unref it later.
4190 Otherwise it could get destroyed while there are still substreams
4191 attached to it. This needs a cleaner solution.
4193 * camel.h: remove data-wrapper-repository.h include(s)
4195 2000-04-24 NotZed <NotZed@HelixCode.com>
4197 * camel-mime-message.c (construct_from_parser): Allow MESSAGE_END
4198 _or_ EOF as valid termination conditions.
4200 * providers/mbox/camel-mbox-summary.c (message_struct_new): Decode
4201 and then re-encode the addresses, so they are consistently
4204 * camel-mime-utils.c (header_decode_mailbox): Store the address in
4205 a _header_address. And try to get a comment-stored name if there
4207 (header_decode_address): Actually return an address.
4208 (header_to_decode): Renamed to header_address_decode()
4209 (header_mailbox_decode): New function to get a single mailbox.
4210 (header_mime_decode): Return the major/minor value, as
4212 (header_address_new, and friends): Whole bunch of utility
4213 functions for working with the address thingies.
4214 (header_decode_domain): Free the string header, and dont expand
4217 * camel.c (camel_init): No longer call
4218 data_wrapper_repository_init.
4220 * camel-medium.c (write_to_stream): Moved (back) to
4225 (get_header): Make all these abstract, and spit warnings if
4226 called. I guess it could manage the list, but well, it doesn't.
4228 * camel-medium.h (struct _CamelMedium): Dont store headers here,
4229 the implementor is the only one who knows their format.
4230 (CamelMediumClass): Changed header values to be void *'s. They
4231 need not be strings?
4233 * camel-simple-data-wrapper.c (construct_from_stream): And we're
4234 back. Set the output stream.
4235 (construct_from_parser): Moved to camel-mime-part-utils.
4237 * camel-mime-part-utils.c
4238 (camel_mime_part_construct_content_from_parser): Create the
4239 contents of multipart and simple messages.
4240 (camel_mime_part_construct_content_from_parser): Oops, this was
4241 totally screwed up, try creating the right cotnent on the right
4244 * camel-multipart.c (construct_from_parser): Moved to
4245 camel-mime-part-utils.
4246 (separate_part): Removed.
4248 * camel-mime-part.c (construct_from_stream): Back again! This now
4249 switches over to using a mime parser for any mime parts, only.
4250 (my_write_to_stream): Write our headers and so forth here.
4251 (add_header): Add header directly, parent class is abstract.
4252 (remove_header): Ditto.
4253 (set_header): Ditto.
4255 * camel-data-wrapper.c (camel_data_wrapper_construct_from_stream):
4257 (camel_data_wrapper_construct_from_parser): Moved to
4260 * camel-data-wrapper.h: Put back construct_from_stream.
4262 * camel-mime-part.h: Put construct_from_parser in here, the
4263 data-wrapper shouldn't know about mime. Ok, so now to undo half
4264 of the last hours changes ... duh.
4266 2000-04-23 Dan Winship <danw@helixcode.com>
4268 * camel-mime-utils.c (header_to_decode, header_mime_decode): fix
4269 some obvious minor bugs noted by -Wall.
4271 2000-04-23 NotZed <NotZed@HelixCode.com>
4273 * providers/pop3/camel-pop3-folder.c (get_message_by_number): Use
4274 construct_from_stream instead of set_input_stream().
4276 * camel-simple-data-wrapper-stream.c
4277 (camel_simple_data_wrapper_stream_construct): REmoved the destroy
4279 (wrapper_destroy_cb): Removed.
4281 * camel-simple-data-wrapper.h: Add prototype for _construct()
4284 * camel.c: Include unicode.h to kill a warning.
4286 * camel-data-wrapper.h (CameldataWrapperClass): Removed
4287 construct_from_stream virtual method.
4288 Removed get/set input stream.
4290 * data-wrapper-repository.[ch]: Removed&from build. Obsoleted?
4291 The justification as is follows: It is mixing storage
4292 protocol/format with message architecture. It really just doesn't
4293 serve any purpose, as each medium implementor will have to have its
4294 own type->handler mapping, and the only current implementor,
4295 mimepart has a very simple structure and no need for this.
4297 * camel-medium.c (write_to_stream): Moved here from most of the
4298 stuff in camel-mime-part. Well, the MEDIUM is the one that knows
4299 what the headers are, and the content is, let it write it out.
4301 * camel-mime-part-utils.c (camel_mime_part_construct_content):
4302 Copied from camel-mime-part.c, removed handling of message
4303 followon state (moved to camel-mime-message).
4304 (camel_mime_part_construct_content_from_parser): Renamed from
4306 (camel_mime_part_construct_headers_from_stream):
4307 (camel_mime_part_construct_content_from_stream):
4308 (camel_mime_part_store_stream_in_buffer): Removed. Replaced by
4309 the new construct from parser stuff.
4311 * camel-mime-message.c (construct_from_parser): Do
4312 construct_from_parser for mime-message.
4313 (_write_to_stream): Set the mime-version header for medium to
4314 write out, rather than writing it out ourselves.
4316 * camel-data-wrapper.c (set_mime_type_field): Ref the
4317 content_field when we get it?
4318 (construct_from_stream): Removed.
4319 (camel_data_wrapper_construct_from_stream): Changed to a helper
4320 function, creates a mime_parser, and constructs from that.
4321 (set_input_stream): Removed.
4322 (camel_data_wrapper_set_input_stream): Removed.
4323 (get_input_stream): Removed.
4324 (camel_data_wrapper_get_input_stream): Removed.
4326 * camel-mime-parser.c (camel_mime_parser_unstep): New function.
4327 Cause a subsequent call to mime_parser_step() to return the same
4330 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
4331 Initial test code using the mime parser to construct the message.
4332 (_get_message_by_uid): Use construct_from_stream() instead of
4333 creating our own parser.
4335 * camel-mime-part.c (construct_from_parser): part constructor.
4336 (camel_mime_part_construct_content): Basically a simpler
4337 replacement for the datawrapper repository.
4338 (camel_mime_part_init): Set the default type to text/plain.
4339 (camel_mime_part_construct_content): Removed to
4340 camel-mime-part-utils.c
4341 (my_get_output_stream): Removed. The streeam is in the
4343 (my_get_content_object): Removed. The content object is stored in
4344 the medium. If none is there, the object wasn't created properly.
4345 (my_write_content_to_stream): Removed. The content object is the
4346 one that knows how to write itself out!!!!!!!!
4347 (my_write_to_stream): Remove the base header writing stuff - has
4348 been moved to camel-medium, where it belongs. This can just be
4349 used to check for mandatory headers.
4350 (my_construct_from_stream): Removed.
4351 (my_set_input_stream): What the hell, i'll remove this too.
4352 Nobody seems to understand how it differs from create from stream,
4353 and they both seem to serve the same purpose ...
4355 * camel-simple-data-wrapper.c (construct_from_parser): Initial
4356 implementation of a content constructor.
4357 (construct_from_stream): Removed! Job taken over by
4358 construct_from_parser.
4360 * camel-multipart.c (construct_from_parser): Multipart
4361 construction routine.
4362 (camel_multipart_init): Set the default multipart type to
4363 multipart/mixed. Duh, no subtype is not allowed anyway.
4364 (set_input_stream): REmoved. Replaced by construct_from_parser.
4366 2000-04-22 Dan Winship <danw@helixcode.com>
4368 * camel-multipart.[ch]: clean, document, etc.
4369 (camel_multipart_init): pick a prettier default boundary. Still
4370 need to deal with the larger problem
4372 2000-04-22 NotZed <NotZed@HelixCode.com>
4374 * camel-mime-message.h (struct _CamelMimeMessage): Removed
4375 send_date, and received_date, and replaced it with a time_t
4376 'date' (this is what the header is called), and date_offset to
4377 store the GMT offset of the date.
4379 * camel-mime-message.c (camel_mime_message_set_from): Update raw
4381 (_set_from): Removed.
4382 (_get_from): Removed.
4383 (camel_mime_message_get_from): Moved implementation here.
4384 (camel_mime_message_get_subject): Move implementation here.
4385 (_get_subject): Nuked.
4386 (camel_mime_message_set_subject): Handle utf-8 input, and also
4387 update raw header when changed.
4388 (_set_subject): Removed.
4389 (_set_received_date): Removed.
4390 (camel_mime_message_set_received_date): Removed.
4391 (_get_received_date): Removed.
4392 (camel_mime_message_get_received_date): Removed.
4393 (_get_sent_date): Removed.
4394 (camel_mime_message_get_sent_date): Removed.
4395 (camel_mime_message_get_date): New function to get the date as a
4397 (camel_mime_message_set_date): Set the date as a time_t/offset.
4398 (camel_mime_message_get_date_string): Get the date as a string.
4399 (camel_mime_message_init): Initialise the current date as
4400 'CMAEL_MESSAGE_DATE_CURRENT'.
4401 (_set_reply_to): Removed.
4402 (camel_mime_message_set_reply_to): Moved implementation here.
4403 This is still broken, reply-to can have multiple addresses.
4404 (_get_reply_to): Removed.
4405 (_set_field): Removed, no longer used anywhere.
4406 (_get_field): Also removed.
4407 (_init_header_name_table): Add the Date header.
4408 (process_header): Also handle snooping of Date header here.
4410 * camel-stream-filter.c (finalise): Unref the source stream on
4411 finalise, and also call the parent class (oops).
4413 * camel-mime-parser.c (camel_mime_parser_state): New function to
4414 get the current parser state.
4415 (camel_mime_parser_stream): Allow you to get the stream back from
4417 (camel_mime_parser_fd): Alternative to allow you to get the fd
4418 back from the mime_parser.
4419 (folder_scan_init_with_stream): Properly ref/unref the stream.
4420 (folder_scan_close): Properly unref the stream/close the fd on
4422 (folder_scan_init_with_fd): Close the old fd if there is one.
4424 * camel-data-wrapper.c (camel_data_wrapper_construct_from_parser):
4425 New method, construct a data wrapper from an initialised parser.
4426 (construct_from_parser): Empty implementation.
4428 * providers/mbox/camel-mbox-summary.c (message_struct_new):
4429 Convert subject line to unicode, before storing in the summary.
4430 (strdup_trim): Removed, no longer needed.
4432 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref
4433 the folder after setting it in the new message.
4435 * camel-mime-part.c (my_set_content_object): Have the headers
4436 follow the content-type change here too.
4437 (my_write_to_stream): Dont write content-type here, automatically
4438 stored in the headers ...
4439 (my_write_to_stream): Use header_disposition_format() to format
4440 the content-disposition header.
4441 (my_write_to_stream): Removed old code, all headers are now stored
4442 in the camel-medium level, always. Need to do the same with
4443 camel-mime-message i suppose ...
4444 (my_write_to_stream): Write the content using the parent class,
4445 not some weird function.
4446 (camel_mime_part_class_init): Dont override get_output_stream.
4447 (camel_mime_part_encoding_from_string): Bleh, make it
4450 * camel-mime-utils.c (header_content_type_is): Handle empty types.
4451 (header_encode_string): Start of an implementation of the rfc2047
4452 encoder. It does iso-8859-1, and us-ascii, and utf-8 (others get
4454 (rfc2047_encode_word): Convert a single word/string into rfc2047
4456 (quoted_encode): Different quoted-printable encoding for rfc2047
4457 encoding of headers.
4459 * gmime-content-field.c (gmime_content_field_write_to_stream): Use
4460 header_content_type_format() to format it.
4462 2000-04-21 NotZed <NotZed@HelixCode.com>
4464 * camel-mime-utils.h: Add prototype for header_param_list_free.
4466 * camel-recipient.c: New function to remove all the types of a
4467 recipient list. I think this whole object needs a major review.
4469 * camel-mime-message.c (camel_mime_message_class_init): Removed
4470 parse_header_pair override, override add_header instead.
4471 (_parse_header_pair): Renamed to add_header.
4472 (remove_header): Add this method, to make sure we keep upto date
4473 with removed headers too.
4474 (_set_field): If given a NULL value, clear it out.
4475 (_set_recipient_list_from_string): Constify.
4476 (set_header): Override set_header from camel_medium.
4477 (process_header): Local function to handle set/add/remove of each
4478 header we know about.
4480 * camel-mime-part.c (camel_mime_part_class_init): Removed
4481 parse_header_pair setup.
4482 (my_parse_header_pair): Moved into add_header(), removed.
4483 (my_set_disposition): Allow a NULL disposition to clear it.
4484 (my_set_content_id): Allow NULL content id to clear it.
4485 (remove_header): Track removed headers.
4486 (my_set_description): Allow NULL description to clear it.
4487 (my_set_content_MD5): Make sure we copy the md5 value, and allow a
4488 NULL value to reset it.
4489 (my_set_filename): Copy the filename.
4490 (my_set_header_lines): Removed. Nothing uses it, it doesn't
4491 actually serve any purpose.
4492 (camel_mime_part_set_header_lines): Ditto.
4493 (my_get_header_lines): Ditto.
4494 (camel_mime_part_get_header_lines): Ditto.
4495 (camel_mime_part_class_init): Remove *_header_lines setup.
4496 (camel_mime_part_init): Remove header_lines init.
4497 (my_finalize): Remove header_lines finalise.
4498 (my_write_to_stream): Write the headers here. This is just WRONG,
4499 camel_medium should be doing this.
4500 (my_get_output_stream): Kill a warning.
4501 (camel_mime_part_encoding_to_string): Ditto.
4502 (camel_mime_part_set_description): Unvirtualiase, use add_header()
4503 to do the processing.
4504 (my_set_description): Removed.
4505 (set_disposition): Renamed from my_set_disposition.
4506 (camel_mime_part_get_description): Get the descriptionf rom the
4508 (my_get_description): Removed.
4509 (my_set_filename): Removed.
4510 (camel_mime_part_get_filename): Get the parameter from the
4512 (camel_mime_part_encoding_from_string): Handle NULL string.
4513 (camel_mime_part_init): Remove reference to filename.
4514 (my_finalize): Dont free filename.
4516 * camel-mime-part.h (CamelMimePartClass): Removed
4517 parse_header_pair() method, it doesn't add anything that
4518 add_header() can't be used for.
4519 (CamelMimePartClass): Remove *_header_lines methods.
4520 (struct _CamelMimePart): Remove header_lines list.
4521 (struct _CamelMimePart): Removed filename attribute.
4523 * camel-medium.c (camel_medium_init): Init headers to null, not a
4525 (add_header): Append the headers as a list.
4526 (remove_header): Remove headers as a list.
4527 (get_header): Likewise for lookup.
4528 (free_header): Removed, no longer needed.
4529 (finalize): Free headers using header_raw_clear().
4530 (camel_medium_set_header): New function, to reset and override all
4531 values of a header with a new value.
4533 * camel-medium.h (struct _CamelMedium): Changed to use a
4534 header_raw struct rather than a hash table, to store headers
4535 (many headers can occur multiple times).
4537 * camel-mime-utils.c (header_raw_find_next): New function, allows
4538 you to find multi-valued header fields.
4539 (header_disposition_format): New function to format/create
4540 content-disposition header string.
4541 (header_param_list_format_append): Function to format parameter
4542 lists into a GString.
4543 (header_content_type_format): Function to format content-type into
4545 (header_set_param): allow NULL value to remove the parameter.
4546 (decode_token): Renamed from header_decode_token.
4547 (header_decode_token): New interface for external use.
4548 (quoted_decode): Made static to kill annoying warnings.
4549 (g_strdup_len): Killed, replaced with calls to g_strndup().
4550 (rfc2047_decode_word): Made static to kill warnings.
4551 (decode_coded_string): Terminated.
4552 (g_string_append_len): Made static to kill warnings.
4553 (header_decode_text): Made static to kill warnings.
4554 (header_decode_text): Constify.
4555 (rfc2047_decode_word): Constify.
4556 (header_param): Constify.
4557 (header_content_type_new): Copy the type/subtype strings.
4558 (header_param_list_decode): Made static.
4559 (header_param_list_format_append): Made static.
4560 (quoted_decode): Constify.
4561 (g_string_append_len): Constify.
4562 (header_token_decode): New function to decode a single token.
4564 * providers/mbox/camel-mbox-summary.c (header_write): Append a
4565 trailing \n when writing headers.
4566 (strdup_trim): Killed a warning.
4567 (camel_mbox_summary_set_uid): Make sure the next uid is at least 1
4568 higher than any existing one.
4569 (header_evolution_decode): Use header_token_decode to get the
4572 * camel-mime-parser.c (folder_scan_header): Strip the trailing \n
4573 of the end of all header lines.
4575 2000-04-20 NotZed <NotZed@HelixCode.com>
4577 * providers/mbox/camel-mbox-utils.[ch]: Removed.
4579 * providers/mbox/camel-mbox-parser.[ch]: Removed. Removed
4582 2000-04-20 Dan Winship <danw@helixcode.com>
4584 * camel-mime-utils.c (rfc2047_decode_word): use libunicode iconv
4585 functions rather than libc ones (since libc might not have them).
4586 (header_decode_date): add autoconfiscation on timezone code
4588 * camel.c (camel_init): call unicode_init ()
4590 2000-04-20 NotZed <NotZed@HelixCode.com>
4592 * providers/mbox/camel-mbox-summary.c (message_struct_new): Trim
4593 leading/trailing spaces off the raw headers.
4595 * MERGE NEW_PARSER branch into HEAD, fixed conflicts.
4597 * gmime-content-field.c (_print_parameter): Duh, removed again
4600 * camel-mime-utils.c (header_content_type_is): Constify.
4601 (header_content_type_unref): Killed a couple warnings.
4603 * camel-folder.c (_init): Removed more log crap.
4605 * providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for
4608 * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
4609 Fixed for new summary interface. Added a warning for using this
4611 (_get_message_by_uid): Fixed for message new with session
4614 2000-04-19 Dan Winship <danw@helixcode.com>
4616 * camel-simple-data-wrapper-stream.c
4617 (camel_simple_data_wrapper_stream_get_type): This is a subtype of
4618 CamelSeekableStream, not CamelStream.
4620 * camel-seekable-substream.c: clean up a lot.
4621 (eos): When testing for end-of-stream, reset the parent position
4622 before testing if it is at end-of-stream, since either (a) it may
4623 have been seek'ed to eos by someone else, or (b) we may have been
4624 seek'ed away from eos and it hasn't been synced yet.
4626 * camel-medium.[ch] (camel_medium_add_header): const poison.
4627 (Belatedly goes with my change of 2000-02-23.)
4628 (camel_medium_init): Use g_strcase_{hash,equal} on the header
4631 2000-04-18 Dan Winship <danw@helixcode.com>
4633 * camel-mime-part.c (my_set_input_stream):
4634 * camel-data-wrapper.c (set_input_stream, set_output_stream): do
4635 better reference counting of streams so they actually go away
4638 * camel-log.[ch], *: Nuke camel log stuff. Replace calls to
4639 CAMEL_LOG_WARNING with calls to g_warning.
4641 * camel-data-wrapper.[ch]:
4642 * camel-simple-data-wrapper.[ch]:
4643 * camel-medium.[ch]: Clean, polish, document. Most of the gtk-doc
4644 comments added to camel-data-wrapper.c note serious problems that
4647 2000-04-17 Dan Winship <danw@helixcode.com>
4649 * camel-mime-message.[ch]: Remove the "session" field from
4650 CamelMimeMessage. Nothing uses it, about half of the existing
4651 calls to camel_mime_message_new_with_session pass NULL, and
4652 there's no obvious reason for it to be there.
4654 * providers/MH/camel-mh-folder.c:
4655 * providers/maildir/camel-maildir-folder.c:
4656 * providers/mbox/camel-mbox-folder.c:
4657 * providers/mbox/camel-mbox-utils.c:
4658 * providers/nntp/camel-nntp-folder.c:
4659 * providers/pop3/camel-pop3-folder.c: Use camel_mime_message_new
4660 instead of camel_mime_message_new_with_session.
4662 * camel-session.c (get_store_for_protocol_with_url): Set the
4663 exception if no provider is found.
4665 * camel-url.c: Add code to encode and decode %-escapes in URLs,
4666 and do some additional correctness-checking on URL syntax. From
4667 Tiago Antà o with modifications by me.
4669 2000-04-14 Chris Toshok <toshok@helixcode.com>
4671 * providers/Makefile.am (SUBDIRS): add nntp
4673 2000-04-14 Christopher James Lahey <clahey@helixcode.com>
4675 * providers/mbox/camel-mbox-folder.c: Fix switch statement.
4677 2000-04-14 Chris Toshok <toshok@helixcode.com>
4679 * providers/nntp/camel-nntp-folder.c (_exists): always return TRUE
4680 for now. we need to check the server response to make sure the
4682 (_get_message_by_uid): make sure to account for the \n we add to
4683 the string after every line.
4685 * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): function
4686 to get the headers using the XOVER command.
4687 (get_HEAD_headers): function to get the headers using the HEAD
4688 command on each message. slooooooow.
4689 (camel_nntp_get_headers): make this function use either XOVER or HEAD
4690 versions depending on whether or not the server extension is present.
4692 2000-04-14 Dan Winship <danw@helixcode.com>
4694 * camel-formatter.[ch]: This didn't belong in Camel. Move to mail/
4696 * Makefile.am, camel-types.h: remove references to
4699 2000-04-12 Matt Loper <matt@helixcode.com>
4701 * camel-folder-pt-proxy.c (_folder_open_cb): Print warning message
4702 for broken function.
4703 (_folder_close_cb): Same.
4705 2000-04-12 Miguel de Icaza <miguel@gnu.org>
4707 * Makefile.am (pthread_SRC): Use correct names for the pthread
4710 2000-04-10 Dan Winship <danw@helixcode.com>
4712 * providers/pop3/camel-pop3-store.c (pop3_connect): fix various
4713 bugs in APOP code (still untested) and some of the error cases.
4715 * camel-provider.h: Clarify what provider.protocol, provider.name,
4716 and provider.description should be.
4718 * providers/mbox/camel-mbox-provider.c:
4719 * providers/pop3/camel-pop3-provider.c:
4720 * providers/sendmail/camel-sendmail-provider.c:
4721 * providers/smtp/camel-smtp-provider.c: update protocols, names,
4724 * providers/mbox/camel-mbox-folder.c (_get_message_by_number):
4725 implement get_message_by_number for the mail fetch code.
4727 2000-04-09 Jeffrey Stedfast <fejj@stampede.org>
4729 * providers/smtp/camel-smtp-transport.c: reformatted to fit
4730 the standard indent format used by helix code
4732 2000-04-09 Dan Winship <danw@helixcode.com>
4734 * camel-movemail.c: New file with new function to dot-lock an mbox
4735 file and copy it to a safe private directory.
4737 2000-04-08 Christopher James Lahey <clahey@helixcode.com>
4739 * providers/smtp/.cvsignore: Added a .cvsignore file.
4741 2000-04-08 Dan Winship <danw@helixcode.com>
4743 * providers/sendmail/camel-sendmail-transport.c (_send_internal):
4744 actually record the pid returned by fork(). Noticed by clahey.
4746 * providers/smtp/camel-smtp-transport.c: #include <sys/param.h>
4747 for MAXHOSTNAMELEN. (This is a stopgap: some of the uses of
4748 MAXHOSTNAMELEN are wrong anyway...)
4750 2000-04-07 Jeffrey Stedfast <fejj@stampede.org>
4752 * providers/smtp/camel-smtp-transport.c: fixes to numerous bugs;
4753 should now build fine.
4754 * providers/Makefile.am: Readded smtp now that smtp builds without
4757 2000-04-20 NotZed <NotZed@HelixCode.com>
4759 * providers/mbox/camel-mbox-summary.c
4760 (camel_mbox_summary_next_uid): Public function to get the next
4761 uid, makes sure its saved to disk too.
4763 * camel-mime-part.c (my_finalize): Fix disposition crap with a
4765 (my_set_disposition): Likewise.
4766 (my_get_disposition): And here.
4767 (my_write_to_stream): And here, needs more cleanup.
4769 * providers/mbox/camel-mbox-folder.c (_append_message): Assign a
4770 new uid at this point.
4772 * gmime-content-field.c (gmime_content_field_write_to_stream):
4773 Make something up if we have an invalid/missing content type
4776 2000-04-19 NotZed <NotZed@HelixCode.com>
4778 * providers/mbox/camel-mbox-folder.c (_delete): Fixed completely
4779 broken switch() syntax, only compiled because errno is a macro on
4781 (_list_subfolders): Likewise.
4783 2000-04-18 NotZed <NotZed@HelixCode.com>
4785 * camel-mime-parser.c (folder_scan_init): init stream to null.
4787 * providers/mbox/camel-mbox-summary.c
4788 (CAMEL_MBOX_SUMMARY_VERSION): Moved to .c file, incremented.
4789 (index_folder): Changed to have index passed via the summary.
4790 (decode_string): Do a sanity check on the string size, so we dont
4791 visit g_malloc()'s friendly abort().
4793 * camel-folder-pt-proxy.c (camel_folder_pt_proxy_class_init):
4794 Removed reference to set_name.
4795 (_set_name): Removed.
4797 * providers/mbox/camel-mbox-utils.c
4798 (parsed_information_to_mbox_summary): Removed. Most of this file
4799 is about to be binned.
4801 * providers/mbox/camel-mbox-search.c (func_header_contains): Fixes
4802 for changes to summary interface.
4803 (struct _searchcontext): Remove pointer to message info, get it
4804 straight from the mboxsummary.
4805 (camel_mbox_folder_search_by_expression): New summary interface.
4806 (camel_mbox_folder_search_by_expression): Uh, the summary is not
4807 an object anymore (well not yet).
4809 * providers/mbox/camel-mbox-folder.c
4810 (camel_mbox_folder_class_init): Removed set_name init.
4811 (_set_name): Removed.
4812 (_open): Call new summary interface.
4813 (_close): Use new summary interface.
4814 (_create): Removed a summary object leak.
4815 (_get_message_count): New summary interface.
4816 (_get_uid_list): Use new summary interface. FIXME: this is leaky.
4817 (_get_message_by_uid): Use the new summary interface, some
4819 (_append_message): Totally changed, basically just appends the
4820 message directly, ignores the summary (for now), the summary will
4821 fix itself up if it needs to.
4822 (_check_get_or_maybe_generate_summary_file): Bye bye old code.
4823 (summary_get_message_info): Implement get_message_info again, for
4826 * camel-folder.c (camel_folder_class_init): Removed set_name
4828 (_set_name): Moved contents into _init.
4829 (_init): Perform the old functions of set_name here.
4831 * camel-folder.h: Removed the set_name internal interface.
4833 2000-04-14 NotZed <NotZed@HelixCode.com>
4835 * providers/mbox/camel-mbox-summary.[ch]: Completely replaced with
4838 * Makefile.am (libcamel_la_SOURCES): Removed
4839 camel-folder-summary.[ch].
4841 * camel-folder.h (struct _CamelFolder): Removed summary.
4842 (struct _CamelFolder): Changed flags to be 1 bit bitfields.
4844 * camel-folder-summary.[ch]: Class removed entirely.
4846 * camel-folder.c (camel_folder_get_summary): Removed.
4847 (camel_folder_summary_get_message_info): Moved from
4848 camel-folder-summary.c
4849 (camel_folder_summary_get_subfolder_info): Moved from
4850 camel-folder-summary.c
4852 * camel-mime-parser.c (folder_scan_step): Store the start of
4853 headers and start of from in the scan state.
4854 (camel_mime_parser_tell_start_headers): Query the start of the
4856 (camel_mime_parser_tell_start_from): Query the cached start of
4859 2000-04-13 NotZed <NotZed@HelixCode.com>
4861 * gmime-content-field.c (gmime_content_field_free): Removed this
4862 function. If its too dangerous to use, it shouldn't be here.
4863 (gmime_content_field_ref): Also ref the embedded content-type.
4864 (gmime_content_field_unref): Ditto to unref it.
4866 * camel-mime-utils.h: Add a refcount for content-type header.
4868 * camel-mime-utils.c (header_content_type_unref): Implement unref
4870 (header_content_type_ref): Implement ref for header content type.
4872 2000-04-12 NotZed <NotZed@HelixCode.com>
4874 * gmime-content-field.h: Changed to use a _header_content_type.
4875 Added type/subtype back for compatability with clients.
4877 * gmime-content-field.c: Basically a total rewrite, and now just a
4878 thin wrapper ontop of header_content_type.
4879 (_free_parameter): Got rid of it.
4880 (gmime_content_field_new): Use header_content_type_* functions.
4881 (gmime_content_field_set_parameter): Likewise.
4882 (_print_parameter): Blow away.
4883 (gmime_content_field_write_to_stream): Get details from the
4884 content_type field. Should check if it needs to escape chars in
4886 (gmime_content_field_get_mime_type): Likewise.
4887 (___debug_print_parameter): Get rid of this rather annoyingly
4889 (gmime_content_field_get_parameter): Simplified function.
4890 (gmime_content_field_construct_from_string): Fixed this to use a
4892 (gmime_content_field_is_type): New function to test if a type matches.
4893 (gmime_content_field_construct_from_string): Track type/subtype
4894 from subordinate content_type header struct.
4896 * gmime-rfc2047.[ch]: Removed. Unused.
4898 * camel-stream-b64.[ch]: Blown away more duplicated code.
4900 * Makefile.am: Removed camel-stream-b64.[ch], and
4903 * camel-mime-part.c (my_get_content_object): Replaced
4904 camel-stream-b64 with camel-stream-filter/camel-mime-filter-basic.
4905 (my_write_content_to_stream): Replaced camel-stream-b64 with the
4906 camel-stream-filter with an encoder.
4907 (my_get_content_object): Also implement quoted-printable decoding.
4908 (my_write_content_to_stream): Also implement quoted-printable
4910 (my_get_output_stream): Took out stream-b64 code (nothing's being
4911 executed yet anyway).
4913 * gmime-base64.[ch]: Blown away. Not used, dont need it.
4915 * camel-mime-utils.h: Added offset for this header. Records where
4916 it is in the source.
4918 * camel-mime-utils.c (header_raw_append_parse): Add offset
4919 parameter, to store where the header is stored in the stream.
4920 (header_raw_append): Added offset param.
4921 (header_raw_find): Return offset, if a pointer supplied for it.
4922 (header_raw_replace): Add offset param.
4923 (header_content_type_new): New function, to create an empty
4925 (header_content_type_set_param): Set a parameter in the
4927 (header_set_param): Generic header parameter setting function.
4928 (header_decode_string): Handle NULL input.
4930 * camel-mime-parser.c (camel_mime_parser_headers_raw): New
4931 function to get access to all the raw headers.
4932 (folder_scan_header): Keep track of the header start position, and
4933 store it when saving the header.
4935 2000-04-11 NotZed <NotZed@HelixCode.com>
4937 * camel-mime-utils.c: Moved a bunch of printf's to debug.
4939 * camel-mime-parser.c: Moved a bunch of printf's to debug.
4940 (folder_scan_header): Detect end of each header line using the
4941 last scanned char, and not the last scanned position.
4943 * camel-mime-filter-index.[ch]: Indexing filter. Indexes unicode
4944 sequences into ibex files.
4946 2000-04-09 NotZed <NotZed@HelixCode.com>
4948 * camel-mime-part.c: Dont include gmime-base64.h
4950 * camel-mime-filter-charset.c (complete): Implement the completion
4953 * camel-mime-parser.c (folder_scan_step): If we get to the end of
4954 the body data, check any filters for outstanding completion data.
4955 (camel_mime_parser_scan_from): Set whether we scan for "From "
4958 * camel-stream-filter.c (do_read): If we get to end of stream on
4959 the source, then call the filtering completion function to see if
4960 we have any more data to return.
4962 * camel-mime-filter-basic.c (filter): Implement quoted printable
4963 encoding and decoding filters.
4964 (complete): And the complete function as well.
4966 * camel-mime-utils.c (base64_encode_close): Also take an input
4967 buffer, allow closing of filters.
4968 (quoted_encode_step): First cut, simple quoted-printable encoder.
4969 Doesn't handle trailing spaces/tabs on end of line properly yet.
4970 (quoted_encode_close): Complete a quoted-encoding.
4971 (is_qpsafe): New type check, for quoted-printable safe characters
4972 (that do not need encoding). Thats all bits used in the type
4973 table! Rebuilt the types table.
4974 (header_content_type_is): Checks a content type against at
4976 (header_content_type_param): Handle NULL content type pointer.
4978 2000-04-08 NotZed <NotZed@HelixCode.com>
4980 * camel-mime-filter-basic.c (filter): Implement the base64
4981 encoder. Problem is, there is no way to know when to close it.
4982 Close/Reset will have to provide the same args as filter, so it can
4983 flush remaining data *sigh*
4985 * camel-mime-utils.c (base64_encode_step): A rather complex base64
4987 (base64_step_close): Companion function to finish off the base64
4990 * camel-mime-part.c (my_write_content_to_stream): Changed to use
4991 camel_stream_write_to_stream().
4993 * camel-stream.[ch] (camel_stream_write_to_stream): From
4994 camel_stream_b64_write_to_stream(). Fixed some infinite loop
4995 bugs with error conditions.
4997 * camel-stream-b64.[ch] (camel_stream_b64_write_to_stream): Removed.
4998 This has nothing to do with stream-b64, so i've moved it to
5001 * camel-mime-utils.h: Add a comment about refcounting
5002 header_content_type struct.
5004 * Makefile.am: Added camel-stream-filter*.[ch].
5006 * camel-stream-filter.[ch]: Class to implement a generic
5007 (multipass) filter ontop of a stream. Only implements a read-only
5010 * camel-mime-parser.c (camel_mime_parser_filter_add): Ref the
5011 filter we just added.
5013 * Makefile.am: Added camel-mime-filter*.[ch].
5015 * camel-mime-filter-charset.[ch]: A filter to preform character set
5016 conversion (uses unicode_iconv).
5018 * camel-mime-filter-save.[ch]: A simple filter which will save all
5019 data directly to a file or file descriptor.
5021 * camel-mime-filter-basic.[ch]: Implements the basic mime filters,
5022 base64 and quoted-printable decoding (encoding not implemented yet).
5024 * camel-mime-filter.[ch]: A filtering class, which can filter streams
5025 of data without having to copy them. Simpler than stream classes,
5026 and can be plugged into a single stream class (when i write it).
5028 2000-04-07 Dan Winship <danw@helixcode.com>
5030 * providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error
5032 (finalize): fix a bug in camel_exception usage
5033 (pop3_connect): Remember the password after asking for it the
5036 2000-04-07 NotZed <NotZed@HelixCode.com>
5038 * Makefile.am: Added camel-mime-parser/camel-mime-utils.
5040 * camel-mime-parser.c: Fast mime parser.
5042 * camel-mime-utils.c: Mime utility functions, and email header
5045 2000-04-07 NotZed <NotZed@HelixCode.com>
5047 * providers/Makefile.am: Removed smtp for now, its a long way from
5049 * providers/smtp/Makefile.in: Removed file that shouldn't have been
5052 2000-04-06 Matt Loper <matt@helixcode.com>
5054 * camel-folder-pt-proxy.c (_get_full_name): Remove exception param
5055 from get_full_name() called, since get_full_name() was changed to
5056 not have an exception in the last param (see dan's notes below).
5059 2000-04-06 Dan Winship <danw@helixcode.com>
5061 * camel-store.[ch]: Reorganize the folder-fetching methods and
5062 implement a folder cache so that multiple requests for the same
5063 folder will yield the same CamelFolder object (as long as it
5064 remains active). Includes some code to remove no-longer-active
5065 folders from the cache, but it doesn't get used since nothing is
5066 ever unref'ed in Camel right now...
5068 * providers/mbox/camel-mbox-store.c:
5069 * providers/pop3/camel-pop3-store.c: update for CamelStore
5072 * camel-folder.[ch]: Remove the (unused) CamelException argument
5073 from camel_folder_get_name and camel_folder_get_full_name.
5074 (camel_folder_set_name): make this go away since changing a
5075 folder's name after it has been created could result in it
5076 conflicting with a separately-issued folder.
5078 2000-04-05 Dan Winship <danw@helixcode.com>
5080 * g_url_new really wanted to take a CamelException. So, rename
5081 Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new
5082 taking an exception), and url-util.[ch] to camel-url.[ch]. Also
5083 force url->port to be numeric and remove camel_service_getport. (I
5084 was confused before: the URL RFC says the port must be numeric, so
5085 we don't want to do getportbyname.)
5087 2000-04-01 Dan Winship <danw@helixcode.com>
5089 * providers/mbox/camel-mbox-folder.c
5090 (_check_get_or_maybe_generate_summary_file): Compare
5091 mbox_file_size and mbox_modtime to the results of stat()ing the
5092 mbox file, not the summary file. Duh.
5093 (_close): Update the summary's mbox_file_size and mbox_modtime
5094 before writing it to disk.
5096 * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_save,
5097 camel_mbox_summary_load): Wow. I must have been tired when I wrote
5098 this code. First, the comparison bug above. Second, it was using
5099 ntohs and htons instead of ntohl and htonl. Third, I was reading
5100 the status flag byte in two different places and thus getting out
5101 of sync. Fourth, it was writing out field_length bytes of each
5102 header field after having converted field_length to network byte
5103 order, resulting in lots of random crap being appended, and the
5104 summary files being huge. (Fortunately, since the size/modtime
5105 comparison was biffed, the garbage summary read from disk was
5106 always immediately discarded.)
5108 * providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): fix
5109 an off-by-one error that caused the last-used UID to be reused if
5110 the summary file was regenerated. (That one wasn't my fault. :-)
5112 2000-03-31 Dan Winship <danw@helixcode.com>
5114 * camel-stream-mem.c: implement unimplemented methods
5116 * gmime-content-field.c
5117 (gmime_content_field_construct_from_string):
5118 * data-wrapper-repository.c
5119 (data_wrapper_repository_get_data_wrapper_type):
5120 * camel-simple-data-wrapper.c (my_write_to_stream):
5121 * camel-mime-part.c (my_set_input_stream):
5122 remove debugging printf()s that no longer seem useful.
5124 2000-03-31 Matt Loper <matt@helixcode.com>
5126 * camel-formatter.c (text_to_html): Added "convert_newlines_to_br"
5127 boolean param, to give the option of not converting '\n's to <br>
5128 tags. This way, when we stick stuff in a <pre> tag, newlines stay
5131 2000-03-30 Matt Loper <matt@helixcode.com>
5133 * camel-formatter.c (handle_text_plain): Use <pre> tag to force
5134 the use of monospaced fonts.
5136 2000-03-30 Dan Winship <danw@helixcode.com>
5138 * camel-service.c (camel_service_getport): Add a htons in the
5139 default_number case, and document the fact that the function
5140 returns the port in network byte order.
5142 * providers/pop3/camel-pop3-store.c (pop3_connect): Revert
5143 Miguel's change. The port number bug was actually somewhere
5144 else, and the IP address copying code was fine already.
5146 2000-03-29 Miguel de Icaza <miguel@gnu.org>
5148 * providers/pop3/camel-pop3-store.c (pop3_connect): Add htons
5149 (port), and only copy 4 bytes for the IP address to prevent a DNS
5152 2000-03-28 Dan Winship <danw@helixcode.com>
5154 * camel-seekable-substream.c
5155 (camel_seekable_substream_new_with_seekable_stream_and_bounds):
5156 make this return a CamelStream rather than a
5157 CamelSeekableSubstream, because that's the way Gtk objects tend to
5160 * camel-service.c (camel_service_gethost,
5161 camel_service_getport): convenience functions to canonicalize
5162 the host and port values of a service's URL.
5163 * providers/pop3/camel-pop3-store.c: use them
5165 * providers/mbox/camel-mbox-folder.c
5166 (_check_get_or_maybe_generate_summary_file): Make this work when
5167 the inbox file doesn't yet exist.
5169 2000-03-27 Dan Winship <danw@helixcode.com>
5171 * providers/mbox/camel-mbox-folder.c (_append_message): uncomment
5172 the call to unlink the temp file: there's no way to tell
5173 camel_stream_fs to truncate a file, so reusing the same file was
5174 resulting in junk at the ends of messages.
5176 * camel-folder.[ch]: add delete_message_by_{number,uid}.
5178 * providers/pop3/camel-pop3-folder.[ch]: implement
5179 delete_message_by_uid. Add a close method to do expunging
5180 of deleted messages if requested.
5182 * providers/pop3/camel-pop3-store.[ch]: support for
5183 CamelPop3Folder::close. (You have to close the connection
5184 in order to expunge the folder, thus the store may be
5185 connected in the CamelService::is_connected sense when it
5186 is not actually connected to the server.) Also some bugfixes.
5188 2000-03-27 NotZed <NotZed@HelixCode.com>
5190 * providers/mbox/camel-mbox-folder.c (_append_message): Unref the
5191 output_stream when done, close doesn't do it.
5192 (_append_message): Clear all uid's from the appending messages, so
5193 they are reassigned proper unique id's.
5195 * gmime-utils.c (get_header_array_from_stream): Actually free the
5196 header, it is copied elsewhere.
5198 2000-03-26 NotZed <NotZed@HelixCode.com>
5200 * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Added
5201 folder parameter to function. Fixed callers.
5202 (index_message): Index a message as it is assigned a unique id.
5204 * camel-mime-part.c (my_set_content_id): Make sure we malloc and
5205 copy the content_id, otherwise *poof*
5207 2000-03-25 NotZed <NotZed@HelixCode.com>
5209 * camel-medium.c (_finalize): Another leak, unref the content if
5212 * camel-recipient.c (camel_recipient_table_free): Plug another
5213 memory leak - actually free the recipient table.
5215 * camel-mime-message.c (_finalize): Plugged a memory leak with the
5218 * gmime-utils.c (_store_header_pair_from_string): A simpler, more
5219 debuggable and functionally identical header extraction function.
5221 2000-03-24 NotZed <NotZed@HelixCode.com>
5223 * gmime-content-field.c (gmime_content_field_set_parameter):
5224 Remove the hash table entry before freeing its key and data.
5226 2000-03-27 Dan Winship <danw@helixcode.com>
5228 * providers/Makefile.am (SUBDIRS): Add pop3.
5230 * providers/pop3/camel-pop3-store.c: keep separate input and
5231 output streams so the output doesn't end up being buffered.
5233 * providers/pop3/camel-pop3-folder.c (get_message_by_number):
5234 finish implementing this.
5236 2000-03-27 Michael Meeks <michael@helixcode.com>
5238 * camel-mime-part.c (my_set_disposition): fix so less broken.
5239 (my_finalize): remove dodgy disposition free.
5241 * camel-data-wrapper.c (my_set_mime_type_field): unref instead of
5244 2000-03-27 Dan Winship <danw@helixcode.com>
5246 * camel-service.c (camel_service_free_auth_types): new routine to
5247 free the data allocated by camel_service_query_auth_types.
5249 * providers/pop3/camel-pop3-store.c (free_auth_types): implement
5251 * camel-stream-mem.c (camel_stream_mem_new_with_buffer): rename
5252 camel_stream_mem_new_with_buffer to ..._with_byte_array and add a
5253 new ..._with_buffer that takes a char * rather than a GByteArray.
5255 * Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it
5258 2000-03-25 Dan Winship <danw@helixcode.com>
5260 * camel-folder-summary.[ch]: change the CamelFolderSummary
5261 interfaces to allow partial summary queries (for dealing
5262 with very large folders). Remove the "extended_fields" from
5263 CamelFolderInfo and CamelMessageInfo: this is better dealt
5266 * providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
5267 subclass of CamelFolderSummary. Update interfaces for that. Remove
5268 the internal/external summary distinction. Remove the (unused) md5
5269 checksum in the folder summary. Change the summary file format
5270 (primarily to make it no longer byte-order dependent) and add a
5271 version number to it so it will be easier to change in the future.
5273 * providers/mbox/camel-mbox-folder.[ch]
5274 * providers/mbox/camel-mbox-search.c
5275 * providers/mbox/camel-mbox-utils.c: update for summary changes
5277 * camel-exception-list.def: add
5278 CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID
5280 2000-03-23 NotZed <NotZed@HelixCode.com>
5282 * providers/mbox/camel-mbox-provider.c: Added flag to provider
5283 initialisation, to match changed structure.
5285 2000-03-22 NotZed <NotZed@HelixCode.com>
5287 * camel-folder.[ch]: Added async search api.
5289 * providers/mbox/camel-mbox-search.c
5290 (camel_mbox_folder_search_by_expression): Changed to use an
5291 asynchronous interface.
5292 (camel_mbox_folder_search_cancel): Cancel function for async
5295 2000-03-23 Dan Winship <danw@helixcode.com>
5297 * camel-stream-buffer.c (camel_stream_buffer_read_line): Function
5298 to read one line of any size from a stream and return it in
5301 2000-03-22 Dan Winship <danw@helixcode.com>
5303 * camel-service.c (camel_service_query_auth_types): New function
5304 to query a service for the authentication protocols it supports.
5305 * providers/pop3/camel-pop3-store.c (query_auth_types): implement
5307 * camel-provider.c (camel_provider_scan): New function to
5308 scan the provider dir and return a list of all providers.
5310 * providers/pop3/camel-pop3-folder.c: fill this in partially
5311 * providers/pop3/camel-pop3-store.c: make camel_pop3_command
5312 return the text after "+OK"/"-ERR" and add a separate
5313 camel_pop3_get_additional_data to get the message body or
5314 whatever. Also make them take a CamelPop3Store rather than
5315 a CamelStreamBuffer.
5317 2000-03-22 Matt Loper <matt@helixcode.com>
5319 * camel-formatter.c (debug): Disabled some useless debug
5322 2000-03-21 Dan Winship <danw@helixcode.com>
5324 * providers/pop3: some initial bits of the POP3 provider, to
5325 make Matt happy. Incomplete, untested, etc.
5327 2000-03-21 bertrand <bertrand@helixcode.com>
5329 * providers/mbox/camel-mbox-summary.c
5330 (camel_mbox_summary_append_internal_to_external): copy the size field
5332 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize
5333 message_info to NULL
5335 * camel-folder-summary.h: added the size field.
5337 * providers/mbox/camel-mbox-summary.h:
5338 added the received_date field.
5340 * providers/mbox/camel-mbox-summary.c:
5341 documented all functions.
5343 * camel-folder-summary.h: name change and
5346 * providers/mbox/camel-mbox-search.c: update to
5347 conform to name change in the summary fields.
5349 2000-03-10 bertrand <bertrand@helixcode.com>
5351 * camel-service.h: cosmetic changes.
5353 2000-03-09 Dan Winship <danw@helixcode.com>
5355 * s/HelixCode/Helix Code, Inc./ in the copyrights
5357 2000-03-07 bertrand <bertrand@helixcode.com>
5359 * camel-formatter.c (handle_mime_part):
5360 plug mem leaks due to bad documentation
5361 of camel_content_field_get_mime_type
5362 (print_camel_body_part): idem
5363 (handle_multipart_alternative): idem
5365 * gmime-content-field.c (gmime_content_field_get_mime_type):
5369 * camel-mime-part.c (my_finalize): unref the
5370 content_input_stream if any.
5372 2000-03-06 bertrand <bertrand@helixcode.com>
5374 * camel-stream-fs.c (_seek): fix a bogus calculation
5375 in the return position.
5377 2000-03-05 bertrand <bertrand@helixcode.com>
5379 * camel-session.h: cosmetic fixes.
5381 * camel-stream-fs.c (_read):
5382 (_seek): fixed the current position so that it refers
5383 to the current position in the stream, not in its parent.
5385 2000-03-04 NotZed <NotZed@HelixCode.com>
5387 * providers/mbox/camel-mbox-search.c
5388 (camel_mbox_folder_search_by_expression): Ref the summary
5389 after we have got it.
5391 2000-03-04 bertrand <bertrand@helixcode.com>
5393 * camel-mime-part.c (my_write_content_to_stream):
5394 stream the raw content instead of nothing if the encoding
5397 * camel-stream-fs.c (_seek): handle eos more
5400 * camel-formatter.c (get_bonobo_tag_for_object):
5401 bonobo-goad-id is the good key to look for.
5402 (get_bonobo_tag_for_object): close the <object> tag.
5403 (get_bonobo_tag_for_object): the correct syntax for the
5404 to set a parameter inside an <object> tag is :
5405 <object classid="..."> <param name="uid" value="..."> <param ...>
5408 2000-03-03 bertrand <bertrand@helixcode.com>
5410 * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
5411 use set_input_stream instead of construct_from_stream
5412 to feed the message object.
5414 * camel-data-wrapper.c (my_write_to_stream): reset output stream.
5415 (my_set_input_stream): unref the previous input stream.
5416 use the set_output_stream for default behaviour.
5417 (my_set_output_stream): unref previous output stream.
5419 * camel-mime-part.c (my_write_content_to_stream): reset content
5420 object output stream.
5422 2000-03-03 NotZed <NotZed@HelixCode.com>
5424 * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Make
5425 sure we open with create with a creation mask.
5427 2000-03-01 NotZed <NotZed@HelixCode.com>
5429 * camel-mime-part-utils.c
5430 (camel_mime_part_construct_content_from_stream): DO NOT assert on
5431 content type, we have fallback code 4 lines below it ... *sigh*
5433 2000-02-29 NotZed <NotZed@HelixCode.com>
5435 * Makefile.am (libcamelinclude_HEADERS): Added camel-stream-buffer
5438 * camel-stream-buffer.[ch]: Generic buffer which can be applied to
5441 2000-03-03 bertrand <bertrand@helixcode.com>
5443 * camel-formatter.c (handle_image): in the case
5444 of images, put the content object output stream
5445 in the url. This allows the message browser
5446 to show inline images.
5448 * camel-stream-b64.c (my_read_encode): fixed state
5451 2000-03-02 bertrand <bertrand@helixcode.com>
5453 * camel-stream-b64.c (my_read_encode): don't forget to
5454 set the state to 0 after 3.
5455 (my_read_encode): don't forget to encode, even in state 3.
5457 * camel-simple-data-wrapper.c: static functions are prefixed
5458 with my_ instead of _
5459 * camel-multipart.c: static functions are prefixed
5460 with my_ instead of _
5461 (my_write_to_stream): commented.
5462 (my_write_to_stream): warning in case the boudary is set
5463 but is a zero length string.
5465 * camel-mime-part.c (camel_mime_part_encoding_from_string):
5468 * camel-mime-part.c: Replaced all static functions
5469 with name begining with _ by the same name begining
5470 with "my_" to prevent the possible conflicts
5471 with system symbols Dan warned us about.
5473 * camel-stream-b64.c (camel_stream_b64_write_to_stream):
5474 use CamelStreamB64 type for the input stream.
5476 * camel-mime-part.c (_get_content_object): remove
5478 (_write_content_to_stream): implement the b64
5479 encoding the new way (that is using camel_stream_b64)
5481 * camel-data-wrapper.c (my_write_to_stream):
5482 fix implementation so that it writes properly
5483 to the output stream even.
5485 * camel-stream-b64.c (camel_stream_b64_write_to_stream):
5488 2000-02-29 bertrand <bertrand@helixcode.com>
5490 * camel-stream-b64.c (camel_stream_b64_write_to_stream): new
5493 * camel-data-wrapper.c (_write_to_stream): default
5496 * gmime-utils.c (_store_header_pair_from_string):
5497 revert strange changes.
5499 * camel-stream-b64.c (my_read_decode): set eos to true when we
5500 have read the whole input stream.
5501 (my_reset): set eos to FALSE.
5503 2000-02-28 NotZed <NotZed@HelixCode.com>
5505 * camel-mime-part.c (_parse_header_pair): Dont free this either.
5507 * camel-medium.c (_remove_header): Ugh, dont free the header
5508 before we actually remove it.
5509 (_add_header): Ugh, dont free hashtable entries which may be
5510 duplicated (hash_insert _will_ reference that memory).
5512 * string-utils.c (string_trim): Trimming a 0-length string is not
5515 * camel-mime-message.c (_parse_header_pair): Fixed very broken
5516 memory handling of header_name/value.
5518 * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev):
5519 Initialise end_of_last_message always.
5520 (camel_mbox_copy_file_chunk): Stop trying to read if we run out of
5521 data, rather than looping forever.
5522 (camel_mbox_write_xev): Use an open flag when opening with create.
5524 * camel-folder.c (camel_folder_search_by_expression): No, its not
5525 a fatal error to search on a non-searchable folder, you just dont
5527 (_open): Dont open an opened folder (i dont see why this is really
5528 a bug, but what the hell ...)
5530 * providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
5531 (_open): Call parent class to perform open. Remove folder-open
5532 check to parent instead.
5533 (_create): open takes a creation mask, dont use umask to try and
5535 (_delete): Dont bother checking folder==NULL, its already been
5536 checked on the external interface (changed to an assertion, this
5537 would have to be a camel bug).
5538 (_delete_messages): Likewise.
5540 (_init): Dont go and clear all the paths and shit that the parent
5541 open just setup for us.
5542 (_delete_messages): Get rid of more umask stuff.
5543 (_append_message): Make sure we pass file mode to open with create.
5544 (_append_message): Cleaned up some indenting to make it readable.
5546 * camel-stream-b64.c (my_read_encode): Fixed a typo.
5548 * providers/mbox/camel-mbox-search.c: Changed to use e-sexp,
5549 rather than filter-sexp.
5551 2000-02-28 bertrand <bertrand@helixcode.com>
5553 * camel-stream-b64.c (my_read_encode): encoding
5556 2000-02-23 bertrand <Bertrand.Guiheneuf@aful.org>
5558 * camel-stream-b64.c: changed the __static
5559 suffix into a my_ prefix.
5560 (camel_stream_b64_set_mode): reset the persistent
5562 (my_read_decode): remove superfluous %
5564 * providers/mbox/camel-mbox-utils.c (camel_mbox_copy_file_chunk):
5565 fix exception description message.
5567 2000-02-24 Dan Winship <danw@helixcode.com>
5569 * camel-session.c: Add camel_session_get_transport_for_protocol.
5571 * camel-transport.h:
5572 * camel-transport.c: Add an abstract CamelTransport class.
5574 * providers/sendmail/*: A CamelTransport that uses sendmail
5577 2000-02-24 Dan Winship <danw@helixcode.com>
5579 * camel-folder.c: use CamelExceptions for run-time errors, not
5580 incorrect code. Don't bother validating that an object exists from
5581 inside one of its methods, since you couldn't have gotten there if
5582 it didn't. Fix some code style bugs.
5584 (_init): Rename init_with_store to init and add parent_folder,
5585 separator, and name arguments.
5586 (_set_name): Get separator from self, not parent_store now.
5589 * camel-store.c: Remove get/set_separator.
5591 * providers/mbox/: Update for above.
5593 2000-02-23 Dan Winship <danw@helixcode.com>
5595 * camel-medium.c (_finalize): Free the data in the headers hash
5597 (_add_header): g_strdup the header name and value when adding it.
5599 * camel-mime-part-utils.c
5600 (camel_mime_part_construct_headers_from_stream): Free the header
5601 data after calling camel_medium_add_header, since it will have
5602 g_strdup()ed it itself.
5604 2000-02-22 NotZed <NotZed@HelixCode.com>
5606 * providers/mbox/camel-mbox-search.c: Dont compile by default.
5608 * providers/mbox/Makefile.am: Fuck off the filter code.
5610 2000-02-22 bertrand <Bertrand.Guiheneuf@aful.org>
5612 * camel-stream-b64.c (read_decode__static):
5613 don't read the char if we reached the length
5614 of the output buffer. Hours lost on this
5617 * camel-folder.c (camel_folder_get_subfolder):
5618 (camel_folder_create):
5619 (camel_folder_delete):
5620 (camel_folder_delete_messages):
5621 (camel_folder_list_subfolders):
5622 (camel_folder_expunge):
5623 (camel_folder_get_message_by_number):
5624 (camel_folder_get_message_count):
5625 (camel_folder_append_message):
5626 (camel_folder_copy_message_to):
5627 (camel_folder_get_summary):
5628 (camel_folder_get_message_uid):
5629 (camel_folder_get_message_by_uid):
5630 (camel_folder_get_uid_list):
5631 Check folder state (open/close) and raise an
5632 exception if it is not ok.
5634 * providers/mbox/camel-mbox-folder.c (_create):
5635 create the file and the path with two different
5638 * camel-folder.c (_create): handle the case
5639 when the folder name starts with '/'
5641 * camel-exception.c (camel_exception_new): use
5642 (void) instead of () in decl.
5644 * camel-exception.h: cosmetic fixes.
5646 * camel-exception.c (camel_exception_init): new routine.
5647 Fix a bug in mail/message-list.c
5650 * camel-folder.h: cosmetic changes.
5652 * camel-stream-b64.c (reset__static): added a
5653 reset method. Thanks message-browser to find
5656 * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
5659 2000-02-21 bertrand <Bertrand.Guiheneuf@aful.org>
5661 * camel-formatter.c (lookup_unique_id):
5662 awful hack to test get_output_stream.
5663 * camel-stream-b64.[ch] :
5664 b64 encoding/decoding is now implemented as
5668 2000-02-21 bertrand <Bertrand.Guiheneuf@aful.org>
5670 * camel-seekable-substream.c (_reemit_parent_signal):
5671 emit "data_available" when parent stream emits it.
5674 2000-02-21 NotZed <NotZed@HelixCode.com>
5676 * providers/mbox/Makefile.am: Uh, fixed LIBADD again. What was
5677 there was never ever going to work, wasn't it tested?
5680 2000-02-21 Dan Winship <danw@helixcode.com>
5682 * camel-session.h: (struct _CamelSession): Add authenticator.
5684 * camel-session.c (camel_session_new): Add authenticator.
5685 (camel_session_query_authenticator): New function to query the
5686 session authenticator for password, etc, information.
5688 2000-02-21 Dan Winship <danw@helixcode.com>
5690 * camel-session.c: add CamelExceptions to several functions. Use
5691 camel_session_new to initialize the session and URL fields of
5692 created CamelStores as appropriate.
5697 * camel-service.c: Move the session and url (and associated
5698 functions) from CamelStore to CamelService. Add url_flags to
5699 CamelService so subclasses can specify which URL components
5700 are mandatory for them. Add camel_session_new for
5701 camel_session_get_store* to use.
5703 * providers/mbox/camel-mbox-folder.c:
5704 * providers/mbox/camel-mbox-store.c:
5705 * providers/mbox/camel-mbox-store.h: Update for above changes.
5707 * camel-exception-list.def: Once camel is being used for real,
5708 exceptions won't be renumberable. So renumber them now to make
5709 more room to add exceptions to the various categories later, and
5710 add a big warning message.
5712 2000-02-20 Dan Winship <danw@helixcode.com>
5714 * providers/mbox/Makefile.am: add libibex back to
5715 libcamelmbox_la_LIBADD
5717 2000-02-18 NotZed <NotZed@HelixCode.com>
5719 * providers/mbox/camel-mbox-search.h
5720 (camel_mbox_folder_search_by_expression): Added exception to call,
5723 * providers/mbox/camel-mbox-search.c
5724 (camel_mbox_folder_search_by_expression): Major changes, to use
5725 the sexp evaluator from filter/filter-sexp.c to implement the
5727 (func_body_contains): Changed to support multiple strings in 1
5728 command (results or'd together)
5730 * url-util.c (g_url_new): Fixed a typo (colon == 0 isn't right),
5731 and made it so full url's are absolute pathed (Dan, this is how it
5732 has to work!). Also, always include a path part, even if it is an
5735 2000-02-18 Dan Winship <danw@helixcode.com>
5737 * camel/camel-types.h: New header with the typedefs for all camel
5738 classes. Now the class headers can just include this and the
5739 header for the parent type. This makes it possible for
5740 CamelService to include a CamelSession without creating an
5744 * composer/e-msg-composer-attachment-bar.h:
5745 * mail/folder-browser.c:
5746 * mail/message-list.c: frob #includes to match the new reality
5748 2000-02-17 Dan Winship <danw@helixcode.com>
5750 * camel/camel-service.h:
5751 * camel/camel-service.c: Make camel-service us a Gurl internally.
5752 Remove the login/password interfaces and instead provide
5753 camel_service_connect_with_url. Add CamelExceptions
5755 2000-02-17 bertrand <Bertrand.Guiheneuf@aful.org>
5757 * camel/camel-formatter.c (handle_text_plain):
5758 (handle_text_html): use camel_stream_reset instead
5759 of seek. The formatter should be able to work
5760 with all streams, not only seekable streams.
5761 In the case where some provider implementation
5762 would not be able to provide a reset method
5763 to their stream, implementors would have
5764 to find a workaround.
5766 * camel/camel-session.c (camel_session_new): use
5767 (void) instean of () in function decl.
5769 * camel/camel-folder.c: ifdef async operation
5772 * camel/camel-seekable-stream.c (_seek): added a warning.
5773 (_reset): default implementation of reset for seekable
5776 * camel/camel-mime-message.h: set_received_date declaration fix.
5779 * camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init):
5780 use (void) instead of ().
5782 * camel/camel-stream.c (camel_stream_reset):
5783 new method for CamelStream.
5785 2000-02-17 Dan Winship <danw@helixcode.com>
5787 * camel/url-util.c (g_url_to_string): New function to convert
5788 a Gurl back into a char *.
5790 2000-02-17 bertrand <Bertrand.Guiheneuf@aful.org>
5792 * camel/camel-formatter.c (handle_text_plain):
5793 revamped so that it uses the output stream
5795 (handle_text_html): ditto.
5798 * camel/camel-simple-data-wrapper.h:
5799 * camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_new):
5800 use (void) instead of ().
5801 (_get_output_stream): simple implementation.
5803 2000-02-16 bertrand <Bertrand.Guiheneuf@aful.org>
5805 * camel/camel-data-wrapper.c (_set_input_stream): ref input stream
5806 (_set_output_stream): ref output stream
5807 (_finalize): unref input and output streams
5809 * camel/camel-seekable-substream.c (_set_bounds): don't
5810 seek the begining of the substream.
5811 (_eos): fix eos condition testing.
5812 (_finalize): unref parent stream
5813 (_init_with_seekable_stream_and_bounds): ref parent stream
5815 * camel/gstring-util.c (g_string_equal_for_hash):
5816 (g_string_equal_for_glist): return type is int.
5819 * camel/camel.c (camel_init): use (void)
5822 2000-02-16 NotZed <NotZed@HelixCode.com>
5824 * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Added
5825 libfilter to link line (temporarily?). Required for
5828 2000-02-15 bertrand <bertrand@helixcode.com>
5830 * camel/camel-multipart.c (_localize_part):
5831 this routine replaces the _read_part routine
5832 and does not store the part in a buffer.
5833 (_set_input_stream): use the set_input_stream
5834 instead of the construct_from_stream.
5835 each bodypart is given an input stream.
5837 * camel/camel-mime-part-utils.c:
5838 include the data-wrapper-repository header.
5839 (camel_mime_part_construct_content_from_stream):
5840 use the set_input_stream instead of the
5841 construct_from_stream method.
5843 * camel/camel-seekable-substream.c (_set_bounds):
5844 cur position is set to 0 not to inf_bound.
5846 2000-02-15 bertrand <Bertrand.Guiheneuf@aful.org>
5848 * camel/camel-mime-part.c: include gmime-base64.h
5849 various compilation and runtime fixes.
5850 (_set_input_stream): store the input substream
5851 for the content object.
5853 * camel/camel-data-wrapper.h: declare the
5854 set/get function on input/output stream.
5856 * camel/camel-mime-part.c (_get_content_object):
5857 don't use a temporary mem stream.
5859 * camel/camel-seekable-substream.c (_seek):
5861 (_read): the substream can be unlimited in length
5863 * camel/camel-data-wrapper.c (camel_data_wrapper_class_init):
5864 set the get/set_input/output_stream methods.
5866 * camel/camel-multipart.c (_construct_from_stream):
5867 camel_stream_seek -> camel_seekable_stream_seek
5869 2000-02-14 Miguel de Icaza <miguel@gnu.org>
5871 * camel/providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Add
5872 the unicode libraries as well.
5874 * camel/camel-provider.c (camel_provider_register_as_module): Add
5875 error reporting here. Desire to use Solaris increases. Hair loss
5876 in the last two hours: 5,400.
5878 * camel/providers/mbox/camel-mbox-provider.c
5879 (camel_mbox_get_provider): Renamed function.
5881 * camel/camel.h: All include files use camel/ now here.
5883 * camel/providers/mbox/Makefile.am: Drop all the dynamism from
5884 Camel, and make this a standard library.
5886 2000-02-14 bertrand <Bertrand.Guiheneuf@aful.org>
5888 * camel/gmime-utils.c (get_header_array_from_stream): use the
5890 (gmime_read_line_from_stream): ditto.
5892 * camel/camel-stream-fs.h (struct ): add the eof field
5895 * camel/camel-stream-fs.c (camel_stream_fs_init): set eof.
5896 (_read): set eof on end of file.
5897 (_eos): implemented.
5899 * camel/gmime-utils.c (get_header_array_from_stream):
5900 make a blocking version of the header parser.
5901 When the fs stream uses gnome-vfs, this should
5903 (gmime_read_line_from_stream): ditto.
5905 2000-02-11 bertrand <Bertrand.Guiheneuf@aful.org>
5907 * camel/camel-stream-fs.c:
5908 everywhere, when using the cur_pos field, do it
5909 on the CamelSeekableStream object.
5912 * camel/camel-seekable-stream.c (camel_seekable_stream_seek):
5913 s/camel_stream_seek/camel_seekable_stream_seek/g
5915 * camel/camel-seekable-stream.h:
5916 (struct ): added a field to store the
5919 * camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position):
5920 New function. Allows to get the current position
5921 of a seekable stream.
5924 2000-02-13 NotZed <notzed@zedzone.helixcode.com>
5926 * providers/mbox/camel-mbox-search.c: New file, implements the
5927 search api for mbox folders.
5929 * providers/mbox/Makefile.am: Link with ibex.
5931 * camel-folder.c (camel_folder_has_search_capability): Api
5933 (camel_folder_search_by_expression): Ditto.
5935 2000-02-12 NotZed <notzed@zedzone.helixcode.com>
5937 * providers/mbox/camel-mbox-folder.c (_set_name): Setup index
5939 (_init_with_store): Init index filename. Hmm, none of these
5940 names ever seem to get free'd (FIXME?)
5942 * providers/mbox/camel-mbox-folder.h: Add index file name.
5944 2000-02-12 NotZed <notzed@helixcode.com>
5946 * camel-folder.h: Add folder search functions.
5948 ** Created ChangeLog just for camel **
5949 - refer to ../ChangeLog for changes prior to this date.