Commit Graph

23 Commits

Author SHA1 Message Date
d46cb0fd8d Completely new implementation of NNTP.
2001-11-30  Not Zed  <NotZed@Ximian.com>

        * providers/nntp/camel-nntp-*.c:

        Completely new implementation of NNTP.

        Doesn't support subscriptions yet (lists all folders), but should
        be more reliable (faster?), and has an integrated cache.

        * camel-exception.c (camel_exception_new): Use e_memchunks for
        exception blocks.
        (camel_exception_free): Same.

        * camel-data-cache.[ch]: New object for managing on-disk caches of
        anything that can be stored in a camel-stream.

        * camel-file-utils.c (camel_file_util_mkdir): New function, just a
        nicer place to put this (than camel-store), should be removed from
        camel-store.
        (camel_file_util_safe_filename): New function to url-encode a
        filename.

        * camel-mime-parser.c (drop_states): New func to drop the parser
        state to initial state.
        (folder_scan_init_with_fd):
        (folder_scan_init_with_stream): Call above func to reset state if
        the stream is changed on us so we can change streams to reuse a
        parser object.

svn path=/trunk/; revision=14822
2001-11-30 03:09:38 +00:00
08fb7329cb Fixing the license text.
svn path=/trunk/; revision=14212
2001-10-27 16:59:46 +00:00
02dcd0aadf Update the licensing information to require version 2 of the GPL
(instead of version 2 or any later version).

svn path=/trunk/; revision=14190
2001-10-27 00:25:49 +00:00
982357f35c Make sure the new description isn't the same as the old description
2001-10-17  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-exception.c (camel_exception_set): Make sure the new
	description isn't the same as the old description pointer before
	freeing the old one.
	(camel_exception_setv): Don't free the old description until we
	set the new one this way we can reuse the old description in the
	new description.

	* providers/local/camel-mbox-folder.c (mbox_append_message): If
	errno == EINTR, then we got a user-cancel so set the exception
	appropriately so that we don't make the user shit his pants.

svn path=/trunk/; revision=13737
2001-10-17 22:16:46 +00:00
e8aa23866a Clean up some exception misusage.
2001-07-17  Peter Williams  <peterw@ximian.com>

	Clean up some exception misusage.

	* providers/imap/camel-imap-command.c (camel_imap_command): Use
	our own internal exception for sending the string and transfer it
	to @ex if anything goes wrong.
	(imap_read_response): Use our own internal exception for reading
	the untagged responses and blah blah blah.

	* camel-session.c (get_service): Use our own internal exception
	when constructing the service and transfer it to @ex if anything
	goes wrong.

	* camel-remote-store.c (remote_recv_line): Instead of having
	gboolean exception, use our own internal exception and copy
	it to @ex if anything goes wrong.

	* camel-store.c (store_sync): Create an internal exception
	because sync_folder() checks it for validity. Transfer it to
	@ex when done.

	* camel-exception.c (camel_exception_get_description): If @ex is
	NULL, complain - passing NULL exceptions to Camel is okay, but
	there should be no circumstances under which they're then
	examined.
	(camel_exception_get_id): Same here,
	(camel_exception_xfer): NULL-protect and warn if transferring from
	a NULL exception.

svn path=/trunk/; revision=11177
2001-07-17 21:22:20 +00:00
91cc026904 Update the copyrights, replacing Helix Code with Ximian and
helixcode.com with ximian.com all over the place.

svn path=/trunk/; revision=10440
2001-06-23 08:52:02 +00:00
fe962a2055 Big header cleanups and nntp compile fix
svn path=/trunk/; revision=9024
2001-03-29 20:31:40 +00:00
6de256c2a2 Lock the command channel while searching. (imap_body_contains): If
2000-12-24  Not Zed  <NotZed@HelixCode.com>

        * providers/imap/camel-imap-search.c (imap_body_contains): Lock
        the command channel while searching.
        (imap_body_contains): If performing a whole uid search, then add
        references to our own summary items, dont look it up in the
        folder.  This way they can't vanish unexpectedly.

        * providers/imap/camel-imap-folder.h (CamelImapFolder): Added a
        private field.

        * providers/imap/camel-imap-private.h: Added lock for imap
        searches.

        * Merge from camel-mt-branch.

        * providers/imap/camel-imap-folder.c (imap_update_summary): Merge
        fix, use the folder->summary.
        (imap_get_message_flags, imap_set_message_flags,
        imap_get_message_user_flag, imap_set_message_user_flag): Removed
        again.
        (camel_imap_folder_init): Setup private data/lock.
        (imap_finalize): Free private data/search lock.
        (imap_search_free): Lock the search_lock.
        (imap_search_by_expression): Lock the search lock when using the
        search object.  Also copy/ref hte summary, rather than getting it
        directly.
        (imap_refresh_info): Free any info lookups.  Use folder->summary
        not imap_folder->summary.  And lock around commands.

svn path=/trunk/; revision=7150
2000-12-24 00:46:20 +00:00
7547b5166d Remove unused variable.
* camel-exception.c (camel_exception_setv): Remove unused
	variable.

svn path=/trunk/; revision=6742
2000-11-30 20:53:55 +00:00
d38a417de3 Add a missed unref.
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
	starting.

	* 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
2000-11-29 10:49:05 +00:00
65ec43cb55 Use CamelException to signal failure. (camel_stream_write_strings):
* 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.

svn path=/trunk/; revision=2924
2000-05-08 22:27:59 +00:00
c7ae879700 fix warnings
svn path=/trunk/; revision=2217
2000-03-28 21:12:12 +00:00
1e7ab47d26 fix the name of "Helix Code, Inc." in all the copyrights
svn path=/trunk/; revision=2091
2000-03-09 19:52:48 +00:00
f65a2d78c6 fix to show a sample correct implementation.
2000-02-22  bertrand  <Bertrand.Guiheneuf@aful.org>

	* message-list.c (message_list_set_folder):
	fix to show a sample correct implementation.

	* 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.

Fixes and exception handling in camel-folder.
Fixes in mail/evolution-mail to make it not
segfault and to demonstrate a correct implementation.

svn path=/trunk/; revision=1902
2000-02-22 11:16:36 +00:00
7dded29a63 converted all gint64 variables into guint32.
2000-01-24  bertrand  <bertrand@helixcode.com>

	* camel/camel-stream-fs.[ch]: converted all
	gint64 variables into guint32.


	* camel/camel-stream-fs.c (_read): fix stupid bug.
	(_write): ditto.

	* camel/camel-exception.c (camel_exception_new): don't
	forget to clean the exception when creating it.

svn path=/trunk/; revision=1621
2000-01-24 22:29:49 +00:00
316a4c47ff Updated my e-mail address to reflect my new employment
svn path=/trunk/; revision=1533
2000-01-03 23:05:55 +00:00
23185a2546 Backup sync.
svn path=/trunk/; revision=1520
1999-12-27 09:25:21 +00:00
0c6cc80cdf use exception mechanism. (camel_folder_set_name): idem.
1999-12-17  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/camel-folder.c (_set_name):
	use exception mechanism.
	(camel_folder_set_name): idem.
	(camel_folder_set_full_name): idem.
	(_get_name): idem.
	(camel_folder_get_name): idem.
	(_get_full_name): idem.
	(camel_folder_get_full_name): idem.
	(_can_hold_folders): idem.
	(_can_hold_messages): idem.
	(_exists): idem.
	(camel_folder_exists): idem.
	(_is_open): idem.
	(_get_subfolder): idem.
	(camel_folder_get_subfolder): idem.

	* camel/camel-exception.c (camel_exception_clear):
	New function. Clear an exception.
	(camel_exception_get_id):
	New function.
	(camel_exception_get_description):
	New function.

	* camel/camel-folder.c (_set_name):
	Use the exception system. When the folder
	has no parent, don't set its full name
	field.

svn path=/trunk/; revision=1499
1999-12-17 19:19:59 +00:00
d376deb02b changed the return value. Now returns the list of expunged messages
1999-12-16  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/camel-folder.c (camel_folder_expunge):
	(_expunge):
	* camel/camel-folder-pt-proxy.c (_expunge):
	changed the return value. Now returns the list
	of expunged messages

	* camel/camel-folder.c (_init_with_store):
	cleaned up. Use the exception system now.
	(_open): ditto.
	(camel_folder_open): ditto.
	(camel_folder_open_async): ditto.
	(_close):  ditto.
	(camel_folder_close):  ditto.
	(camel_folder_close_async): ditto.

	* camel/camel-exception.c (camel_exception_set):
	When no exception is given, do nothing, just
	return.
	(camel_exception_set): documented.
	(camel_exception_new): idem.
	(camel_exception_free): idem.
	(camel_exception_xfer): idem.


	* camel/camel-folder.c:
	* camel/camel-folder.h: more clean-ups.
	Removed message list related code.
	This was braindead design.

svn path=/trunk/; revision=1494
1999-12-16 18:05:41 +00:00
331335d12c Fix copyright informations once again
svn path=/trunk/; revision=1489
1999-12-14 22:40:38 +00:00
8fe1aa5f41 Copyright change
svn path=/trunk/; revision=1348
1999-10-23 15:19:51 +00:00
bf9f54f961 A lot of changes. The thread proxy mechanism
is now functional. The signal proxy needs to be tested
though. The thread proxy folder is being implemented.
A rough summary :

1999-10-13  bertrand <Bertrand.Guiheneuf@aful.org>

	* camel/camel-folder.c (camel_folder_close): the
	folder->close method is now asynchronous.

	* camel/camel-folder-pt-proxy.c (_folder_open_cb):
	(_open):
	(_folder_open_cb):
	(_open):
	open/close method implemented in the thread proxy
	folder. More to come.

	* camel/camel-exception.c (camel_exception_xfer):
	new utility func.

	* camel/camel-marshal-utils.c: some new marshallers

	* camel/camel-folder-pt-proxy.c: Some explanations
	on the thread proxy system.

1999-10-11  bertrand <Bertrand.Guiheneuf@aful.org>

	* camel/camel-marshal-utils.c:
	camel/camel-marshal-utils.h:
	Handles operation marshalling.

	* camel/camel-thread-proxy.c:
	camel/camel-thread-proxy.h:
	new files. Generic proxy system.

	* camel/camel-folder-pt-proxy.c
	moved all proxy related code in dedicated files.

	(camel_folder_pt_proxy_init):
	removed proxy initialisation code
	(_finalize):
	removed proxy finalization code


	* camel/camel-exception.c
	(camel_exception_new):
	(camel_exception_set):
	(camel_exception_free):
	New funcs.

svn path=/trunk/; revision=1328
1999-10-13 21:16:55 +00:00
6d24357f78 sync
svn path=/trunk/; revision=1255
1999-09-23 15:15:40 +00:00