2000-11-28 Not Zed <NotZed@HelixCode.com>
* providers/local/camel-maildir-summary.c
(camel_maildir_summary_init): Set the info size's properly, oops!
* tests/lib/folders.[ch]: Folder testing helpers.
* tests/folder/test2.c: Test basic message ops on folders.
* tests/folder/test1.c (main): Test basic folder ops on (local)
stores.
* providers/local/camel-local-provider.c
(camel_provider_module_init): Removed some debug.
* providers/local/camel-maildir-folder.c
(camel_maildir_folder_class_init): fix parent class.
* providers/local/camel-mh-folder.c (camel_mh_folder_class_init):
Fix parent class (damn cut & paste).
* providers/local/camel-maildir-store.c (get_folder): Call parent
impl.
(camel_maildir_store_class_init): Fix parent class setup.
(delete_folder): Check the folder exists before trying to delete
it.
(delete_folder): Try and make the delete operation atomic/rollback
failures. e.g. if one directory isn't empty, then create the
other empty ones back. Also clear the tmp directory fully first.
* providers/local/camel-mbox-store.c (get_folder): Call parent
impl.
(camel_mbox_store_class_init): parent class is camel_local_store,
not camel_folder, oops.
(delete_folder): Return an error if it doesn't exist, rather than
covering it up.
* providers/local/camel-mh-store.c (get_folder): Call parent impl.
(camel_mh_store_class_init): fix parent class setup.
(delete_folder): Error if it doesn't exist now.
* camel-folder.c (camel_folder_move_message_to):
(camel_folder_copy_message_to): Added warnings as these functions
are going to be removed later.
* camel-store.c (camel_store_get_root_folder): Fix for an early
api change. We want CAMEL_STORE_FOLDER_CREATE, not TRUE, since
its a flag.
(camel_store_get_default_folder): And here too.
* providers/local/camel-local-store.c (xrename): Handle renaming
folders differently to renaming files.
(get_default_folder_name): local stores dont have a default
folder, so make it so. Or at least, it doesn't seem to make sense
to have one.
(get_root_folder_name): Same for root.
(get_folder): Added parent implementation, that makes sure the
service path exists, if we are creating a new folder (but doesn't
create the folder).
2000-11-27 Not Zed <NotZed@HelixCode.com>
* providers/local/camel-local-store.c (xrename): Fixed races. Use
link/unlink, rather than rename, to properly detect overwriting
another file. And allow some files to be missing.
2000-11-28 Radek Doulik <rodo@helixcode.com>
* providers/local/camel-local-summary.c
(local_summary_decode_x_evolution): add scan = scan->next; to
avoid infinite loop
2000-11-27 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-command.c (imap_read_untagged): Make
this gratuitously more complicated. No wait, I mean, fix bugs. Now
fully handles NULs in the data stream (which "can't happen" but
do) and also handles responses containing multiple literals. Also
does less copying than the original code.
* camel-stream-buffer.c (stream_read): Fix a bug that could make
it lose sync and/or overrun buffers.
2000-11-27 JP Rosevear <jpr@helixcode.com>
* providers/local/.cvsignore: shush
2000-11-27 Not Zed <NotZed@HelixCode.com>
* providers/Makefile.am: Removed mh, mbox, added local, to the default.
2000-11-24 Not Zed <NotZed@HelixCode.com>
* tests/data/getaddr.pl: little util to scan mailboxes for any and
every address they contain.
* tests/message/test2.c (main): Added a bunch of stuff to test
decoding/reencoding/etc of internationalised addresses.
* tests/message/lib/address-data.h: Copy of some unicode/other
testing data. **Beware** of editing this file in emacs, it'll
probably try and convert all the characters to something
unusable.
* tests/lib/camel-test.c (camel_test_break): Add a debugger hook
point.
* camel-mime-utils.c (quoted_encode): Check for space and convert
to _ separately.
(header_decode_mailbox): Fixed the 'check comments for realname'
code, problem was the domain getting code was skipping all
whitespace/comments before we could get a look-in. This is
approximate but fairly robust.
(header_decode_text): Dont use the c-type isspace func here, we
want a specific whitespace only.
(header_decode_text): If we have decoded words next to each other,
do not insert whitespaces between them, which is what rfc2047 requires.
(header_decode_text): Make c unsigned too.
* tests/README: Added at least some explanation of all this stuff.
* tests/lib/camel-test.h (check_msg): Added a non-gcc version of
the fail command, we dont get the expression that failed, but no
matter. Should be (more) portable now.
(check, check_msg): Put the file/lineno in the default message.
* Makefile.am (SUBDIRS): Add tests.
* camel-mime-filter-basic.c (filter): Well, I'll add the extra
bytes here too, lathough not strictly needed, might save a
re-malloc when we get to complete().
* camel-mime-filter-charset.c (filter): Make sure we have room if
we only convert very short data.
(complete): and here too.
* tests/Makefile.am: Initial test harness & tests. Requires gcc
for this.
* camel-internet-address.c (d): Turn off debug.
* camel-charset-map.c (camel_charset_step): Oops, & masks for set
intersection, not | them. Dunno how this got even close to
working.
2000-11-23 Not Zed <NotZed@HelixCode.com>
* camel-mime-filter-basic.c (filter): For base64 encoding, the
output size for 0, 1, or 2 bytes of input can exceed input*2, so
make sure we account for that as well.
(complete): And here.
(complete): Similarly for qp encoding, if we have a trailing
space, we need some extra bytes (not needed for 'filter()', as any
such bytes are stored in state/save).
* camel-mime-utils.c (quoted_decode_step): Removed fixme not required.
(quoted_encode_close): Dont append a trailing afterall. Otherwise
a pass through the encode/decode will grow the message each time.
2000-11-22 Radek Doulik <rodo@helixcode.com>
* camel-mime-utils.c (header_msgid_generate): check for return
values
2000-11-21 Dan Winship <danw@helixcode.com>
* camel-lock.c:
* camel-movemail.c: add #ifdef HAVE_ALLOCA_H
2000-11-21 Not Zed <NotZed@HelixCode.com>
* providers/local/camel-mh-summary.c (mh_summary_sync_message):
Shite, -1 on error, >=0 on success. So i've just been truncating
all the messages I touched, good one zed.
(mh_summary_sync_message): Sigh, and write to the right damn fd as
well.
(mh_summary_sync_message): Argh, and we need to compare the length
of the old xev -1 to the new xev, to check if we can optimise it.
* camel-folder.c (camel_folder_change_info_new): Init the pool.
(camel_folder_change_info_add_source): Allocate string in the
pool.
(camel_folder_change_info_add_source_list):
(camel_folder_change_info_add_update): No longer free the key, as
it cannot be yet.
(change_info_add_uid): Add a new arg, copy, telling it whether to
copy the uid argument or not, and copy using mempool_strdup.
(change_info_cat): Tell add_uid to copy the string.
(camel_folder_change_info_add_update): Call add_uid directly.
(change_info_remove): Call add_uid directly, with no copy, and
dont free the key.
(change_info_free_update): No longer required since we dont malloc
the keys.
(camel_folder_change_info_add_uid): Fix for add_uid change.
(camel_folder_change_info_remove_uid):
(camel_folder_change_info_change_uid):
(change_info_clear): No longer needed, just set the size to 0 on
the array directly.
(camel_folder_change_info_clear): Empty the arrays directly, and
flush the mempool too, and also clear uid_source, incase anyone
was silly enough to call us in the wrong order.
(camel_folder_change_info_free): Dont bother clearing the array's
contents, just free the pool and throw away all the indexes.
* camel-folder.h: Added a mempool to CamelFolderChangeInfo to
store the uid's we get.
* camel-folder-search.c (search_match_all): If we are only
matching a single info, just use that/do the search.
(camel_folder_search_match_expression): New function. Matches a
single message info against an expression.
(camel_folder_search_init): Init a hash table used to map the
returned gptrarrays' to mempools.
(camel_folder_search_execute_expression): Store all of the string
data in a mempool, slightly faster, less wasted space (usually),.
(camel_folder_search_free_result): Check for the mempool that
stores the data for the list, and free that if we have it,
otherwise assume we need to use g_free() (which should only happen
if the list is empty at the moment).
: commented out the debugging prints. Got sick of 'executing
header search' crap.
* providers/vee/camel-vee-folder.c (camel_vee_folder_init): Init
changes.
(camel_vee_folder_finalise): Free changes.
(vfolder_add_match): Simple helper to add a new matching info
record.
(camel_vee_folder_add_folder): Only trigger a changed event if we
have changes.
(vfolder_change_match): New function, changes our local vfolder
info to match the source.
(vfolder_add_match): Add a new info to the vfolder list.
(vfolder_remove_match): Remove a no-longer matching info from the
vfolder summary.
(message_changed): check if the message still matches, and
remove/etc as required.
(camel_vee_folder_finalise, init): init/free search object.
(vee_folder_build_folder): Build the changes to the folder into
the changes data, as we go.
(folder_changed): If the folder gave us an explicit list of
changes, then process each one separately (unless there's a lot
added/changed).
* providers/vee/camel-vee-folder.h: Added a changes field to the
folder.
* Makefile.am (libcamel_la_SOURCES): Added
camel-folder-thread.[ch].
* camel-folder-thread.c: message-threading algorithm, taken from
evolutions' mail component, as it is generally more useful than
just for evolution itself. Changed to use e-memchunks as well to
speed it up a little and use less mem.
2000-11-20 Jeffrey Stedfast <fejj@helixcode.com>
* camel-remote-store.c (remote_recv_line): Fixed to return the
correct bytecount in all cases which is the real fix to
imap_parse_nstring.
* providers/imap/camel-imap-command.c (imap_read_untagged): Again,
don't use strlen for the post-data, use 'n'.
* providers/imap/camel-imap-utils.c (imap_parse_nstring): Undo my
previous temp-fix.
2000-11-20 Not Zed <NotZed@HelixCode.com>
* providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Fixes for
the summary messageid changes. Hash the messageid and store it.
(get_XOVER_headers): Use camel_folder_summary_info_new() to create
the summary item before adding it.
* camel-folder-summary.h (CamelMessageInfo): Changed the
messgae-id to be an 8 byte md5 hash, and the references list to be
an array of these.
* providers/local/camel-mh-summary.c (mh_summary_sync_message):
New function, sync out the message info stuff. Only updates the
X-Ev header if it can get away with it, otherwise writes out a
whole new message.
(mh_summary_sync): Added more functionality. All summary info is
now written to the X-Ev header, etc, and new messages re-written
if required during the sync process.
* providers/local/camel-local-folder.c
(local_set_message_user_flag): Set the XEVCHANGE flag.
(local_set_message_user_tag): And here too.
* providers/local/camel-local-summary.h: New flag
CAMEL_MESSAGE_FOLDER_XEVCHANGE to indicate the XEV header has
probably changed size and needs to be rewritten in whole.
* camel-folder-summary.c (next_uid_string): Want this static, not
const.
(message_info_new): Store the references and message-id values as
64 bit, binary hashes.
(message_info_load): fix for message-id/references changes.
(message_info_save): Likewise.
(camel_message_info_dup_to): And here.
(camel_message_info_free): And here too. No longer free
message_id, and simple free for references array.
(CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
(camel_folder_summary_init): Init memchunk allocators to empty.
(camel_folder_summary_finalize): Free memchunk allocators if
there.
(message_info_new): Use the chunk allocator to allocate message
info's.
(camel_folder_summary_info_new): New helper to allocate the
message info, and setup the memchunk if required.
(content_info_alloc): Likewise for content info's.
(message_info_load): Use summary_info_new_empty.
(content_info_new): Use content_info_alloc.
(content_info_load): "
(content_info_free): Free the content info as a memchunk.
(message_info_free): Free everything directly and the base as a
memchunk, rather than calling camel_message_info_free(), which
assumes a malloc'd array.
* providers/local/camel-local-summary.c: Include ctype.h, kill a
warning.
(local_summary_decode_x_evolution): If we get a NULL message info,
then dont try and set anything, just check for validity.
(camel_local_summary_write_headers): New function to write a set
of headers to an fd.
(camel_local_summary_check): Added some statistic generation
stuff for memory profiling.
* providers/local/camel-mbox-summary.c (header_write): Changed to
use stdoi functions to write out the header to a buffered stream,
instead of using writev, which is apparently slow (and writing
each line separately is slow anyway).
(mbox_summary_sync_full): New implementation. Does things
differently, doesn't use or require the content info stuff.
(summary_rebuild): Dont return an error if we start scanning at
the end of file.
(mbox_summary_sync_full): If we are not writing out new headers,
make sure we copy the From line as we go, and update frompos
appropriately.
(mbox_summary_sync_full): Always copy the From line from the
existing one, rather than trying to make one up ourselves.
(mbox_summary_sync): If we can get by with a quick-sync, then try
it, if that fails, then try a full sync anyway.
(mbox_summary_sync_quick): Quick sync. Only update system flags,
etc.
(mbox_summary_sync_full): Use the proper local summary encode_xev
function.
(header_evolution_decode): Removed, no longer needed.
(header_evolution_encode): Same.
(copy_block): No longer needed, removed.
(header_write): Removed, replaced with
camel_local_summary_write_headers.
(mbox_summary_sync_full): Fixed for header_write change.
* camel-mime-parser.c (folder_scan_step): Implement the new
optional parser state HSCAN_PRE_FROM, that returns the (currently
unfiltered) input data.
(folder_scan_drop_step): Do the right thing for the PRE_FROM
state.
(camel_mime_parser_scan_from): Update the doco.
(camel_mime_parser_scan_pre_from): Ok, make this behaviour
optional, it simplifies a lot of loops that dont otherwise need to
know about it.
(folder_scan_step): Made the PRE_FROM state optional.
(struct _header_scan_state): Made the bool vars 1 bit.
(folder_pull_part): Free the from_line buffer if it is there.
(folder_scan_skip_line): Added a new arg, can save the skpped data
to a byte_array, as we go.
(folder_scan_step): Fixed calls to skip_line approrpiately. Now
we save the from line as we parse it.
(camel_mime_parser_read): New function to read from the mime
parser buffer directly. Useful if you use the parser to read the
first/some headers, then need to scan the rest of the data,
without needing to use a seek(), or allocate your own buffers.
* camel-mime-parser.h (struct _header_state): Added a new parser state,
pre-from which returns any data found before a from line during
parsing (all other data can be retrieved by the caller except
this).
2000-11-17 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-utils.c (imap_parse_nstring): When
extracting a literal string, capture up until the end of the last
line - this we we don't lose any data if the byte count is off.
* providers/imap/camel-imap-command.c (imap_read_untagged): Use
the byte-read count to decrement the number of bytes left to read
rather than using strlen. Not only does this protect against a DoS
(embedded NUL chars in the literal string would make strlen
inaccurate) but it also improves performace a little.
* camel-remote-store.c (remote_recv_line): *Sigh* Return the
number of bytes read on success rather than 0. Also don't use
camel_stream_buffer_read_line since we can't get an accurate octet
count.
2000-11-17 Not Zed <NotZed@HelixCode.com>
* providers/local/camel-local-summary.c (local_summary_add): Clear
the NOXEV/FLAGGED bits, since we do have an xev header. um m,
maybe this is right, this assumes a write is following. Maybe
this should be done in folder::append() instead ...
* camel-stream-buffer.c (camel_stream_buffer_gets): We should
always terminate the string. No need to check outptr is in range,
its already been checked.
* providers/local/camel-mbox-summary.c (mbox_summary_sync): When
we update the summary, do it from mbox_summary->folder_size, not
the content info endpos (which isn't any good anymore anyway).
* providers/local/camel-mbox-folder.c (mbox_append_message): Set
the frompos from the current folder size, since summary_add wont
have initialised it to anything useful.
2000-11-16 Not Zed <NotZed@HelixCode.com>
* providers/local/camel-local-summary.c
(local_summary_encode_x_evolution): Check the uid string is all
digits before trying to write a 'standard' x-ev header.
* providers/local/camel-maildir-summary.c
(camel_maildir_summary_info_to_name): Convert an info into a
maildir name:info filename.
(camel_maildir_summary_name_to_info): Convert a name:info filename
into an info, and tell us if it didn't match it.
(message_info_new): When creating a new filename, gets its info
from the flags field. Likewise if creating from an existing file,
extract the flags.
(maildir_summary_sync): Remove a small memleak. Also, if our
flags and that requires a filename change, perform that here.
(message_info_new): Get the received date from the filename.
Also, dont overwirte the uid if we have one.
(maildir_summary_check): Sort the summary in received order before
completion.
(maildir_summary_next_uid_string): Test the name for collusions
before we give it out. Retry, and if that fails, well, I guess we
collide :(
* providers/local/camel-mbox-folder.c (mbox_lock): Implement mbox
locking.
(mbox_unlock): And unlocking.
(mbox_append_message): Lock the folder for write before doing
anything.
(mbox_get_message): Lock the folder for read before doing
anything.
* providers/local/camel-local-folder.c (camel_local_folder_lock):
Implement something here. We handle the recursive ability but
pass the locking to the folder itself.
(camel_local_folder_unlock): Likewise for unlocking.
(local_lock): Default - do nothing, return success.
(local_unlock): Same.
(local_sync): Changed slightly for locking api changes, and also,
only lock around the sync process itself.
* camel-lock.c: New file - utility functions for locking using
different strategies and/or for locking folders safely.
* Makefile.am (libcamel_la_SOURCES): Adde camel-lock.[ch]
2000-11-15 Radek Doulik <rodo@helixcode.com>
* camel-mime-utils.c: mime_guess_type_from_file_name moved back to
composer as it introduced unwanted VFS dependency
removed #include <libgnomevfs/gnome-vfs.h>
2000-11-15 Not Zed <NotZed@HelixCode.com>
* providers/Makefile.am: Removed local again, not quite ready.
2000-11-14 Not Zed <NotZed@HelixCode.com>
* camel-folder-summary.c (message_info_new_from_message): Use
message_info_new to create the summary from headers, instead of
getting directly from the message.
(format_recipients): No longer required.
* providers/Makefile.am (SUBDIRS): Added local.
2000-11-11 Not Zed <NotZed@HelixCode.com>
* camel-mime-parser.c (folder_push_part): Make sure 'atleast' is
at least 1, always. This is possibly a temporary fix for a
bad failure mode on bad multipart messages.
(folder_scan_content): Go until inend, not inend+1. Changed the
continuation and retry logic to be simpler and more robust. If we
can't find a marker within
the atleast we need, just set it to 1, and try again, rather than
just going to the next smaller limit (boundary check checks the
length anyway).
(header_append): streamline the empty line case. And strip
trailing \r's if there are any (\n's already stripped).
(folder_scan_header): Reordered and cleaned up a lot. Check for
continuation only once, and compress lwsp then. Assume the header
buffer already has end of line's stripped, and simplify some things:
Only check for end of headers once and easier.
Dont check to remove end of line character
Dont bother testing inptr-start if we get a boundary match - it is
always zero.
(folder_scan_header): Removed the unused part variable, and a few
pointless assignments.
(folder_scan_header): Change the end limit to be 1 higher, to make
sure we get all content.
(folder_scan_content): And here too.
(folder_scan_header): Killed a warning.
(folder_push_part): Removed a bad comment. Actually
boundarylenfinal can be zero for a new message not in a
multipart. So we fix that here.
2000-11-09 Not Zed <NotZed@HelixCode.com>
* camel-mime-utils.c (header_decode_param_list): Renamed from
header_param_list_decode.
(header_param_list_decode): New external function to decode a
parameter list.
(header_param_list_format_append): Made public.
(header_param_list_format): Another new public helper function for
formatting just a param list.
* camel-folder-summary.c (next_uid_string): Default implementation
is the same as before.
(camel_folder_summary_class_init): And set it up.
* camel-folder-summary.h: Make next_uid_string a virtual function.
* camel-folder.c (camel_folder_change_info_changed): New function
to return true if the changeset contains any changes.
2000-11-14 Jeffrey Stedfast <fejj@helixcode.com>
* camel-stream.c (camel_stream_printf): Don't cast an int to a
ssize_t.
2000-11-10 Dan Winship <danw@helixcode.com>
* providers/mbox/camel-mbox-summary.c
(camel_mbox_summary_build_from): put a space before a single-digit
day of the month since it seems some mailers are fantastically
picky about this. (bugs.gnome.org #27232)
2000-11-10 Radek Doulik <rodo@helixcode.com>
* camel-mime-utils.c (header_msgid_generate): fix ids ending with '.'
2000-11-09 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
Fix error handling. (Only send a "*" to bail out of authentication
if the server hasn't already bailed on us.)
2000-11-08 Radek Doulik <rodo@helixcode.com>
* camel-mime-utils.c (mime_guess_type_from_file_name): new
function, moved from composer
2000-11-08 Not Zed <NotZed@HelixCode.com>
* camel-mime-message.c (find_best_encoding): Keep track of the
caller bestenc flags that make sense.
* camel-mime-filter-bestenc.c (filter): Added code to detect when
we have "^From " lines in the sequence of text.
(camel_mime_filter_bestenc_get_best_encoding): Added a new flag
CAMEL_BESTENC_NO_FROM: if set, it will not allow any lines
matching "^From " to appear in the output - currently forcing
base64 encoding to achieve this.
* camel-mime-parser.c (folder_scan_step): Call
camel_mime-filter_complete() once we're done, rather than
filter_filter().
(folder_scan_content): Some fixes for state changing; so that when
we do find another boundary it is properly flagged. Since we
strip the last \n off all data, we must take that into account
too. Sigh. Fixes a rather nasty set of bugs where multipart
messages could start including following messages as parts, etc.
(struct _header_scan_stack): Added new parameter,
boundarylenfinal, which holds the length of the final boundary, if
it is different (e.g. for From lines, whihc aren't)
(folder_scan_step): Setup teh boundarylenfinal value when creating
a new boundary.
(folder_scan_content): Hmm, if we hit the end-of-buffer sentinal,
reset the scanner back to leave 'atleast' chars in the buffer
still, dump that content, and retry again. Stops us losing a
check for a boundary on some data we haven't really looked at yet!
(folder_scan_content): Use boundarylenfinal to calculate
'atleast'.
(folder_scan_header): And here too.
(folder_boundary_check): Use the atleast value directly, dont
truncate it. Use the boundarylen/boundarylenfinal values directly
too.
(struct _header_scan_stack): Add an atleast parameter to cache the
atleast info.
(folder_push_part): Determine/set 'atleast', every time we add a
new part.
(folder_scan_header): Get the cached atleast info from the current
part.
(folder_scan_content): And here too.
(folder_scan_header): Fix a problem where a part starting with
" text" would be interpreted as a followon header wrongly.
* camel-mime-filter-charset.c (complete): Add some assertions to
find a bug.
2000-11-07 Ettore Perazzoli <ettore@helixcode.com>
* camel-service.c (get_name): Strdup the "???" string you return,
so that the expected semantics for `::get_name()' is respected.
2000-11-07 Dan Winship <danw@helixcode.com>
* camel-stream-filter.c (d): Kill debugging, as it causes lots of
evolution-mail spewage.
2000-11-07 Not Zed <NotZed@HelixCode.com>
* camel-mime-filter-bestenc.c (complete): Implement a complete()
function, now we need one.
(filter): Upgraded to match rfrc2045 properly. Checks also for
length of line and valid CRLF sequences.
(camel_mime_filter_bestenc_get_best_encoding): Do the work of
working out what is the best encoding given what we found about
the stream.
* camel-mime-part.c (camel_mime_part_encoding_to_string): Use a
lookup table to get the encoding naem, and add the binary type.
(camel_mime_part_encoding_from_string): Likewise for the reverse.
* camel-mime-part.h: Added the binary encoding type, see rfc2045.
* camel-mime-utils.c (header_param_list_format_append): Dont put a
space before ;'s in parameter lists, makes them more
readable/consistent.
* camel-mime-message.c (multipart_has_8bit_parts): Cleaned up the
old stuff, well removed it.
(camel_mime_message_set_best_encoding): Added another argument
that lets you select what you want to set the best of. i.e. for
smtp transport we only need 7 bit, and dont need to optimise the
charset (although of course, we should always).
(find_best_encoding): Implement this feature, if we are not
getting the best charset, use the one we have.
(best_encoding): Set the charset on the part appropriately. Sigh,
the interfaces for this are nonexistant.
(find_best_encoding): Tell the bestenc filter that lf should be
treated as crlf for the purposes of determining encodings.
2000-11-06 Not Zed <NotZed@HelixCode.com>
* camel-charset-map.c (camel_charset_init): Init function for an
iterative charset determinator.
(camel_charset_step): Iterate another buffer.
(camel_charset_mask): Removed, since it couldn't have worked.
(camel_charset_best): Use the iterative interface to do the work.
(camel_charset_best_name): Get the best name for a charset so far.
* camel-mime-filter-bestenc.c: New class, a stream
filter that can be used to memory-efficiently determine the best
encoding and/or charset to use for a given stream of bytes.
* Makefile.am (libcamelinclude_HEADERS): Added stream-null*.
(libcamel_la_SOURCES): Added bestenc*
* camel-stream-null.c: New class, a null-stream, that always
succeeds, and never has any contents.
* camel-stream.c: Minor pointless changes. Was going to do
something else but changed my mind. Added trivial default
implementations for all callbacks.
* camel-mime-message.h: Cleaned up some old cruft.
* camel-folder-summary.c (camel_folder_summary_format_address):
address_list_format() no longer encodes, so we dont need to decode
it.
* camel-address.c (camel_address_unformat): New function, attempts
to reverse the formatting process on display addresses.
(camel_address_length): New function to get the number of
addresses, without having to peek the structure.
* camel-mime-message.c (camel_mime_message_set_from): Fix a typo.
(camel_mime_message_finalize): Only unref from/reply_to if we have
it.
(camel_mime_message_set_recipients): New function - set the
recipients as a CamelInternetAddress. This function effectively
deprecates the older recipient setting functions.
(camel_mime_message_add_recipient): What the hell, i'll bite the
bullet. Terminate this function. The old api was ambiguious and
inefficient and didn't work right anyway.
(camel_mime_message_remove_recipient_address): And this one.
(camel_mime_message_remove_recipient_name): And this one too.
(camel_mime_message_set_recipients): If we set an empty header,
then remove it from the header list. Allow a null receipient
object to clear a header.
(camel_mime_message_set_from): Likewise, if setting an empty from
address.
(camel_mime_message_encode_8bit_parts): Eeek!!
camel_stream_mem_new_with_byte_array owns the byte_array we give
it, so make sure we dont free any of it!
(camel_mime_message_encode_8bit_parts): Infact, i'll just rewrite
the whole lot, its a bit of a mess. Should really rename it and
make it a little more useful too, lets see ...
(best_encoding): This has a string interface? Oh boy.
(camel_mime_message_foreach_part): New experimental function to
iterate over all message parts. Might not remain.
(camel_mime_message_has_8bit_parts): New implementation using
foreach_part. Fixed a couple of problems.
(find_best_encoding): New function, that finds the best encoding
for a given part (will probably be moved to camel-mime-part), and
also the best charset to use if it is a text part. Since one
affects the other it is a two pass process, but uses streams and
not memory to achieve this.
(camel_mime_message_set_best_encoding): Uses the function above to
configure an entire message for the best encoding possible given
transport constraints.
(camel_mime_message_encode_8bit_parts): Reimplemented to use the
function above to perform the work.
* camel-internet-address.c
(camel_internet_address_format_address): Dont put <> around a lone
address with no real name.
(camel_internet_address_encode_address): Similarly.
(internet_decode): Actually return the count of decoded addresses.
(internet_unformat): Implement the unformatting routine.
2000-11-05 Not Zed <NotZed@HelixCode.com>
* providers/smtp/camel-smtp-transport.c (_send_to): Changed to get
the internetaddress directly, rather than having to parse it
itself.
* camel-address.c (camel_address_format): Added a new function
which will format address, suitable for display.
(camel_address_cat): Concatentate 1 camel address onto another.
It is upto the caller to ensure the addresses are of compatible
types.
(camel_address_new_clone): New function to create a new address by
copying an existing one of the same type.
(camel_address_copy): New helper function to copy an address.
* camel-mime-message.h (struct _CamelMimeMessage): Removed cached
copy of date string.
(struct _CamelMimeMessage): Added date_received info.
* camel-mime-message.c (camel_mime_message_get_date_string):
Removed. Nothing uses it anyway, and it is redundant.
(camel_mime_message_finalize): No more date_str.
(camel_mime_message_init): No more date_str, initialise
date_received*
(write_to_stream): Change the check for a date header.
(process_header): No longer track the date_str.
(camel_mime_message_get_received_date): Removed. totally invalid
anyway.
(camel_mime_message_get_sent_date): Removed. Redundant. The only
'date' is the sent date, the received date is just made up.
(camel_mime_message_get_date): Args changed to be more consistent
with utility functions.
(camel_mime_message_get_date): Dont set the date when we're asked
for it (if its not set by the time its written, it'll be set
then).
(camel_mime_message_get_date_received): Actually do 'the right
thing' here, if we have a received header, use that to determine
the received date. And return the data in the same format as
get_date.
(camel_mime_message_set_from): Changed the api to better match
what we should be doing. Pass a camelinternetaddress, etc.
(camel_mime_message_set_reply_to): Cahnged similarly to take an
internetaddress.
(camel_mime_message_get_reply_to): Likewise.
(camel_mime_message_finalize): Unref the from/reply_to objects.
(format_address): Removed, no longer needed.
(process_header): Changed to store the from/reply_to as
internetaddress's.
(write_to_stream): Set the from header directly to empty, if we
dont have one. Maybe we should just abort, and/or create one
based on the current user.
* camel-mime-utils.c (header_address_list_format): Renamed to
header_address_list_encode, which is what it is actually doing.
(header_address_list_format_append): Similarly.
(encoding_map[]): Removed, no longer used.
(header_address_list_encode_append): Take another arg, do we
encode the address (for internet), or not (for display - utf8
only).
(header_address_list_format): Re-added this function, but now it
generates a display version only. Surprise surprise, that is all
anythign needs to generate anyway. Sigh.
* camel-internet-address.c (camel_internet_address_get): Return
false if we get an invalid index only.
(camel_internet_address_encode_address): Helper function to encode
a single address for mailing.
(internet_encode): Use the above function to format it.
(camel_internet_address_format_address): Format a single address
for display.
(internet_format): Implement the display version.
(camel_internet_address_class_init): Init the internet_format
virtual function.
(internet_cat): Implement virtual function to concatenate
addresses.
* camel-folder-summary.c
(camel_folder_summary_info_new_from_header): new function, only
build the summary info, dont add it.
(camel_folder_summary_info_new_from_parser): Likewise, for new
info from parser.
(camel_folder_summary_add_from_parser): Cahnged to call function
above to build info.
(camel_folder_summary_add_from_header): Changed to call function
above, to build info.
(camel_folder_summary_info_free): New function to free the summary
message info.
(camel_folder_summary_clear): Changed to clal above to free info.
(camel_folder_summary_remove): Likewise.
(camel_folder_summary_add): Cleaned up the clashing uid
re-assignment logic a little bit.
(camel_folder_summary_decode_uint32): Fixed a typo, 01 != -1.
(camel_folder_summary_decode_time_t): Return -1 on error.
(camel_folder_summary_encode_off_t): New function to encode an
off_t type.
(camel_folder_summary_decode_off_t): And likewise for the reverse.
(CAMEL_FOLDER_SUMMARY_VERSION): Bumped the summary version, since
we're now encoding time/off_t's right.
(summary_header_save): Use time_t encoder to save the timestamp.
(summary_header_load): Likewise for decoding the timestamp.
(content_info_load): Decode off_t types directly, now we can.
(content_info_save): And likewise for encoding.
(camel_folder_summary_add_from_message): New function, create a
summary item from an existing message and add it.
(camel_folder_summary_info_new_from_message): New function, create
a summary item from an existing message.
(summary_build_content_info_message): New function to do the dirty
work of building the conent info/indexing, from a message source.
(format_recipients): Format an internetaddress suitable for the
summary.
(message_info_new_from_message): Build a new summary item from a
mime message.
(content_info_new_from_message): Build a new conent info from a
mime part.
(camel_folder_summary_class_init): Init the new class functions.
(message_info_new_from_message): Fixed for message api change.
Added documentation to the functions.
2000-11-03 Radek Doulik <rodo@helixcode.com>
* camel-mime-utils.c (header_msgid_generate): new function,
generates simple message/content id
2000-11-04 Not Zed <NotZed@HelixCode.com>
* camel-mime-part-utils.c
(camel_mime_part_construct_content_from_parser): Set the
preface/postface from the parser into the multipart object.
* camel-multipart.c (camel_multipart_set_postface): Function to
set the postface text on a multipart.
(camel_multipart_set_preface): Similarly for preface text.
* camel-mime-parser.c (folder_scan_content): If we scan until a
boundary, then we do not include the \n that starts the boundary
line in the content.
(struct _header_scan_stack): Added a ByteArray to store the
multipart pre/post-text as we're scanning.
(folder_pull_part): Free pre/posttext if they are allocated.
(folder_scan_step): Build into the pre/posttext arrays as we
encounter data.
(camel_mime_parser_preface): REturn the multipart preface text, if
there is any scanned.
(camel_mime_parser_postface): Likewise for postface text.
(byte_array_to_string): helper function for above.
* providers/mbox/camel-mbox-folder.c (mbox_append_message): Change
the from line to be "\nFrom ..." always, so no need to
check/append a \n to messages.
(mbox_append_message): Open the output stream with append mode
[assuming this is more efficient than seeking to the end]
And dont prepend \n on the From line if its the first in the
mbox.
(mbox_append_message): Pass the offset of the real start of the
"From " line when we perform the update (which may != 'seek')
* camel-mime-filter-charset.c (complete): Removed the terminating
NUL 'fix'.
* camel-stream-filter.c (do_read): Added some debug.
(do_flush): And here.
(do_write): And here too.
(do_write): ARGH!!! ARGH! Ok, so the filter stream was writing a
different number of bytes than the requester was asking it to
write (because of filtering, of course!). So instead of returning
the true number of written bytes, we'll return what they asked us
to write - unless there is an error in which case we return -1.
* camel-mime-utils.c (base64_encode_close): Sigh, forgot to make
it unsigned. I think this is actually a gcc bug as (48 >> 2)
somehow ended up negative, when it obviously should not, even if
the data load was signed.
2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
* camel-url.c: Undo my incorrect fix - I misunderstood danw -
sorry!
2000-11-03 Dan Winship <danw@helixcode.com>
* providers/pop3/camel-pop3-store.c (camel_pop3_store_expunge):
Unbreak this.
2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
* camel-url.c (camel_url_to_string): If show_pass, then base64 the
password before writing it to the output string.
(camel_url_new): Assume password has been base64 encoded and
decode accordingly.
2000-11-03 Dan Winship <danw@helixcode.com>
* camel-provider.h: Add an "url_flags" field to CamelProvider.
Move the CAMEL_SERVICE_URL_* defines here and remove the SERVICE_
part of the name.
* camel-service.h: Remove CAMEL_SERVICE_URL_* flags and
service->url_flags field.
* camel-service.c (check_url, get_path): Get URL flags from
service->provider, update for changed flag names.
* providers/*/camel-*-provider.c: Add URL flags to provider
structures.
* providers/*/camel-*-{store,transport}.c, camel-remote-store.c:
Remove service->url_flags initialization.
2000-11-02 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (get_folder_info): Quote
foldernames when sending to the IMAP server because the folder
name might contain spaces.
2000-11-02 Not Zed <NotZed@HelixCode.com>
* Merged in camel-incremental-branch.
2000-11-01 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-store.c (get_folder_info): Remove old
subbed folders from hash table after freeing them.
* providers/imap/camel-imap-folder.c (imap_get_full_name): Deal
correctly with namespace == ""
2000-11-01 Gediminas Paulauskas <menesis@delfi.lt>
* camel-charset-map.c, camel-charset-map-private.h: synced all charsets
with ones found in libunicode. Just include more "iso/*.h" and rebuild
...private.h with this.
2000-10-31 Dan Winship <danw@helixcode.com>
* camel-service.c (service_disconnect): Add a new argument, clean,
that says whether or not to try to disconnect cleanly.
* camel-remote-store.c (remote_send_string, remote_send_stream,
remote_recv_line): disconnect uncleanly on failure to prevent
infinite loops when providers would normally send commands from
disconnect(). Remove some unneeded CamelException goo.
* providers/smtp/camel-smtp-transport.c (smtp_disconnect):
* providers/pop3/camel-pop3-store.c (pop3_disconnect):
* providers/nntp/camel-nntp-store.c (nntp_store_disconnect):
* providers/imap/camel-imap-store.c (imap_disconnect): Don't send
QUIT/LOGOUT if !clean.
2000-10-30 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-auth.c: New file with code for IMAP
authentication mechanisms. (Currently just krb4, and without
integrity/privacy protection).
* providers/imap/Makefile.am: Add camel-imap-auth.[ch] and krb4
CFLAGS/LDFLAGS
* providers/imap/camel-imap-store.c (connect_to_server): Split out
from imap_connect. Just does the basic connect and CAPABILITY
check. Redo the CAPABILITY code more robustly.
(query_auth_types_connected): Do this right rather than punting to
query_auth_types_generic. Check for KERBEROS_V4 if compiled with
krb4 support.
(query_auth_types_generic): Mention KERBEROS_V4 if compiled with
krb4 support.
(imap_connect): Use connect_to_server().
* camel-mime-utils.c (base64_encode_step, base64_encode_close):
Take an additional argument, "break_lines", saying whether or not
to add '\n's to the output.
* camel-multipart.c (set_boundary):
* camel-mime-filter-basic.c (filter, complete): Update for base64
api change.
2000-10-30 Peter Williams <peterw@helixcode.com>
* providers/imap/camel-imap-store.c (unsubscribe_folder): Correct
parameters to g_hash_table_lookup_extended.
2000-10-29 Dan Winship <danw@helixcode.com>
Improved IMAP namespace handling: leave the namespace in the
folder names rather than constantly prepending it and stripping it
off. Also some subscription fixes.
* camel-store.c (camel_folder_info_build): Fix for the case where
@top isn't in @folders.
* providers/imap/camel-imap-folder.c (camel_imap_folder_new): Add
a "short_name" argument rather than figuring it out ourselves.
(imap_get_full_name): Implementation of CamelFolder::get_full_name
that strips off namespace so the user doesn't have to see it.
(imap_append_message, imap_copy_message_to, imap_move_message_to):
Use folder->full_name rather than calling
camel_imap_store_get_folder_path.
* providers/imap/camel-imap-utils.c (imap_parse_list_response):
Update this: make @flags a bitmask and @sep a char rather than a
string. Make all of the out arguments optional. Handle literals in
the server response.
* providers/imap/camel-imap-store.c (imap_connect): Do a better
job of getting the correct dir_sep for the namespace we're using.
Construct a base_url here that will be used by get_folder_info.
(camel_imap_store_folder_path): Removed
(imap_folder_exists): Add an argument to return the short name of
the folder (parsed out of the LIST response). Update for
imap_parse_list_response change.
(get_folder): Update for the various other changes.
(get_folder_info): Update for the various other changes. Be more
consistent about the returned layout: put everything underneath
the "namespace" directory, including INBOX, even if it doesn't
belong there. Don't destroy the list of subscribed folders until
we've actually gotten the new list.
(folder_subscribed, subscribe_folder, unsubscribe_folder): Use
folder_name directly rather than camel_imap_store_folder_Path.
* providers/imap/camel-imap-command.c (camel_imap_command): Update
for folder name changes.
2000-10-29 Dan Winship <danw@helixcode.com>
* camel.h: Remove md5-utils.h include since it's not part of Camel
any more.
* camel-charset-map.c: Kill some warnings.
* providers/nntp/camel-nntp-grouplist.c
(camel_nntp_get_grouplist_from_file, camel_nntp_grouplist_save):
Clean up warnings about time_t casts.
* providers/smtp/camel-smtp-transport.c: Remove unused md5-utils.h
include.
* providers/pop3/camel-pop3-store.c: Undefine the "_" macro
defined by krb4's des.h when compiling with krb support.
Fix md5-utils.h include.
2000-10-27 Dan Winship <danw@helixcode.com>
* camel-mime-utils.c (header_param_list_format_append): Only quote
Content-type parameters when the quoting is mandatory, and deal
with embedded quotes/backslashes when quoting.
2000-10-27 <jpr@helixcode.com>
* providers/pop3/Makefile.am: Tidy up build
* providers/smtp/Makefile.am: ditto
* Makefile.am: Move md5-utils.[hc] to e-util because the
addressbook is going to use md5 hashes for pilot syncing.
Maybe the calendar conduits as well because this is a good idea
Chris had.
2000-10-26 Kjartan Maraas <kmaraas@gnome.org>
* camel-exceptions-list.def: Add newline to kill warnings.
2000-10-25 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-store.c (get_folder_info): Fix folder
listing code infinite loop.
* camel-store.h: Add a "parent" field to CamelFolderInfo.
* camel-store.c (camel_folder_info_build): Deal with "parent"
(camel_store_folder_subscribed, camel_store_subscribe_folder,
camel_store_unsubscribe_folder): Add g_return_if_fails checking
that the folder supports subscriptions.
* providers/imap/camel-imap-store.c (folder_subscribed,
subscribe_folder, unsubscribe_folder): Remove "+ 1"s since the
mail subscribe UI won't prepend / to the folder names now.
(get_folder_info): Clear the "parent" field of the folderinfos
when removing an empty top level.
* providers/nntp/camel-nntp-store.c (nntp_store_folder_subscribed,
nntp_store_subscribe_folder, nntp_store_unsubscribe_folder):
Remove "+ 1"s since the mail subscribe UI won't prepend / to the
folder names now.
2000-10-24 Chris Toshok <toshok@helixcode.com>
* providers/imap/camel-imap-store.h: add subscribed_folders.
* providers/imap/camel-imap-store.c (camel_imap_store_class_init):
fill in vtable entries for subscription functions.
(camel_imap_store_finalize): new function, so we can free up our
subscribed_folders hashtable.
(camel_imap_store_init): set CAMEL_STORE_SUBSCRIPTIONS in the
CamelStore flags, and create our subscribed_folders hashtable.
(camel_imap_store_get_type): camel_imap_store_finalize is our
finalize function.
(get_folder_info): if we're looking at subscribed_only, clear out
the subscribed_folders hashtable, use LSUB instead of LIST, and
insert folder paths (prepended by their namespace if there is one)
into subscribed_folders. INBOX subscription support needs work,
since we always show it, regardless of it's subscribed state.
(folder_subscribed): new function. just look up the folder_path
in the hashtable.
(subscribe_folder): new function. use the imap SUBSCRIBE command,
and if successful add it to the hashtable.
(unsubscribe_folder): new function. use the imap UNSUBSCRIBE
command, and if successful remove it from the hashtable.
2000-10-24 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-store.c (get_folder_info): Fill in the
message_count and unread_message_count flags (if !fast).
2000-10-23 Dan Winship <danw@helixcode.com>
* camel-object.h: #include gnome-i18n.h (and gnome-defs.h since
the former depends on it.)
* *: Add lots of _() and N_().
2000-10-23 Chris Toshok <toshok@helixcode.com>
* providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
camel-nntp-types.h.
2000-10-23 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-command.c (imap_read_untagged): Fix a
"how could this have been working before" memory overrun bug
found by Vlad.
* camel-op-queue.[ch], camel-thread-proxy.[ch]: These should have
gone away a long time ago.
2000-10-20 Chris Toshok <toshok@helixcode.com>
* providers/Makefile.am (SUBDIRS): re-enable the nntp provider.
2000-10-20 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-store.c (build_folder_info): add
function to build a tree from the nntp group names (using '.' as a
heirarchy separator.) #ifdefed INFO_AS_TREE only.
(build_folder_info_from_grouplist): if INFO_AS_TREE is selected,
call build_folder_info instead of appending a new CamelFolderInfo
to our list.
(ensure_news_dir_exists): use e_mkdir_hier instead of failing if a
parent directory (~/evolution/news generally) isn't there.
2000-10-19 Chris Toshok <toshok@helixcode.com>
* camel-folder-search.c: #include <sys/types.h> before <regex.h>
2000-10-19 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-utils.c (imap_parse_list_response):
Fix a bug with "INBOX" (or anything else with NIL hierarchy
separator) as the namespace.
* providers/imap/camel-imap-folder.c (imap_refresh_info): Emit
message_changed and folder_changed as appropriate.
2000-10-19 Dan Winship <danw@helixcode.com>
* camel-folder.c (camel_folder_refresh_info): Update comment here
so refresh_info isn't just for reconnects any more. Make the
default implementation a no-op rather than an error.
* providers/nntp/camel-nntp-folder.c: Move refresh_info impl into
camel_nntp_folder_new, since it would have leaked memory and not
done anything useful if it was called later.
* providers/mbox/camel-mbox-folder.c: Remove no-longer-necessary
refresh_info impl.
* providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
Update imap_folder->exists, but don't actually load the new
messages. This is a temporary workaround to deal with the IMAP
provider stealing the message list focus at annoying times.
(imap_copy_message_to, imap_move_message_to): Emit a
folder_changed by hand, for now.
2000-10-19 Ettore Perazzoli <ettore@helixcode.com>
* providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
`camel-imap-stream.h'.
* Makefile.am (libcamelinclude_HEADERS): Add `camel-charset-map.h'
and `camel-charset-map-private.h'.
2000-10-18 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-part.c (camel_mime_part_set_description): The correct
fix this time - the description should be encoded here and not in
the camel-medium layer.
2000-10-30 Not Zed <NotZed@HelixCode.com>
* camel-folder.c (camel_folder_change_info_add_update): Fixed the
changeset logic, which was completely wrong.
2000-10-27 Not Zed <NotZed@HelixCode.com>
* camel-mime-utils.c (quoted_encode_step): Removed is_blank() stuff.
(header_decode_init): When we set the 'space' bit, dont clear all
the others.
(quoted_encode): Put back the safemask. Yes we totally need it,
see rfc 2047 section 5, parts (1) and (3).
(CHARS_PSPECIAL): Remove '=' and '_' from the list of allowed
characters (this is an allowed list, not a not-allowed list, like
the ESPECIAL).
(camel_mime_special_table): Updated for fixes to definitions.
(CHARS_ESPECIAL): Added '_' to list of characters that should be
encoded.
2000-10-26 Not Zed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
Use the new camel_folder_change_info_* stuff to build the update
diff, rather than doing it ourselves.
* camel-folder.c (camel_folder_change_info_add_source): Add a
'source' list, used to create change lists.
(camel_folder_change_info_add_source_list): Add a list of uid's,
convenience function.
(camel_folder_change_info_add_update): Add a uid to the list of
uid's in the new updated list.
(camel_folder_change_info_add_update_list): Add a bunch of uid's
at once for the same purpose.
(camel_folder_change_info_build_diff): Take the source list, the
update list, and find the differences, building on the added or
removed list as appropriate.
2000-10-20 Not Zed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-summary.c (removed_uids): REnamed from
add_uid.
(camel_mbox_summary_update): Oops, fix the reversed logic for
determining the uid changesets.
* camel-folder.c (message_changed): Oops, we want to change the
uid, not add it.
2000-10-19 Not Zed <NotZed@HelixCode.com>
* providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Added a
change list argument, and add expunged uid's to it.
* providers/mh/camel-mh-folder.c (mh_init): Setup the change list.
(mh_finalize): And free it.
(mh_sync): Track changes, and send a folder_changed signal as
appropriate.
(mh_expunge): Likewise.
(mh_append_message): Add the new uid to the change list and
trigger a folder_changed event.
* providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
Setup a mbox list of changes structure.
(mbox_finalize): And free it.
(mbox_expunge): Include the change list with the folder_changed
event, and clear it off.
(mbox_sync): And the same for when we are just syncing the folder.
(mbox_append_message): And do the same here, after we've updated
the folder.
* providers/mbox/camel-mbox-summary.c
(camel_mbox_summary_build_from): Use gmtime_r to get the time
thread-safely.
(camel_mbox_summary_sync): Added a changeinfo argument. Add any
removed or changed messages to the changelists as appropriate.
(camel_mbox_summary_update): Added a changeinfo argument.
Genereate a list of added/removed uid's based on the difference
before and after rebuilding the summary.
* camel-folder.c (camel_folder_change_info_new):
(camel_folder_change_info_add_uid):
(change_info_add_uid):
(camel_folder_change_info_remove_uid):
(camel_folder_change_info_change_uid):
(change_info_clear):
(camel_folder_change_info_clear):
(camel_folder_change_info_free):
(change_info_cat):
(camel_folder_change_info_cat): Bunch of utility functions for
working with change info lists.
(camel_folder_init): Init the change info list.
(camel_folder_finalize): And free it.
(thaw): Changed to pass through a list of changes, or to get the
changed message uids from the camelfolderchangeinfo struct, and
reset it.
(folder_changed): Add the changed lists to the frozen change list
if we are frozen.
(message_changed): Add the message to the changed list if we are
in the frozen state.
* camel-folder.h (CamelFolderChangeInfo): New structure to hold
information for the folder_changed event.
2000-10-18 Ettore Perazzoli <ettore@helixcode.com>
* camel-mime-filter-charset.c (complete): Put a zero at the start
of the outbuf.
2000-10-18 Not Zed <NotZed@HelixCode.com>
* camel-mime-part.c (add_header): No, we must not encode the
headers here. These interfaces ARE raw interfaces as they are
defined in camel_medium. Also removed a bogus/meaningless FIXME.
(set_header): Likewise here, we must not.
(process_header): Removed another bogus comment.
* camel-object.c (shared_is_of_type): Comment out the spitting of
a big warning when we're trying to determine types from code.
* providers/mbox/camel-mbox-summary.c
(message_info_new_from_parser): Only call ibex funcitons if we
have an index.
* providers/mh/camel-mh-summary.c (camel_mh_summary_add): Only
call ibex functions if we have an index.
(remove_summary): Likewise.
(camel_mh_summary_check): Likewise.
* providers/nntp/camel-nntp-store.c (nntp_store_get_folder):
get_folder -> flags argument.
* providers/vee/camel-vee-store.c (vee_get_folder): create->flags.
* providers/pop3/camel-pop3-store.c (get_folder): Changed create
-> flags.
* providers/imap/camel-imap-store.c (get_folder): Added flags
argument.
* providers/mh/camel-mh-folder.c (camel_mh_folder_new): Added
flags argument, and fixed code appropriately.
* providers/mh/camel-mh-store.c (get_folder): Added flags argument.
* camel-folder-search.c (message_body_contains): Perform a regex
match on the contents of messages. This wont quite work yet as
message contents are encoded when written to a stream.
(build_match_regex): Converts a number of strings into a regex
matching pattern, escaping special chars.
(match_message): match a single message from a folder, by uid.
Slow.
(search_body_contains): Changed to support matching where no index
is supplied. Matches are performed by retrieving message
contents, etc.
() WTF? camel should not be including any widget headers.
* providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
Added flags argument.
(mbox_refresh_info): Changed into a NOP, the refresh info code
moved into the new function.
(camel_mbox_folder_new): If we have an index requested, build one,
otherwise, remove an old one, or just dont do anything.
* providers/mbox/camel-mbox-store.c (get_folder): Changed create
to flags, changed code to suit.
* camel-store.c (camel_store_get_folder): Changed create to flags.
(get_folder_internal): And here.
(get_folder): And here too.
* camel-store.h (camel_store_get_folder): Change the create
argument to be a flags argument.
2000-10-17 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_refresh_info): Remove
cached info at the end of the summary when the folder shrinks
between sessions. Also remove an untrue comment.
(camel_imap_folder_new): Move the summary creation to after the
folder selection again, since it depends on the uidvalidity
having been set.
* providers/imap/camel-imap-store.c (get_folder): Fix up
summary_file to not include the namespace twice.
2000-10-17 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-part.c (set_header): Encode the header value.
(add_header): Same.
2000-10-17 Not Zed <NotZed@HelixCode.com>
* camel-mime-filter.c: Added some malloc check debugging stuff.
* camel-mime-parser.c
(struct _header_scan_state): Removed top_part, top_start, and
pending. I can't even remember why they were there, and they're
not used anymore.
* camel-mime-filter-basic.c (filter): Forgot to up the space here
too.
2000-10-14 Not Zed <NotZed@HelixCode.com>
* camel-mime-filter-basic.c (complete): Ok, so we hit a fixme, 3x
just wasn't enough for some sequences.
2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-command.c
(imap_read_response): Don't imap_next_word(respbuf + 2), instead
use imap_next_word(respbuf) or else we'll skip over the second
token.
2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-command.c
(camel_imap_response_extract): Don't free 'resp' as it doesn't
point to the beginning of the allocated data, instead free
response->untagged->pdata[i]. Also, if '*resp' is equal to a space
character, then set resp = imap_next_word (resp) rather than
expecting resp++ to work (there's a list broken IMAP daemons that
like to put extra spaces between tokens).
(imap_read_response): Don't expect 'respbuf+2' to be where the
untagged number response to start (see above fix for an
explanation).
2000-10-16 Chris Toshok <toshok@helixcode.com>
* camel-service.c (get_path): when using the construct (flags &
CAMEL_SERVICE_URL_NEED_*) make sure to do ((flags &
CAMEL_SERVICE_URL_NEED_*) == CAMEL_SERVICE_URL_NEED_*)
(check_url): same.
2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (imap_disconnect): Only send
the LOGOUT command if the store is connected.
(imap_connect): Set the 'connected' state to TRUE when we
successfully connect.
(get_folder_info): if (!topfi), 'topfi' was allocated but then
'fi' was set. I think Dan meant to set topfi since fi is an
uninitialized value at this point.
* providers/imap/camel-imap-command.c (imap_read_response): Check
for the untagged BYE response and set the 'connected' state to
FALSE if we receive the BYE response. Return NULL if we get a BYE
response.
2000-10-16 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-store.c (get_folder_info): Deal with
the possibility of not getting a LIST response back for the top
level.
2000-10-12 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-summary.c: Simple subclass of
CamelFolderSummary that also keeps a UIDVALIDITY value (and
doesn't, for the moment, build content info).
* providers/imap/camel-imap-folder.c:
(various): Use a CamelImapSummary to store/fetch summary info.
(camel_imap_folder_new): Take a path to a file to use for the
summary. Set the folder's permanent_flags correctly according to
the server response. Read in the summary (checking the
UIDVALIDITY) and update it if it's out of date.
(imap_refresh_info): Just fetch UIDs and flags. If the UIDs all
match, update the flags as needed and be done with it. Otherwise,
delete messages that have been expunged from the server and fetch
full summary info for any new messages.
(imap_sync): Save the summary to disk.
(imap_update_summary): Renamed from imap_get_summary_internal. Can
now be told to get summary for only a subset of messages. Use
camel-mime-utils functions rather than rolling our own header
parsing.
(imap_get_message_info_internal): Merged into imap_update_summary.
(imap_set_message_flags): Don't marked the message FOLDER_FLAGGED
if we're not actually changing the value of any of the flags.
(camel_imap_folder_changed): Deal with EXISTS rather than RECENT.
* providers/imap/camel-imap-store.c (imap_connect): Call
camel_session_get_storage_path and save the value.
(get_folder): Create a local directory to store summary
information and pass a summary file name to camel_imap_folder_new.
Don't call camel_folder_refresh_info from here any more since
camel_imap_folder_new does it again.
* providers/imap/camel-imap-command.c (camel_imap_command): Add a
special case to this to make it possible to get the repsonses from
a SELECT and still have store->current_folder be updated
correctly.
(imap_read_response): parse EXISTS rather than RECENT
* camel-session.c (camel_session_get_storage_path): Use
e_mkdir_hier.
* camel-folder-summary.c (camel_folder_summary_remove_index): New
function.
* camel-mime-utils.c (header_raw_append_parse): fix this.
(camel-mime-parser.c doesn't use this code because of the MEMPOOL
optimization, so nothing was ever actually calling it before.)
2000-10-11 Not Zed <NotZed@HelixCode.com>
* camel-mime-part.h (struct _CamelMimePart): Removed
temp_message_buffer, and content_input_stream fields which seem to
have come from nowhere, and are unused.
* camel-mime-utils.c: Added a note about touching this file.
Nobody is to touch it without asking me first. That goes for you
too Jeff.
(header_decode_text): In what way is this broken?
2000-10-10 Not Zed <NotZed@HelixCode.com>
* providers/imap/camel-imap-folder.c (imap_get_summary_internal):
Fix camel_summary_* function rename
(imap_get_message_info_internal): Likewise.
* camel-mime-parser.c (camel_mime_parser_finalise): Fixed a spelling mistake.
* camel-folder-summary.c (camel_summary_format_address): Uh, why
do we encode and then decode here ... sigh. This is not the way
to fix this.
(camel_folder_summary_format_address): Renamed to a proper name,
this was only supposed to be a private function.
(camel_folder_summary_format_string): Likewise. Oh i see why it
was made public, code reuse by cut & paste. Joy.
2000-10-11 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-store.c (nntp_store_unsubscribe_folder): remove the leading '/'.
(nntp_store_subscribe_folder): same.
(nntp_store_folder_subscribed): same.
2000-10-11 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_move_message_to): Quote
the mailbox name as it may contain spaces.
(imap_copy_message_to): Same.
2000-10-10 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-store.c
(build_folder_info_from_grouplist): fill in message_count and
unread_message_count properly.
* providers/nntp/camel-nntp-newsrc.h: reformat.
* providers/nntp/camel-nntp-grouplist.c
(camel_nntp_get_grouplist_from_file): remove spew.
* providers/nntp/camel-nntp-newsrc.c
(camel_nntp_newsrc_group_get_num_articles_read): new function.
(camel_nntp_newsrc_group_get_highest_article_read): robustification.
2000-10-10 Joe Shaw <joe@helixcode.com>
* providers/imap/camel-imap-store.c
(parse_list_response_as_folder_info): Check before dereferencing the
sep pointer.
2000-10-10 Jacob "Ulysses" Berkman <jacob@helixcode.com>
* camel-*.c: teach camel about "its" vs. "it's"
2000-10-09 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-store.c (finalize): write out the
newsrc.
(nntp_store_get_name): if @brief, just return host.
* providers/nntp/camel-nntp-newsrc.c: robustification and bug
fixes.
2000-10-06 Jeffrey Stedfast <fejj@helixcode.com>
* camel-folder-summary.c (camel_summary_format_address): Decode
the resulting string.
2000-10-06 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-grouplist.c: new file.
* providers/nntp/camel-nntp-grouplist.h: new file.
* providers/nntp/camel-nntp-types.h: new file.
2000-10-06 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-utils.c (quoted_encode): Fix so that we don't encode
every single char in the word. Also, do we need a safemask? I
don't see why we would.
(header_encode_string): Don't strip off the last char!!
2000-10-06 Chris Toshok <toshok@helixcode.com>
* providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
camel-nntp-grouplist.h
(libcamelnntp_la_SOURCES): add camel-nntp-grouplist.c
* providers/nntp/camel-nntp-provider.c: add our own hash functions
for nntp urls.
* providers/nntp/camel-nntp-newsrc.c
(camel_nntp_newsrc_group_is_subscribed): new function.
(camel_nntp_newsrc_subscribe_group): new function.
(camel_nntp_newsrc_unsubscribe_group): new function.
* providers/nntp/camel-nntp-newsrc.h: add prototypes for
_group_is_subscribed, _subscribe_group, and _unsubscribe_group.
* providers/nntp/camel-nntp-store.c
(build_folder_info_from_grouplist): new function.
(nntp_store_get_folder_info): add subscribed_only_parameter. if
it's FALSE, load the grouplist and call
build_folder_info_from_grouplist.
(nntp_store_folder_subscribed): implement.
(nntp_store_subscribe_folder): implement.
(nntp_store_unsubscribe_folder): implement.
(camel_nntp_store_init): add CAMEL_STORE_SUBSCRIPTIONS to the
store's flags.
* providers/mh/camel-mh-store.c (get_folder_info): add
subscribed_only parameter.
* providers/mbox/camel-mbox-store.c (get_folder_info): add
subscribed_only parameter.
* providers/imap/camel-imap-store.c (get_folder_info): add
subscribed_only parameter.
* camel-store.c (camel_store_supports_subscriptions): new function.
(camel_store_folder_subscribed): new function.
(camel_store_subscribe_folder): new function.
(camel_store_unsubscribe_folder): new function.
* camel-store.h: add prototypes and virtual functions for the
subscribe implementation. also, add a subscribed_only argument to
camel_store_get_folder_info.
2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-utils.c (header_address_list_format_append): Encode
the name part of the address and don't quote the name.
(header_decode_text): Rewrote from scratch, the old code was badly
broken.
2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-message.c (camel_mime_message_set_reply_to): Use the
camel_address_encode function again.
(camel_mime_message_set_from): Same.
2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-utils.c (quoted_encode_step): Modified to not encode
space chars in the middle of a line.
(isblank): New macro if we're not on a system with the GNU isblank
extension.
* camel-mime-message.c (camel_mime_message_set_from): Reversed my
changes, don't header_encode_phrase - it generates broken headers.
(camel_mime_message_set_reply_to): Same.
2000-10-04 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
revert to old method (only use XOVER if OVER is supported.)
* providers/nntp/camel-nntp-store.c
(camel_nntp_store_get_overview_fmt): handle the case where the
OVER extension isn't listed but LIST OVERVIEW.FMT works (again,
INN 2.2). enable the OVER extension in this case.
2000-10-04 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-utils.c (get_XOVER_headers): return a
gboolean so we can tell if this command worked. we can't key off
the OVER extension being present because at least one server (INN
2.2) doesn't report the OVER extension but implements the XOVER
command. This could of course just be because I'm a loser for
thinking they were related in the first place.
(camel_nntp_get_headers): always try XOVER first, and if it fails
revert to the slow method.
2000-10-04 Dan Winship <danw@helixcode.com>
* providers/mbox/camel-mbox-store.c (get_folder): Fix a case where
a variable was free'd and then possibly used in an error message.
2000-10-04 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-provider.c
(camel_provider_module_init): news: -> nntp:.
2000-10-04 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-store.c (nntp_store_get_folder_info):
use "nntp:" instead of "news:" since "news:" urls aren't supposed
to have host/user/port info in them. also, if there's a user
defined in the url, put it in the urls for our folders.
2000-10-04 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-auth.c (camel_nntp_auth_authenticate):
borrow some code from the imap provider to query the user for
their password, and pass the user/passwd to nntp. be extra
paranoid and zero out the password before freeing it.
* providers/nntp/camel-nntp-store.c (camel_nntp_store_init): add
ALLOW_USER/ALLOW_PASSWORD/ALLOW_AUTH to the url flags.
(nntp_store_query_auth_types_generic): return our list of
auth_types.
(nntp_store_query_auth_types_connected): broken, return same as in
query_auth_types_generic.
2000-10-04 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-store.c (imap_connect): IMAP4
(pre-rev1) doesn't support the 'LIST "" ""' idiom, so don't use
it. Just assume the dir_sep is '/'. Shrug.
2000-10-04 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-message.c (camel_mime_message_set_reply_to): Use
header_encode_phrase instead.
(camel_mime_message_set_from): Same.
2000-10-04 Not Zed <NotZed@HelixCode.com>
* camel-mime-utils.c (header_content_type_is): Handle the case
where ct != NULL, but type and subtype are, and also match that
against text/plain.
* camel-folder-summary.c: Bump summary file version.
(message_info_save): Save the size from the messageinfo.
(message_info_load): Load the size from the summary file.
(message_info_load): Fixed up the time_t saving/loading. There
was a reason the warning was left there ... obviously nobody could
read the comment "/* warnings, leave them here */", why do i even
bother.
(camel_folder_summary_decode_time_t): Decode a time_t value from
the summary file.
(camel_folder_summary_encode_time_t): Encode a time_t value to the
summary file.
2000-10-03 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-command.c (camel_imap_command): Quote
the mailbox name when sending a SELECT request otherwise mailboxes
with spaces in their names will cause problems.
* camel-mime-message.c (camel_mime_message_set_reply_to): encode
before setting.
(camel_mime_message_set_from): Same.
2000-10-03 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-command.c: New file containing
camel_imap_command and friends. Major camel_imap_command rewrite
to remove duplicated code, make the parsing of literals be
more safe/correct, deal with RECENT/EXPUNGE responses more
consistently, and make it possible to implement the AUTHENTICATE
command.
* providers/imap/camel-imap-utils.c (imap_parse_nstring): New
function, to parse an IMAP "nstring".
* providers/imap/camel-imap-store.c: Move command stuff to
camel-imap-command.c. Update for camel_imap_command changes.
* providers/imap/camel-imap-folder.c: Update for
camel_imap_command changes.
(imap_append_message): CRLF filter the message before sending it.
* providers/imap/Makefile.am: Add camel-imap-command.[ch], remove
camel-imap-stream.[ch] for now.
2000-10-02 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-message.c (camel_mime_message_has_8bit_parts): New
convenience function to determine if there are any 8bit mime parts
in a mime message.
(camel_mime_message_encode_8bit_parts): New convenience function
to recursively reencode all 8bit mime parts to either
quoted-printable or base64 depending on which would be the best
encoding for that part.
* providers/smtp/camel-smtp-transport.c (smtp_data): If the mime
message contains 8bit parts and the server doesn't support 8bit
transfers, reencode those parts before proceding with the send.
(smtp_mail): If the mime message contains 8bit parts and the
server supports the 8BITMIME extension to SMTP, notify the server
that we'll be sending it 8bit mime parts.
(_send_to): Find out if the message contains 8bit parts.
2000-10-02 Jeffrey Stedfast <fejj@helixcode.com>
* providers/smtp/camel-smtp-transport.c (_send_to): Use the
CamelInternetAddress parser.
(smtp_get_email_addr_from_text): deprecated.
2000-10-02 Dan Winship <danw@helixcode.com>
* camel-provider.h: Remove default_ports.
* camel-remote-store.c (remote_connect): Get default_port from
CamelRemoteStore rather than CamelProvider.
* providers/{imap,nntp,pop3}/camel-*-store.c: Initialize
CamelRemoteStore::default_port
* providers/*/camel-*-provider.c: Remove default_ports.
2000-10-02 Dan Winship <danw@helixcode.com>
* camel-folder.[ch]: Remove
camel_folder_{get,free}_subfolder_info, as we want to be able to
scan the whole subfolder tree without having to open any folders,
so this needs to be in CamelStore. Remove can_hold_folders and
can_hold_messages flags; things that don't hold messages are no
longer considered CamelFolders.
* camel-folder-summary.[ch]: Remove CamelFolderInfo stuff.
* camel-store.[ch]: Add camel_store_{get,free}_folder_info, as
well as camel_store_free_folder_info_full and ..._nop for default
implementations, and camel_folder_info_free and
camel_folder_info_build as convenience functions. Turn
CamelFolderInfo into a tree structure and also add an "url"
member.
* providers/*/camel-*-folder.c: Remove subfolder_info and can_hold
stuff.
* providers/*/camel-*-store.c: Add folder_info stuff.
* providers/imap/camel-imap-folder.c (imap_summary_free): Free the
summary elements with camel_message_info_free, not
camel_folder_info_free. Oops.
* providers/imap/camel-imap-utils.c: const poison
2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
* providers/smtp/camel-smtp-transport.c: Fixed some memory leaks.
(camel_smtp_transport_init): Initialize supports_8bit to FALSE.
(smtp_helo): If server supports 8bit, set supports_8bit to TRUE.
* camel-transport.h (struct _CamelTransport): Added variable
gboolean supports_8bit (we'll need this eventually? - see bugzilla
bug #53)
* providers/smtp/camel-smtp-transport.c
(smtp_get_email_addr_from_text): Ugh, no wonder people were
getting illegal seek warnings *sigh*. I guess I can only blame
myself for this one though :-(
2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
* providers/smtp/camel-smtp-transport.c (_send_to): Don't send the
recipient data through smtp_get_email_addr_from_text - this is a
complete waste. In fact, we don't want to have to use that
function ever.
* camel-internet-address.c, camel-address.c: Added some gtk-doc
comments.
2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-utils.c (header_encode_string): Make sure to add the
space char after an encoded word when the encoding is iso-8859-1.
2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_message): When
getting a literal string response, don't include the \r\n after
the closing } (as in: "... {798}\r\n...")
* providers/imap/camel-imap-stream.c (stream_read): Same.
2000-09-28 Not Zed <NotZed@HelixCode.com>
* camel-mime-utils.c (header_fold): New function to fold headers.
2000-09-27 Not Zed <NotZed@HelixCode.com>
* camel-mime-parser.c (folder_scan_header): If we had an empty
header, then it must be end of the headers too.
(folder_scan_init): No we dont need to init the outbuf with a nul
terminator.
* camel-folder-summary.c (camel_folder_summary_set_uid): New
function to reset the uid to a higher value.
* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
"something failed (yo!)" what sort of crap is this? Fixed all the
indenting again, what wanker keeps running stuff through indent?
(message_info_new): Check the uid we loaded off the disk, if it
existed already, assign a new one. If it didn't then make sure
the nextuid is higher.
* camel-charset-map.c: New file, used to build a large unicode
decoding mapping table, and use it to determine what is the
lowest charset a given word can be encoded with. Uses tables from
libunicode's source.
* camel-internet-address.c (internet_encode): Use
header_phrase_encode to properly encode the fullname, as required.
refixed indenting. Who keeps doing that?
(camel_internet_address_find_address): Changed fatal return/warnings
into assertions.
* camel-mime-utils.c (header_raw_append_parse): Check : explicitly
(removed from is_fieldname() macro).
(camel_mime_special_table): Changed to short, so we can represent
more bit types.
(quoted_encode): Take a mask of the safe chars for this encoding.
(header_address_decode): Removed a #warning that makes no sense
anymore.
(header_decode_date): Fixed the 'broken date' parser code, if it
ever decoded it it just threw away the result.
(header_encode_string): Use better charset matching for encoding
strings as well.
2000-08-31 Not Zed <NotZed@HelixCode.com>
* providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Save
the index if we do a sync.
(camel_mh_summary_check): Save the index here too. Probably.
2000-09-27 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-store.c (camel_imap_command_extended):
Return untagged data in a GPtrArray rather than a string, since it
saves processing time and is much easier to deal with for several
commands. Update for camel_imap_folder_changed change.
(camel_imap_fetch_command): Update for camel_imap_folder_changed
change.
(imap_connect, imap_folder_exists): Update for
camel_imap_command_extended change.
* providers/imap/camel-imap-folder.c
(imap_get_message_count_internal,
imap_get_subfolder_info_internal, imap_search_by_expression):
Update for camel_imap_command_extended change.
(imap_get_summary_internal, imap_get_message_info_internal): Use
camel_imap_fetch_command here now to get around the
camel_imap_command_extended change.
(camel_imap_folder_changed): turn expunged into a GArray of ints
rather than a GPtrArray of strings representing ints.
2000-09-26 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c
(imap_get_message_count_internal): Quote the folder name as it may
contain spaces.
(imap_get_subfolder_info_internal): Same.
* providers/imap/camel-imap-utils.c (imap_parse_list_response): Do
proper unquoting for folder names.
(func_get_current_date): Implemented.
* providers/imap/camel-imap-store.c
(imap_folder_exists): Quote the folder name as it may have spaces.
(imap_create): Same.
(check_current_folder): Same.
2000-09-22 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-folder.c
(imap_get_subfolder_info_internal): The root folder's name is "",
not the namespace.
(camel_imap_folder_new): constify folder_name.
* providers/imap/camel-imap-store.c (get_folder): Create the
folder with folder_name, not folder_path.
(camel_imap_command_preliminary): Don't free cmdid here.
2000-09-21 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-utils.c (imap_create_flag_list): New
function to convert Camel flags to an IMAP flag_list.
(imap_parse_flag_list): Contrariwise.
* providers/imap/camel-imap-store.c (camel_imap_command_*): Make
the @ret arg actually optional, as (mostly) documented.
(various): Don't pass "&result" to camel_imap_command_* if we're
just going to immediately free it. Don't record status if we're
not going to look at it.
* providers/imap/camel-imap-folder.c: Likewise.
(imap_summary_free): Use camel_folder_info_free.
(imap_sync): Use imap_create_flag_list. Clear
CAMEL_MESSAGE_FOLDER_FLAGGED after syncing so we don't keep
re-syncing.
(imap_append_message): Use imap_create_flag_list. Don't leak the
memstream if the append fails.
(imap_move_message_to): Use camel_folder_delete_message rather
than doing it by hand.
(imap_get_summary_internal, imap_get_message_info_internal): Use
imap_parse_flag_list and header_raw_clear.
(camel_imap_folder_changed): Use camel_message_info_free.
2000-09-21 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-store.c (get_folder_name): INBOX is
case-insensitive.
(get_root_folder_name): Make the root folder "" rather than "/".
(get_folder): Update for root folder name change.
(camel_imap_store_get_toplevel_dir): Removed. (Unused, unneeded.)
(camel_imap_store_folder_path): New function to turn a Camel
folder name into the corresponding namespaced IMAP path.
(imap_folder_exists): Make this take a store and a path rather
than a folder.
(imap_create): Likewise
(get_folder): Update for camel_imap_store_folder_path and other
changes.
(check_current_folder): Likewise.
* providers/imap/camel-imap-folder.c: Change a bunch of CamelStore
variables to CamelImapStore (and add a few more) to prevent excess
gratuitous casting. Use camel_imap_store_folder_path where
appropriate.
(camel_imap_folder_new): Update for root folder name change.
2000-09-19 Jeffrey Stedfast <fejj@helixcode.com>
* providers/smtp/camel-smtp-transport.c (smtp_data): Use the
linewrap filter to achieve full RFC0821 compliance.
* camel-mime-filter-linewrap.[c,h]: New mime-filter to word-wrap.
2000-09-19 Jeffrey Stedfast <fejj@helixcode.com>
* camel-internet-address.c (internet_encode): When encoding the
internet address, quote the name as the name may have commas or
any other token which may later confuse our address parser.
2000-09-19 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-folder.c
(imap_get_subfolder_info_internal): Fix the case where INBOX
isn't returned in the folder listing.
2000-09-19 Dan Winship <danw@helixcode.com>
* camel-folder.c: (init): Removed
(camel_folder_init, camel_folder_construct): New object init
function and public object constructor to replace the old init
method in a more Gtk-like fashion.
(get_parent_folder, camel_folder_get_parent_folder): Removed. No
CamelFolder subclass was ever setting the parent_folder member, no
code has ever needed to look at it, and fixing it would actually
be pretty hard.
(get_subfolder_info, camel_folder_get_subfolder_info): Renamed
from ..._names. Deals in CamelFolderInfo now.
(free_subfolder_info, camel_folder_free_subfolder_info): Likewise.
(get_subfolder, camel_folder_get_subfolder): Removed.
CamelFolderInfo contains the subfolder's full name, so this is
unnecessary now, and removing it lets us get rid of the
CamelFolder separator member, which is needed for the default
implementation of this function, but not otherwise needed for most
providers.
Also, lots of code style fixes.
* providers/*: Update CamelFolder subclasses for changes, although
none of them fill in the message counts in the CamelFolderInfo
yet.
2000-09-18 Christopher James Lahey <clahey@helixcode.com>
* camel-folder-search.c, camel-folder-search.h,
camel-remote-store.c, providers/imap/camel-imap-folder.c,
providers/imap/camel-imap-store.c: Fixed the #include lines to
deal properly with gal.
2000-09-17 Dan Winship <danw@helixcode.com>
* camel-folder-summary.h: update CamelFolderInfo
* camel-folder-summary.c (camel_folder_info_free): New function to
free the contents of a CamelFolderInfo
2000-09-15 Dan Winship <danw@helixcode.com>
* camel.c (camel_init): Set camel_verbose_debug to TRUE if
CAMEL_VERBOSE_DEBUG is set in the environment.
* camel-remote-store.c (remote_send_line, remote_recv_line): only
log if camel_verbose_debug is TRUE.
2000-09-14 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (get_folder): Don't use
dir_sep as top-level directory, use "/".
* providers/imap/camel-imap-folder.c (imap_expunge): Get rid of
unused variable.
2000-09-13 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_expunge): Don't look at
the response of the command. camel_imap_command_extended()
processes EXPUNGE responses itself, so if we do it here too we
remove twice as many summary items as we should.
2000-09-13 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (imap_folder_exists): Rewrote
to take a third argument (gboolean *selectable) so that we can
find out if the folder is selectable or not as we look to see if
it exists. Also, don't use EXAMINE because that will not work on
non-selectable folders, so use LIST instead.
(get_folder): Check to see if the folder exists even vefore
calling imap_create as this will save time. If the folder does
exist, find out if it's selectable. Moved the call to refresh_info
here.
* providers/imap/camel-imap-folder.c (imap_get_uids): Check for a
NULL summary.
(camel_imap_folder_new): Don't call refresh_info here - call it in
get_folder() because we don't know if this folder even exists on
the server yet! And even if it does, we don't know if it can hold
messages or not yet.
2000-09-12 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-parser.c (folder_scan_step): Make sure *datalength is
> 0 before calling camel_mime_filter_filter otherwise we will get
a segfault if the filter calls iconv().
2000-09-08 Christopher James Lahey <clahey@helixcode.com>
* providers/nntp/camel-nntp-auth.c,
providers/nntp/camel-nntp-auth.h: Fixed a warning.
2000-09-07 Dan Winship <danw@helixcode.com>
* camel-session.c (camel_session_get_storage_path): Make this not
leak.
2000-09-07 Dan Winship <danw@helixcode.com>
* camel-session.c (camel_session_new): Make this take a path to a
directory that Camel can use for its own nefarious purposes.
(camel_session_get_storage_path): New function to return a path
that a service can use for its own nefarious sub-purposes.
* camel-service.c (camel_service_get_path): New method (and
useful default implementation) to get a (relative) pathname
corresponding to the service.
2000-09-06 Dan Winship <danw@helixcode.com>
* providers/pop3/camel-pop3-store.c (connect_to_server): Make KPOP
work again.
2000-09-06 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-message.c (camel_mime_message_get_received_date):
Implemented (someone added these to camel-mime-message.h but never
implemented them!!) - though it may not be right.
(camel_mime_message_get_sent_date): Same.
2000-09-05 Dan Winship <danw@helixcode.com>
* camel-mime-part.c (camel_mime_part_get_filename): If a MIME part
has no Content-Disposition, but does have a "name" on the
Content-Type, return that as the filename.
(process_header): strstrip the Content-Description
2000-09-05 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-utils.c (get_OVER_headers): care about
response code.
(get_HEAD_headers): same.
(camel_nntp_get_headers): same.
* providers/nntp/camel-nntp-store.h: get rid of
CAMEL_NNTP_OK/ERR/FAIL.
* providers/nntp/camel-nntp-store.c
(camel_nntp_store_get_extensions): take CamelException arg and
pass along to camel_nntp_command.
(camel_nntp_store_get_overview_fmt): same.
(nntp_store_connect): convert to using constants in
camel-nntp-resp-codes.h
(nntp_store_get_folder): make use of camel_nntp_folder_new.
(camel_nntp_command_send_recv): new function to deal with auth
challenge.
(camel_nntp_command): split out most of this function into
camel_nntp_command_send_recv. also, return the actual response
code instead of CAMEL_NNTP_OK/ERR/FAIL.
* providers/nntp/camel-nntp-resp-codes.h: new file.
* providers/nntp/camel-nntp-folder.h: prototype for
camel_nntp_folder_new.
* providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): new
convenience function.
(nntp_folder_get_message): care more about the actual response
code.
* providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
camel-nntp-auth.c.
(libcamelnntpinclude_HEADERS): add camel-nntp-auth.h.
* providers/nntp/camel-nntp-auth.h: new file.
* providers/nntp/camel-nntp-auth.c: new file.
2000-09-05 Peter Williams <peterw@helixcode.com>
* providers/imap/camel-imap-store.c (imap_folder_exists): Don't free the
result on error; the exception will have the relevant info.
* providers/imap/camel-imap-folder.c (camel_imap_folder_new): Check for
exceptions here.
* providers/imap/camel-imap-store.c (imap_connect): Check the exception
on the refresh_folders call.
* providers/imap/camel-imap-store.h: Clean up some now-unused fields.
* camel.c (camel_init): Call unicode_init again, now that libunicode
will not initialize itself twice.
2000-09-02 Lauris Kaplinski <lauris@helixcode.com>
* camel-folder-search (search_header_contains): Use e_utf8_strstrcase
2000-09-01 Christopher James Lahey <clahey@helixcode.com>
* providers/imap/camel-imap-utils.c: Removed some unused
functions.
2000-09-01 Peter Williams <peterw@helixcode.com>
* providers/nntp/camel-nntp-store.c (camel_nntp_command): Initialize
the statically-allocated CamelException so that it doesn't contain
junk data that camel_exception_set() may try to free.
(camel_nntp_store_get_extensions): Same.
(camel_nntp_store_get_overview_fmt): Same.
* providers/pop3/camel-pop3-store.c (camel_pop3_command): Typo
fix (if (*ret) -> if (ret)).
* providers/pop3/camel-pop3-store.c (pop3_connect): Set the
port # back to what was specified ASAP, so that the hash of
the URL doesn't change (which causes a failure in
service_cache_remove that leads to a segfault).
* providers/imap/camel-imap-store.c (imap_connect): Clear the
exception after a failed LOGIN so that it doesn't pass through
to the upper level and make mail think that the login failed.
* providers/pop3/camel-pop3-store.c (pop3_connect): As above.
2000-08-31 Peter Williams <peterw@helixcode.com>
* providers/pop3/camel-pop3-store.c (camel_pop3_store_get_type):
Implement POP3 with the CamelRemoteStore now.
(connect_to_server): Hack this a bit to get KPOP to work. Obey
the new connection semantics of the remote store (implicitly).
(query_auth_types_connected): Clear exceptions after attempts
to connect; the code at the bottom will catch hard errors.
Use camel_service_connect.
(camel_pop3_command): Take a CamelException; now, when an error
occurs, ret is set to NULL and the exception passes back the
appropriate information.
(pop3_get_response): Same as above.
(pop3_try_authenticate): Give camel_pop3_command its exception
and handle it properly.
(pop3_connect): Call the parent classfuncs. Don't disconnect
on error (done for us).
* providers/pop3/camel-pop3-folder.c: Obey the camel_pop3_command
semantics.
* camel-remote-store.c (remote_query_auth_types_connected): Don't
warn; just return NULL.
(remote_query_auth_types_generic): Same.
(remote_send_string): Filter out passwords in debugging output.
* providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Also
set the ALLOW_AUTH flag.
* providers/imap/camel-imap-store.c (camel_imap_store_init): Same.
2000-08-31 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-store.c (camel_nntp_store_class_init):
remove get_folder_name.
(nntp_store_get_folder_name): remove.
2000-08-31 Lauris Kaplinski <lauris@helixcode.com>
* camel-mime-part.c (write_to-stream): Use filter only if we have one
2000-08-31 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-utils.c (get_OVER_headers): use
camel_remote_store_recv_line.
* providers/nntp/camel-nntp-folder.c (nntp_folder_get_message):
use camel_remote_store_recv_line to build message. also, free our
buffer so we don't leak like mad.
* providers/nntp/camel-nntp-store.c:
(camel_nntp_store_get_additional_data) remove.
(camel_nntp_store_get_extensions): use
camel_remote_store_recv_line.
(camel_nntp_store_get_overview_fmt): same. also, don't rely on
_get_additional_data anymore since it's easier to parse without.
(camel_nntp_command): use camel_remote_store_send_string and
camel_remote_store_recv_line.
* providers/nntp/camel-nntp-store.h: CamelRemoteStore is the
parent class now. remove istream/ostream since CamelRemoteStore
takes care of that for us. also remove the prototype for
camel_nntp_store_get_additional_data.
* providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_write):
make sure to clear dirty bit.
(camel_nntp_newsrc_read_for_server): don't worry about continually
trying to open the file - if it fails we just return an
unpopulated .newsrc file.
2000-08-31 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-newsrc.c
(camel_nntp_newsrc_read_for_server): make this a bit more robust.
try to create an empty .newsrc file for the server if we can't
open it for reading. also, don't allocate everything until we've
opened the file.
* providers/nntp/camel-nntp-utils.c (get_OVER_headers): make use
of our overview field indices.
(camel_nntp_get_headers): only call get_OVER_headers if the
extension is present. warn if it's not - since get_HEAD_headers
needs work before it works.
* providers/nntp/camel-nntp-store.c
(camel_nntp_store_get_extensions): new function - query the server
for it's extensions.
(camel_nntp_store_get_overview_fmt): new function - query the
server for the overview format and build our table of the indices
we care about. support the "full" suffix on fields.
(nntp_store_connect): call camel_nntp_store_get_extensions and
camel_nntp_store_get_overview_fmt.
* providers/nntp/camel-nntp-store.h: add codes for extensions
found on news.mozilla.org. only one that we care about is OVER.
also, add CamelNNTPOverField and an enum of the overview fields
that we care about.
2000-08-31 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-utils.c (imap_translate_sexp):
Reimplemented. It should now work correctly for most possible
VFolder rules.
2000-08-31 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (camel_imap_command_extended):
Don't save any exceptions caused by camel_imap_folder_changed
(camel_imap_fetch_command): Same.
* providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
Using a new way of calculating the first recent message that seems
more accurate. Also added code to make sure we don't accidently
add a duplicate summary.
2000-08-31 Not Zed <NotZed@HelixCode.com>
* camel-mime-part.c (write_to_stream): Use the proper type
checking function to check for text types.
(write_to_stream): If we have a charset on a text type that
isn't us-ascii or utf-8, then we need to reencode it, so add a
filter to do that too.
(write_to_stream): Fix some warnings/use the right constructor,
oops.
(write_to_stream): Rearrange the logic so it always does charset
conversion, and not just if we have a qp/base64 block.
* camel-mime-utils.c (append_latin1): New function - even though
its broken, we'll assume mailers send latin1 headers instead of
us-ascii. We just have to encode high chars into utf-8.
(header_decode_text): Call append_latin1 for appending unencoded
text segments.
(append_latin1): Do an additional mask for account for c's
undefined behaviour for sign extension whilst shifting right.
2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (camel_imap_fetch_command):
Rewrote to ignore strings that look like server responses until it
is sure that it has finished reading the literal string response.
2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
* camel-remote-store.c (remote_send_string): Don't wrap printed
strings in quotes, makes things messy
* providers/imap/camel-imap-folder.c (imap_get_message): Updated
to use the camel_imap_fetch_command
* providers/imap/camel-imap-stream.c (stream_read): Updated to use
camel_imap_fetch_command
* providers/imap/camel-imap-store.c (camel_imap_command_extended):
No longer handles FETCH requests so no longer needs to be
concerned with checking to make sure that server responses are
valid (they have to be).
(camel_imap_fetch_command): New convenience function that handles
all FETCH requests
2000-08-30 Peter Williams <peterw@helixcode.com>
* camel-remote-store.c (remote_connect): Unify with remote_post_connect.
(remote_disconnect): Unify with remote_pre_disconnect.
(camel_remote_store_class_init): Don't use the post_connect and
pre_disconnect classfuncs anymore ; they weren't especially useful.
* providers/imap/camel-imap-store.c (imap_connect): Use this again
instead of implementing post_connect.
(imap_disconnect): Analogous to above.
* camel-session.c (camel_session_get_service_connected): New function.
Like camel_session_get_service() but also connects to the service
if needed. camel_session_get_{store,transport} (defined in the header)
used this now, preventing annoying when-to-connect problems.
* camel-service.c (camel_service_new): Revert to the old behavior
of not connecting until told to do so. Otherwise doing auth
testing correctly is really hard.
(camel_service_connect): Fix behavior here (set the connected
flag).
(camel_service_disconnect): Unset the connected flag.
2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c: General cleanup / moving
stuff around to make things easier to follow.
2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
* camel-remote-store.c: Prevent exceptions from being overwritten
* providers/imap/camel-imap-folder.c (imap_expunge): Beautified
(imap_get_subfolder_names_internal): Removed old code as the
replacement code has now been tested and proven to work
2000-08-29 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-utils.c: Removed old code that will
never be needed again
* providers/imap/camel-imap-store.c: Removed old code for
try_connect - will never need this code
(slurp_response): Update to make sure we aren't falsely detecting
EXPUNGE flags
2000-08-29 Peter Williams <peterw@helixcode.com>
* camel-service.c (camel_service_connect): Uncomment this.
(camel_service_disconnect): Same.
* camel-remote-store.[ch]: New files. Abstract remote storages
(IMAP, POP3, NNTP) and hides the lower-level networky stuff.
* camel-service.c (camel_service_new): Take an extra argument, the
provider that created us, cause it's useful.
(camel_service_finalize): Unref our new provider member.
* camel-session.c (camel_session_get_service): Pass the proper number of
arguments to camel_service_new().
* camel-imap-store.c: Massive update: 1) use the CamelRemoteService to
make our life Very Easy (TM). 2) Change the semantics of all
camel_imap_command* functions to take exceptions, centralize tons of
duplicate code, and use the handy RemoteStore utility functions
* camel-imap-folder.c: Use the new semantics of camel_imap_command*
* camel-imap-stream.c: Same.
2000-08-29 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (camel_imap_command_extended):
Updated to check for EXPUNGE notifications
* providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
Updated to account for messages which have been expunged (now
takes a new arg, a GPtrArray of message id's that have been
expunged)
(imap_expunge): Updated (we may want to just use the code in
folder_changed now instead of doing our own summary
expunging...but that can be fixed later)
(imap_append_message): Updated.
(imap_copy_message_to): Updated.
(imap_move_message_to): Updated.
2000-08-28 Peter Williams <peterw@helixcode.com>
* camel-folder.c (camel_folder_refresh_info): New member function,
refresh_info, used for rereading folder state after its state has
somehow become unknown. Tries to preserve last-known status of
messages.
* providers/mbox/camel-mbox-folder.c (mbox_refresh_info): Implement
::refresh_info (split up ::init)
* providers/mbox/camel-mbox-store.c (get_folder): Call ::refresh_info.
* providers/imap/camel-imap-folder.c (camel_imap_folder_new): Call
::refresh_info once initialized.
(imap_refresh_info): New member function; reads the summary from
the server (used to be in camel_imap_folder_new; split out).
* providers/imap/camel-imap-store.c (imap_connect): Set
CamelService::connected a little early so that
camel_imap_command won't try to connect while already
connnecting.
(camel_imap_command*): Try to connect if not connected already.
* providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Same as above.
* providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Same
as above.
* providers/pop3/camel-pop3-store.c (pop3_connect): Set
CamelService::connected a little early so that
camel_pop3_command won't try to connect while already
connecting
(connect_to_server): Same.
* providers/nntp/camel-nntp-folder.c (nntp_folder_refresh_info): Same
as above.
2000-08-28 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_message): Fixed the
hack around quoted string responses - should now handle them
according to the specifications in the RFC
* providers/imap/camel-imap-stream.c (stream_read): Updated to
match the code currently used in camel-imap-folder.c
2000-08-28 Ettore Perazzoli <ettore@helixcode.com>
* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
Never ever free `tmpname' as it comes from `alloca()'!
2000-08-26 Ettore Perazzoli <ettore@helixcode.com>
* camel-mime-utils.c (header_decode_text): Use `g_free()', not
`free()', to free `decword'.
2000-08-25 Peter Williams <peterw@helixcode.com>
* camel.c (camel_init): Don't call unicode_init; code in e-util
will do it, and if unicode_init is called twice, you get an
infinite loop when looking up nonexistant encodings (patch
has been submitted to libunicode's maintainer).
* camel-provider.h: Add a new field, default_ports, which
helps the configuration code guess about how to make CamelURL's
from providers.
* providers/*/camel-*-provider.c: Specify default ports.
2000-08-25 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c
(imap_get_subfolder_names_internal): If the url path is "/" and
the folder path is "/", just LIST "" "*" (this should fix some
cyrus imapd problems). Also, INBOX is case insensitive so use
g_strcasecmp
2000-08-24 Lauris Kaplinski <lauris@helixcode.com>
* camel-folder-summary.c (summary_build_content_info):
Use UTF-8 as default
* camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
Use UTF-8 as default
* camel-mime-utils.c (rfc2047_decode_word): Use UTF-8
2000-08-17 Not Zed <NotZed@HelixCode.com>
* providers/mh/camel-mh-folder.c (mh_finalize): And here too.
* providers/mbox/camel-mbox-folder.c (mbox_finalize): Close index
on exit.
2000-08-23 Dan Winship <danw@helixcode.com>
* camel-mime-utils.c (header_address_list_format_append): put
commas between addresses.
2000-08-22 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-folder.c
(imap_protocol_get_summary_specifier): use BODY.PEEK, not BODY, so
we don't set the message \Seen.
2000-08-22 Christopher James Lahey <clahey@helixcode.com>
* providers/pop3/camel-pop3-store.c: Fixed a small warning.
2000-08-22 Peter Williams <peterw@helixcode.com>
* camel-service.c (camel_service_new): Connect automatically if the
URL is not empty.
(finalize): Disconnect automatically if connected.
(camel_service_query_auth_types): Split into two functions; one to
be called if we're connected to an actual server (_connected), one
to be called if we're just gauging the general authtypes supported
(_generic).
(is_connected): Remove.
* camel-store.c (camel_store_get_folder): Don't connect explicitly to
the service.
* providers/nntp/camel-nntp-store.c (query_auth_types_generic): Split
the query_auth_types function. Hook it up in _new.
(finalize): Don't try to disconnect here.
* providers/pop3/camel-pop3-store.c (query_auth_types_generic): Same.
(finalize): Don't try to disconnect here.
* providers/imap/camel-imap-store.c (query_auth_types_generic): Same.
(finalize): Don't try to disconnect here.
* providers/smtp/camel-smtp-transport.c (query_auth_types_generic): Split
the query_auth_types (dummy, in this case) function. Hook it up in _new.
(finalize): Don't try to disconnect here.
2000-08-21 JP Rosevear <jpr@helixcode.com>
* providers/nntp/camel-nntp-folder.c (nntp_folder_get_subfolder_names):
Make sure newsrc is not null
(nntp_folder_get_subfolder_names): ditto
* providers/nntp/camel-nntp-newsrc.c
(camel_nntp_newsrc_get_subscribed_group_names): Programming check
for newsrc == NULL
(camel_nntp_newsrc_get_all_group_names): ditto
(camel_nntp_newsrc_write_to_file): ditto
(camel_nntp_newsrc_write): ditto
2000-08-21 JP Rosevear <jpr@helixcode.com>
* providers/nntp/camel-nntp-store.c (camel_nntp_command):
Make sure respbuffer is not null before manipulating it.
If it is null, return CAMEL_NNTP_FAIL and a decent error
message.
2000-08-18 Peter Williams <peterw@helixcode.com>
* camel-internet-address.c (internet_encode): If the name is "" we
weren't outputting anything; output the address at least.
2000-08-16 Peter Williams <peterw@helixcode.com>
* camel-internet-address.c (internet_encode): Fix a leak when
name = "". It's a single-byte leak, but it's the little things
that count.
* camel-object.c (camel_type_lock_up): Don't leave the type
system locked when a bad unlock happens.
* providers/mbox/camel-mbox-store.c (get_folder): Fix a leak.
2000-08-15 Peter Williams <peterw@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_copy_message_to): Typo fix.
2000-08-14 Peter Williams <peterw@helixcode.com>
* camel-folder-search.c (search_get_sent_date): New search function;
returns the time_t when the message was sent.
(search_get_receive_date): Same for when it was received.
(search_get_current_date): Gets the current time for use with the
above two. Is this in the right place?
* camel-folder-search.h: Add the new functions above to the class.
2000-08-13 Dan Winship <danw@helixcode.com>
* providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): Add
camel-nntp-utils.h
* providers/imap/camel-imap-folder.c
(imap_get_subfolder_names_internal): do a strcasecmp rather than
just a strcmp when checking if a folder is "INBOX", since it is
a case-insensitive name.
2000-08-12 Dan Winship <danw@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_summary_internal):
Don't assume the FETCH results will come back in the order they
were requested.
(imap_get_subfolder_names_internal): Add "INBOX" to the list as
g_malloc'ed memory, not a static string.
2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c
(camel_imap_command_continuation): Now takes a char * parameter
rather than a stream
(camel_imap_command_continuation_with_stream): Same function as
above but takes a stream parameter instead
* providers/imap/camel-imap-folder.c (imap_append_message): Use
camel_imap_command_continuation_with_stream
2000-08-12 Dan Winship <danw@helixcode.com>
* providers/pop3/camel-pop3-store.c (pop3_try_authenticate): New
function to do one round of attempted authentication.
(pop3_connect): Move a bunch of code out into
pop3_try_authenticate and fix some bugs in the edge cases.
2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (query_auth_types): No longer
calls try_connect() to get authtypes
2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c
(camel_imap_command_continuation): Changed param order a bit and
fixed some logic
* providers/imap/camel-imap-folder.c (imap_append_message): Use
the new multi-transactional convenience functions
2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c
(camel_imap_command_preliminary): New convenience function for
multi-transactional commands (opening request)
(camel_imap_command_continuation): New convenience function for
multi-transactional commands (followup data)
2000-08-11 Christopher James Lahey <clahey@helixcode.com>
* providers/mh/camel-mh-folder.c: Fixed a warning.
2000-08-11 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-folder.c
(camel_nntp_folder_class_init): remove get_name and get_full_name
assignments, since the camel-folder.c implementation does what we
need.
2000-08-11 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-store.c
(camel_nntp_store_get_toplevel_dir): use g_get_home_dir, since
evolution_dir isn't available in the providers.
2000-08-11 Peter Williams <peterw@helixcode.com>
* camel-folder.c (thaw): Fix a bug where the message_changed
signal wasn't being emitted.
2000-08-11 Not Zed <NotZed@HelixCode.com>
* providers/mh/camel-mh-folder.c (mh_set_message_user_tag):
Implement.
(mh_get_message_user_tag): Implement.
* providers/mbox/camel-mbox-folder.c (mbox_get_message_user_tag):
(mbox_set_message_user_tag): Implement.
* camel-folder.c (move_message_to): Yay so lets fix an already
fixed fix, again.
(copy_message_to): and here too ... update for api change to append().
And removed another warning.
(camel_folder_set_message_user_tag): Routine to set message tags.
(camel_folder_get_message_user_tag): And accessor.
2000-08-10 Christopher James Lahey <clahey@helixcode.com>
* camel-folder-search.c, camel-folder-summary.c, camel-medium.c,
camel-mime-filter-charset.c, camel-mime-filter.c,
camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c,
camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c,
camel-movemail.c, camel-multipart.c, camel-object.c,
camel-stream-mem.c, providers/mbox/camel-mbox-folder.c,
providers/mbox/camel-mbox-summary.c,
providers/mh/camel-mh-folder.c,
providers/smtp/camel-smtp-transport.c: Fixed some warnings.
2000-08-11 Not Zed <NotZed@HelixCode.com>
* providers/vee/camel-vee-folder.c (vee_folder_build_folder): Free
the search properly.
(vee_folder_build): And here too.
2000-08-10 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
If we go over the max number of messages, don't keep requesting
new message summaries, just break.
2000-08-11 Not Zed <NotZed@HelixCode.com>
* camel-mime-parser.c (folder_scan_header): A better way to
compress leading whitespace. The code is probably invalid anyway,
I dont think it will work across buffer boundaries.
* providers/mbox/camel-mbox-folder.c (mbox_append_message): And
write out proper format From lines here too.
* providers/mbox/camel-mbox-summary.c
(camel_mbox_summary_build_from): New function to build a more
compatible mbox "From " line.
(camel_mbox_summary_sync): Write From lines in the proper format.
2000-08-10 Not Zed <NotZed@HelixCode.com>
* providers/mh/camel-mh-store.c (get_folder): Remove warnin g.
* providers/mbox/camel-mbox-store.c (xrename): Kill some warnings
with constification.
* providers/imap/camel-imap-folder.c (imap_append_message): Fixed
for append api change. Eek this routine seriously wastes memory.
* providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt.
(mh_append_message): Fix for api change, and include user flags
and tags in new message.
* providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix
for search api change.
* camel-folder.c (camel_folder_search_free): New function for
freeing search results.
(search_free): Changed my mind, implement a default that actually
does something. Free as to the old interface.
(camel_folder_append_message): Changed to accept a
camelmessageinfo rather than flags, which just doesn't have enough
info in it.
(copy_message_to): Change for append_message api change.
(move_message_to): Likewise.
* providers/mbox/camel-mbox-folder.c (mbox_search_free):
Implement.
(mbox_append_message): Fix for api change, and also copy user
flags/tags across to new summary.
* camel-folder-search.c (search_user_tag): A search expression
that returns the current use flag by name.
(camel_folder_search_free_result): New function to free the result
of a search.
* camel-folder-summary.c: Bump summary version.
(message_info_new):
(message_info_load):
(message_info_save):
(camel_message_info_dup_to):
(camel_message_info_free): Added support for arbitrary tag/value
pairs (CamelTag's).
(camel_tag_get):
(camel_tag_set):
(camel_tag_list_size):
(camel_tag_list_free): Operations for working with CamelTags.
2000-08-09 Peter Williams <peterw@helixcode.com>
* camel-store.c (camel_store_get_folder): Connect beforehand, if
necessary.
* providers/imap/camel-imap-store.c (camel_imap_store_init): Default
the dir_sep to "/" so that certain functions can safely assume that
dir_sep is valid (at least, nonnull).
2000-08-09 Ettore Perazzoli <ettore@helixcode.com>
* providers/nntp/camel-nntp-folder.c
(nntp_folder_set_message_flags): Get rid of an unused variable.
* providers/nntp/Makefile.am (INCLUDES): Fix includes so that we
don't use installed headers anymore. [I copied this over from the
IMAP provider, that does not seem to have this problem.]
2000-08-09 Not Zed <NotZed@HelixCode.com>
* camel-folder-search.c (camel_folder_search_execute_expression):
Reorder search result in summary order if we searched with a
summary.
2000-08-08 Dan Winship <danw@helixcode.com>
* camel-uid-cache.c: New code to keep an on-disk cache of what
UIDs have been seen in a folder.
* camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail
can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE
(you can work with mail directly without needing to copy it local).
* providers/*/camel-*-provider.c: Add flags as needed: imap and
mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is
just SOURCE.
* camel-mime-message.c (process_header): Add another subject
g_strstrip that fejj's earlier commit missed.
2000-08-08 Peter Williams <peterw@helixcode.com>
* camel-provider.h: Remove some GTK stuff that I missed.
* providers/imap/camel-imap-store.c (imap_noop): Turn this
back on with the new timeout interface in CamelSession.
* camel-session.[ch] (camel_session_register_timeout): New
interface for Camel to register timeouts. Basically the
GTK timeout interface is copied. We do this because Camel isn't
allowed to use GTK anymore.
2000-08-07 Not Zed <NotZed@HelixCode.com>
* providers/mh/camel-mh-folder.c (mh_append_message): Only retry
another uid if we had a name clash, otherwise fail.
2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c
(imap_get_subfolder_names_internal): If we are trying to get a
subfolder listing of the root folder, always make sure INBOX is
there...
* providers/imap/camel-imap-utils.c (imap_parse_list_response):
Check for NIL as a directory separator.
2000-08-07 Peter Williams <peterw@helixcode.com>
* providers/nntp/Makefile.am: Reorder the INCLUDES to pull
in the camel headers from the local source tree before
the ones in $(includedir). This was causing compile problems
because the installed, Gtk-based camel-object.h was included
before the uninstall Camel-based one.
2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip
all \n's from the expression
* string-utils.c (strip): New convenience function to strip
occurences of a single char from a string
* camel-mime-message.c (camel_mime_message_set_subject): Do a
g_strstrip on the subject so we can stop getting those annoying
leading spaces
2000-08-07 Dan Winship <danw@helixcode.com>
* camel-folder.c (camel_folder_free_deep): Fix this to not require
NULL-termination of the array.
2000-08-04 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (imap_connect): If we fail to
get a dir_sep, then supply the default of "/".
(get_folder): Undo changes by Peter
2000-08-04 Peter Williams <peterw@helixcode.com>
* providers/imap/camel-imap-store.c (get_folder): Prevent a coredump
when get_folder()ing from a store with dir_sep = NULL.
2000-08-04 Peter Williams <peterw@helixcode.com>
* camel-store.h: Include camel-object.h. Ettore said this wasn't
compiling.
2000-08-04 Not Zed <NotZed@HelixCode.com>
* camel-url.c (camel_url_set_protocol):
(camel_url_set_host):
(camel_url_set_path):
(camel_url_set_port): Url editing functions.
2000-08-04 Dan Winship <danw@helixcode.com>
* providers/pop3/camel-pop3-folder.c (pop3_set_message_flags):
(pop3_sync): Indexes into the flags array are message_number minus
1, not just message_number.
* providers/pop3/camel-pop3-store.c: add a debugging macro for
doing protocol tracing.
2000-08-03 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_new): Only
call imap_get_summary_internal if the folder can hold messages
* providers/nntp/camel-nntp-provider.c (camel_provider_module_init):
Initialize the service_cache for the news/nntp providers
2000-08-03 Peter Williams <peterw@helixcode.com>
* providers/nntp/Makefile.am (INCLUDES): Add -I$(top_srcdir) to
pull in libibex/ibex.h
2000-08-02 Not Zed <NotZed@HelixCode.com>
* providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Expunge
from the end, so the index isn't messed up when you remove a
message.
* providers/mh/camel-mh-folder.c (mh_append_message): Fix a bug
where it would never open an output file/uid.
* providers/mbox/camel-mbox-store.c (rename_folder):
Implementation for mbox as well.
* camel-store.c (camel_store_rename_folder): New method to rename folders.
(rename_folder): Default implementation.
* providers/mh/camel-mh-store.c (delete_folder): Implement this.
(rename_folder): Implement a rename operation.
2000-08-02 Dan Winship <danw@helixcode.com>
* providers/MH: Kill this. It doesn't have any code to do anything
the new mh provider doesn't do better.
* providers/Makefile.am: Remove reference to MH subdir, and
promote nntp to fully-supported status, since it does compile and
all.
* camel-mime-message.c (camel_mime_message_set_subject): Trim
trailing space from the subject. I've now seen replies from two
different people that tricked the threading code by (a) not having
References/In-Reply-To, and (b) adding an extra space to the end
of the subject line so the subject-based threading fails too. Who
writes these broken mailers anyway?
2000-08-01 Jeffrey Stedfast <fejj@helixcode.com>
* providers/smtp/camel-smtp-transport.c (smtp_helo): When forced
to use the IP, place it in square brackets.
* providers/imap/camel-imap-utils.c (imap_translate_sexp): New and
improved sexp parser. An honest try at using e-sexp is wrapped in
a #ifdef at the bottom of the file but is currently not used
* providers/imap/camel-imap-folder.c (imap_search_by_expression):
We want to do a UID SEARCH so we get UIDs back instead of sequence
numbers
2000-08-01 Not Zed <NotZed@HelixCode.com>
* providers/mh: New mh provider implementation.
* providers/Makefile.am (SUBDIRS): Added mh provider.
2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_message_info_internal):
Some IMAP servers don't wrap the UID in ()'s so don't depend on that
(imap_get_summary_internal): Same
* providers/imap/camel-imap-utils.c (free_sexp_node): Oops, forgot to
free node->function - not good.
2000-07-31 Peter Williams <peterw@helixcode.com>
* providers/vee/camel-vee-folder.c (vee_search_by_expression): Add
a NULL to the matches pointer array so that g_strfreev knows where
the end is.
2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-utils.c (imap_translate_sexp): New
convenience function to translate a Camel sexp into the equivalent
IMAP sexp.
* providers/imap/camel-imap-store.c: More places now use
imap_next_word
* providers/imap/camel-imap-folder.c (imap_search_by_expression):
Implemented initial version (this may or may not work quite right)
2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_expunge): Make sure
the third word/token (whatever) is "EXPUNGE" and not something
else like "EXISTS" or "RECENT". When removing the message from
the summary also make sure to free that data to avoid leakage.
Also make sure to subtract 1 from the 'id' since IMAP starts
at 1 and our summary starts at 0 :-)
2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (camel_imap_status): Cleaned
up a bit, now uses imap_next_word()
(camel_imap_command_extended): Now uses imap_next_word(). When
checking for RECENT, allow the first digit of the recent-count
be between 0 and 9 inclusive instead of exclusive.
* providers/imap/camel-imap-folder.c (imap_expunge): Optimized.
No longer will it need to reload the summary as it now instead
removes the appropriate message summaries from the cache.
(camel_imap_folder_changed): If recent == 0 then return. If
recent < 0 then just emit the folder_changed signal, don't reload
summaries.
2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c
(imap_get_message_count_internal): Get message count when STATUS
is not available.
(imap_init): folder->has_search_capability is required for IMAP so
should always be set to TRUE (is currently being set to FALSE as
I've not yet implemented SEARCH support).
(camel_imap_folder_changed): Seem to have fixed my optimization
hack
2000-07-28 Jon K Hellan <hellan@acm.org>
* providers/imap/camel-imap-store.h (CamelImapServerLevel): New
enum.
(CamelImapStore): Added server_level and has_status_capability
members.
* providers/imap/camel-imap-store.c (imap_connect): Detect
IMAP4REV1, IMAP4 and STATUS in capability response.
* providers/imap/camel-imap-folder.c
(imap_get_message_count_internal): Use STATUS only if server
supports it. TODO: Get message count when STATUS not supported.
(imap_get_message, imap_get_summary_internal,
imap_get_message_info_internal): Handle IMAP4 as well.
(imap_protocol_get_summary_specifier): New function: Make a data
item specifier for the header lines we need, appropriate to the
server level.
2000-07-27 Peter Williams <peterw@helixcode.com>
* camel-mime-utils.c (header_decode_lwsp): More
checks for end of string.
* providers/imap/camel-imap-store.c:
(imap_command_extended): Free the elements of our
array (huge mem leak)
* providers/imap/camel-imap-folder.c:
(summary_get_internal): Same as above.
2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
Fixed my routine to only fetch new headers, my IDs were off by 1
on the high end, so when it would fetch the last newly arrived
message it would fail and end up fetching all of the summaries
because of the corruption.
2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
* camel-url.c (camel_url_to_string): If the path doesn't begin
with a / and there is a host, prepend a / to the path.
2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/Makefile.am: Added camel-imap-utils.[c,h]
* providers/imap/camel-imap-utils.[c,h]: Utilities for parsing
server responses for use in both camel-imap-store.c and
camel-imap-folder.c
* providers/imap/camel-imap-folder.c (imap_get_summary_internal):
Free all the pointers in the headers array.
(imap_get_subfolder_names_internal): Updated to use
imap_parse_list_response
(imap_parse_subfolder_list): Removed in favor of
imap_parse_list_response
* providers/imap/camel-imap-store.c (camel_imap_command_extended):
Free all the pointers in the data array.
(imap_connect): Updated to use imap_parse_list_response and fixed
a leak
(folder_is_selectable): Updated.
2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_message_info): Now
uses a hash table for looking up message info rather than a linear
search :)
2000-07-27 Peter Williams <peterw@helixcode.com>
* providers/*/Makefile.am: Don't specify SUBDIRS =
[nothing]. Messes up distcheck.
2000-07-26 Peter Williams <peterw@helixcode.com>
* camel-mime-parser.c (folder_scan_init): Initialize
outbuf to be "" -- it's not guaranteed to be zeroed.
* camel-mime-utils.c (header_references_decode): Return
if the header is NULL -> or "" <-. Don't do our stupid
mailer trick if we point to \0.
(header_decode_quoted_string): Don't rip past end of
string!
2000-07-26 Dan Winship <danw@helixcode.com>
* camel-movemail.c (movemail_external): routine to call an
external movemail program.
(camel_movemail): Nuke return value, use movemail_external when
available and useful, and don't delete "dest" on errors, since
it might have started non-empty.
2000-07-26 Jeffrey Stedfast <fejj@helixcode.com>
* camel-url.c (camel_url_to_string): Should now always prepend a '/'
before the path if it doesn't already exist.
* providers/imap/camel-imap-folder.c: Fixed a few compiler warnings
2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the
real problem that Peter was running into.
2000-07-25 Dan Winship <danw@helixcode.com>
* camel-mime-message.c (write_to_stream): Don't add a Mime-Version
header to a message that already has one.
* camel-internet-address.c (internet_encode): Don't put <>s around
addresses with no name part.
2000-07-25 Peter Williams <peterw@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_expunge): Set
imap_folder->summary to NULL after calling imap_summary_free,
so we don't get stuck with a junk summary pointer. Should
we free it at all?
2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
Optimized to try and get the new message headers without reloading
the entire summary from scratch.
(imap_get_summary_internal): Will now sync() before attempting to
reload the summary so that flags are set in the reloaded summary
as well.
2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (get_folder): Updated to give
special attention to the root folder.
* providers/imap/camel-imap-folder.c
(imap_get_subfolder_names_internal): Updated to handle the root
folder
(imap_get_message_count_internal): return 0 if folder can't hold
messages
(camel_imap_folder_new): Change so that root folder gets special
attention and always gets can_hold_messages set to FALSE
2000-07-24 Dan Winship <danw@helixcode.com>
* camel-folder.c: Remove exceptions from a number of methods that
work on what ought to be static data: get_parent_folder,
get_parent_store, get_message_count, get_unread_message_count,
get_permanent_flags, get_message_flags, set_message_flags,
get_message_user_flag, set_message_user_flag, get_uids,
get_summary, get_subfolder_names. Turn camel_folder_delete_message
into a macro. (Mostly a pull-up from the camel-async branch.)
* providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder
changes
2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_message_info): Updated
to port easily to the new Camel API
(imap_init): Don't SELECT INBOX, we don't need to do that
2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_new):
Initialize the summary and subfolder listing.
(imap_summary_free): Now takes a GPtrArray arg rather than a
CamelImapFolder as it increases it's usefullness for free()'ing
temporary summaries.
(imap_get_message_count_internal): A new convenience function for
getting the actual message count on a server to be used by
imap_get_summary_internal)
(imap_get_message_count): Since the Camel API is on the move again,
the future version of this function will not be able to make a
call to the store, it must only access previously fetched data (thus
the creation of the _internal function)
(imap_get_subfolder_names_internal): Again, because the future version
of imap_get_subfolder_names will not take an exception, we must rename
this function which will be called by camel_imap_folder_new()
(imap_get_subfolder_names): We now return the previously collected
subfolder listing that the _internal function fetched previously
(imap_get_summary_internal): Again, same idea as the previous _internal
functions...
(imap_get_summary): Again... now returns a previously aquired summary
* providers/imap/camel-imap-store.c (imap_noop): This will hopefully
prevent the imap store from disconnecting.
(imap_connect): Modified to add a gtk timeout event that will call
imap_noop() every 10 minutes (we may want to change this time value)
(imap_disconnect): Modified to remove the NOOP timeout event from the
store.
(camel_imap_command_extended): Commented out the code that would try
and detect if the store was disconnected and then reconnect if it was
needed.
2000-07-24 Dan Winship <danw@helixcode.com>
* camel-folder.[ch]: Remove camel_folder_get_message_uid, which
was not used, and not implemented by any provider.
* providers/nntp/camel-nntp-folder.c: Remove get_message_uid
non-implementation.
* camel-folder-pt-proxy.[ch], camel-arg-collector.c,
camel-marshal-utils.[ch]: Bye bye bye.
* Makefile.am: remove reference to camel-arg-collector.c
2000-07-23 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (imap_disconnect): Made it a
little more forgiving. Also set current_folder to NULL as there is
no selected folder after a disconnect.
(stream_is_alive): Detects whether or not a socket is "alive"
(camel_imap_command_extended): Use stream_is_alive() to aid in the
detection of a disconnected state.
2000-07-22 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (get_folder): Clear
CamelExceptions when appropriate (eg when folder is marked as
\NoSelect). Still needs some cleanup and perhaps Dan will have a
better way of doing this as this seems like a messy way of
handling this.
* providers/imap/camel-imap-folder.c (imap_get_uids): Took out
some debug statements as they are no longer needed.
2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_subfolder_names):
Updated to not strip out subfolders that are marked as \NoSelect
because this will be correctly handled in store->get_folder from
now on.
* providers/imap/camel-imap-store.c (folder_is_selectable): New
convenience function for use in get_folder().
(parse_list_response): Now takes a char **flags argument which is
needed by folder_is_selectable().
(imap_connect): Updated to reflect changes to
parse_list_response().
2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-stream.c (stream_read): Updated with
some of the same fixes I've made to camel-imap-folder.c like
recalculating message part lengths.
* providers/imap/camel-imap-store.c (camel_imap_command_extended):
Rewrote the code to check for "* %d RECENT". Still needs to be
modified, but should no longer cause an infinite loop by detecting
mis-detecting RECENT messages.
2000-07-20 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_summary):
(imap_get_message_info): Oops. Fix UID parser to allow 0 and 9 to
be in the range of valid UID chars.
2000-07-20 Peter Williams <peterw@helixcode.com>
* camel-object.c (camel_object_unref): Add a new global mutex
'refcount' held when refcounting operations occur.
2000-07-19 Peter Williams <peterw@helixcode.com>
* camel-object.c (camel_type_lock_up): Correct the recursiveness;
the locklevel is stored as a private, so each thread has its own
idea of the locklevel. Thus one thread can relock, but a different
one will think that it's a level 0 and try to lock the type_system
mutex.
2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c: General cleanup working
towards getting Actions->Expunge working correctly.
* providers/imap/camel-imap-store.c
(cammel_imap_command_extended): Added code to look for "* %d
RECENT" and to emit the folder_changed signal if there are any
recent messages. Note: this is a hack and needs to be rewritten
badly.
2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_summary): If the
folder's message count is not the same as the number of summaries,
free the old summary and create a new summary.
2000-07-18 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c
(camel_imap_folder_class_init): Added in
imap_[g,s]et_message_user_flag() methods
(imap_get_message_info): Rewrote to use the more efficient way of
downloading summary information and also added a UID comparison so
that if the UID requested doesn't match the UID received, it
returns NULL. FIXME: When the mailer gets NULL when it requested
message info, it seems that it displays a row for that message and
when you try and select the blank row, it segfaults.
* providers/imap/camel-imap-store.c (get_folder): Oops, this
should not be checking against "/", it should be checking against
dir_sep.
* providers/imap/camel-imap-folder.c (imap_parse_subfolder_line):
Updated to trim out the leading namespace.
(imap_get_subfolder_names): Let the subfolder parser trim the
namespace off the folder name.
2000-07-17 Peter Williams <peterw@helixcode.com>
* camel-object.c (camel_type_lock_up): New function; the
Camel type_system lock is now fakey-recursive, being controlled
by a semaphore that goes up and down and is protected by another
lock. Theoretically all we need is the lock on the semaphore,
but this we catch exceptions "better" (by deadlocking).
(camel_type_lock_down): Corresponding to above.
(all functions): s,G_LOCK,camel_type_lock_up, etc.
2000-07-17 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (imap_disconnect): Send a
"LOGOUT" command.
* providers/imap/camel-imap-folder.c (imap_get_message): Hacks to
get IMAP code to work with CommunigatePro and MS Exchange (and any
other servers that send back a UID at the end of each FETCH inside
of the main body of the message part).
(imap_sync): Un-#if 0 the code that sets the flags on the IMAP
server for messages that have changed. Oops, don't mask with
DELETED to find out if the message has been answered ;-)
(imap_expunge): sync before expunging.
2000-07-16 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c: All SELECT calls now pass
a NULL folder argument to camel_imap_command_extended() since it's
not needed.
(imap_connect): Moved service_class->connect() to the point right
after a connection is established with the server rather than
waiting until the end of the function.
(camel_imap_command): Updated the documentation comment
(camel_imap_command_extended): Before sending a command, first
check to make sure we are connected; if we aren't, then reconnect.
Don't strncmp() command with "SELECT" as it's redundant.
* providers/imap/camel-imap-folder.c: All SELECT calls now pass
a NULL folder argument to camel_imap_command_extended() since it's
not needed. Also s/camel_imap_command/camel_imap_command_extended as
I will probably be doing away with camel_imap_command() or at least
only using it for LOGIN and similar commands where the server won't
notify us of any recent messages.
2000-07-15 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_new):
One last fix to get rid of hard-coded "/" directory separators
2000-07-14 Peter Williams <peterw@helixcode.com>
* camel-object.c : Implement 'events', which are suspiciously
like signals except without all the marshalling baggage, and
with quasi-thread-safety.
(camel_object_class_declare_event): New func.
(camel_object_hook_event): Ditto.
(camel_object_trigger_event): Ditto.
(obj_class_init): Declare the "finalize" event.
(obj_class_finalize): Free the hashtable of events->preps
(obj_finalize): Free the hashtable of events->hooklists
(camel_object_unref): Trigger the finalize event (ourselves,
to prevent massively unpleasant looping things.)
2000-07-14 Peter Williams <peterw@helixcode.com>
* camel-object.c (make_global_classfuncs): Change to return
a CamelObjectClass. Change parents to a GSList and free it
when done.
(camel_object_new): Don't allocate a classfuncs for every object;
merely give it a reference to the global_classfuncs. Convert
parents to a GSList and free it when done.
(camel_object_unref): Don't free the classfuncs. Free the parents
list, which is changed to a GSList.
2000-07-14 Jeffrey Stedfast <fejj@helixcode.com>
* string-utils.c (string_unquote): New convenience function
to unquote a string if it's encapsulated by "'s
* providers/imap/camel-imap-folder.c:
* providers/imap/camel-imap-store.c: Made the necessary changes
to stop using hard coded directory separators.
2000-07-13 Dan Winship <danw@helixcode.com>
* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
If the summary is for a smaller mbox, and rebuilding from the
last-known end position fails, try rebuilding from the beginning.
Deals with the case where the user edits the mbox and makes it
bigger, without adding new messages.
2000-07-13 Peter Williams <peterw@helixcode.com>
* camel-object.c: Rewritten to not be based on GtkObject,
but a tiny threadsafe ripoff thereof. Objects still cannot
be shared across threads, but ref/unref/destroy/new/etc
will work. Signals are not implemented because doing it
robustly would be a major pain in the butt, but class
functions are. There's a small demonstration that it doesn't
crash in ./temp-test.c: build it with ./make-test.sh.
* camel-stream.c, camel-seekable-stream.c, camel-stream-mem.c:
moved over to CamelObject. Proof of concept: two levels of
subclass and class functions, all working without coredumps.
To port to CamelObject:
- s,GTK_,CAMEL_,g in the cast checks
- s,gtk_type_new,camel_object_new,g
- s,GtkType,CamelType,g
- Change get_type function over to camel_type_declare
- instead of hooking to finalize function, it goes into the
type declaration.
- remove signals.
- instead of GTK_OBJECT(so)->klass, CAMEL_OBJECT_GET_CLASS(so)
- s,gtk_type_class,camel_type_get_global_classfuncs,g
- don't chain finalize handlers; it will be done for you
2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c:
* providers/imap/camel-imap-store.c: If a SELECT fails, set
imap_store->current_folder to NULL so a SELECT is forced before
any message/folder operations are requested. Also, because some
users don't use a namespace, make sure that if the url->path is
"/" we don't use it when creating the folder_path.
(camel_imap_command[_extended]): Since we allow the passing of
a NULL folder which we can use to bypass a forced SELECT, no need
to check for the individual commands that don't require a folder
to be selected.
2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c:
* providers/imap/camel-imap-store.c: Updated to use CAMEL_IMAP_OK,
CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and CAMEL_IMAP_FAIL rather than the
ones copied from the POP3 provider.
2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_summary): Oops.
If the number of messages in the folder is 0, don't fetch
summaries 1 thru 0, just return an empty summary.
(imap_copy_message_to): Fixed to use message UID and also send
the source folder as an arg to camel_imap_command rather than NULL.
(imap_move_message_to): Same.
(imap_init): If SELECT is successful, we need to set the current
folder to the one selected, this was causing problems with move/copy
2000-07-13 Dan Winship <danw@helixcode.com>
* camel-service.h: define a set of CAMEL_SERVICE_URL_ALLOW_* flags
parallel to the _NEED_* flags, and make the _NEED_* flags imply
the _ALLOW_* ones.
* providers/imap/camel-imap-store.c (camel_imap_store_init): imap
urls ALLOW_PATH
2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_summary): New
and improved approach to fetching an entire folder summary
that should be much much faster than the old way as it gets
the entire folder summary in 1 shot rather than requesting
message by message. As with the last update, this version
also only fetches the minimum number of header fields.
(imap_get_summary): Oops, forgot to free the temp
GPtrArray *headers
2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_summary): Don't
fetch the entire RFC822 header, just fetch the fields we want.
(imap_get_message_info): Same.
2000-07-13 Not Zed <NotZed@HelixCode.com>
* camel-mime-filter-basic.c (camel_mime_filter_basic_new_type):
Reset filter on setup.
(reset): When resetting qp encoding, set the state to -1, instead
of 0.
* camel-mime-utils.c (quoted_encode_step): Actually count the
characters output sofar (it never counted any). Bunch of other
fixes.
(quoted_encode_close): Also flush out final character, if there's
one.
2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
Chris forgot to add #include <e-util/e-util.h> to the source files
* providers/imap/camel-imap-store.c (imap_connect): Fixed Peter's
fix, we don't want to send a string to a %d.
2000-07-12 Christopher James Lahey <clahey@helixcode.com>
* camel-folder-search.c, providers/imap/camel-imap-store.c:
Changed from strstrcase to e_strstrcase.
* string-utils.c, string-utils.h: Removed strstrcase (in favor of
e_strstrcase in e-util/e-util.c.)
2000-07-12 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-folder.c
(nntp_folder_set_message_flags): get the article num out of our
uid and mark it read in the newsrc.
(nntp_folder_get_message): get the message id out of the uid to
fetch the article.
* providers/nntp/camel-nntp-utils.c (get_XOVER_headers): the uid
is now <article-num>,<messageid>
(get_HEAD_headers): same.
* camel-mime-parser.c (folder_scan_step): go to HSCAN_MESSAGE
state when ct->subtype is "news" as well as "rfc822". this makes
attachments of type "message/news" display properly.
2000-07-12 Dan Winship <danw@helixcode.com>
* camel-folder.c (camel_folder_free_deep,
camel_folder_free_shallow, camel_folder_free_nop): Useful default
implementations for free_{uids,subfolder_names,summary}.
(free_subfolder_names, free_uids): Make these g_warning-ing
default implementations.
* providers/*/camel-*-folder.c: Use the new functions where
appropriate, remove duplicated code.
2000-07-12 Peter Williams <peterw@helixcode.com>
* providers/imap/camel-imap-store.c (query_auth_types): Check for
NULL parameters when setting the exception so as to not crash on
Solaris (can't handle a %s passed NULL).
(imap_connect): Same.
2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
* providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use
mbox_set_message_flags () instead of setting the flags by hand. This
fixes the problem of the "message_changed" signal not being emitted
at the correct time.
* providers/imap/camel-imap-folder.c: "folder_changed" signals should
pass a third argument (which is ignored).
* camel-folder.c: Undo gtk signal emits done in set_flags and
expunge.
(move_message_to):
(copy_message_to): Create info as a const CamelMessageInfo
2000-07-12 Chris Toshok <toshok@helixcode.com>
* providers/nntp/Makefile.am: don't add test-newsrc to the build
since it needs libcamel (which isn't built at the time test-newsrc
needs linking.)
* providers/nntp/camel-nntp-utils.c (get_HEAD_headers): fill in
MessageInfo->message_id.
(get_XOVER_headers): same.
* providers/nntp/camel-nntp-folder.c (nntp_folder_init): move
summary loading here.
(nntp_folder_sync): summary/newsrc changes should be stored here.
put a comment to that effect.
(nntp_folder_set_message_flags): don't save the newsrc here.
(nntp_folder_get_uids): use g_ptr_array_index instead of the
cast/addition.
(nntp_folder_get_summary): no need to check if we should generate
the summary here. already done.
(nntp_folder_get_message_info): implement.
* providers/nntp/camel-nntp-store.c
(camel_nntp_store_get_toplevel_dir): use evolution_dir instead of
computing it ourselves.
(nntp_store_disconnect): call camel_nntp_newsrc_write.
(ensure_news_dir_exists): new function to create the news/<news
server> subdir.
(camel_nntp_store_class_init): hook up connect/disconnect and
finalize.
(nntp_store_connect): if ensure_news_dir_exists fails throw an
exception.
2000-07-12 Peter Williams <peterw@helixcode.com>
* camel-folder.c (camel_folder_set_message_flags): Emit a message_changed
signal once the flags are set on the message.
(camel_folder_set_user_flag): Ditto.
(camel_folder_expunge): Emit a folder_changed if no exception.
2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
* camel-stream.c: Use size_t and ssize_t for read/write methods
* providers/imap/camel-imap-folder.c (imap_set_message_flags):
Updated to emit the message_changed signal.
(imap_delete_message): Updated to use imap_set_message_flags ().
(imap_move_message_to): Updated to use imap_set_message_flags ()
and to emit the folder_changed signal on the destination folder.
(imap_copy_message_to): Updated to emit the folder_changed signal
on the destination folder.
(imap_append_message): Updated to emit the folder_changed signal
on the destination folder.
2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
* camel-folder.c (camel_folder_append_message): Now takes a
flags argument to specify the flags to be set on the message
since we might not necessarily want the flags to be wiped clean.
(move_message_to):
(copy_message_to): Updated to send a flags argument to
append_message (); currently sends the original message's flags.
* providers/mbox/camel-mbox-folder.c (mbox_append_message):
* providers/imap/camel-imap-folder.c (imap_append_message):
Updated.
2000-07-11 Dan Winship <danw@helixcode.com>
* camel-folder.c: Remove exceptions from a number of methods
that work on what ought to be static data: get_parent_folder,
get_parent_store, get_message_count, get_unread_message_count,
get_permanent_flags, get_message_flags, set_message_flags,
get_message_user_flag, set_message_user_flag, get_message_uid,
get_uids, get_summary, get_subfolder_names. Turn
camel_folder_delete_message into a macro.
* providers/{mbox,pop3,vee}: Update for CamelFolder changes
* providers/Makefile.am: Disable imap and nntp for now
2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_search_by_expression):
This shouldn't return NULL, it should return g_ptr_array_new ()
so the mailer gets what it expects.
2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
* camel-folder-summary.c (camel_folder_summary_decode_string):
Oops, an unsigned integer can never be < 0
2000-07-10 Dan Winship <danw@helixcode.com>
* providers/vee/camel-vee-folder.c (vee_search_by_expression):
Initialize a variable to make this not crash again. And fix a bug
so it actually does something.
2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
* camel-folder-summary.c: Cleaned up a bunch of compile warnings
2000-07-10 Dan Winship <danw@helixcode.com>
* providers/vee: kill more debugging messages
2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
* providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count):
* providers/vee/camel-vee-folder.c (vee_get_unread_message_count):
* providers/imap/camel-imap-folder.c (imap_get_unread_message_count):
Implemented.
* camel-folder.c (camel_folder_get_unread_message_count): New
convenience function to allow the mailer to query the number
of unread messages in a folder (for displaying message stats
in a folder tree?).
2000-07-09 Dan Winship <danw@helixcode.com>
* camel-mime-utils.c (header_references_dup): New function to copy
a header_references structure.
* camel-folder-summary.c (camel_message_info_dup_to): New function
to (deep) copy the data from one CamelMessageInfo into another.
(camel_message_info_free): And free the data.
* providers/vee/camel-vee-folder.c (vee_sync): Implement. (empty).
(vee_search_by_expression): belatedly update for
camel_folder_search change.
(vee_folder_build): belatedly update for camel_folder_search
change. Use camel_message_info_dup_to and camel_message_info_free
(in particular, so that we get message_id and references info so
vfolders can be threaded).
(vee_folder_build_folder): Ditto.
2000-07-08 Jeffrey Stedfast <fejj@helixcode.com>
* providers/nntp/camel-nntp-folder.c:
* providers/nntp/camel-nntp-utils.c:
* providers/nntp/camel-nntp-store.c: Update to reflect past changes
in the Camel API. Use gtk macro casts wherever possible and use glib's
memory functions instead of standard c's (since they are not
compatable)
* providers/smtp/camel-smtp-transport.c:
* providers/imap/camel-imap-store.c: Wrap debug print statements
in a macro
* providers/imap/camel-imap-stream.c (stream_read): Make sure
that we get up to and including the last \n of the mime part.
* providers/imap/camel-imap-folder.c (imap_get_message): Make sure
that we get up to and including the last \n of the mime part.
Wrap debug print statements in a macro.
* providers/imap/camel-imap-stream.c (stream_read): Only cache
the important data (aka the mime part requested and no extra
server response stuff)
2000-07-07 Dan Winship <danw@helixcode.com>
* camel-mime-utils.c (header_references_decode): Work around
In-Reply-To's with unquoted punctuation. So many broken mailers.
* camel-folder.c (camel_folder_search_by_expression): Make this
return a GPtrArray rather than a GList.
* camel-folder-search.c (camel_folder_search_execute_expression):
* providers/imap/camel-imap-folder.c (imap_search_by_expression):
* providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
* providers/nntp/camel-nntp-folder.c (nntp_search_by_expression):
Update to return a GPtrArray rather than a GList.
2000-07-07 Jeffrey Stedfast <fejj@helixcode.com>
* providers/smtp/camel-smtp-transport.c (esmtp_get_authtypes):
Fixed the parser to actually work
2000-07-06 Dan Winship <danw@helixcode.com>
* camel-mime-utils.c (header_references_decode): Make this deal
with the full RFC822 References/In-Reply-To format rather than
just the more-nicely-behaved RFC1036 version. (Needed to parse
In-Reply-To headers with extra junk in them.)
2000-07-06 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_summary): Parse for
more header information to allow message threading in IMAP.
(imap_get_message_info): Same.
* camel-folder-summary.c: Renamed summary_format_* to
camel_summary_format_* and moved them into public scope.
* providers/smtp/camel-smtp-transport.c (smtp_connect): Oops. Don't
pass port # as a string in the error code (if it fails to connect).
* providers/imap/camel-imap-folder.c (imap_append_message): Changed
over to camel_imap_command_extended as that was the source of the
problems - apparently appending replies with more than just 1 line.
2000-07-05 Dan Winship <danw@helixcode.com>
* camel-folder-search.c (search_header_contains): make header
matching case-insensitive
* camel-folder-summary.c:
* camel-session.c:
* providers/mbox/camel-mbox-folder.c:
* providers/mbox/camel-mbox-summary.c: Remove some non-error case
debugging-type messages.
2000-07-05 Ettore Perazzoli <ettore@helixcode.com>
* providers/mbox/camel-mbox-summary.c (d): Define to empty so that
we get rid of a ton of debugging messages.
2000-07-05 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-utils.h: Added prototype for uudecode_step
* camel-mime-utils.c (uudecode_step): Cleaned up some junk that
should have been cleaned up when debugging printf's were taken out.
2000-07-05 Ettore Perazzoli <ettore@helixcode.com>
* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
Update the X-Evolution: header even if the in-memory UID and the
saved UID are not the same. Otherwise mboxes with clashing UIDs
can never be fixed.
* camel-folder-summary.c
(camel_folder_summary_add_from_parser): Add the message to the
summary before doing any ibex stuff. In fact, this might also
have the side effect of reassigning the UID so it needs to be done
before we start using the UID.
* providers/mbox/camel-mbox-folder.c (mbox_append_message): Add
debugging message to keep track of the UIDs we add.
2000-07-05 Dan Winship <danw@helixcode.com>
* camel-folder-summary.c: Add "Cc" to summary and bump summary
version number.
* camel-folder-search.c (search_header_contains): make "Cc" a
searchable header.
2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
* camel-folder-summary.c (camel_folder_summary_next_uid_string):
New.
(camel_folder_summary_add): Use
`camel_folder_summary_next_uid_string()' instead of recomputing
the UID manually here.
(camel_folder_summary_add_from_parser): Likewise.
2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
* camel-folder-summary.c (camel_folder_summary_set_uid): Removed.
2000-07-03 Dan Winship <danw@helixcode.com>
* camel-folder-summary.c (message_info_new): Parse In-Reply-To
with header_references_decode, not header_msgid_decode.
* camel-mime-message.c (camel_mime_message_class_init): message
headers are case-insensitive.
* providers/pop3/camel-pop3-store.c (camel_pop3_command): Fix a
bug in error-setting code.
(pop3_connect): Don't re-prompt for password in the KPOP case.
(pop3_get_response): New function, split out from
camel_pop3_command.
(connect_to_server): Use pop3_get_response to parse the greeting
message, and error out appropriately if it's -ERR.
2000-07-02 Dan Winship <danw@helixcode.com>
* camel-folder.c (camel_folder_freeze, camel_folder_thaw): New
functions to freeze and thaw a folder (to prevent message/folder
changed signals in the middle of a long series of operations).
(camel_folder_class_init): Change signals to GTK_RUN_FIRST.
(message_changed, folder_changed): Add default implementations
that stop the emission and record info for later if the folder is
frozen.
* providers/mbox/camel-mbox-folder.c (mbox_sync): leftover fixes
from the close->sync change: don't destroy the ibex, summary, and
search when syncing.
(append_message): emit "folder_changed" on a successful append.
2000-07-02 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-utils.c (uudecode_step): A rather complex uudecoder
written in the spirit of Zucchi-ness, is it up to par? Only the
Z-man can tell us :-)
2000-07-01 Dan Winship <danw@helixcode.com>
* camel-service.c (camel_service_get_name): New method, to return
an end-user-friendly name corresponding to a service. (eg, "POP
service for danw on trna.helixcode.com").
* providers/imap/camel-imap-store.c,
providers/mbox/camel-mbox-store.c,
providers/nntp/camel-nntp-store.c,
providers/pop3/camel-pop3-store.c,
providers/sendmail/camel-sendmail-transport.c,
providers/smtp/camel-smtp-transport.c: Implement.
* providers/imap/Makefile.am: remove unneeded
libcamelimap_la_LDADD.
* providers/pop3/camel-pop3-store.c (connect_to_server): fix the
CAPA-parsing code to not get into an infinite loop.
2000-07-01 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_message): Fixed
the bug that would sometimes leave part of the server response
tacked on to the end of the message.
* camel-folder.c: Renamed _by_uid methods. Since we no longer
have get-by-number methods, no need to have the _by_uid
extensions.
(get_message_by_uid): Renamed to get_message
(delete_message_by_uid): Renamed to delete_message
(summary_get_by_uid): Renamed to get_message_info
* providers/mbox/camel-mbox-folder.c:
* providers/pop3/camel-pop3-folder.c:
* providers/imap/camel-imap-folder.c:
* providers/vee/camel-vee-folder.c: Updated to reflect
camel-folder changes.
2000-06-30 Jeffrey Stedfast <fejj@helixcode.com>
* camel-folder.c (camel_folder_copy_message_to): New function, to
copy a message from one folder to another. The default
implementation just uses append_message, but providers can
implement more efficient versions for use when both folders are on
the same store.
* broken-date-parser.[c,h]: Utilities for parsing broken
date strings.
* providers/imap/camel-imap-folder.c (imap_move_message_to):
(imap_copy_message_to): Implemented.
* camel-mime-utils.c (header_decode_date): Wrote some code to try
and un-mangle broken date formats and then parse that new string
instead.
2000-06-30 Dan Winship <danw@helixcode.com>
* camel-folder.c (camel_folder_move_message_to): New function, to
move a message from one folder to another. The default
implementation just uses append_message and delete_message, but
providers can implement more efficient versions for use when both
folders are on the same store.
2000-06-29 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_expunge): Should now
print a meaningful error message when it doesn't succeed
2000-06-28 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (imap_connect): Changed to
keep prompting user for a valid password until it either
authenticates or until Canceled by the user.
(camel_imap_command_extended): Improved speed (replaced the
g_strjoinv call with a faster implementation)
* providers/pop3/camel-pop3-store.c
(camel_pop3_command_get_additional_data): Fixed.
(pop3_connect): Changed to keep prompting the user for a
password until it either works or until Canceled by the user.
* providers/mbox/camel-mbox-summary.c: General cleanup
(camel_mbox_summary_sync): Fixed a memory leak and added
CamelException handling.
* providers/mbox/camel-mbox-store.c (delete_folder): Fixed a
memory leak
* providers/mbox/camel-mbox-folder.c (mbox_append_message):
Default 'off_t seek' to -1 so as to make sure it's initialized
before it's used in the case of a bad stat() call.
(mbox_sync): Updated
(mbox_expunge): Updated
2000-06-27 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (imap_connect): Move the
CAPABILITY command here so we don't have to keep checking
each time we open a folder.
(camel_imap_command_extended): If we are doing an EXAMINE,
don't bother doing a SELECT first.
* providers/imap/camel-imap-folder.c (imap_init): Update so
folder->has_search_capability depends on the parent IMAP store
(since this is really dependant on the IMAP implementation and
not the folder)
2000-06-27 Christopher James Lahey <clahey@helixcode.com>
* providers/smtp/camel-smtp-transport.c: Don't close the filter
stream when done with it (this causes the source stream to close);
Instead, just flush it when done.
2000-06-27 Michael Zucchi <zucchi@zedzone.mmc.com.au>
* camel-folder-search.c (search_header_contains): Make header
search 'to' match 'to', and not 'from', small typo, fixes #317.
2000-06-26 Christopher James Lahey <clahey@helixcode.com>
* providers/mbox/camel-mbox-summary.c: Added debugging
information.
2000-06-23 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c:
* providers/imap/camel-imap-folder.c: Improved folder parsing.
Not specifying a namespace should no longer list the entire
filesystem.
2000-06-22 Chris Toshok <toshok@helixcode.com>
* providers/nntp/.cvsignore: ignore test-newsrc
* providers/nntp/camel-nntp-store.c,
providers/nntp/camel-nntp-store.h,
providers/nntp/camel-nntp-folder.c,
providers/nntp/camel-nntp-folder.h,
providers/nntp/camel-nntp-utils.c: Bring the nntp provider up to a
state where it builds and is usable with the current camel. there
are still warts (semi-broken .newsrc file handling, and a lack of
a subscribe ui -- in fact no way to add a new server, really), but
it'll display news messages.
* providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
camel-nntp-newsrc.c
(libcamelnntpinclude_HEADERS): add camel-nntp-newsrc.h
also, add test-newsrc stuff.
* providers/nntp/test-newsrc.c: new file that tests the newsrc
stuff by parsing and regurgitating a .newsrc file for a particular
server.
* providers/nntp/camel-nntp-newsrc.c,
providers/nntp/camel-nntp-newsrc.h: new files, initial support for .newsrc files.
2000-06-22 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_message_count):
Oops. Now appends the namespace to the folder before querying
for the number of messages.
* providers/imap/camel-imap-store.c (imap_folder_exists): New
convenience function for use by imap_create().
(get_folder): If folder is specified as "/", we really want
"INBOX".
* providers/sendmail/camel-sendmail-provider.c:
* providers/vee/camel-vee-provider.c:
* providers/smtp/camel-smtp-provider.c:
* providers/mbox/camel-mbox-provider.c:
* providers/pop3/camel-pop3-provider.c:
* providers/imap/camel-imap-provider.c: Updated
* camel-session.c: Moved service_cache hash table into the
providers.
(service_cache_remove): Updated.
(camel_session_get_service): Updated.
* camel-url.c (camel_url_hash): Took out the hashing of
url->passwd. We don't want this anymore.
* providers/imap/camel-imap-folder.c (imap_init): Took out
references to 'namespace'
(camel_imap_folder_init): Same
* providers/imap/camel-imap-folder.h: No more namespace. We are
instead going to use url->path as the namespace.
2000-06-21 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (imap_create): Modified to
use the "namespace" (url->path) if it exists.
* providers/imap/camel-imap-folder.c (imap_delete_message_by_uid):
Now just sets the deleted flag on the summary rather than speaking
directly to the IMAP server. This is both faster and cleaner.
2000-06-21 Dan Winship <danw@helixcode.com>
* providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb
bug.
2000-06-21 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_message_by_uid):
We are getting mail in IMAP now!! whoo-hoo!. Stripped out the
filtering so messages may have some dot-stuffing, but the
filtering can always be added back in later when we know it
works and isn't the problem.
2000-06-21 Peter Williams <peterw@curious-george.helixcode.com>
* providers/mbox/camel-mbox-folder.c (mbox_init): Use the basename
of the mailbox so we don't get pathnames like ~/evolution/inbox///movemail.ibex
2000-06-21 Dan Winship <danw@helixcode.com>
* camel-folder-summary.c (message_info_new): Set date_received
based on the first (most recent) "Received" header.
2000-06-20 Dan Winship <danw@helixcode.com>
* camel-mime-part.c (write_to_stream): flush the filter stream
before unreffing it, so it will camel_mime_filter_complete.
* camel-stream-filter.c (camel_stream_filter_class_init): Fix a
braino so camel_stream_flush works here.
* camel-stream-mem.c (stream_seek): Fix a bug that resulted in
large attachments being silently dropped.
* providers/pop3/camel-pop3-store.c
(camel_pop3_command_get_additional_data): Don't use g_strjoinv
here, since it is O(n^2) on the length of the output string, and
we can do O(n).
* camel-mime-part-utils.c
(simple_data_wrapper_construct_from_parser): add a CRLF decoder
after the QP/B64 decoder if it's text.
2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_summary): Only
fetch the summary if the folder summary doesn't already exist.
When the summary *does* exist, start fetching from 1, not 0.
(imap_free_summary): Don't do anything here.
(imap_finalize): Free the summary here instead of in
imap_free_summary().
(imap_set_message_flags): Implemented
(imap_sync): Added code to set flags on messages that have had
their flags changed (however I #if'd it out until we are more
confidant in the IMAP code :)
(imap_summary_get_by_uid): Now parese flags correctly.
(imap_get_summary): Now parese flags correctly. Also correctly
parses the UID correctly.
* camel-url.c (check_equal): No need to check s1 if s2 is NULL
(camel_url_equal): Don't check the passwd component of the url.
2000-06-20 Dan Winship <danw@helixcode.com>
* camel-folder-summary.c (camel_folder_summary_add): mark the
message info with CAMEL_MESSAGE_FOLDER_FLAGGED if we change the
uid, so the folder will know that it's dirty.
2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (camel_imap_command_extended):
Now returns the last line of data that the server sends back as
well. This is needed for commands like SELECT (like Peter pointed
out).
(camel_imap_command): No longer checks for SELECT (no need)
* providers/imap/camel-imap-folder.c: Added namespace stuff
which we will need later on...
(imap_parse_subfolder_line): Convenience function for use in
get_subfolder_names()
(imap_get_subfolder_names): Updated. Also changed it to use LIST
instead of LSUB (temporary change).
2000-06-19 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set
summary equal to NULL.
(imap_get_summary): Store the summary in the ImapFolder
(imap_summary_get_by_uid): If we have a summary cache in the
ImapFolder, first check to see if that message info is in the
cached summary first, if not fetch it directly from the IMAP
server and append it to the summary cache.
(imap_get_message_flags): Don't free the message info that we get
back from summary_get_by_uid as we don't want to be corrupting our
cached summary.
2000-06-19 Peter Williams <peterw@curious-george.helixcode.com>
* providers/imap/camel-imap-store.c (camel_imap_command{,_extended}): When
SELECT'ing a folder for an IMAP command, use _extended to grab the entire
response (before we just used camel_imap_command and missed the OK codes)
2000-06-18 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_summary_get_by_uid):
Now gets the message flags as it should.
(imap_get_summary): Same as imap_summary_get_by_uid
(imap_get_permanent_flags): Return the permanent flags stored
on the folder.
(imap_get_message_flags): Return message flags associated with
given uid. Note: we may want to somehow cache summary info so
that we don't have to keep querying the IMAP provider in
imap_summary_get_by_uid().
2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_free_summary): We were
leaking memory - but not anymore!
(imap_get_summary): We now get the UIDs and the beginnings of the
code to get the message flags as well.
2000-06-17 Dan Winship <danw@helixcode.com>
* camel-mime-parser.c (folder_scan_header): Don't copy newlines
into the parsed header text, and turn any number of tabs and
spaces after a newline into a single space.
2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_init): Should now
correctly do CAPABILITY.
2000-06-17 Dan Winship <danw@helixcode.com>
* providers/mbox/camel-mbox-summary.c: Add some debugging printfs
when rebulding summary to help figure out why people's summaries
are always being rebuilt.
2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_search_by_expression):
Began to implement, need to get information on how to
deconstruct @expression into an IMAP search expression and
parse the results.
(imap_init): Now queries the IMAP provider for CAPABILITY to
determine if SEARCH is implemented or not.
* providers/imap/imap.c: Removed - no longer a need to have
this as an example for anyone interesting to help mecode IMAP
support.
2000-06-16 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_sync): Added code
to expunge if called for (still need to finish coding this).
(imap_get_uids): Implemented.
(imap_get_summary): Found a way to get the date
(imap_summary_get_by_uid): Same.
(imap_free_summary): Implemented.
* string-utils.c (strstrcase): Fixed a compile warning
* providers/imap/camel-imap-summary.c: Removed - we don't
need a CamelImapSummary structure.
2000-06-16 Dan Winship <danw@helixcode.com>
Move flag handling from CamelMimeMessage to CamelFolder. This
simplifies several flag-handling pieces of code in the mailer, and
lets you change a message's flags without having to fetch the
message body. It also means that fully-constructed
CamelMimeMessages are now essentially constant, which will help
simplify locking issues later since it means two threads
interested in the same message can just work with separate copies
of it.
* camel-mime-message.h (struct _CamelMimeMessage): Removed flags
and user_flags (moved to summary). Removed expunged and
message_number which were unused. Removed message_uid and folder
which are no longer needed in the new scheme.
(struct CamelMimeMessageClass): Removed message_changed signal and
get/set_message_number methods.
* camel-mime-message.c: Updates for CamelMimeMessage changes.
(camel_mime_message_get/set_flags,
camel_mime_message_get/set_user_flag): Replaced with methods in
CamelFolder.
(camel_flag_get, camel_flag_set, camel_flag_list_size,
camel_flag_list_free): Moved verbatim to camel-folder-summary.c
* camel-folder.c (camel_folder_get/set_message_flags,
camel_folder_get/set_message_user_flag): New methods (and
corresponding useless default implementations)
(camel_folder_class_init): add a message_changed signal
* camel-folder-summary.c (camel_flag_get, camel_flag_set,
camel_flag_list_size, camel_flag_list_free): Moved here from
camel-mime-message.c
* providers/mbox/camel-mbox-folder.c (message_changed): Removed.
(mbox_get_message_flags, mbox_set_message_flags,
mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak
summary bits as appropriate. (Functionality moved here from
message_changed.)
(mbox_get_message_by_uid): Update for CamelMimeMessage changes
(less stuff to initialize).
* providers/imap/camel-imap-folder.c (message_changed): Remove
this. It was just copied from the mbox provider and doesn't deal
with the real IMAP flag stuff anyway. (So there's currently no
flag support in the IMAP provider.)
(imap_get_message_by_uid): Update for CamelMimeMessage changes.
* providers/vee/camel-vee-folder.c: (message_changed): Remove old
one. Add a new one to listen for message_changed on each folder
and re-emit message_changed signals that correspond to messages in
the vfolder.
(vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy
flag setting to the underlying real messages.
(vee_append_message): Removed for now; there's no way to translate
this into the new CamelMimeMessage/CamelFolder scheme, but (a)
there's also no code which would ever call it and (b) we're
probably going want a better interface than append_message for
message drag and drop to work anyway. To be revisited.
2000-06-16 Dan Winship <danw@helixcode.com>
* camel-mime-utils.c (rfc2047_decode_word):
* camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
* camel-folder-summary.c (summary_build_content_info):
KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet,
output ISO-8859-1 instead, so Ettore can read his Italian mail. :)
This will be reverted later.
2000-06-15 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_summary): Started to
implement - may want to use ENVELOPE instead of BODY.PEEK[HEADER]
(imap_summary_get_by_uid): Started to code, I've got to find a way to
get the date in time_t format and also get the flags
* string-utils.c (strstrcase): Added this convenience function - I
know about strcasestr() but it's not portable.
2000-06-15 Dan Winship <danw@helixcode.com>
* camel-service.c: Remove camel_service_connect_with_url. (URLs
must be specified when the service is requested from the session,
so that there can only ever be one service for any URL.)
* camel-folder.c: (camel_folder_open, camel_folder_is_open,
camel_folder_get_mode): Kill. Folders are now always open, and
handle "closing" sorts of operations at sync or finalize time.
(camel_folder_sync): renamed from camel_folder_close. Syncs state
to the store but doesn't necessarily close/disconnect.
* providers/*/camel-*-folder.c: Merge "open" methods into "init"
methods. Rename close to sync and update appropriately.
* providers/imap/camel-imap-store.c: Remove camel_imap_store_open
and camel_imap_store_close, which should not have been copied from
the POP provider (where the exist to work around limitations of
the POP protocol).
* providers/mbox/camel-mbox-summary.c: fix a bug. (don't expunge
deleted messages if called with expunge == FALSE)
* providers/pop3/camel-pop3-store.c (connect_to_server): Check
server for various interesting extensions.
* providers/pop3/camel-pop3-folder.c (get_uids): If the server
supports UIDL, use real UIDs rather than fake ones.
(etc): Map uids back to numbers appropriately
* providers/mbox/camel-mbox-folder.c (mbox_append_message): Fix to
previous change: make sure the "seek" variable ends up with the
value it should.
* providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
summary mtime as well as size.
2000-06-14 Dan Winship <danw@helixcode.com>
* providers/mbox/camel-mbox-folder.c (mbox_append_message): if the
mbox doesn't end with a '\n', write one before appending the new
message.
2000-06-14 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-filter-crlf.c (filter): Updated the encoder to allocate
more memory (since we are also now adding dots). Also updated the
decoder as we have found that it sometimes passes the end of the
buffer.
* providers/pop3/camel-pop3-folder.c (get_message_by_uid): Took out the
filter code (we already filter in
camel_pop3_command_get_additional_data)
* camel-folder.c (init): Updated: a separator is now a char* rather
than a single char because IMAP can have a string for a directory
separator. Also, since IMAP does not begin with a directory separator,
there is a new argument (path_begins_with_sep) which decides if a
directory should begin with a directory separator.
* providers/imap/camel-imap-store.c (imap_create): Since, on connect,
Camel tries to create INBOX (which already exists on every IMAP
provider) we can return TRUE when the folder name is "INBOX".
* providers/vee/camel-vee-folder.c (vee_init): Updated.
* providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated.
* providers/mbox/camel-mbox-store.c (get_folder): Updated.
* providers/mbox/camel-mbox-folder.c (mbox_init): Updated.
* providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated.
2000-06-14 Dan Winship <danw@helixcode.com>
* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
Renamed from camel_mbox_summary_expunge. Takes a gboolean saying
whether to expunge or just sync the mbox file. Change some
g_errors to g_warning so we don't abort. Make the quick
X-Evolution updating code lseek around correctly. Update the
mbox mtime in the summary file even in the quick case.
* providers/mbox/camel-mbox-summary.h: make
CAMEL_MESSAGE_FOLDER_NOXEV not conflict with
CAMEL_MESSAGE_FOLDER_FLAGGED defined in camel-mime-message.h
* providers/mbox/camel-mbox-folder.c (mbox_close): call
camel_mbox_summary_sync to save flag state if not expunging.
(mbox_expunge): Update for camel_mbox_summary_expunge rename.
2000-06-13 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (camel_imap_store_open):
(camel_imap_store_close): Added.
(camel_imap_command_extended): Fixed a segfault and updated
to use camel_imap_status()
(camel_imap_command): Updated to use camel_imap_status()
(camel_imap_status): New convenience function for parsing
the return status of an IMAP command
2000-06-12 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_message_by_uid):
Works like the POP fetch code, should work temporarily until
we get around to coding it the way it "Should Be".
* providers/pop3/camel-pop3-folder.c (get_message_by_uid): Now uses
the camel-mime-filter-crlf decoder when retrieving messages.
* camel-mime-filter-smtp.c: Deprecated.
* providers/smtp/camel-smtp-transport.c (smtp_data): Updated to use
camel-mime-filter-crlf with my 'dot' extension in place of
camel-mime-filter-smtp
* camel-mime-part.c (write_to_stream): Updated to reflect changes
made to camel-mime-filter-crlf.c
* camel-mime-filter-crlf.c (filter): Modified to be able to
encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder
so that it should no longer get caught in an infinite loop.
2000-06-12 Dan Winship <danw@helixcode.com>
* providers/*/Makefile.am: don't pass a second (incorrect) -rpath
in addition to the (correct) one automatically provided by
automake.
* camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion.
(Currently only tested in the LF->CRLF direction.)
* camel-mime-part.c (write_to_stream): if content-type is text,
and it's QP or B64 encoded, pass through the CRLF filter before
the other filter to satisfy the "canonical encoding" rules in the
MIME spec.
2000-06-09 Dan Winship <danw@helixcode.com>
* camel-session.c (camel_session_query_authenticator): Add another
argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache
bad info.
* providers/pop3/camel-pop3-store.c (pop3_connect): uncache the
password if it doesn't work.
2000-06-09 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-stream.c (stream_read): Updated to reflect
changes made in camel-imap-store.c
* providers/imap/camel-imap-store.c (imap_create): No longer checks to
make sure a folder doesn't already exists (as this is no longer needed)
(camel_imap_command): Now takes a CamelFolder argument so it can detect
whether or not it needs to SELECT a folder or not
(camel_imap_command_extended): Same.
* providers/smtp/camel-smtp-transport.c (smtp_connect): Will now always
send EHLO first, if that fails it will fall back on HELO.
(esmtp_get_authtypes): Should now correctly parse authtypes.
2000-06-07 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-summary.c: Now builds (not that it's worth
much yet).
* providers/imap/camel-imap-folder.c (imap_get_uids): Now uses the
correct cast to a CamelImapMessageInfo structure (should get rid of
compile warnings).
* providers/imap/Makefile.am: Added rules to build
camel-imap-stream
* providers/imap/camel-imap-store.c (get_folder): Update.
Moved imap_create here.
* providers/imap/camel-imap-folder.c (delete_messages): Remove.
(imap_create): Removed.
(imap_delete): Removed.
(imap_exists): Removed.
* providers/imap/camel-imap-stream.h: Added typedef's for the stream
* providers/imap/camel-imap-stream.c: Modified to build cleanly
2000-06-07 Not Zed <NotZed@HelixCode.com>
* camel-mime-utils.c (header_msgid_decode_internal): Properly
dereference warning/debug messages.
(header_references_decode): Check we actually have msgid stuff
before trying to decode it ...
2000-06-06 Jeffrey Stedfast <fejj@helixcode.com>
* camel-imap-stream.[c,h]: Removed
* providers/imap/camel-imap-stream.[c,h]: Relocated to this
location
* providers/imap/camel-imap-summary.c: Added
2000-06-06 Dan Winship <danw@helixcode.com>
* camel-folder.c: Remove exists, create, delete. A CamelFolder
now always references an existing folder. Remove delete_messages
too since it wasn't being used. Add a "create" flag to
get_subfolder saying whether or not to create the subfolder if it
doesn't yet exist.
* camel-store.c (camel_store_get_folder): Add a "create" flag to
say whether or not to create the folder if it doesn't yet exist.
(camel_store_delete_folder): New method, moved from CamelFolder.
(cache_folder, uncache_folder): Fix up a bit.
(get_folder_name): Explain what this is for.
* providers/mbox/camel-mbox-folder.c:
* providers/mbox/camel-mbox-store.c: Update. Remove support for
hierarchical folders to simplify this for now, since we're not
using it, and it's not completely clear how they should work in an
ELocalStorage world. Needs to be revisited.
* providers/pop3/camel-pop3-folder.c (delete_messages): Remove.
* providers/pop3/camel-pop3-store.c (get_folder): Update.
* providers/vee/camel-vee-folder.c (exists): Remove.
* providers/vee/camel-vee-store.c (vee_get_folder): Update.
2000-06-06 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-*.[c,h]: Started on getting
imap to build cleanly (tho some work has not been completed
so it still won't build until camel-imap-summary is finished
along with a few methods in camel-imap-folder)
* camel-stream.[c,h]: Changed the read and write method prototypes
to return an ssize_t type rather than an int and also changed
the 'number of bytes' to read or write to a size_t type
* camel-stream-fs.c: same as above
* camel-stream-mem.c: again, same as above
* camel-stream-buffer.c: same
* camel-imap-stream.[c,h]: Added this new stream, cache's previously
read data so each successive call will instead read from the cache
2000-06-05 Dan Winship <danw@helixcode.com>
* camel-mime-part.c (camel_mime_part_set_disposition): fix
typo/braino (set "Content-Disposition", not "Content-Description")
(camel_mime_part_set_filename): const poison
2000-06-02 Not Zed <NotZed@HelixCode.com>
* camel-mime-utils.c (base64_encode_step): Ick, damn signs! Fix a
bug with sign extended bytes.
* camel-mime-filter-smtp.c (filter): Changed layout/logic slightly
(to match From filter)
2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-filter-smtp.c (filter): Fixed the filter so that it
wouldn't insert garbage under certain conditions.
2000-06-02 Christopher James Lahey <clahey@helixcode.com>
* camel-session.c: Don't ref the services in the cache.
2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
* providers/smtp/camel-smtp-transport.c: Rearanged where debug
fprintf statements we placed so that any data the server sends
back is printed out before an exception is set and the function
returns.
2000-06-02 Not Zed <NotZed@HelixCode.com>
* camel-mime-utils.c (header_decode_date): If we get a funny
result, just throw it out. Basically a fix for the one true
broken TradeClient.
2000-06-01 Not Zed <NotZed@HelixCode.com>
* camel-folder-summary.c (message_info_free): Free
references/messsage id.
(message_info_save): Save them.
(message_info_load): Load them.
(message_info_new): And get them from the new message.
(CAMEL_FOLDER_SUMMARY_VERSION): Bumped for new changes.
* camel-folder-summary.h: Added references and messageid to
summary.
2000-06-02 Christopher James Lahey <clahey@helixcode.com>
* camel-session.c: Ref and unref objects in the service cache
properly.
* camel-store.c: Ref the folder when returning it using
lookup_folder. Used the folder's full name for the key for the
folder cache since that's used to uncache it.
2000-06-02 Dan Winship <danw@helixcode.com>
Fun with purify.
* providers/pop3/camel-pop3-store.c (pop3_connect): free msg on
success as well as failure.
(camel_pop3_command_get_additional_data): free buf after reading
the last line (".").
* providers/pop3/camel-pop3-folder.c (get_message_by_uid): free
body data after creating the memstream from it (which will copy
the data).
* providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary
and index paths.
* camel-data-wrapper.c (finalize): unref the stream, if it exists.
2000-06-01 Not Zed <NotZed@HelixCode.com>
* camel-mime-part.c (construct_from_parser): For a message part,
set the default content-type to message/rfc822. Maybe needs to be
done for multiparts too?
2000-05-31 Not Zed <NotZed@HelixCode.com>
* camel-mime-message.c (construct_from_parser): Typo in assersion.
* camel-mime-parser.c (folder_scan_step): Use a default type of
message/rfc822 for multipart/digest. Bug Z192.
(folder_scan_drop_step): Remove warning.
2000-05-30 Not Zed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-folder.c (mbox_append_message): Init
filter_from to NULL, for exception case.
(mbox_get_message_by_uid): Cast off_t to long int for diagnostics.
* camel-url.c (camel_url_hash): Hash funciton for using camel
url's as hash keys.
(camel_url_equal): equal function for same.
* camel-session.c (camel_session_finalise): Free cached services.
(camel_session_init): Init service cache.
(service_cache_remove): destroy callback to remove a service from
the cache.
* camel-store.c (get_folder_internal): Remove the extra ref of the
folder. That seems the right behaviour ...?
(camel_store_get_type): Doh, actually call store init, so the
cache works.
(cache_folder): strdup the folder name! no wonder it never found
it again.
2000-05-30 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c: Implemented a few more
methods like imap_append and 1 or 2 others
2000-05-29 Not Zed <NotZed@HelixCode.com>
* camel-store.c (camel_store_init): Move it to here. If this
level is going to maintain it, it should set it up. Lets see what
caching folders breaks :(
* providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Dont
init folder cache here.
* providers/mbox/camel-mbox-summary.c
(camel_mbox_summary_expunge): Make sure we copy messages which are
still intact to the new folder.
(camel_mbox_summary_expunge): Update the frompos as well when
moving the content.
(camel_mbox_summary_expunge): Remove some debug, and dont offset
frompos?
* providers/vee/camel-vee-folder.c (vee_folder_build): Check the
searched folder is open before trying to search it.
(message_changed): Track changes to the source message in the
summary.
(folder_changed): Track folder changes, re-query the folder that
changed, and cascade the changed event as well.
(camel_vee_folder_finalise): Free subfolder and subfolder summary.
2000-05-29 Dan Winship <danw@helixcode.com>
* camel-service.c (camel_service_new): Fix up some glib
precondition stuff. Try to set the URL in camel_service_new before
checking whether or not it's "empty" so that you can successfully
set "sendmail:" as a URL.
2000-05-28 Dan Winship <danw@helixcode.com>
* camel-provider.h: Add a domain field to CamelProvider, to say
what kind of data it provides.
* providers/imap/camel-imap-provider.c:
* providers/mbox/camel-mbox-provider.c:
* providers/pop3/camel-pop3-provider.c:
* providers/sendmail/camel-sendmail-provider.c:
* providers/smtp/camel-smtp-provider.c: Set domain to "mail".
* providers/nntp/camel-nntp-provider.c: Set domain to "news".
* providers/vee/camel-vee-provider.c: Set domain to "vfolder". (So
it doesn't end up being listed as a potential mail source in the
mail config wizard.)
* providers/pop3/camel-pop3-store.c: Split apart password and APOP
auth, since some servers seem to do both, but don't really.
(connect_to_server): Renamed from try_connect. Now actually does
the connection up to the point of checking the greeting for APOP
support.
(query_auth_types): Return APOP, if appropriate. Call
pop3_disconnect after connect_to_server since we don't really want
to be connected.
(pop3_connect): Use connect_to_server rather than duplicating
code. Fix a one-byte buffer overrun in the APOP code.
(pop3_disconnect): Make this able to clean up after a partial
connect.
(connect_to_server): Remove port number from error message since
it's not terribly useful and we were getting it from the wrong
place anyway.
* camel-mime-utils.c (header_address_list_format_append): Use
`foo@bar' rather than `"" <foo@bar>' for email addresses with no
name component.
2000-05-27 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c: Removed
camel_imap_command_get_additional_data() as it was
completely useless, replaced with
camel_imap_command_extended() which may eventually replace
camel_imap_command() as well.
* providers/imap/camel-imap-store.h: Modified to reflect
changes made to camel-imap-store.c
* providers/imap/camel-imap-folder.c: Wrote the first of many
methods: camel_imap_init(), imap_open(), imap_expunge(),
imap_get_message_count(), and imap_get_subfolder_names()
2000-05-26 Dan Winship <danw@helixcode.com>
* camel-multipart.c (camel_multipart_init): Don't set a default
boundary. Require the caller to do that.
(set_boundary): if boundary is NULL, generate a "random" boundary.
* camel-mime-part-utils.c
(camel_mime_part_construct_content_from_parser): Add a call to
camel_multipart_set_boundary after creating a new multipart.
2000-05-25 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (try_connect): Removed
Exception code - Pop doesn't seem to set exceptions
* providers/imap/camel-imap-folder.c: Initial code, mostly
just a template for future code
* providers/imap/imap.[c,h]: Source code from my personal
mailer - for reference only!
2000-05-25 NotZed <NotZed@HelixCode.com>
* camel-mime-part-utils.c
(camel_mime_part_construct_content_from_parser): Replace simple
data wrapper here too, oops.
* Makefile.am (libcamel_la_SOURCES): Removed
camel-simple-data-wrapper again. Less code to maintain == better
code.
* camel-data-wrapper.c (construct_from_stream): Fixes for bug
where text attachments dont work. Made data-wrapper concrete for
the second time.
2000-05-23 NotZed <NotZed@HelixCode.com>
* providers/vee/camel-vee-folder.c (vee_folder_build_folder):
Update the vfolder details for a single folder.
2000-05-25 Jeffrey Stedfast <fejj@helixcode.com>
* providers/smtp/camel-smtp-transport.c (_send_to): Took out code
that had been there to reconnect to the server if it was not
already connected - Mailer code was fixed so that this should not
be needed.
* providers/imap/camel-imap-store.[c,h]: Initial code.
2000-05-24 Dan Winship <danw@helixcode.com>
* camel.h: Re-add camel-simple-data-wrapper.h, which was removed
for some reason.
2000-05-24 Jeffrey Stedfast <fejj@helixcode.com>
* providers/smtp/camel-smtp-transport.[c,h]: Moved global
variables into struct CamelSmtpTransport to make SMTP
thread-safe
* providers/imap/camel-imap-*.h: Stolen from Mbox. Rough structure
for Imap.
2000-05-23 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap: Added some initial code to the camel tree
for IMAPv4
* providers/imap/.cvsignore: Added to repository
* providers/smtp/camel-smtp-transport.c: Added debug fprintf's
so that testers can provide more information. Tested with simple
messages and a reply to the hello@helixcode.com default message
but should really be tested more.
(smtp_data): Fixed to use data_wrapper_write_to_stream.
* camel-mime-filter-smtp.c (filter): Modified to escape all lines
beginning with a '.' and to place a \r before each \n if one did
not previously exist. Removed code to escape "From " as it was
found to not be needed for SMTP.
2000-05-22 Jeffrey Stedfast <fejj@helixcode.com>
* providers/smtp/camel-smtp-transport.c (smtp_data): Fixed the
filtered stream. Fixes for stream changes, updated to use
camel-mime-filter-smtp.
* Makefile.am: Added camel-mime-filter-smtp.c
* camel-mime-filter-smtp.[c,h]: Added to camel tree
Smtp filter used to change \n into \r\n, escape lone dots,
and escape "From "'s.
2000-05-19 NotZed <NotZed@HelixCode.com>
* camel-simple-data-wrapper.c (construct_from_stream): If we
already have been constructed, unref our content.
(write_to_stream): Check we've been constructued, and change for
stream api changes.
* camel-mime-parser.c: Removed exception stuff.
* md5-utils.c (md5_get_digest_from_stream): repaired.
* camel-mime-message.c: Remove exception from write_to_stream, and
fix, and fix formatting.
* providers/sendmail/camel-sendmail-transport.c (_send_internal):
Fix for stream changes.
* providers/pop3/camel-pop3-store.c (camel_pop3_command): Fixes
for stream changes.
* providers/mbox/camel-mbox-folder.c, and elsewhere, fix all
stream api changes.
(mbox_append_message): Use stream_close() now its back.
(mbox_append_message): unref the from filter.
* camel-stream-mem.c: And here.
* camel-stream-fs.[ch]: Here too.
* camel-stream-filter.c: Likewise. This is getting tedious.
* camel-stream-buffer.c (stream_write): Fix a few little problems.
(stream_close): Reimplement.
(camel_stream_buffer_read_line): Slightly more efficient version,
that also only allocates the right amount of memory for strings.
* camel-seekable-substream.c: Likewise.
* camel-seekable-stream.[ch]: Remove exceptions, fix formatting,
changes for stream (re)fixes. set_bounds returns an error.
* camel-stream.[ch]: Remove exceptions. Make flush and reset return
an error code, repair all the screwed up formatting, and put back
close.
* camel-mime-part-utils.c
(camel_mime_part_construct_content_from_parser): And here.
* camel-mime-part.c (camel_mime_part_set_content): And this too.
(write_to_stream): Fixed for stream changes.
* camel.h: Fixed.
* providers/vee/camel-vee-folder.c (vee_search_by_expression):
Implement. Performs an intersection of the two searches.
(camel_vee_folder_finalise): Unref search folders.
(vee_append_message): Implement append.
2000-05-18 Dan Winship <danw@helixcode.com>
* camel-folder.c: remove message_number_capability and require uid
capatibility.
(camel_folder_list_subfolders, camel_folder_get_uid_list,
camel_folder_get_subfolder_info, camel_folder_get_message_info):
removed
(camel_folder_get_subfolder_names,
camel_folder_free_subfolder_names): new subfolder interfaces.
(camel_folder_get_uids, camel_folder_free_uids): new uid
interfaces
(camel_folder_get_summary, camel_folder_free_summary): new summary
interfaces
* providers/mbox/camel-mbox-folder.c,
* providers/nntp/camel-nntp-folder.c:
* providers/vee/camel-vee-folder.c: Update for changes
* providers/pop3/camel-pop3-folder.c: Implement get_uids, update
for other changes.
2000-05-18 NotZed <NotZed@HelixCode.com>
* providers/vee/camel-vee-folder.c: Guess!
* camel-folder-search.c (search_user_flag): Implement user_flag
search term.
* camel-folder-search.h: Added user_flag search capability
(user-flag "blah")
* providers/mbox/camel-mbox-folder.c (mbox_init): Set USER flag in
permanent flags for the folder.
2000-05-17 Dan Winship <danw@helixcode.com>
* camel-folder.c: Remove unused async open/close and
copy_message_to functions.
Rename functions without initial _. Fix glib preconditions and
gtk-doc comments.
2000-05-17 Dan Winship <danw@helixcode.com>
* camel-data-wrapper.c: remove get/set_output_stream operations.
They're redundant with write_to_stream, and CamelMimePart and
CamelMimeMessage only implement the latter, meaning that trying to
get_output_stream on a CamelMimeMessage that was built from pieces
rather than being parsed from a stream doesn't work. Anything that
uses get_output_stream can be rewritten to use write_to_stream, so
we'll standardize on that.
(camel_data_wrapper_new): remove this: CamelDataWrapper is
supposed to be an abstract class.
(write_to_stream): remove default implementation. (Moved to
CamelSimpleDataWrapper)
* camel-simple-data-wrapper.c: resurrect, although it's not really
the same thing it was before. A simple data wrapper, which is
backed by a CamelStream.
* camel-mime-part-utils.c
(simple_data_wrapper_construct_from_parser): Use
construct_from_stream rather than set_output_stream.
(camel_mime_part_construct_content_from_parser): Change
camel_data_wrapper_new to camel_simple_data_wrapper_new.
* camel-mime-part.c (camel_mime_part_set_content): Change
camel_data_wrapper_new to camel_simple_data_wrapper_new.
2000-05-17 Darin Adler <darin@eazel.com>
* camel-folder-summary.c: (message_info_load):
Quick fix to get it to compile. I hope I don't get into trouble.
2000-05-17 Dan Winship <danw@helixcode.com>
* camel.h: Don't include the no-longer-distributed
possibly-to-be-removed headers.
* providers/smtp/camel-smtp-transport.c
(smtp_get_email_addr_from_text): fix an off-by-one error in
address parsing
(smtp_data): use camel_data_wrapper_get_output_stream rather than
data_wrapper->output_stream
2000-05-17 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-folder.c (message_changed): Snoop
changes to user flags on the message into the summary as well.
* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_init):
Changed version init to include the parent class version info
(i.e. add it not overwrite it).
* camel-folder-summary.c (message_info_new): Initialise user_flags
to empty.
(message_info_load): And load user flags.
(message_info_save): And save user flags.
(message_info_free): And free them.
(CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
* camel-folder-summary.h: Added user-flags to summary.
* camel-mime-message.c (camel_mime_message_set_user_flag): Dont
use a hashtable for user flags.
(camel_mime_message_get_user_flag): And changed here too.
(camel_flag_get): New interface to get a flag from a flag
list. Flag lists are easier to work with than hash tables, and
save memory too.
(camel_flag_set): And set.
(camel_flag_list_free): And free.
(free_key_only): Discard.
(finalize): Remove the flag list.
2000-05-17 Jeffrey Stedfast <fejj@stampede.org>
* providers/smtp/camel-smtp-transport.c: (smtp_helo): Error
checking on gethostbyaddr() eliminating a possible segfault.
2000-05-16 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-folder.c (mbox_delete_message_by_uid):
Implement.
2000-05-12 NotZed <NotZed@HelixCode.com>
* camel-movemail.c (camel_movemail): Open the destination with
O_APPEND, so we dont blow away a partially transferred mbox.
(camel_movemail): Loop if we get errno=INTR, and not fail.
2000-05-11 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
the summarised file size, if everything went ok.
(camel_mbox_summary_expunge): Clear header flags after updating.
2000-05-16 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-folder.c:
* providers/nntp/camel-nntp-folder.h:
* providers/nntp/camel-nntp-provider.c:
* providers/nntp/camel-nntp-store.c:
* providers/nntp/camel-nntp-utils.c:
* providers/nntp/camel-nntp-utils.h:
get things working with new camel summary stuff.
* providers/nntp/camel-nntp-summary.c:
* providers/nntp/camel-nntp-summary.h:
removed files since camel-folder-summary does all we need.
2000-05-15 Jeffrey Stedfast <fejj@stampede.org>
* providers/smtp/camel-smtp-transport.c: Added some preliminary
AUTH support.
2000-05-15 Dan Winship <danw@helixcode.com>
* camel-folder.h: Remove camel_folder_get_summary, which no longer
exists.
2000-05-11 Dan Winship <danw@helixcode.com>
* Makefile.am: remove some cruft that we're not currently using.
* camel-stream-mem.c (camel_stream_mem_new_with_buffer): Change
to match prototype (size_t vs unsigned int) so it works on 64-bit
machines. Noted by msw.
2000-05-11 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-folder.c (message_changed): Indicate
the summary changed also.
2000-05-11 Jeffrey Stedfast <fejj@stampede.org>
* providers/smtp/camel-smtp-transport.c: (smtp_helo):
Updated to more closely comply with RFC 821 standards
2000-05-11 NotZed <NotZed@HelixCode.com>
* camel-mime-part.c (write_to_stream): Unref the filter after
adding it to the filtering stream.
* providers/mbox/camel-mbox-summary.c
(camel_mbox_summary_finalise): Free the folder path.
(camel_mbox_summary_update): Also save summary when done.
(camel_mbox_summary_expunge): Unindex items when deleting them.
(camel_mbox_summary_expunge): Save the index as well as the
summary.
* camel-folder-summary.c (camel_folder_summary_finalise): Free the
summary path.
(camel_folder_summary_touch): New function, indicate the summary
info changed.
(camel_folder_summary_remove): Dirty here.
* camel-internet-address.c (internet_decode): Free multiple entry
addresses properly.
* camel-mime-utils.c (header_decode_mailbox): Plugged another
memleak, free text after converting it.
(header_decode_addrspec): More leaks plugged.
* camel-mime-message.c (finalize): Free message_uid.
(finalize): Free the recipients hashtable.
2000-05-11 <notzed@helixcode.com>
* camel-folder-summary.c (camel_folder_summary_finalise): Free
summary items and charset filters.
2000-05-10 <notzed@helixcode.com>
* camel-folder-summary.c (camel_folder_summary_finalise): Don't
free stuff in p, after we've free'd p.
* providers/mbox/camel-mbox-folder.c (mbox_append_message): Unref
the stream we created for appending.
2000-05-10 Jeffrey Stedfast <fejj@stampede.org>
* providers/smtp/camel-smtp-transport.c: (camel_smtp_transport_class_init):
Added initialization for service_class
2000-05-10 Dan Winship <danw@helixcode.com>
* camel-multipart.c (write_to_stream): fix a stupid typo. Thank
you, C.
* camel-mime-part.c (write_to_stream): don't ref the stream before
wrapper a filter around it, since nothing will ever unref it.
2000-05-10 Christopher James Lahey <clahey@helixcode.com>
* Makefile.am: Added camel-types.h, camel-folder-pt-proxy.h, and
camel-thread-proxy.h.
2000-05-09 Dan Winship <danw@helixcode.com>
* providers/sendmail/camel-sendmail-transport.c (_send_internal):
Bleah. Can't fsync a pipe. As a quick kludge, just don't
stream_flush it. The right fix will require bringing back
stream_close though.
2000-05-09 Jeffrey Stedfast <fejj@stampede.org>
* camel-internet-address.[c,h]: Undid my changes (moved
struct _address back into came-internet-address.c)
* providers/smtp/camel-smtp-transport.c: (_send): changed
from using it's own address manipulation (using struct _address)
to using camel_internet_address_get(). Also some format changes
to keep consistant with the rest of Camel
2000-05-09 Jeffrey Stedfast <fejj@stampede.org>
* camel-internet-address.[c,h]: Moved struct _address from
camel-internet-address.c to camel-internet-address.h
(hopefully this doesn't break anything...)
* providers/smtp/camel-smtp-transport.c: (_send): now
populates the recipient list with To, Cc, and Bcc addresses.
Should now be able to use this module.
2000-05-09 Dan Winship <danw@helixcode.com>
* providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
one more refcounting fix I missed before.
2000-05-08 Jeffrey Stedfast <fejj@stampede.org>
* providers/smtp/camel-smtp-transport.c: no longer frees memory it
shouldn't, updated to reflect camel-stream changes involving
CamelException (perhaps it should use a different CamelException
variable than is passed to the camel smtp module?)
2000-05-08 Dan Winship <danw@helixcode.com>
* camel-stream.c (camel_stream_read, camel_stream_write,
camel_stream_flush, camel_stream_reset, camel_stream_printf,
camel_stream_write_to_stream): Use CamelException to signal
failure.
(camel_stream_write_strings): Remove. camel_stream_printf is more
useful in most of the places that used this.
(camel_stream_write_string): Change from macro to function to
prevent problems with double-evaluation.
* camel-seekable-stream.c (camel_seekable_stream_seek,
camel_seekable_stream_set_bounds): Use CamelException.
(reset): Update.
* camel-seekable-substream.c, camel-stream-buffer.c,
camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c:
Update.
* camel-stream-fs.c: Remove the virtual init functions and move
the code into the creator functions. Add CamelExceptions to
creation functions that could fail.
* camel-data-wrapper.c (camel_data_wrapper_write_to_stream): Use
CamelException.
* camel-mime-message.c, camel-mime-part.c, camel-multipart.c
(write_to_stream): Update.
* camel-mime-parser.c: add an exception to the mime parser private
data and pass that to stream functions as needed.
* gmime-content-field.c, md5-utils.c: Update (badly) for stream
changes.
* camel-exception.h (camel_exception_is_set): convenience macro.
* providers/Makefile.am: disable SMTP for now
* providers/mbox/camel-mbox-folder.c (mbox_append_message): Pass
CamelException to the functions that now need it. Check the
exception after calling camel_stream_flush, and fail if it fails.
(mbox_get_message_by_uid): More updates.
* providers/pop/camel-pop3-folder.c,
providers/pop/camel-pop3-store.c,
providers/sendmail/camel-sendmail/transport.c: Update.
2000-05-08 NotZed <NotZed@HelixCode.com>
* camel-mime-message.c (process_header): Format From and Reply-To
to at least a decoded string. Should probably store them as an
camelinternetaddress.
* Merged NEW_SUMMARY branch back to trunk, and resolved conflicts.
* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
Return status.
(camel_mbox_summary_expunge): Force an update of the summary
before we do anything.
(camel_mbox_summary_expunge): Build new xev line in xevnew, and
free that, and consify xev.
(camel_mbox_summary_load): If we are rebuilding from scratch, make
sure we clear the summary content.
* camel-stream-filter.c (do_close): We NEED a stream close.
2000-05-07 Dan Winship <danw@helixcode.com>
Make camel not leak like a sieve.
* camel-object.c: New subclass of GtkObject which is now the base
of the Camel object hierarchy. Currently the only difference
between CamelObject and GtkObject is that CamelObjects don't start
out floating.
* *.h: Move a bunch of typedefs to camel-types.h. Standardize on
using <camel/foo.h> in header files rather than <foo.h>, "foo.h",
or "camel/foo.h". Remove some unneeded includes.
* camel-address.c, camel-data-wrapper.c, camel-folder-search.c,
camel-folder-summary.c, camel-folder.c, camel-mime-filter.c,
camel-mime-parser.c, camel-service.c, camel-session.c,
camel-stream.c: These are now subclasses of CamelObject.
* camel-data-wrapper.c (set_output_stream):
* camel-medium.c (set_content_object):
* camel-seekable-substream.c
(init_with_seekable_stream_and_bounds):
* providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
remove gtk_object_sink calls.
* camel-stream-buffer.c (init_vbuf):
* camel-stream-filter.c (camel_stream_filter_new_with_stream):
ref the original stream.
* camel-folder-summary.c (camel_folder_summary_finalise): unref
the filters when finalizing.
* camel-mime-part-utils.c
(simple_data_wrapper_construct_from_parser,
camel_mime_part_construct_content_from_parser):
* camel-mime-part.c (camel_mime_part_set_content): Unref objects
that are created only to be handed off to other objects. If
they're going to be needed later, they will have been additionally
ref'ed by the object that needs them.
* providers/pop3/camel-pop3-folder.c (get_message_by_number):
unref the message stream after creating the data from it.
* camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c,
camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close,
since its semantics are dubious (what happens when you close a
stream other people still have references on?).
* providers/nntp/camel-nntp-store.c:
* providers/smtp/camel-smtp-transport.c:
* providers/pop3/camel-pop3-store.c:
replace camel_stream_close calls with gtk_object_unref.
* providers/mbox/camel-mbox-folder.c:
* providers/nntp/camel-nntp-folder.c:
* providers/sendmail/camel-sendmail-transport.c:
replace camel_stream_close with camel_stream_flush +
gtk_object_unref
2000-05-06 Dan Winship <danw@helixcode.com>
* providers/pop3/camel-pop3-store.c (query_auth_types): A machine
which serves neither POP nor KPOP is not a POP server.
* providers/smtp/camel-smtp-provider.c: Note in the description
that this provider is not yet tested.
2000-05-08 <notzed@helixcode.com>
* camel-mime-part.c (write_to_stream): Free the filter stream when
done.
* camel-mime-parser.c (folder_seek): Make sure we add the \n
terminal when we seek as well (frob!).
* camel-mime-utils.c (header_decode_addrspec): Plug minor memleak.
* camel-mime-part.c (finalize): Free header tables once finished.
* camel-folder-summary.c (camel_folder_summary_remove): Dont try
to access info after its free'd.
2000-05-07 NotZed <NotZed@HelixCode.com>
* camel-mime-part.c (write_to_stream): Apply encoding to content
part, when writing to a stream *sigh*.
* camel-stream-filter.c (do_write): implement write for the
filtering stream. Writes shouldn't be mixed with reads.
(do_flush): Implemented flush. Again write/flush shouldn't be
mixed with reads. Only flushes if the last op was write.
(do_close): Force flush on close.
* camel-mime-filter.c (filter_run): Oops, make sure we include the
backlen in the total length before passing onto the filter.
* camel-mime-filter-from.c: New filter, munges 'From ' lines into
'>From ', for mbox.
* camel-mime-parser.c (camel_mime_parser_header_remove): New
function to remove the parser's raw header, rather than
manipulating the header directly (wich doesn't work with
mempools).
* camel-mime-utils.c (header_address_list_clear): Fixed some
broken(tm) logic, which would leak entries on multivalued lists.
* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
Use ibex_save() to save the ibex. Makes a big difference to
startup times for very large mailboxes.
(camel_mbox_summary_expunge): Dum de dum, reimplemented. Designed
to be much more robust, and to stop immediately if anything awry
happens.
(copy_block): Utility function to copy n bytes from one fd to
another.
(header_write): Utility function to write out raw headers to an
fd.
(camel_mbox_summary_update): Incremental summary updater.
* providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
Dont unref the stream, because of the broken(tm) ref model of gtk
widget that for some odd reason is being perpetuated in camel.
(mbox_expunge): Reenable expunge again.
(mbox_append_message): Removed the optimised mbox append. If its
an issue, it can go back later. Cleaned up a lot, checks error
returns, and automagically translates 'From ' into '>From' as
necessary.
2000-05-07 <notzed@helixcode.com>
* camel-mime-filter.c (filter_run): Oops, forgot to add the
backlen to the pre-buffer (*poof*).
2000-05-07 NotZed <NotZed@HelixCode.com>
* camel-mime-message.c (construct_from_parser): Allow
HSCAN_FROM_END to terminate the processing of a message.
* camel-folder-summary.c (perform_content_info_load): Ick, dont
try and append a node onto its own list.
(camel_folder_summary_clear): Actually clear the indexes after
we've removed the messages.
(camel_folder_summary_clear): Set dirty if it changes.
(camel_folder_summary_load): Clear dirty.
(camel_folder_summary_save): Only save if dirty.
* providers/mbox/camel-mbox-summary.c (summary_header_load): Oops,
remember to call that parent class first ...
(summary_header_save): Here too.
(camel_mbox_summary_load): Do more checking to verify the index
contents as well as teh summary contents, against the mbox
contents.
(camel_mbox_summary_load): Removed some fo that checking, it needs
more code to work reliably.
2000-05-07 <notzed@helixcode.com>
* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
Set the size and mtime of the mbox we indexed once done.
* camel-folder-summary.c (camel_folder_summary_set_index): Dont
write the index if it changes - let the claler fix it (uh, kind of
impacts performance).
(camel_folder_summary_load): close in.
* camel-folder-summary.c (summary_format_string): Check header
exists before trying to strip its leading spaces.
2000-05-06 NotZed <NotZed@HelixCode.com>
* camel-folder.h: Removed summary info from here, and include
camel-folder-summary.h as well.
* camel-mime-parser.c (camel_mime_parser_step): Allow it to accept
a NULL databuffer.
* providers/mbox/camel-mbox-summary.c: Totally new file, now
subclasses camel-folder-summary.
* camel-folder-summary.c (message_info_load): Load the uid as a
string.
(message_info_save): And save too.
(camel_folder_summary_clear): New function, clears the contents of
the summary.
* providers/mbox/camel-mbox-folder.c: Fixes for summary changes.
(mbox_get_message_by_uid): Completely redone. Now cross-checks
the summary information to make sure we get a real message.
(mbox_append_message): Disabled the copy version of append for
now.
(mbox_expunge): Temporarily disabled the expunge function, until
it is put back in camel-mbox-summary.c
2000-05-05 NotZed <NotZed@HelixCode.com>
* camel-folder-summary.c: And same here ...
(camel_folder_summary_encode_fixed_int32): Ugh, fwrite doesn't
return -1 on error ..
(camel_folder_summary_decode_fixed_int32): Neither deos fread.
(camel_folder_summary_encode_token): Fix here too.
(summary_build_content_info): Use start-headers to get the pos of
the message, not parser_tell(), which might not be what we
expected because of parser_unstep().
(camel_folder_summary_encode_token): Use bserch() to tokenise the
values, rather than a linear search.
* camel-mime-utils.c: Defined out some memory profiling stuff I
left there by mistake.
(header_decode_mailbox): Dont try to append the word part of a
local address if we ran out of words.
* camel-mime-parser.c (folder_scan_content): Apply the fix from
the header scanner to here too.
(folder_scan_header): Only check for end of header if we have
space for it (didn't end the read with a newline)
(folder_scan_header): inptr is the only real thing we need
registerised for performance. Try to help the compiler be smart
about it ..
(folder_scan_header): Simplified the save header case a tad.
Commented out some memory profiling stuff.
2000-05-05 <notzed@helixcode.com>
* camel-mime-utils.c (header_decode_mailbox): Plug a memory leak.
(header_decode_text): Fixed memory leaks with g_string_append().
(header_encode_string): And here too, and a few other places. The
glib api is so awful ...
(header_content_type_decode): More memory leaks.
2000-05-05 <notzed@helixcode.com>
* camel-mime-parser.c (folder_scan_init_with_fd): Make sure we
init the end of buffer sentinal!
(folder_scan_init_with_stream): And here too ...
2000-05-04 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-folder.c (summary_get_message_info):
Maxcount is minimum of the max and the requested count, not the
maximum :)
* camel-mime-parser.c (folder_scan_content): Properly set midline,
so we dont falsely catch offset boundary markers (i.e. From inside
content).
(folder_read): Set a sentinal on the end of the read data (\n) so
we dont have to check the buffer boundary in the inner loop.
(mempool_*): New experimental memory management routines, speed
up simple structure parsing by about 25% ... not compiled in by
default. Something similar may be needed for camel-mime-utils to
address performance issues with g_malloc and friends.
* camel-mime-utils.c: Added a macro w(x) used to wrap all warnings
about mime/rfc violations, so they can be turned off.
* camel-folder-summary.c (summary_build_content_info): Step after
the end of a message ...
Turn into a stand-alone program for testing and profiling.
2000-05-04 Dan Winship <danw@helixcode.com>
* providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall
back to plaintext passwords if APOP fails, since it should also
fail.
2000-05-04 Dan Winship <danw@helixcode.com>
* camel-session.c (camel_session_list_providers): New function to
replace camel_provider_scan. Returns a list of either (a) all
currently-loaded providers, or (b) all available providers.
* camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that
it contains only a protocol).
* camel-service.c (camel_service_query_auth_types): Make this take
a CamelException (since it may have to try to connect to the
server, and it might not able to.)
* providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP)
support. This is mostly so I have two kinds of authmech to play
with instead of just one. (But it does actually work.)
* providers/smtp/camel-smtp-transport.c (query_auth_types): update
for prototype change, but disable the functionality, since it
doesn't really support any auth types yet.
(camel_smtp_transport_get_type): add an object init function to
set the service url_flags.
2000-05-04 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-summary.c: Yes, and anotherone.
* camel-mime-utils.c: And another one.
* camel-mime-part.c: And another one.
* camel-mime-part-utils.c: And another one.
* camel-folder-search.c: And another one.
* camel-mime-parser.c: Reverted a change wihtout a ChangeLog entry.
2000-05-04 NotZed <NotZed@HelixCode.com>
* camel-folder-summary.[hc]: Yes, CamelFolderSummary is back ...
... re-usable class to summarise and index any stream or message
and to manage/load/save the created summaries.
* camel-folder.c: Include string.h to kill a warning.
2000-05-03 Jason Leach <leach@wam.umd.edu>
* Makefile.am (INCLUDES): add $(UNICODE_CFLAGS) to the INCLUDES,
people who installed libunicde in non-standard include paths need
this.
2000-05-03 NotZed <NotZed@HelixCode.com>
* camel-folder.h: Added pos/bodypos/endpos to the basic message
content info object. Size to be removed? Moved the
messageconentinfo and messageinfo back to camel-folder-summary.h.
* camel-mime-filter-index.c (camel_mime_filter_index_set_ibex):
New function to (re)set the index to use on a filter.
* camel-mime-parser.c (camel_mime_parser_scan_from): Whole bunch
of inline docs.
(camel_mime_parser_drop_step): New function to drop a state from
the parser. Needs more testing.
* camel-mime-utils.c (rfc2047_decode_word): If the iconv handle is
-1, then dont try and convert (crashes unicode_iconv?).
(rfc2047_decode_word): Use alloca for variables instead of
g_malloc - by the rfc they should always be short.
(rfc2047_decode_word): If we can't do the charset conversion, undo
the quoted-printable/base64 at least? Should probably convert
unknown characters to the utf-8 unknown character.
2000-05-02 Larry Ewing <lewing@helixcode.com>
* camel-mime-utils.c (header_decode_date): fix typo when
dereferencing saveoffset.
2000-05-02 NotZed <NotZed@HelixCode.com>
* camel-folder-search.c: Added some header doco.
* camel.h: REmove gmime-utils.h from here.
* providers/mbox/camel-mbox-search.[ch]: Removed. Functionally
redundant.
* providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
Use the new CamelFolderSearch class to do the actual searching,
just setup the search here.
* camel-folder-search.[ch]: A helper class that providers may
subclass to provide their own search functionality, or they can
simply use as is, it supports body searches if an ibex is
supplied, and header searches if a summary is supplied.
2000-05-02 Matt Loper <matt@helixcode.com>
* Makefile.am: set G_LOG_DOMAIN.
* providers/MH/Makefile.am: same.
* providers/maildir/Makefile.am: same.
* providers/mbox/Makefile.am: same.
* providers/nntp/Makefile.am: same.
* providers/pop3/Makefile.am: same.
* providers/sendmail/Makefile.am: same.
* providers/smtp/Makefile.am: same.
2000-05-02 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-search.c
(camel_mbox_folder_search_by_expression): Dont store/remove
current search from the search list.
* providers/mbox/camel-mbox-folder.h: Removed searches list,
searches are all sync now.
* gmime-utils.[ch]: What the hell, remove it. This will break the
nntp provider. The mime parser can be used instead though.
Removed from all code including it (but none were using it).
* gmime-utils.c (_store_header_pair_from_string): Removed bizarre
string_dichotomy version of this. This code is somewhat redundant
now, and is headed for death anyway.
* gstring-util.c (g_string_dichotomy): Same with this one.
(g_string_clone): Removed a memory leak, g_string_new() allocates
its own memory.
(g_string_append_g_string): Allow to append an empty gstring onto
another gstring, dont abort()!
* string-utils.c (string_dichotomy): Removed this incredibly weird
function.
* camel-folder.c (_create): Replaced the rather obtuse use of
"string_dichotomy" function with a simple strrchr(). Still not
sure it'll work.
* camel-folder-summary.c: cvs removed a long-removed file.
* camel-mime-parser.c (folder_scan_header): Fix the previous
overflow problem properly (can happen in 2 places).
(header_append): A new macro to include the code changed above, so
it only appears in one place.
(folder_scan_step): Change the content type to text/plain if the
multipart is broken. Doesn't actually change the header though.
(header_append): Also move the header-start tracking stuff here.
Could be a static function to save code.
2000-05-02 <notzed@helixcode.com>
* camel-mime-part-utils.c
(simple_data_wrapper_construct_from_parser): Dont use autofill on
these fucking long function anmes!!!!!!
2000-05-02 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-summary.c
(camel_mbox_summary_expunge): Fix the offset for the summary when
an item is expunged to take account of the From line.
2000-05-01 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-folder.h (CamelMboxFolder): Removed
search_id.
* providers/mbox/camel-mbox-search.c
(camel_mbox_folder_search_cancel): Remove.d
(camel_mbox_folder_search_complete): Removed.
(camel_mbox_folder_search_by_expression): Changed back to sync
api.
(struct _searchcontext): Removed cancelled flag.
(find_context): Removed.
(func_header_contains): Debug out some search stuff.
* providers/mbox/camel-mbox-search.h
(camel_mbox_folder_search_by_expression): Moved back to sync api.
* providers/mbox/camel-mbox-summary.c
(camel_mbox_summary_set_flags_by_uid): New function to update the
flags in the summary.
(camel_mbox_summary_expunge): Expunge messages from a folder.
(offset_content): Re-align offsets of summary when messages
added/removed to an existing summary.
(camel_mbox_summary_remove_uid): Remove a message summary entry by
uid.
(index_folder): Restore flags from X-Evolution header, if they are set.
(index_folder): Make sure we index using a decimal uid, since
thats what everything else indexes off (oops).
Upped SUMMARY_VERSION as a result.
(camel_mbox_summary_expunge): Oops, my wrong, use the string uid
to unindex on.
* providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
Connect to the message_changed signal.
(_init): Set permanent flags to something reasonable. No user
flags yet ...
(message_changed): If the flags of the message change, update the
flags in the summary.
(mbox_expunge): Implement the expunge.
(camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s
(mbox_expunge): Emit a folder_changed signal on expunge (uh, even
if it didn't ...)
* camel-folder.c (_finalize): Uh, dont free permanent_flags
anymore (this wouldn't failed anyway, it was a GList !!!)
(camel_folder_search_complete): Removed.
(camel_folder_search_cancel): Removed.
(camel_folder_expunge): Changed to only allow expunge on an open
folder. It doesn't make sense for mbox, otherwise (?)
(camel_folder_class_init): Added a folder_changed signal.
* camel-folder.h (struct _CamelFolder): Change permanent_flags to
a bitfield.
(list_permanent_flags): Renamed to get_permanent_flags, and
returns a bitfield.
(camel_folder_expunge): Changed expunge to a void type. The
messages would no longer be useful after they have been removed
...
(CamelFolderClass): New function summary_get_by_uid() to get a single
summary.
(*search*): Moved back to synchronous search api ... *sigh*
* camel-folder.h: Removed CamelSearchFunc.
* camel-mime-message.c (set_flag): Removed.
(camel_mime_message_set_flag): Removed.
(get_flag): Removed.
(camel_mime_message_get_flag): Removed.
(add_flag_to_list): Removed.
(get_flag_list): Removed.
(camel_mime_message_get_flag_list): Removed.
(camel_mime_message_get_flags): New interface to get system flags.
(camel_mime_message_set_flags): " to set ".
(camel_mime_message_get_user_flag): To get a user flag.
(camel_mime_message_set_user_flag): To set a user flag.
(finalize): Hmm, the old one free'd the key and data, not good
when the data is a boolean ...
2000-04-30 Dan Winship <danw@helixcode.com>
* camel-provider.h: Tweak the definition of CamelProvider. Among
other things, a provider may now be both a store and a transport.
* camel-provider.c: Remove a lot of code we had no intention of
using. This now only contains two functions: camel_provider_init
to read the installed .urls files, and camel_provider_load to
load and register a new provider.
* camel-session.c: Remove more unused code and simplify some of
the remaining code. The list of available provider modules is now
stored in the session, and it handles calling camel_provider_load
to load them as needed. Provider registration is now done by
calling back from the module init routine, which allows a single
module to register providers for multiple URL types.
* providers/*: Update provider structures and init routines for
the new stuff. Add a .urls file to each provider specifying what
urls it handles, and install that with the library.
* providers/nntp/camel-nntp-provider.c: Add hints towards
supporting both news: and nntp: URLs, and using nntp as both a
store and a transport.
2000-04-29 Dan Winship <danw@helixcode.com>
* camel-internet-address.c (camel_internet_address_get): const
poison
* camel-mime-part-utils.c
(simple_data_wrapper_construct_from_parser):
camel_mime_parser_tell() returns an offset from where it started
parsing, not necessarily from the start of data. Since we're
parsing a bounded seekable_stream, we need to add the stream's
starting bound to camel_mime_parser_tell's return value to
create the substream in the right place.
* camel-seekable-substream.c
(camel_seekable_substream_new_with_seekable_stream_and_bounds):
say CAMEL_STREAM_UNBOUND rather than -1 in doc.
* camel-seekable-stream.c (camel_seekable_stream_seek): Add more
info to docs.
2000-04-28 Dan Winship <danw@helixcode.com>
* camel-mime-parser.c (folder_scan_header): fix a bug that would
cause corruption with very long headers.
2000-04-27 Ettore Perazzoli <ettore@helixcode.com>
* providers/pop3/Makefile.am (INCLUDES): Add `-I$(srcdir)/../../..'
to pick the Camel includes.
* providers/sendmail/Makefile.am (INCLUDES): Likewise.
* camel.h: Don't #include <camel/data-wrapper-repository.h> anymore.
2000-04-27 NotZed <NotZed@HelixCode.com>
* camel-mime-utils.c (check_header): Dont try and check a NULL
header.
* camel-recipient.[ch]: Dead. Its not pining.
* camel-mime-message.h: Dont include recipients.h anymore.
* camel-mime-message.c (camel_mime_message_add_recipient): Accept
name/address separately, and store in an CamelInternetAddress.
(add_recipient): Removed.
(remove_recipient): Removed.
(remove_recipient_address): Renamed from remove_receipient, works
via address.
(camel_mime_message_remove_recipient_name): New function to remove
by name.
(get_recipients): Removed.
(camel_mime_message_get_recipients): Return a camel-internet-address.
(write_to_stream): No longer write receipients directly.
(write_recipients_to_stream): Removed.
(write_one_recipient_to_stream): Removed.
(camel_mime_message_init): Setup recipients hashtable, rather than
usign the recipients stuff.
(set_recipient_list_from_string): Killed, a violent and lengthy
death.
(process_header): Simplified recipient handling code a lot.
(received_date_str, sent_date_str, reply_to_str, subject_str,
from_str): Removed some oddly-defined global statics.
(camel_mime_message_class_init): Dont initialise above variables
anymore.
(init_header_name_table): Removed, use a table to init this, and
do it in class init (2 lines of code ...).
* camel-news-address.c: Class to represent news addresses -
currently empty, and not built.
* camel-internet-address.h: Class to represent internet (email)
addresses.
* camel-address.h: Abstract class to represent (lists of)
addresses.
2000-04-27 Dan Winship <danw@helixcode.com>
* camel-mime-part.c (write_to_stream): Revert previous change. I
was confused.
* camel-url.[ch] (camel_url_encode, camel_url_decode): expose
these routines.
2000-04-26 Dan Winship <danw@helixcode.com>
* camel-mime-part.c (write_to_stream): Only write a newline
between the headers and the content object if the content object
is not a CamelMedium. (If the content is a medium, it may have its
own headers, which then need to go before the blank line.)
* camel-mime-body-part.[ch]: Remove. We weren't using the fields
that made this different from camel-mime-part, so it basically
just forced us to do lots of gratuitous typecasting.
* camel-multipart.[ch]: Use CamelMimePart. Remove the multipart
parent stuff, since we weren't using that either.
* etc: update for CamelMimeBodyPart -> CamelMimePart
2000-04-26 Dan Winship <danw@helixcode.com>
* camel-medium.c (set_content_object): sink the content object
after referencing it.
* camel-mime-part.c: fix various little things in the handling
of CamelMedium methods. Change camel_mime_part_set_text to the
more generic camel_mime_part_set_content.
* camel.h: sync to current reality
* camel-folder-utils.[ch]: removed
* camel-mime-utils.c (header_format_date): fix format specifier
for time zone. Fix typo in month names array.
2000-04-26 NotZed <NotZed@HelixCode.com>
* camel-seekable-substream.c (stream_seek): Changed to have
absolute seek semantics, not relative to the bounds.
* camel-seekable-stream.c (reset): When we reset, seek to the
start of the bound, if there is one.
(stream_tell): Make tell virtual.
* camel-stream-filter.c (do_available): Removed.
* camel-stream-buffer.c: Remove leading _'s from static functions.
(stream_read): Renamed from read(). Fancy that conflicting! (my
boo!) Others too.
* providers/pop3/camel-pop3-folder.c (get_message_by_number):
Changed to stream_mem interface.
* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed
for streamfs interface changes, and implement a failure case.
(_append_message): Changed for fs stream interface change.
* camel-multipart.c (print_part): Iterate rahter than callback. I
hate glists's interface (hence, move this to write_to_stream).
(write_to_stream): Return an error (yuck, this is a royal PITA to
do with the stream write interface).
* camel-mime-message.c: Removed leading _ from static names.
* camel-mime-part.h: construct_from_parser() now returns an error
code.
* camel-mime-part-utils.c
(camel_mime_part_construct_content_from_parser): Changed to use a
camel-data-wrapper instead of a camel-simple-data-wrapper (no
change needed elsewhere?).
(simple_data_wrapper_construct_from_parser): Fixes for stream-mem
interface changes.
* camel-simple-data-wrapper.[ch],
camel-simple-data-wrapper-stream.[ch],
camel-stream-data-wrapper.[ch], removed. Fixed including of these
files.
* camel-mime-part.c (camel_mime_part_set_text): Remove the use of
the camel-simple-data-wrapper-stream, just use a mem stream.
(write_to_stream): Renamed from my_*
(construct_from_stream): Return an error on error.
* camel-stream-mem.c (camel_stream_mem_new*): Remove mode
parameter.
* camel-stream-mem.h (enum CamelStreamMemMode): Removed. It
wasn't used at all.
* camel-data-wrapper.h: Add camel_data_wrapper_new() to create
these.
(write_to_stream, construct_from_stream): Return an error
indicator for success. Fixed all methods to match (ICK).
* Makefile.am (libcamel_la_SOURCES): Remove
camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c,
camel-stream-data-wrapper.c. Obsoleted by code re-use!
* camel-data-wrapper.c (construct_from_stream): Change the default
implementation to just set the output stream == construction
stream. Well, this lets me get rid of both simple-data-wrapper
and stream-data-wrapper (unused anyway), and
simple-data-wrapper-stream in one hit. CamelDataWrapper is now
also a concrete class.
(write_to_stream): Use camel_stream_write_to_stream() to
calculate/return values (and save code).
Include <errno.h> for obvious reasons.
* camel-stream.c (eos): Provide a default implementation of .eos().
(camel_stream_write_to_stream): Make it return an error code on
error.
(camel_stream_printf): Changed to return the number of bytes
written/error.
(camel_stream_available): Removed.
* camel-stream-fs.h (enum CamelStreamFsMode): Removed. Changed to
use unix modes and so forth (wasn't used for anything but new file
creation and didn't work well either).
* camel-stream-fs.c: Removed leading _'s for names. And removed
some virtual method 'documentation'.
(destroy): Dont try and close a closed/error fd. Only report
error if close returns -1. Moved all the code to finalise(), and
killed this function.
(init_with_fd): Properly setup the seek offset, if it is a
valid and seekable file descriptor.
(init_with_fd_and_bounds): Use off_t for bounds, set bounds on the
seekable stream.
(init_with_name): Return error codes.
(init_with_name_and_bounds): Ditto.
(camel_stream_fs_new_with_name): REturn NULL object if it failed.
(camel_stream_fs_new_with_name_and_bounds): Return NULL object on
failure. Changed with_name* api's to take unix open style args
and flags.
(read): The bounded stream bounds checking seemed off, simplified
code a bit.
(write): Implement bounds checking for writing, the comment was
wrong, it could make sense to bound writing. Cleaned up a little.
(available): Gone.
(eos): Removed. Use CamelStream's implementation now.
(close): Reset the fd to -1, provide a warning for bad usage.
(seek): Cleaned up. Changed the behaviour a little, the returned
offset is the absolute position in the file, even in bounded
streams.
(seek): Seek from end mirrors lseek() behaviour (reverse seeking).
2000-04-25 NotZed <NotZed@HelixCode.com>
* camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof
indicator to other parent classes.
* camel-stream.c (camel_stream_printf): New utility
function. Obvious use.
* camel-stream-mem.c: Removed leading _'s from static func's.
(camel_stream_mem_new_with_byte_array): Fixed for api changes, set
the owner for the byte array to us.
: Removed A bunch of gtk doc stuff for static (implementation) functions.
(available): Removed.
(write): Fixed the write implementation so that seek() works on a
seekable memory stream, as expected. Seeking past the end of the
buffer has unix semantics (filling with 0).
(available): Removed.
(write): Implement seekable stream bounded stream.
(read): Implement seekable stream bounded stream.
(close): Dont free the stream_mem if we're not the owner.
(seek): Allow to seek beyond the end of memory area,
implement bounds checking.
(seek): Set errno on bad policy.
* camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t.
(new_with_buffer): Changed len to be a size_t.
(set_buffer, set_byte_array): New interface functions.
(struct _CamelStreamMem): Removed position, it is stored in the
superclass.
* camel-stream.h: Removed some of the seemingly random
whitespace. Removed the available method (its not
impelemented/useful enough).
* camel-seekable-substream.c
(init_with_seekable_stream_and_bounds): Remove the data_available
stuff, it hasn't been properly implemented/finished, and may never
work (unfortunately *sigh).
(reemit_parent_signal): Removed part of the above change.
(set_bounds): Removed (moved to seekable-stream).
: Fixed up some of the generally unreadable indenting (sorry,
wrapping at 80 characters with
camels_really_long_function_names()
just_doesnt_work_very_well_does_it().
(available): Removed.
(stream_seek): Fixup for object changes. Make sure we return -1
if the parent stream can't seek.
* camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New
function to bound any seekable stream.
: Removed _'s.
(camel_seekable_stream_class_init): Implement an init function, to
setup the stream bounds to unbound.
* camel-seekable-stream.h (CamelSeekableStreamClass): New virtual
method set_bounds for seekable streams.
(CAMEL_STREAM_UNBOUND): New define for no bound.
* camel-seekable-substream.h (struct _CamelSeekableSubstream):
Removed sup_bound and inf_bound, moved to CamelSeekableStream (and
renamed, and changed to off_t's).
(new_with_seekable_stream_and_bounds): Use off_t as the bounds.
(CamelSeekableSubstreamClass): Uh, why was the intialiser virtual?
Removed.
* camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek
to accept an off_t as the offset.
(struct _CamelSeekableStream): Renamed cur_pos to position and
changed it to an off_t type.
(enum CamelStreamSeekPolicy): Set to match the SEEK_* constants
from lseek().
(get_current_position): Renamed to tell().
* camel-stream-buffer.h: Commented out set_vbuf - never implemented.
2000-04-25 Dan Winship <danw@helixcode.com>
* camel-stream-buffer.c (_eos): only return TRUE if the parent is
at eos AND the buffer has been exhausted
* camel-mime-message.c: fix some incorrect macro usage that
resulted in bogus casts
2000-04-24 Dan Winship <danw@helixcode.com>
* camel-mime-part-utils.c
(simple_data_wrapper_construct_from_parser): fix a cut-and-pasto.
* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): ref
(and sink) the message stream if we're going to unref it later.
Otherwise it could get destroyed while there are still substreams
attached to it. This needs a cleaner solution.
* camel.h: remove data-wrapper-repository.h include(s)
2000-04-24 NotZed <NotZed@HelixCode.com>
* camel-mime-message.c (construct_from_parser): Allow MESSAGE_END
_or_ EOF as valid termination conditions.
* providers/mbox/camel-mbox-summary.c (message_struct_new): Decode
and then re-encode the addresses, so they are consistently
formatted.
* camel-mime-utils.c (header_decode_mailbox): Store the address in
a _header_address. And try to get a comment-stored name if there
is one.
(header_decode_address): Actually return an address.
(header_to_decode): Renamed to header_address_decode()
(header_mailbox_decode): New function to get a single mailbox.
(header_mime_decode): Return the major/minor value, as
appropriate.
(header_address_new, and friends): Whole bunch of utility
functions for working with the address thingies.
(header_decode_domain): Free the string header, and dont expand
'.' into ' . '.
* camel.c (camel_init): No longer call
data_wrapper_repository_init.
* camel-medium.c (write_to_stream): Moved (back) to
camel-mime-part.
(add_header):
(set_header):
(remove_header):
(get_header): Make all these abstract, and spit warnings if
called. I guess it could manage the list, but well, it doesn't.
* camel-medium.h (struct _CamelMedium): Dont store headers here,
the implementor is the only one who knows their format.
(CamelMediumClass): Changed header values to be void *'s. They
need not be strings?
* camel-simple-data-wrapper.c (construct_from_stream): And we're
back. Set the output stream.
(construct_from_parser): Moved to camel-mime-part-utils.
* camel-mime-part-utils.c
(camel_mime_part_construct_content_from_parser): Create the
contents of multipart and simple messages.
(camel_mime_part_construct_content_from_parser): Oops, this was
totally screwed up, try creating the right cotnent on the right
object.
* camel-multipart.c (construct_from_parser): Moved to
camel-mime-part-utils.
(separate_part): Removed.
* camel-mime-part.c (construct_from_stream): Back again! This now
switches over to using a mime parser for any mime parts, only.
(my_write_to_stream): Write our headers and so forth here.
(add_header): Add header directly, parent class is abstract.
(remove_header): Ditto.
(set_header): Ditto.
* camel-data-wrapper.c (camel_data_wrapper_construct_from_stream):
Remade abstract.
(camel_data_wrapper_construct_from_parser): Moved to
camel_mime_part.
* camel-data-wrapper.h: Put back construct_from_stream.
* camel-mime-part.h: Put construct_from_parser in here, the
data-wrapper shouldn't know about mime. Ok, so now to undo half
of the last hours changes ... duh.
2000-04-23 Dan Winship <danw@helixcode.com>
* camel-mime-utils.c (header_to_decode, header_mime_decode): fix
some obvious minor bugs noted by -Wall.
2000-04-23 NotZed <NotZed@HelixCode.com>
* providers/pop3/camel-pop3-folder.c (get_message_by_number): Use
construct_from_stream instead of set_input_stream().
* camel-simple-data-wrapper-stream.c
(camel_simple_data_wrapper_stream_construct): REmoved the destroy
callback code.
(wrapper_destroy_cb): Removed.
* camel-simple-data-wrapper.h: Add prototype for _construct()
method.
* camel.c: Include unicode.h to kill a warning.
* camel-data-wrapper.h (CameldataWrapperClass): Removed
construct_from_stream virtual method.
Removed get/set input stream.
* data-wrapper-repository.[ch]: Removed&from build. Obsoleted?
The justification as is follows: It is mixing storage
protocol/format with message architecture. It really just doesn't
serve any purpose, as each medium implementor will have to have its
own type->handler mapping, and the only current implementor,
mimepart has a very simple structure and no need for this.
* camel-medium.c (write_to_stream): Moved here from most of the
stuff in camel-mime-part. Well, the MEDIUM is the one that knows
what the headers are, and the content is, let it write it out.
* camel-mime-part-utils.c (camel_mime_part_construct_content):
Copied from camel-mime-part.c, removed handling of message
followon state (moved to camel-mime-message).
(camel_mime_part_construct_content_from_parser): Renamed from
construct_content.
(camel_mime_part_construct_headers_from_stream):
(camel_mime_part_construct_content_from_stream):
(camel_mime_part_store_stream_in_buffer): Removed. Replaced by
the new construct from parser stuff.
* camel-mime-message.c (construct_from_parser): Do
construct_from_parser for mime-message.
(_write_to_stream): Set the mime-version header for medium to
write out, rather than writing it out ourselves.
* camel-data-wrapper.c (set_mime_type_field): Ref the
content_field when we get it?
(construct_from_stream): Removed.
(camel_data_wrapper_construct_from_stream): Changed to a helper
function, creates a mime_parser, and constructs from that.
(set_input_stream): Removed.
(camel_data_wrapper_set_input_stream): Removed.
(get_input_stream): Removed.
(camel_data_wrapper_get_input_stream): Removed.
* camel-mime-parser.c (camel_mime_parser_unstep): New function.
Cause a subsequent call to mime_parser_step() to return the same
state over again.
* providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
Initial test code using the mime parser to construct the message.
(_get_message_by_uid): Use construct_from_stream() instead of
creating our own parser.
* camel-mime-part.c (construct_from_parser): part constructor.
(camel_mime_part_construct_content): Basically a simpler
replacement for the datawrapper repository.
(camel_mime_part_init): Set the default type to text/plain.
(camel_mime_part_construct_content): Removed to
camel-mime-part-utils.c
(my_get_output_stream): Removed. The streeam is in the
data-wrapper.
(my_get_content_object): Removed. The content object is stored in
the medium. If none is there, the object wasn't created properly.
(my_write_content_to_stream): Removed. The content object is the
one that knows how to write itself out!!!!!!!!
(my_write_to_stream): Remove the base header writing stuff - has
been moved to camel-medium, where it belongs. This can just be
used to check for mandatory headers.
(my_construct_from_stream): Removed.
(my_set_input_stream): What the hell, i'll remove this too.
Nobody seems to understand how it differs from create from stream,
and they both seem to serve the same purpose ...
* camel-simple-data-wrapper.c (construct_from_parser): Initial
implementation of a content constructor.
(construct_from_stream): Removed! Job taken over by
construct_from_parser.
* camel-multipart.c (construct_from_parser): Multipart
construction routine.
(camel_multipart_init): Set the default multipart type to
multipart/mixed. Duh, no subtype is not allowed anyway.
(set_input_stream): REmoved. Replaced by construct_from_parser.
2000-04-22 Dan Winship <danw@helixcode.com>
* camel-multipart.[ch]: clean, document, etc.
(camel_multipart_init): pick a prettier default boundary. Still
need to deal with the larger problem
2000-04-22 NotZed <NotZed@HelixCode.com>
* camel-mime-message.h (struct _CamelMimeMessage): Removed
send_date, and received_date, and replaced it with a time_t
'date' (this is what the header is called), and date_offset to
store the GMT offset of the date.
* camel-mime-message.c (camel_mime_message_set_from): Update raw
header as we go.
(_set_from): Removed.
(_get_from): Removed.
(camel_mime_message_get_from): Moved implementation here.
(camel_mime_message_get_subject): Move implementation here.
(_get_subject): Nuked.
(camel_mime_message_set_subject): Handle utf-8 input, and also
update raw header when changed.
(_set_subject): Removed.
(_set_received_date): Removed.
(camel_mime_message_set_received_date): Removed.
(_get_received_date): Removed.
(camel_mime_message_get_received_date): Removed.
(_get_sent_date): Removed.
(camel_mime_message_get_sent_date): Removed.
(camel_mime_message_get_date): New function to get the date as a
time_t/offset.
(camel_mime_message_set_date): Set the date as a time_t/offset.
(camel_mime_message_get_date_string): Get the date as a string.
(camel_mime_message_init): Initialise the current date as
'CMAEL_MESSAGE_DATE_CURRENT'.
(_set_reply_to): Removed.
(camel_mime_message_set_reply_to): Moved implementation here.
This is still broken, reply-to can have multiple addresses.
(_get_reply_to): Removed.
(_set_field): Removed, no longer used anywhere.
(_get_field): Also removed.
(_init_header_name_table): Add the Date header.
(process_header): Also handle snooping of Date header here.
* camel-stream-filter.c (finalise): Unref the source stream on
finalise, and also call the parent class (oops).
* camel-mime-parser.c (camel_mime_parser_state): New function to
get the current parser state.
(camel_mime_parser_stream): Allow you to get the stream back from
the mime_parser.
(camel_mime_parser_fd): Alternative to allow you to get the fd
back from the mime_parser.
(folder_scan_init_with_stream): Properly ref/unref the stream.
(folder_scan_close): Properly unref the stream/close the fd on
exit.
(folder_scan_init_with_fd): Close the old fd if there is one.
* camel-data-wrapper.c (camel_data_wrapper_construct_from_parser):
New method, construct a data wrapper from an initialised parser.
(construct_from_parser): Empty implementation.
* providers/mbox/camel-mbox-summary.c (message_struct_new):
Convert subject line to unicode, before storing in the summary.
(strdup_trim): Removed, no longer needed.
* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref
the folder after setting it in the new message.
* camel-mime-part.c (my_set_content_object): Have the headers
follow the content-type change here too.
(my_write_to_stream): Dont write content-type here, automatically
stored in the headers ...
(my_write_to_stream): Use header_disposition_format() to format
the content-disposition header.
(my_write_to_stream): Removed old code, all headers are now stored
in the camel-medium level, always. Need to do the same with
camel-mime-message i suppose ...
(my_write_to_stream): Write the content using the parent class,
not some weird function.
(camel_mime_part_class_init): Dont override get_output_stream.
(camel_mime_part_encoding_from_string): Bleh, make it
case-insensitive.
* camel-mime-utils.c (header_content_type_is): Handle empty types.
(header_encode_string): Start of an implementation of the rfc2047
encoder. It does iso-8859-1, and us-ascii, and utf-8 (others get
tricky *sigh*)
(rfc2047_encode_word): Convert a single word/string into rfc2047
encoding.
(quoted_encode): Different quoted-printable encoding for rfc2047
encoding of headers.
* gmime-content-field.c (gmime_content_field_write_to_stream): Use
header_content_type_format() to format it.
2000-04-21 NotZed <NotZed@HelixCode.com>
* camel-mime-utils.h: Add prototype for header_param_list_free.
* camel-recipient.c: New function to remove all the types of a
recipient list. I think this whole object needs a major review.
* camel-mime-message.c (camel_mime_message_class_init): Removed
parse_header_pair override, override add_header instead.
(_parse_header_pair): Renamed to add_header.
(remove_header): Add this method, to make sure we keep upto date
with removed headers too.
(_set_field): If given a NULL value, clear it out.
(_set_recipient_list_from_string): Constify.
(set_header): Override set_header from camel_medium.
(process_header): Local function to handle set/add/remove of each
header we know about.
* camel-mime-part.c (camel_mime_part_class_init): Removed
parse_header_pair setup.
(my_parse_header_pair): Moved into add_header(), removed.
(my_set_disposition): Allow a NULL disposition to clear it.
(my_set_content_id): Allow NULL content id to clear it.
(remove_header): Track removed headers.
(my_set_description): Allow NULL description to clear it.
(my_set_content_MD5): Make sure we copy the md5 value, and allow a
NULL value to reset it.
(my_set_filename): Copy the filename.
(my_set_header_lines): Removed. Nothing uses it, it doesn't
actually serve any purpose.
(camel_mime_part_set_header_lines): Ditto.
(my_get_header_lines): Ditto.
(camel_mime_part_get_header_lines): Ditto.
(camel_mime_part_class_init): Remove *_header_lines setup.
(camel_mime_part_init): Remove header_lines init.
(my_finalize): Remove header_lines finalise.
(my_write_to_stream): Write the headers here. This is just WRONG,
camel_medium should be doing this.
(my_get_output_stream): Kill a warning.
(camel_mime_part_encoding_to_string): Ditto.
(camel_mime_part_set_description): Unvirtualiase, use add_header()
to do the processing.
(my_set_description): Removed.
(set_disposition): Renamed from my_set_disposition.
(camel_mime_part_get_description): Get the descriptionf rom the
get_header method.
(my_get_description): Removed.
(my_set_filename): Removed.
(camel_mime_part_get_filename): Get the parameter from the
disposition.
(camel_mime_part_encoding_from_string): Handle NULL string.
(camel_mime_part_init): Remove reference to filename.
(my_finalize): Dont free filename.
* camel-mime-part.h (CamelMimePartClass): Removed
parse_header_pair() method, it doesn't add anything that
add_header() can't be used for.
(CamelMimePartClass): Remove *_header_lines methods.
(struct _CamelMimePart): Remove header_lines list.
(struct _CamelMimePart): Removed filename attribute.
* camel-medium.c (camel_medium_init): Init headers to null, not a
hashtable.
(add_header): Append the headers as a list.
(remove_header): Remove headers as a list.
(get_header): Likewise for lookup.
(free_header): Removed, no longer needed.
(finalize): Free headers using header_raw_clear().
(camel_medium_set_header): New function, to reset and override all
values of a header with a new value.
* camel-medium.h (struct _CamelMedium): Changed to use a
header_raw struct rather than a hash table, to store headers
(many headers can occur multiple times).
* camel-mime-utils.c (header_raw_find_next): New function, allows
you to find multi-valued header fields.
(header_disposition_format): New function to format/create
content-disposition header string.
(header_param_list_format_append): Function to format parameter
lists into a GString.
(header_content_type_format): Function to format content-type into
a usable format.
(header_set_param): allow NULL value to remove the parameter.
(decode_token): Renamed from header_decode_token.
(header_decode_token): New interface for external use.
(quoted_decode): Made static to kill annoying warnings.
(g_strdup_len): Killed, replaced with calls to g_strndup().
(rfc2047_decode_word): Made static to kill warnings.
(decode_coded_string): Terminated.
(g_string_append_len): Made static to kill warnings.
(header_decode_text): Made static to kill warnings.
(header_decode_text): Constify.
(rfc2047_decode_word): Constify.
(header_param): Constify.
(header_content_type_new): Copy the type/subtype strings.
(header_param_list_decode): Made static.
(header_param_list_format_append): Made static.
(quoted_decode): Constify.
(g_string_append_len): Constify.
(header_token_decode): New function to decode a single token.
* providers/mbox/camel-mbox-summary.c (header_write): Append a
trailing \n when writing headers.
(strdup_trim): Killed a warning.
(camel_mbox_summary_set_uid): Make sure the next uid is at least 1
higher than any existing one.
(header_evolution_decode): Use header_token_decode to get the
token.
* camel-mime-parser.c (folder_scan_header): Strip the trailing \n
of the end of all header lines.
2000-04-20 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-utils.[ch]: Removed.
* providers/mbox/camel-mbox-parser.[ch]: Removed. Removed
references to it.
2000-04-20 Dan Winship <danw@helixcode.com>
* camel-mime-utils.c (rfc2047_decode_word): use libunicode iconv
functions rather than libc ones (since libc might not have them).
(header_decode_date): add autoconfiscation on timezone code
* camel.c (camel_init): call unicode_init ()
2000-04-20 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-summary.c (message_struct_new): Trim
leading/trailing spaces off the raw headers.
* MERGE NEW_PARSER branch into HEAD, fixed conflicts.
* gmime-content-field.c (_print_parameter): Duh, removed again
(@@#$@ cvs merge).
* camel-mime-utils.c (header_content_type_is): Constify.
(header_content_type_unref): Killed a couple warnings.
* camel-folder.c (_init): Removed more log crap.
* providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for
summary changes.
* providers/mbox/camel-mbox-folder.c (_get_message_by_number):
Fixed for new summary interface. Added a warning for using this
broken api.
(_get_message_by_uid): Fixed for message new with session
vanishing.
2000-04-19 Dan Winship <danw@helixcode.com>
* camel-simple-data-wrapper-stream.c
(camel_simple_data_wrapper_stream_get_type): This is a subtype of
CamelSeekableStream, not CamelStream.
* camel-seekable-substream.c: clean up a lot.
(eos): When testing for end-of-stream, reset the parent position
before testing if it is at end-of-stream, since either (a) it may
have been seek'ed to eos by someone else, or (b) we may have been
seek'ed away from eos and it hasn't been synced yet.
* camel-medium.[ch] (camel_medium_add_header): const poison.
(Belatedly goes with my change of 2000-02-23.)
(camel_medium_init): Use g_strcase_{hash,equal} on the header
array.
2000-04-18 Dan Winship <danw@helixcode.com>
* camel-mime-part.c (my_set_input_stream):
* camel-data-wrapper.c (set_input_stream, set_output_stream): do
better reference counting of streams so they actually go away
when they should.
* camel-log.[ch], *: Nuke camel log stuff. Replace calls to
CAMEL_LOG_WARNING with calls to g_warning.
* camel-data-wrapper.[ch]:
* camel-simple-data-wrapper.[ch]:
* camel-medium.[ch]: Clean, polish, document. Most of the gtk-doc
comments added to camel-data-wrapper.c note serious problems that
need to be fixed.
2000-04-17 Dan Winship <danw@helixcode.com>
* camel-mime-message.[ch]: Remove the "session" field from
CamelMimeMessage. Nothing uses it, about half of the existing
calls to camel_mime_message_new_with_session pass NULL, and
there's no obvious reason for it to be there.
* providers/MH/camel-mh-folder.c:
* providers/maildir/camel-maildir-folder.c:
* providers/mbox/camel-mbox-folder.c:
* providers/mbox/camel-mbox-utils.c:
* providers/nntp/camel-nntp-folder.c:
* providers/pop3/camel-pop3-folder.c: Use camel_mime_message_new
instead of camel_mime_message_new_with_session.
* camel-session.c (get_store_for_protocol_with_url): Set the
exception if no provider is found.
* camel-url.c: Add code to encode and decode %-escapes in URLs,
and do some additional correctness-checking on URL syntax. From
Tiago Antào with modifications by me.
2000-04-14 Chris Toshok <toshok@helixcode.com>
* providers/Makefile.am (SUBDIRS): add nntp
2000-04-14 Christopher James Lahey <clahey@helixcode.com>
* providers/mbox/camel-mbox-folder.c: Fix switch statement.
2000-04-14 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-folder.c (_exists): always return TRUE
for now. we need to check the server response to make sure the
group exists.
(_get_message_by_uid): make sure to account for the \n we add to
the string after every line.
* providers/nntp/camel-nntp-utils.c (get_XOVER_headers): function
to get the headers using the XOVER command.
(get_HEAD_headers): function to get the headers using the HEAD
command on each message. slooooooow.
(camel_nntp_get_headers): make this function use either XOVER or HEAD
versions depending on whether or not the server extension is present.
2000-04-14 Dan Winship <danw@helixcode.com>
* camel-formatter.[ch]: This didn't belong in Camel. Move to mail/
* Makefile.am, camel-types.h: remove references to
camel-formatter.
2000-04-12 Matt Loper <matt@helixcode.com>
* camel-folder-pt-proxy.c (_folder_open_cb): Print warning message
for broken function.
(_folder_close_cb): Same.
2000-04-12 Miguel de Icaza <miguel@gnu.org>
* Makefile.am (pthread_SRC): Use correct names for the pthread
source variables.
2000-04-10 Dan Winship <danw@helixcode.com>
* providers/pop3/camel-pop3-store.c (pop3_connect): fix various
bugs in APOP code (still untested) and some of the error cases.
* camel-provider.h: Clarify what provider.protocol, provider.name,
and provider.description should be.
* providers/mbox/camel-mbox-provider.c:
* providers/pop3/camel-pop3-provider.c:
* providers/sendmail/camel-sendmail-provider.c:
* providers/smtp/camel-smtp-provider.c: update protocols, names,
and descriptions
* providers/mbox/camel-mbox-folder.c (_get_message_by_number):
implement get_message_by_number for the mail fetch code.
2000-04-09 Jeffrey Stedfast <fejj@stampede.org>
* providers/smtp/camel-smtp-transport.c: reformatted to fit
the standard indent format used by helix code
2000-04-09 Dan Winship <danw@helixcode.com>
* camel-movemail.c: New file with new function to dot-lock an mbox
file and copy it to a safe private directory.
2000-04-08 Christopher James Lahey <clahey@helixcode.com>
* providers/smtp/.cvsignore: Added a .cvsignore file.
2000-04-08 Dan Winship <danw@helixcode.com>
* providers/sendmail/camel-sendmail-transport.c (_send_internal):
actually record the pid returned by fork(). Noticed by clahey.
* providers/smtp/camel-smtp-transport.c: #include <sys/param.h>
for MAXHOSTNAMELEN. (This is a stopgap: some of the uses of
MAXHOSTNAMELEN are wrong anyway...)
2000-04-07 Jeffrey Stedfast <fejj@stampede.org>
* providers/smtp/camel-smtp-transport.c: fixes to numerous bugs;
should now build fine.
* providers/Makefile.am: Readded smtp now that smtp builds without
error.
2000-04-20 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-summary.c
(camel_mbox_summary_next_uid): Public function to get the next
uid, makes sure its saved to disk too.
* camel-mime-part.c (my_finalize): Fix disposition crap with a
real disposition.
(my_set_disposition): Likewise.
(my_get_disposition): And here.
(my_write_to_stream): And here, needs more cleanup.
* providers/mbox/camel-mbox-folder.c (_append_message): Assign a
new uid at this point.
* gmime-content-field.c (gmime_content_field_write_to_stream):
Make something up if we have an invalid/missing content type
(i.e. text/plain).
2000-04-19 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-folder.c (_delete): Fixed completely
broken switch() syntax, only compiled because errno is a macro on
some systems.
(_list_subfolders): Likewise.
2000-04-18 NotZed <NotZed@HelixCode.com>
* camel-mime-parser.c (folder_scan_init): init stream to null.
* providers/mbox/camel-mbox-summary.c
(CAMEL_MBOX_SUMMARY_VERSION): Moved to .c file, incremented.
(index_folder): Changed to have index passed via the summary.
(decode_string): Do a sanity check on the string size, so we dont
visit g_malloc()'s friendly abort().
* camel-folder-pt-proxy.c (camel_folder_pt_proxy_class_init):
Removed reference to set_name.
(_set_name): Removed.
* providers/mbox/camel-mbox-utils.c
(parsed_information_to_mbox_summary): Removed. Most of this file
is about to be binned.
* providers/mbox/camel-mbox-search.c (func_header_contains): Fixes
for changes to summary interface.
(struct _searchcontext): Remove pointer to message info, get it
straight from the mboxsummary.
(camel_mbox_folder_search_by_expression): New summary interface.
(camel_mbox_folder_search_by_expression): Uh, the summary is not
an object anymore (well not yet).
* providers/mbox/camel-mbox-folder.c
(camel_mbox_folder_class_init): Removed set_name init.
(_set_name): Removed.
(_open): Call new summary interface.
(_close): Use new summary interface.
(_create): Removed a summary object leak.
(_get_message_count): New summary interface.
(_get_uid_list): Use new summary interface. FIXME: this is leaky.
(_get_message_by_uid): Use the new summary interface, some
cleanup.
(_append_message): Totally changed, basically just appends the
message directly, ignores the summary (for now), the summary will
fix itself up if it needs to.
(_check_get_or_maybe_generate_summary_file): Bye bye old code.
(summary_get_message_info): Implement get_message_info again, for
folder.
* camel-folder.c (camel_folder_class_init): Removed set_name
setup.
(_set_name): Moved contents into _init.
(_init): Perform the old functions of set_name here.
* camel-folder.h: Removed the set_name internal interface.
2000-04-14 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-summary.[ch]: Completely replaced with
new code.
* Makefile.am (libcamel_la_SOURCES): Removed
camel-folder-summary.[ch].
* camel-folder.h (struct _CamelFolder): Removed summary.
(struct _CamelFolder): Changed flags to be 1 bit bitfields.
* camel-folder-summary.[ch]: Class removed entirely.
* camel-folder.c (camel_folder_get_summary): Removed.
(camel_folder_summary_get_message_info): Moved from
camel-folder-summary.c
(camel_folder_summary_get_subfolder_info): Moved from
camel-folder-summary.c
* camel-mime-parser.c (folder_scan_step): Store the start of
headers and start of from in the scan state.
(camel_mime_parser_tell_start_headers): Query the start of the
headers.
(camel_mime_parser_tell_start_from): Query the cached start of
from marker.
2000-04-13 NotZed <NotZed@HelixCode.com>
* gmime-content-field.c (gmime_content_field_free): Removed this
function. If its too dangerous to use, it shouldn't be here.
(gmime_content_field_ref): Also ref the embedded content-type.
(gmime_content_field_unref): Ditto to unref it.
* camel-mime-utils.h: Add a refcount for content-type header.
* camel-mime-utils.c (header_content_type_unref): Implement unref
for content-type.
(header_content_type_ref): Implement ref for header content type.
2000-04-12 NotZed <NotZed@HelixCode.com>
* gmime-content-field.h: Changed to use a _header_content_type.
Added type/subtype back for compatability with clients.
* gmime-content-field.c: Basically a total rewrite, and now just a
thin wrapper ontop of header_content_type.
(_free_parameter): Got rid of it.
(gmime_content_field_new): Use header_content_type_* functions.
(gmime_content_field_set_parameter): Likewise.
(_print_parameter): Blow away.
(gmime_content_field_write_to_stream): Get details from the
content_type field. Should check if it needs to escape chars in
the paramter value.
(gmime_content_field_get_mime_type): Likewise.
(___debug_print_parameter): Get rid of this rather annoyingly
named function.
(gmime_content_field_get_parameter): Simplified function.
(gmime_content_field_construct_from_string): Fixed this to use a
real parser.
(gmime_content_field_is_type): New function to test if a type matches.
(gmime_content_field_construct_from_string): Track type/subtype
from subordinate content_type header struct.
* gmime-rfc2047.[ch]: Removed. Unused.
* camel-stream-b64.[ch]: Blown away more duplicated code.
* Makefile.am: Removed camel-stream-b64.[ch], and
gmime-base64.[ch].
* camel-mime-part.c (my_get_content_object): Replaced
camel-stream-b64 with camel-stream-filter/camel-mime-filter-basic.
(my_write_content_to_stream): Replaced camel-stream-b64 with the
camel-stream-filter with an encoder.
(my_get_content_object): Also implement quoted-printable decoding.
(my_write_content_to_stream): Also implement quoted-printable
encoding.
(my_get_output_stream): Took out stream-b64 code (nothing's being
executed yet anyway).
* gmime-base64.[ch]: Blown away. Not used, dont need it.
* camel-mime-utils.h: Added offset for this header. Records where
it is in the source.
* camel-mime-utils.c (header_raw_append_parse): Add offset
parameter, to store where the header is stored in the stream.
(header_raw_append): Added offset param.
(header_raw_find): Return offset, if a pointer supplied for it.
(header_raw_replace): Add offset param.
(header_content_type_new): New function, to create an empty
content type.
(header_content_type_set_param): Set a parameter in the
content-type.
(header_set_param): Generic header parameter setting function.
(header_decode_string): Handle NULL input.
* camel-mime-parser.c (camel_mime_parser_headers_raw): New
function to get access to all the raw headers.
(folder_scan_header): Keep track of the header start position, and
store it when saving the header.
2000-04-11 NotZed <NotZed@HelixCode.com>
* camel-mime-utils.c: Moved a bunch of printf's to debug.
* camel-mime-parser.c: Moved a bunch of printf's to debug.
(folder_scan_header): Detect end of each header line using the
last scanned char, and not the last scanned position.
* camel-mime-filter-index.[ch]: Indexing filter. Indexes unicode
sequences into ibex files.
2000-04-09 NotZed <NotZed@HelixCode.com>
* camel-mime-part.c: Dont include gmime-base64.h
* camel-mime-filter-charset.c (complete): Implement the completion
function.
* camel-mime-parser.c (folder_scan_step): If we get to the end of
the body data, check any filters for outstanding completion data.
(camel_mime_parser_scan_from): Set whether we scan for "From "
headers or not.
* camel-stream-filter.c (do_read): If we get to end of stream on
the source, then call the filtering completion function to see if
we have any more data to return.
* camel-mime-filter-basic.c (filter): Implement quoted printable
encoding and decoding filters.
(complete): And the complete function as well.
* camel-mime-utils.c (base64_encode_close): Also take an input
buffer, allow closing of filters.
(quoted_encode_step): First cut, simple quoted-printable encoder.
Doesn't handle trailing spaces/tabs on end of line properly yet.
(quoted_encode_close): Complete a quoted-encoding.
(is_qpsafe): New type check, for quoted-printable safe characters
(that do not need encoding). Thats all bits used in the type
table! Rebuilt the types table.
(header_content_type_is): Checks a content type against at
type/subtype match.
(header_content_type_param): Handle NULL content type pointer.
2000-04-08 NotZed <NotZed@HelixCode.com>
* camel-mime-filter-basic.c (filter): Implement the base64
encoder. Problem is, there is no way to know when to close it.
Close/Reset will have to provide the same args as filter, so it can
flush remaining data *sigh*
* camel-mime-utils.c (base64_encode_step): A rather complex base64
encoder, fast?
(base64_step_close): Companion function to finish off the base64
sequence.
* camel-mime-part.c (my_write_content_to_stream): Changed to use
camel_stream_write_to_stream().
* camel-stream.[ch] (camel_stream_write_to_stream): From
camel_stream_b64_write_to_stream(). Fixed some infinite loop
bugs with error conditions.
* camel-stream-b64.[ch] (camel_stream_b64_write_to_stream): Removed.
This has nothing to do with stream-b64, so i've moved it to
CamelStream.
* camel-mime-utils.h: Add a comment about refcounting
header_content_type struct.
* Makefile.am: Added camel-stream-filter*.[ch].
* camel-stream-filter.[ch]: Class to implement a generic
(multipass) filter ontop of a stream. Only implements a read-only
stream.
* camel-mime-parser.c (camel_mime_parser_filter_add): Ref the
filter we just added.
* Makefile.am: Added camel-mime-filter*.[ch].
* camel-mime-filter-charset.[ch]: A filter to preform character set
conversion (uses unicode_iconv).
* camel-mime-filter-save.[ch]: A simple filter which will save all
data directly to a file or file descriptor.
* camel-mime-filter-basic.[ch]: Implements the basic mime filters,
base64 and quoted-printable decoding (encoding not implemented yet).
* camel-mime-filter.[ch]: A filtering class, which can filter streams
of data without having to copy them. Simpler than stream classes,
and can be plugged into a single stream class (when i write it).
2000-04-07 Dan Winship <danw@helixcode.com>
* providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error
messages.
(finalize): fix a bug in camel_exception usage
(pop3_connect): Remember the password after asking for it the
first time.
2000-04-07 NotZed <NotZed@HelixCode.com>
* Makefile.am: Added camel-mime-parser/camel-mime-utils.
* camel-mime-parser.c: Fast mime parser.
* camel-mime-utils.c: Mime utility functions, and email header
parsers.
2000-04-07 NotZed <NotZed@HelixCode.com>
* providers/Makefile.am: Removed smtp for now, its a long way from
building.
* providers/smtp/Makefile.in: Removed file that shouldn't have been
checked in.
2000-04-06 Matt Loper <matt@helixcode.com>
* camel-folder-pt-proxy.c (_get_full_name): Remove exception param
from get_full_name() called, since get_full_name() was changed to
not have an exception in the last param (see dan's notes below).
(_get_name): same.
2000-04-06 Dan Winship <danw@helixcode.com>
* camel-store.[ch]: Reorganize the folder-fetching methods and
implement a folder cache so that multiple requests for the same
folder will yield the same CamelFolder object (as long as it
remains active). Includes some code to remove no-longer-active
folders from the cache, but it doesn't get used since nothing is
ever unref'ed in Camel right now...
* providers/mbox/camel-mbox-store.c:
* providers/pop3/camel-pop3-store.c: update for CamelStore
changes.
* camel-folder.[ch]: Remove the (unused) CamelException argument
from camel_folder_get_name and camel_folder_get_full_name.
(camel_folder_set_name): make this go away since changing a
folder's name after it has been created could result in it
conflicting with a separately-issued folder.
2000-04-05 Dan Winship <danw@helixcode.com>
* g_url_new really wanted to take a CamelException. So, rename
Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new
taking an exception), and url-util.[ch] to camel-url.[ch]. Also
force url->port to be numeric and remove camel_service_getport. (I
was confused before: the URL RFC says the port must be numeric, so
we don't want to do getportbyname.)
2000-04-01 Dan Winship <danw@helixcode.com>
* providers/mbox/camel-mbox-folder.c
(_check_get_or_maybe_generate_summary_file): Compare
mbox_file_size and mbox_modtime to the results of stat()ing the
mbox file, not the summary file. Duh.
(_close): Update the summary's mbox_file_size and mbox_modtime
before writing it to disk.
* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_save,
camel_mbox_summary_load): Wow. I must have been tired when I wrote
this code. First, the comparison bug above. Second, it was using
ntohs and htons instead of ntohl and htonl. Third, I was reading
the status flag byte in two different places and thus getting out
of sync. Fourth, it was writing out field_length bytes of each
header field after having converted field_length to network byte
order, resulting in lots of random crap being appended, and the
summary files being huge. (Fortunately, since the size/modtime
comparison was biffed, the garbage summary read from disk was
always immediately discarded.)
* providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): fix
an off-by-one error that caused the last-used UID to be reused if
the summary file was regenerated. (That one wasn't my fault. :-)
2000-03-31 Dan Winship <danw@helixcode.com>
* camel-stream-mem.c: implement unimplemented methods
* gmime-content-field.c
(gmime_content_field_construct_from_string):
* data-wrapper-repository.c
(data_wrapper_repository_get_data_wrapper_type):
* camel-simple-data-wrapper.c (my_write_to_stream):
* camel-mime-part.c (my_set_input_stream):
remove debugging printf()s that no longer seem useful.
2000-03-31 Matt Loper <matt@helixcode.com>
* camel-formatter.c (text_to_html): Added "convert_newlines_to_br"
boolean param, to give the option of not converting '\n's to <br>
tags. This way, when we stick stuff in a <pre> tag, newlines stay
newlines.
2000-03-30 Matt Loper <matt@helixcode.com>
* camel-formatter.c (handle_text_plain): Use <pre> tag to force
the use of monospaced fonts.
2000-03-30 Dan Winship <danw@helixcode.com>
* camel-service.c (camel_service_getport): Add a htons in the
default_number case, and document the fact that the function
returns the port in network byte order.
* providers/pop3/camel-pop3-store.c (pop3_connect): Revert
Miguel's change. The port number bug was actually somewhere
else, and the IP address copying code was fine already.
2000-03-29 Miguel de Icaza <miguel@gnu.org>
* providers/pop3/camel-pop3-store.c (pop3_connect): Add htons
(port), and only copy 4 bytes for the IP address to prevent a DNS
attack.
2000-03-28 Dan Winship <danw@helixcode.com>
* camel-seekable-substream.c
(camel_seekable_substream_new_with_seekable_stream_and_bounds):
make this return a CamelStream rather than a
CamelSeekableSubstream, because that's the way Gtk objects tend to
work.
* camel-service.c (camel_service_gethost,
camel_service_getport): convenience functions to canonicalize
the host and port values of a service's URL.
* providers/pop3/camel-pop3-store.c: use them
* providers/mbox/camel-mbox-folder.c
(_check_get_or_maybe_generate_summary_file): Make this work when
the inbox file doesn't yet exist.
2000-03-27 Dan Winship <danw@helixcode.com>
* providers/mbox/camel-mbox-folder.c (_append_message): uncomment
the call to unlink the temp file: there's no way to tell
camel_stream_fs to truncate a file, so reusing the same file was
resulting in junk at the ends of messages.
* camel-folder.[ch]: add delete_message_by_{number,uid}.
* providers/pop3/camel-pop3-folder.[ch]: implement
delete_message_by_uid. Add a close method to do expunging
of deleted messages if requested.
* providers/pop3/camel-pop3-store.[ch]: support for
CamelPop3Folder::close. (You have to close the connection
in order to expunge the folder, thus the store may be
connected in the CamelService::is_connected sense when it
is not actually connected to the server.) Also some bugfixes.
2000-03-27 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-folder.c (_append_message): Unref the
output_stream when done, close doesn't do it.
(_append_message): Clear all uid's from the appending messages, so
they are reassigned proper unique id's.
* gmime-utils.c (get_header_array_from_stream): Actually free the
header, it is copied elsewhere.
2000-03-26 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Added
folder parameter to function. Fixed callers.
(index_message): Index a message as it is assigned a unique id.
* camel-mime-part.c (my_set_content_id): Make sure we malloc and
copy the content_id, otherwise *poof*
2000-03-25 NotZed <NotZed@HelixCode.com>
* camel-medium.c (_finalize): Another leak, unref the content if
finished with it.
* camel-recipient.c (camel_recipient_table_free): Plug another
memory leak - actually free the recipient table.
* camel-mime-message.c (_finalize): Plugged a memory leak with the
flags table.
* gmime-utils.c (_store_header_pair_from_string): A simpler, more
debuggable and functionally identical header extraction function.
2000-03-24 NotZed <NotZed@HelixCode.com>
* gmime-content-field.c (gmime_content_field_set_parameter):
Remove the hash table entry before freeing its key and data.
2000-03-27 Dan Winship <danw@helixcode.com>
* providers/Makefile.am (SUBDIRS): Add pop3.
* providers/pop3/camel-pop3-store.c: keep separate input and
output streams so the output doesn't end up being buffered.
* providers/pop3/camel-pop3-folder.c (get_message_by_number):
finish implementing this.
2000-03-27 Michael Meeks <michael@helixcode.com>
* camel-mime-part.c (my_set_disposition): fix so less broken.
(my_finalize): remove dodgy disposition free.
* camel-data-wrapper.c (my_set_mime_type_field): unref instead of
free on mime_type.
2000-03-27 Dan Winship <danw@helixcode.com>
* camel-service.c (camel_service_free_auth_types): new routine to
free the data allocated by camel_service_query_auth_types.
* providers/pop3/camel-pop3-store.c (free_auth_types): implement
* camel-stream-mem.c (camel_stream_mem_new_with_buffer): rename
camel_stream_mem_new_with_buffer to ..._with_byte_array and add a
new ..._with_buffer that takes a char * rather than a GByteArray.
* Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it
redundant.
2000-03-25 Dan Winship <danw@helixcode.com>
* camel-folder-summary.[ch]: change the CamelFolderSummary
interfaces to allow partial summary queries (for dealing
with very large folders). Remove the "extended_fields" from
CamelFolderInfo and CamelMessageInfo: this is better dealt
with by subtyping.
* providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
subclass of CamelFolderSummary. Update interfaces for that. Remove
the internal/external summary distinction. Remove the (unused) md5
checksum in the folder summary. Change the summary file format
(primarily to make it no longer byte-order dependent) and add a
version number to it so it will be easier to change in the future.
* providers/mbox/camel-mbox-folder.[ch]
* providers/mbox/camel-mbox-search.c
* providers/mbox/camel-mbox-utils.c: update for summary changes
* camel-exception-list.def: add
CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID
2000-03-23 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-provider.c: Added flag to provider
initialisation, to match changed structure.
2000-03-22 NotZed <NotZed@HelixCode.com>
* camel-folder.[ch]: Added async search api.
* providers/mbox/camel-mbox-search.c
(camel_mbox_folder_search_by_expression): Changed to use an
asynchronous interface.
(camel_mbox_folder_search_cancel): Cancel function for async
interface.
2000-03-23 Dan Winship <danw@helixcode.com>
* camel-stream-buffer.c (camel_stream_buffer_read_line): Function
to read one line of any size from a stream and return it in
allocated memory.
2000-03-22 Dan Winship <danw@helixcode.com>
* camel-service.c (camel_service_query_auth_types): New function
to query a service for the authentication protocols it supports.
* providers/pop3/camel-pop3-store.c (query_auth_types): implement
* camel-provider.c (camel_provider_scan): New function to
scan the provider dir and return a list of all providers.
* providers/pop3/camel-pop3-folder.c: fill this in partially
* providers/pop3/camel-pop3-store.c: make camel_pop3_command
return the text after "+OK"/"-ERR" and add a separate
camel_pop3_get_additional_data to get the message body or
whatever. Also make them take a CamelPop3Store rather than
a CamelStreamBuffer.
2000-03-22 Matt Loper <matt@helixcode.com>
* camel-formatter.c (debug): Disabled some useless debug
messaging.
2000-03-21 Dan Winship <danw@helixcode.com>
* providers/pop3: some initial bits of the POP3 provider, to
make Matt happy. Incomplete, untested, etc.
2000-03-21 bertrand <bertrand@helixcode.com>
* providers/mbox/camel-mbox-summary.c
(camel_mbox_summary_append_internal_to_external): copy the size field
* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize
message_info to NULL
* camel-folder-summary.h: added the size field.
* providers/mbox/camel-mbox-summary.h:
added the received_date field.
* providers/mbox/camel-mbox-summary.c:
documented all functions.
* camel-folder-summary.h: name change and
new fields.
* providers/mbox/camel-mbox-search.c: update to
conform to name change in the summary fields.
2000-03-10 bertrand <bertrand@helixcode.com>
* camel-service.h: cosmetic changes.
2000-03-09 Dan Winship <danw@helixcode.com>
* s/HelixCode/Helix Code, Inc./ in the copyrights
2000-03-07 bertrand <bertrand@helixcode.com>
* camel-formatter.c (handle_mime_part):
plug mem leaks due to bad documentation
of camel_content_field_get_mime_type
(print_camel_body_part): idem
(handle_multipart_alternative): idem
* gmime-content-field.c (gmime_content_field_get_mime_type):
documentation fix.
* camel-mime-part.c (my_finalize): unref the
content_input_stream if any.
2000-03-06 bertrand <bertrand@helixcode.com>
* camel-stream-fs.c (_seek): fix a bogus calculation
in the return position.
2000-03-05 bertrand <bertrand@helixcode.com>
* camel-session.h: cosmetic fixes.
* camel-stream-fs.c (_read):
(_seek): fixed the current position so that it refers
to the current position in the stream, not in its parent.
2000-03-04 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-search.c
(camel_mbox_folder_search_by_expression): Ref the summary
after we have got it.
2000-03-04 bertrand <bertrand@helixcode.com>
* camel-mime-part.c (my_write_content_to_stream):
stream the raw content instead of nothing if the encoding
is not supported.
* camel-stream-fs.c (_seek): handle eos more
properly.
* camel-formatter.c (get_bonobo_tag_for_object):
bonobo-goad-id is the good key to look for.
(get_bonobo_tag_for_object): close the <object> tag.
(get_bonobo_tag_for_object): the correct syntax for the
to set a parameter inside an <object> tag is :
<object classid="..."> <param name="uid" value="..."> <param ...>
</object>
2000-03-03 bertrand <bertrand@helixcode.com>
* providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
use set_input_stream instead of construct_from_stream
to feed the message object.
* camel-data-wrapper.c (my_write_to_stream): reset output stream.
(my_set_input_stream): unref the previous input stream.
use the set_output_stream for default behaviour.
(my_set_output_stream): unref previous output stream.
* camel-mime-part.c (my_write_content_to_stream): reset content
object output stream.
2000-03-03 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Make
sure we open with create with a creation mask.
2000-03-01 NotZed <NotZed@HelixCode.com>
* camel-mime-part-utils.c
(camel_mime_part_construct_content_from_stream): DO NOT assert on
content type, we have fallback code 4 lines below it ... *sigh*
2000-02-29 NotZed <NotZed@HelixCode.com>
* Makefile.am (libcamelinclude_HEADERS): Added camel-stream-buffer
to build.
* camel-stream-buffer.[ch]: Generic buffer which can be applied to
any stream.
2000-03-03 bertrand <bertrand@helixcode.com>
* camel-formatter.c (handle_image): in the case
of images, put the content object output stream
in the url. This allows the message browser
to show inline images.
* camel-stream-b64.c (my_read_encode): fixed state
0 keep value.
2000-03-02 bertrand <bertrand@helixcode.com>
* camel-stream-b64.c (my_read_encode): don't forget to
set the state to 0 after 3.
(my_read_encode): don't forget to encode, even in state 3.
* camel-simple-data-wrapper.c: static functions are prefixed
with my_ instead of _
* camel-multipart.c: static functions are prefixed
with my_ instead of _
(my_write_to_stream): commented.
(my_write_to_stream): warning in case the boudary is set
but is a zero length string.
* camel-mime-part.c (camel_mime_part_encoding_from_string):
remove debug trace.
* camel-mime-part.c: Replaced all static functions
with name begining with _ by the same name begining
with "my_" to prevent the possible conflicts
with system symbols Dan warned us about.
* camel-stream-b64.c (camel_stream_b64_write_to_stream):
use CamelStreamB64 type for the input stream.
* camel-mime-part.c (_get_content_object): remove
debugging trace
(_write_content_to_stream): implement the b64
encoding the new way (that is using camel_stream_b64)
* camel-data-wrapper.c (my_write_to_stream):
fix implementation so that it writes properly
to the output stream even.
* camel-stream-b64.c (camel_stream_b64_write_to_stream):
fix implementation.
2000-02-29 bertrand <bertrand@helixcode.com>
* camel-stream-b64.c (camel_stream_b64_write_to_stream): new
utility function.
* camel-data-wrapper.c (_write_to_stream): default
implementation.
* gmime-utils.c (_store_header_pair_from_string):
revert strange changes.
* camel-stream-b64.c (my_read_decode): set eos to true when we
have read the whole input stream.
(my_reset): set eos to FALSE.
2000-02-28 NotZed <NotZed@HelixCode.com>
* camel-mime-part.c (_parse_header_pair): Dont free this either.
* camel-medium.c (_remove_header): Ugh, dont free the header
before we actually remove it.
(_add_header): Ugh, dont free hashtable entries which may be
duplicated (hash_insert _will_ reference that memory).
* string-utils.c (string_trim): Trimming a 0-length string is not
an error.
* camel-mime-message.c (_parse_header_pair): Fixed very broken
memory handling of header_name/value.
* providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev):
Initialise end_of_last_message always.
(camel_mbox_copy_file_chunk): Stop trying to read if we run out of
data, rather than looping forever.
(camel_mbox_write_xev): Use an open flag when opening with create.
* camel-folder.c (camel_folder_search_by_expression): No, its not
a fatal error to search on a non-searchable folder, you just dont
get any matches.
(_open): Dont open an opened folder (i dont see why this is really
a bug, but what the hell ...)
* providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
(_open): Call parent class to perform open. Remove folder-open
check to parent instead.
(_create): open takes a creation mask, dont use umask to try and
set the open mode.
(_delete): Dont bother checking folder==NULL, its already been
checked on the external interface (changed to an assertion, this
would have to be a camel bug).
(_delete_messages): Likewise.
(_create): Ditto.
(_init): Dont go and clear all the paths and shit that the parent
open just setup for us.
(_delete_messages): Get rid of more umask stuff.
(_append_message): Make sure we pass file mode to open with create.
(_append_message): Cleaned up some indenting to make it readable.
* camel-stream-b64.c (my_read_encode): Fixed a typo.
* providers/mbox/camel-mbox-search.c: Changed to use e-sexp,
rather than filter-sexp.
2000-02-28 bertrand <bertrand@helixcode.com>
* camel-stream-b64.c (my_read_encode): encoding
filter.
2000-02-23 bertrand <Bertrand.Guiheneuf@aful.org>
* camel-stream-b64.c: changed the __static
suffix into a my_ prefix.
(camel_stream_b64_set_mode): reset the persistent
status.
(my_read_decode): remove superfluous %
* providers/mbox/camel-mbox-utils.c (camel_mbox_copy_file_chunk):
fix exception description message.
2000-02-24 Dan Winship <danw@helixcode.com>
* camel-session.c: Add camel_session_get_transport_for_protocol.
* camel-transport.h:
* camel-transport.c: Add an abstract CamelTransport class.
* providers/sendmail/*: A CamelTransport that uses sendmail
to deliver mail.
2000-02-24 Dan Winship <danw@helixcode.com>
* camel-folder.c: use CamelExceptions for run-time errors, not
incorrect code. Don't bother validating that an object exists from
inside one of its methods, since you couldn't have gotten there if
it didn't. Fix some code style bugs.
(_init): Rename init_with_store to init and add parent_folder,
separator, and name arguments.
(_set_name): Get separator from self, not parent_store now.
* camel-store.h:
* camel-store.c: Remove get/set_separator.
* providers/mbox/: Update for above.
2000-02-23 Dan Winship <danw@helixcode.com>
* camel-medium.c (_finalize): Free the data in the headers hash
table.
(_add_header): g_strdup the header name and value when adding it.
* camel-mime-part-utils.c
(camel_mime_part_construct_headers_from_stream): Free the header
data after calling camel_medium_add_header, since it will have
g_strdup()ed it itself.
2000-02-22 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-search.c: Dont compile by default.
* providers/mbox/Makefile.am: Fuck off the filter code.
2000-02-22 bertrand <Bertrand.Guiheneuf@aful.org>
* camel-stream-b64.c (read_decode__static):
don't read the char if we reached the length
of the output buffer. Hours lost on this
%$!@# bug : 3.5
* camel-folder.c (camel_folder_get_subfolder):
(camel_folder_create):
(camel_folder_delete):
(camel_folder_delete_messages):
(camel_folder_list_subfolders):
(camel_folder_expunge):
(camel_folder_get_message_by_number):
(camel_folder_get_message_count):
(camel_folder_append_message):
(camel_folder_copy_message_to):
(camel_folder_get_summary):
(camel_folder_get_message_uid):
(camel_folder_get_message_by_uid):
(camel_folder_get_uid_list):
Check folder state (open/close) and raise an
exception if it is not ok.
* providers/mbox/camel-mbox-folder.c (_create):
create the file and the path with two different
names.
* camel-folder.c (_create): handle the case
when the folder name starts with '/'
* camel-exception.c (camel_exception_new): use
(void) instead of () in decl.
* camel-exception.h: cosmetic fixes.
* camel-exception.c (camel_exception_init): new routine.
Fix a bug in mail/message-list.c
* camel-folder.h: cosmetic changes.
* camel-stream-b64.c (reset__static): added a
reset method. Thanks message-browser to find
so much bugs :)
* providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
Unicode libs.
2000-02-21 bertrand <Bertrand.Guiheneuf@aful.org>
* camel-formatter.c (lookup_unique_id):
awful hack to test get_output_stream.
* camel-stream-b64.[ch] :
b64 encoding/decoding is now implemented as
a stream.
2000-02-21 bertrand <Bertrand.Guiheneuf@aful.org>
* camel-seekable-substream.c (_reemit_parent_signal):
emit "data_available" when parent stream emits it.
2000-02-21 NotZed <NotZed@HelixCode.com>
* providers/mbox/Makefile.am: Uh, fixed LIBADD again. What was
there was never ever going to work, wasn't it tested?
2000-02-21 Dan Winship <danw@helixcode.com>
* camel-session.h: (struct _CamelSession): Add authenticator.
* camel-session.c (camel_session_new): Add authenticator.
(camel_session_query_authenticator): New function to query the
session authenticator for password, etc, information.
2000-02-21 Dan Winship <danw@helixcode.com>
* camel-session.c: add CamelExceptions to several functions. Use
camel_session_new to initialize the session and URL fields of
created CamelStores as appropriate.
* camel-store.h:
* camel-store.c
* camel-service.h:
* camel-service.c: Move the session and url (and associated
functions) from CamelStore to CamelService. Add url_flags to
CamelService so subclasses can specify which URL components
are mandatory for them. Add camel_session_new for
camel_session_get_store* to use.
* providers/mbox/camel-mbox-folder.c:
* providers/mbox/camel-mbox-store.c:
* providers/mbox/camel-mbox-store.h: Update for above changes.
* camel-exception-list.def: Once camel is being used for real,
exceptions won't be renumberable. So renumber them now to make
more room to add exceptions to the various categories later, and
add a big warning message.
2000-02-20 Dan Winship <danw@helixcode.com>
* providers/mbox/Makefile.am: add libibex back to
libcamelmbox_la_LIBADD
2000-02-18 NotZed <NotZed@HelixCode.com>
* providers/mbox/camel-mbox-search.h
(camel_mbox_folder_search_by_expression): Added exception to call,
and fixed caller.
* providers/mbox/camel-mbox-search.c
(camel_mbox_folder_search_by_expression): Major changes, to use
the sexp evaluator from filter/filter-sexp.c to implement the
searching.
(func_body_contains): Changed to support multiple strings in 1
command (results or'd together)
* url-util.c (g_url_new): Fixed a typo (colon == 0 isn't right),
and made it so full url's are absolute pathed (Dan, this is how it
has to work!). Also, always include a path part, even if it is an
empty string.
2000-02-18 Dan Winship <danw@helixcode.com>
* camel/camel-types.h: New header with the typedefs for all camel
classes. Now the class headers can just include this and the
header for the parent type. This makes it possible for
CamelService to include a CamelSession without creating an
#include loop.
* camel/*:
* composer/e-msg-composer-attachment-bar.h:
* mail/folder-browser.c:
* mail/message-list.c: frob #includes to match the new reality
2000-02-17 Dan Winship <danw@helixcode.com>
* camel/camel-service.h:
* camel/camel-service.c: Make camel-service us a Gurl internally.
Remove the login/password interfaces and instead provide
camel_service_connect_with_url. Add CamelExceptions
2000-02-17 bertrand <Bertrand.Guiheneuf@aful.org>
* camel/camel-formatter.c (handle_text_plain):
(handle_text_html): use camel_stream_reset instead
of seek. The formatter should be able to work
with all streams, not only seekable streams.
In the case where some provider implementation
would not be able to provide a reset method
to their stream, implementors would have
to find a workaround.
* camel/camel-session.c (camel_session_new): use
(void) instean of () in function decl.
* camel/camel-folder.c: ifdef async operation
related code.
* camel/camel-seekable-stream.c (_seek): added a warning.
(_reset): default implementation of reset for seekable
stream.
* camel/camel-mime-message.h: set_received_date declaration fix.
cosmetic changes.
* camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init):
use (void) instead of ().
* camel/camel-stream.c (camel_stream_reset):
new method for CamelStream.
2000-02-17 Dan Winship <danw@helixcode.com>
* camel/url-util.c (g_url_to_string): New function to convert
a Gurl back into a char *.
2000-02-17 bertrand <Bertrand.Guiheneuf@aful.org>
* camel/camel-formatter.c (handle_text_plain):
revamped so that it uses the output stream
of the data wrapper
(handle_text_html): ditto.
* camel/camel-simple-data-wrapper.h:
* camel/camel-simple-data-wrapper.c (camel_simple_data_wrapper_new):
use (void) instead of ().
(_get_output_stream): simple implementation.
2000-02-16 bertrand <Bertrand.Guiheneuf@aful.org>
* camel/camel-data-wrapper.c (_set_input_stream): ref input stream
(_set_output_stream): ref output stream
(_finalize): unref input and output streams
* camel/camel-seekable-substream.c (_set_bounds): don't
seek the begining of the substream.
(_eos): fix eos condition testing.
(_finalize): unref parent stream
(_init_with_seekable_stream_and_bounds): ref parent stream
* camel/gstring-util.c (g_string_equal_for_hash):
(g_string_equal_for_glist): return type is int.
* camel/camel.h:
* camel/camel.c (camel_init): use (void)
instead of ().
2000-02-16 NotZed <NotZed@HelixCode.com>
* providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Added
libfilter to link line (temporarily?). Required for
filter-sexp.
2000-02-15 bertrand <bertrand@helixcode.com>
* camel/camel-multipart.c (_localize_part):
this routine replaces the _read_part routine
and does not store the part in a buffer.
(_set_input_stream): use the set_input_stream
instead of the construct_from_stream.
each bodypart is given an input stream.
* camel/camel-mime-part-utils.c:
include the data-wrapper-repository header.
(camel_mime_part_construct_content_from_stream):
use the set_input_stream instead of the
construct_from_stream method.
* camel/camel-seekable-substream.c (_set_bounds):
cur position is set to 0 not to inf_bound.
2000-02-15 bertrand <Bertrand.Guiheneuf@aful.org>
* camel/camel-mime-part.c: include gmime-base64.h
various compilation and runtime fixes.
(_set_input_stream): store the input substream
for the content object.
* camel/camel-data-wrapper.h: declare the
set/get function on input/output stream.
* camel/camel-mime-part.c (_get_content_object):
don't use a temporary mem stream.
* camel/camel-seekable-substream.c (_seek):
(_eos):
(_read): the substream can be unlimited in length
* camel/camel-data-wrapper.c (camel_data_wrapper_class_init):
set the get/set_input/output_stream methods.
* camel/camel-multipart.c (_construct_from_stream):
camel_stream_seek -> camel_seekable_stream_seek
2000-02-14 Miguel de Icaza <miguel@gnu.org>
* camel/providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Add
the unicode libraries as well.
* camel/camel-provider.c (camel_provider_register_as_module): Add
error reporting here. Desire to use Solaris increases. Hair loss
in the last two hours: 5,400.
* camel/providers/mbox/camel-mbox-provider.c
(camel_mbox_get_provider): Renamed function.
* camel/camel.h: All include files use camel/ now here.
* camel/providers/mbox/Makefile.am: Drop all the dynamism from
Camel, and make this a standard library.
2000-02-14 bertrand <Bertrand.Guiheneuf@aful.org>
* camel/gmime-utils.c (get_header_array_from_stream): use the
eos stream method.
(gmime_read_line_from_stream): ditto.
* camel/camel-stream-fs.h (struct ): add the eof field
cosmetics changes.
* camel/camel-stream-fs.c (camel_stream_fs_init): set eof.
(_read): set eof on end of file.
(_eos): implemented.
* camel/gmime-utils.c (get_header_array_from_stream):
make a blocking version of the header parser.
When the fs stream uses gnome-vfs, this should
be changed.
(gmime_read_line_from_stream): ditto.
2000-02-11 bertrand <Bertrand.Guiheneuf@aful.org>
* camel/camel-stream-fs.c:
everywhere, when using the cur_pos field, do it
on the CamelSeekableStream object.
(_seek): small fix.
* camel/camel-seekable-stream.c (camel_seekable_stream_seek):
s/camel_stream_seek/camel_seekable_stream_seek/g
* camel/camel-seekable-stream.h:
(struct ): added a field to store the
current position.
* camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position):
New function. Allows to get the current position
of a seekable stream.
2000-02-13 NotZed <notzed@zedzone.helixcode.com>
* providers/mbox/camel-mbox-search.c: New file, implements the
search api for mbox folders.
* providers/mbox/Makefile.am: Link with ibex.
* camel-folder.c (camel_folder_has_search_capability): Api
additions.
(camel_folder_search_by_expression): Ditto.
2000-02-12 NotZed <notzed@zedzone.helixcode.com>
* providers/mbox/camel-mbox-folder.c (_set_name): Setup index
filename as well.
(_init_with_store): Init index filename. Hmm, none of these
names ever seem to get free'd (FIXME?)
* providers/mbox/camel-mbox-folder.h: Add index file name.
2000-02-12 NotZed <notzed@helixcode.com>
* camel-folder.h: Add folder search functions.
** Created ChangeLog just for camel **
- refer to ../ChangeLog for changes prior to this date.