1. 22 Feb, 2001 1 commit
    • Not Zed's avatar
      Add some internal progress reporting. (imap_rescan): Do some progress · 7698a394
      Not Zed authored
      2001-02-23  Not Zed  <NotZed@Ximian.com>
              * providers/imap/camel-imap-folder.c (imap_sync): Add some
              internal progress reporting.
              (imap_rescan): Do some progress reporting.
              * camel-mime-part.c (init_header_name_table): Add the message-id
              to the formatted table, so we dont try and wrap it, and break it.
      svn path=/trunk/; revision=8350
  2. 13 Feb, 2001 1 commit
    • Not Zed's avatar
      Add address headers to list that we dont fold when writing. The are · 7fc59286
      Not Zed authored
      2001-02-12  Not Zed  <NotZed@Ximian.com>
              * camel-mime-part.c (init_header_name_table): Add address headers
              to list that we dont fold when writing.  The are properly
              formatted as we build them.
              (write_to_stream): DOH, lookup the header name in the formatted
              hash table, not the value, that would never have worked.
              * camel-internet-address.c
              (camel_internet_address_encode_address): Changed to take a
              parameter saying how much we've printed so far.  We now fold the
              header as we format it.  We dont fold addresses, even if they are
              too long, we simply put them on another line by themselves: this
              should make the result more parsable by mailers that can't handle
              split up addresses (which are legal).
              (internet_encode): Fix for changes to above.
      svn path=/trunk/; revision=8198
  3. 02 Feb, 2001 1 commit
    • Not Zed's avatar
      Add missing header for cancel check stuff. · ebd3b725
      Not Zed authored
      2001-02-02  Not Zed  <NotZed@Ximian.com>
              * camel-stream-fs.c: Add missing header for cancel check stuff.
              * camel-session.c (camel_cancel_cancel): Fix a wrong cast.
              * camel-mime-part.c (init_header_name_table): Setup a new table
              header_formatted_table, that lists headers that we dont want to
              fold (they've already been folded).
              (write_to_stream): Check for already formatted headers, and dont
              try and fold them.  This is a fix for bug #1097.
      svn path=/trunk/; revision=7941
  4. 22 Jan, 2001 1 commit
  5. 28 Dec, 2000 1 commit
    • Dan Winship's avatar
      Remove this. It was only a thin wrapper around struct _header_content_type · 156996ac
      Dan Winship authored
      	* gmime-content-field.[ch]: Remove this. It was only a thin
      	wrapper around struct _header_content_type anyway, and didn't
      	match the naming scheme of anything else.
      	* Makefile.am: Remove gmime-content-field.[ch]
      	* camel.h: Remove gmime-content-field.h
      	* camel-types.h: Add CamelContentType as a typedef for struct
      	_header_content_type (especially for use outside of camel).
      	* camel-multipart.c:
      	* camel-mime-part.c:
      	* camel-mime-message.c:
      	* camel-folder-summary.c:
      	* camel-folder-search.c:
      	* camel-data-wrapper.[ch]: Use CamelContentType and
      	header_content_type_* functions rather than the GMime stuff.
      	* camel-mime-part-utils.c:
      	* camel-medium.c: Remove unused gmime-content-field.h include.
      svn path=/trunk/; revision=7186
  6. 11 Dec, 2000 1 commit
    • Michael Zucci's avatar
      Remove use of linewrap filter. Headers are now wrapped. encode_8bit · 1c95a1e9
      Michael Zucci authored
      	* providers/smtp/camel-smtp-transport.c (smtp_data): Remove use of
      	linewrap filter.  Headers are now wrapped.  encode_8bit already
      	enforces a 998 octet line limit.
      	(smtp_data): Also fixed a memleak, we always have to unref our own
      	copy of the filters.  We also dont need to remove them manually,
      	so dont bother.  The type's an int too ...
      	* camel-internet-address.c (internet_unformat): When scanning past
      	quotes, remove them also.
      	(camel_internet_address_format_address): If the name contains "'s,
      	or ','s then strip and quotes and wrap the whole lot in one set of
      	* Makefile.am (noinst_HEADERS): We dont want to install
      	camel-charset-map-private.h, ever.  There are probably other
      	similar files ..?
      	* camel-mime-part.c (write_to_stream): Fold header lines
      	appropriately as we're writing them out.
      	* camel-mime-utils.c (header_fold): Add a new argument, headerlen,
      	tells it how long the associated header token is.
      	(header_fold): Also,k check to see if we need to fold first, using
      	a better algorithm, and also accept already-folded lines, and
      	re-process accordingly.
      	(rfc2047_decode_word): Add a little buffer space to iconv output
      	for shifting overheads?
      	(rfc2047_decode_word): finish the iconv with a null call, to flush
      	shift state, etc.
      	(rfc2047_encode_word): Attempt to break up long words into
      	appropriately sized, independent, chunks.  See rfc2047, section 2.
      	(header_decode_mailbox): Dont add in extra spaces into the output
      	if we are decoding adjacent encoded words.  We can only guess this
      	case, as some broken mailers put encoded words inside quoted
      	(header_encode_phrase): Dont merge words if they are going to end
      	up too long.  Also change back ot only merge consecutive words of
      	the same type.  e.g. 'foo. blah fum.' -> "foo." blah "fum."  or
      	'iam an. idiot' -> iam "an." idiot
      svn path=/trunk/; revision=6902
  7. 29 Nov, 2000 1 commit
    • Not Zed's avatar
      Add a missed unref. · d38a417d
      Not Zed authored
      2000-11-29  Not Zed  <NotZed@HelixCode.com>
      	* tests/message/test2.c (main): Add a missed unref.
      	* camel-stream-mem.c (camel_stream_mem_set_buffer): We must set
      	ourselves as the owner of the byte-array.
      	Weird, someone has modified this file (its been reindented), but i
      	can't see any changelogs ...
      	* tests/lib/messages.c (content_finalise): Fix memleak in tester,
      	free byte array when our content object is deleted.
      	* camel-folder-search.c (camel_folder_search_finalize): Yeah
      	great, so the sexp is a gtk object, not a camel object.  Isn't
      	that going to be fun to fix?
      	* camel-session.c (camel_session_finalise): Free the storage path.
      	* providers/local/camel-local-store.c (camel_local_store_init): If
      	store->folders is setup, free it first, then overwrite.  Hmm,
      	this seems a bit crappy to me.
      	* camel-store.c (camel_store_init): Dont setup store->folders if
      	its already setup.
      	* camel-exception.c (camel_exception_setv): Removed a memleak.  no
      	need to strdup after a strdup_printf!!!
      	* camel-address.c (camel_address_finalize): Free the address
      	ptrarray, once finished.
      	* providers/local/camel-local-folder.c (local_finalize): Make sure
      	we dont leave the folder locked on close.
      	(local_finalize): Free summary/search.
      	* providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
      	Small memleak, always free name after using it.
      	* camel-mime-part.c (set_content_object): Free txt after setting
      	the header.
      	* providers/local/camel-maildir-summary.c (maildir_summary_check):
      	Fix a memleak, close the dir after scanning new.
      	(message_info_free): Added so we can free the filename cached in
      	the messageinfo.
      	(camel_maildir_summary_finalise): Free the hostname.
      	* tests/folder/test[12].c (main): Clear out camel-test before
      	* providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
      	Because encode_x_evolution folds the line (sigh, because
      	encode_param does, unlike every other function in
      	camel-mime-utils), unfold the encoded result before comparing.
      	(mbox_summary_sync_quick): Another small memleak, free xevnew once
      	finished with it.
      	* camel-mime-utils.c (header_decode_quoted_string): Removed a
      	redundant check for c=0.
      	(header_unfold): New function to un-fold headers.
      	* providers/local/camel-local-summary.c
      	(local_summary_encode_x_evolution): some problems with encoding
      	tags, using the wrong output strings.
      	(local_summary_encode_x_evolution): We dont need to append a ;
      	either, param_list_format_append() will do it for us.
      svn path=/trunk/; revision=6711
  8. 21 Nov, 2000 1 commit
    • Not Zed's avatar
      Shite, -1 on error, >=0 on success. So i've just been truncating all the · a34a4b15
      Not Zed authored
      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
      	(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
      	(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.
      	(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
      	(camel_vee_folder_finalise): Free changes.
      	(vfolder_add_match): Simple helper to add a new matching info
      	(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
      	* providers/vee/camel-vee-folder.h: Added a changes field to the
      svn path=/trunk/; revision=6628
  9. 07 Nov, 2000 1 commit
    • Not Zed's avatar
      Implement a complete() function, now we need one. (filter): Upgraded to · c70c4c35
      Not Zed authored
      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
      	* 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
      	* 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
      	(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
      	(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
      	* 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
      	(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
      	(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
      	(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
      	(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
      	(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
      	(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
      	(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
      	(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
      	* 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
      	(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.
      svn path=/trunk/; revision=6474
  10. 19 Oct, 2000 1 commit
  11. 18 Oct, 2000 2 commits
    • Not Zed's avatar
      No, we must not encode the headers here. These interfaces ARE raw · 229f78b9
      Not Zed authored
      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
      	* 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.
      	(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.
      svn path=/trunk/; revision=5978
    • Jeffrey Stedfast's avatar
      Encode the header value. (add_header): Same. · 5543f7d8
      Jeffrey Stedfast authored
      2000-10-17  Jeffrey Stedfast  <fejj@helixcode.com>
      	* camel-mime-part.c (set_header): Encode the header value.
      	(add_header): Same.
      svn path=/trunk/; revision=5970
  12. 12 Oct, 2000 1 commit
    • Not Zed's avatar
      Removed temp_message_buffer, and content_input_stream fields which seem to · 6c337e9e
      Not Zed authored
      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.
      svn path=/trunk/; revision=5881
  13. 08 Oct, 2000 1 commit
    • Miguel de Icaza's avatar
      Issue a warning if h->value is NULL. · 4f9326df
      Miguel de Icaza authored
      2000-10-08  Miguel de Icaza  <miguel@helixcode.com>
      	* camel-mime-part.c (write_to_stream): Issue a warning if h->value
      	is NULL.
      svn path=/trunk/; revision=5785
  14. 05 Sep, 2000 1 commit
  15. 01 Sep, 2000 1 commit
  16. 31 Aug, 2000 3 commits
  17. 11 Aug, 2000 1 commit
    • Christopher James Lahey's avatar
      Fixed some warnings. · 40eea369
      Christopher James Lahey authored
      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/smtp/camel-smtp-transport.c: Fixed some warnings.
      svn path=/trunk/; revision=4719
  18. 10 Aug, 2000 1 commit
  19. 21 Jun, 2000 1 commit
    • Dan Winship's avatar
      flush the filter stream before unreffing it, so it will · 4f20138b
      Dan Winship authored
      	* 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.
      svn path=/trunk/; revision=3658
  20. 12 Jun, 2000 2 commits
    • Jeffrey Stedfast's avatar
      Deprecated. · d6291ddc
      Jeffrey Stedfast authored
      2000-06-12  Jeffrey Stedfast  <fejj@helixcode.com>
      	* 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-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.
      svn path=/trunk/; revision=3536
    • Dan Winship's avatar
      New filter to do CRLF<->LF conversion. (Currently only tested in the · 9573b501
      Dan Winship authored
      	* 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.
      svn path=/trunk/; revision=3529
  21. 05 Jun, 2000 1 commit
  22. 01 Jun, 2000 1 commit
    • Not Zed's avatar
      Fixes Bug 192. · 7e662425
      Not Zed authored
      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.
      svn path=/trunk/; revision=3340
  23. 19 May, 2000 1 commit
    • NotZed's avatar
      > searchpart = strchr(namepart, '?'); · 2ce4eb74
      NotZed authored
      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): Reimplmeent.
              (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
              * 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.
      svn path=/trunk/; revision=3142
  24. 18 May, 2000 1 commit
    • Dan Winship's avatar
      remove get/set_output_stream operations. They're redundant with · 0cd1c193
      Dan Winship authored
      	* 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
      	* 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.
      svn path=/trunk/; revision=3112
  25. 11 May, 2000 1 commit
    • NotZed's avatar
      Big bunch o memleaks fixed. · e17b3c90
      NotZed authored
      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-folder-summary.c (camel_folder_summary_finalise): Free the
              summary path.
              * 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.
      svn path=/trunk/; revision=2989
  26. 10 May, 2000 1 commit
    • Dan Winship's avatar
      fix a stupid typo. Thank you, C. · 128d2550
      Dan Winship authored
      	* 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.
      svn path=/trunk/; revision=2978
  27. 08 May, 2000 2 commits
    • Dan Winship's avatar
      Use CamelException to signal failure. (camel_stream_write_strings): · 65ec43cb
      Dan Winship authored
      	* 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
      	(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:
      	* 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
      	* 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
      	* 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/sendmail/camel-sendmail/transport.c: Update.
      svn path=/trunk/; revision=2924
    • NotZed's avatar
      Merged NEW_SUMMARY branch back to trunk, and resolved conflicts. · b7f49ccf
      NotZed authored
      2000-05-08  NotZed  <NotZed@HelixCode.com>
      	* Merged NEW_SUMMARY branch back to trunk, and resolved conflicts.
      	* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
      	Return status.
      	* camel-stream-filter.c (do_close): We NEED a stream close.
      svn path=/trunk/; revision=2906
  28. 07 May, 2000 1 commit
    • Dan Winship's avatar
      Make camel not leak like a sieve. · 580d8858
      Dan Winship authored
      	* 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
      	* 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
      	* 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 +
      svn path=/trunk/; revision=2882
  29. 05 May, 2000 1 commit
    • NotZed's avatar
      And same here ... · aa7851f1
      NotZed authored
      2000-05-05  NotZed  <NotZed@HelixCode.com>
              * camel-folder-summary.c: And same here ...
              * camel-mime-utils.c: Defined out some memory profiling stuff I
              left there by mistake.
              * 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.
      svn path=/trunk/; revision=2811
  30. 04 May, 2000 1 commit
    • NotZed's avatar
      No, we're not going to have g_strcasecmp for no good reason, · f8bfbef0
      NotZed authored
      not even if its slipped in with no changelog.
      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  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.
      svn path=/trunk/; revision=2789
  31. 03 May, 2000 1 commit
  32. 02 May, 2000 2 commits
    • Michael Zucci's avatar
      > * providers/mbox/camel-mbox-search.c · 9190e008
      Michael Zucci authored
      > 	(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.
      svn path=/trunk/; revision=2755
    • Michael Zucci's avatar
      > * gmime-utils.[ch]: What the hell, remove it. This will break the · 44575d97
      Michael Zucci authored
      > 	nntp provider (but its broken anyway).  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.
      svn path=/trunk/; revision=2753
  33. 28 Apr, 2000 1 commit
    • NotZed's avatar
      Dont try and check a NULL header. · 19e94482
      NotZed authored
      2000-04-27  NotZed  <NotZed@HelixCode.com>
              * camel-mime-utils.c (check_header): Dont try and check a NULL
              * 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
              (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
              (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)
              * camel-address.h: Abstract class to represent (lists of)
      svn path=/trunk/; revision=2671
  34. 27 Apr, 2000 1 commit