Commit Graph

77 Commits

Author SHA1 Message Date
1a6fb9ab88 ** A few fixes for better rfc compliance, and cleaner code.
2004-06-01  Not Zed  <NotZed@Ximian.com>

        ** A few fixes for better rfc compliance, and cleaner code.

        * camel-mime-utils.c (header_encode_param): a bunch of logic
        cleanups with new util functions.
        (header_decode_init): setup a new type ATTR_CHAR, for
        attribute-char.

        * tests/misc/test2.c (main): new test for rfc2184 stuff.

        * camel-mime-utils.c (header_convert): helper to convert between
        charsets.
        (rfc2184_decode): fix a bunch of logic problems and use the helper
        above to simplify code.
        (decode_param_token): removed, not needed.
        (header_decode_rfc2184_param): removed, not needed.
        (header_decode_param): removed, not needed.  ugh.
        (header_decode_param_list): completely rewritten, hence lack of
        need of above.

svn path=/trunk/; revision=26140
2004-06-01 10:07:13 +00:00
3bed590653 New test suite for url scanning.
2004-02-03  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/misc/url-scan.c: New test suite for url scanning.

	* camel-url-scanner.c: Added single/double quotes to url_braces[]
	in case the user is quoting the url.
	(camel_url_web_end): Add "-;:" to list of punctuation to strip off
	the end of urls. Also fixed to handle user@domain's
	(camel_url_addrspec_start): Strip open brace characters from the
	beginning of the addr.
	(camel_url_web_start): Make sure "www" wasn't part of something
	not a url (like "Ewww.Gross") by check that pos[-1] is either an
	open brace or whitespace.
	(camel_url_addrspec_end): Don't allow toplevel domain addr-specs
	(if we encounter something that looks like it is a toplevel domain
	addr, it is more likely to be bogus than correct).

svn path=/trunk/; revision=24592
2004-02-03 18:52:53 +00:00
c5c4371741 ** See bug #52817.
2004-01-20  Not Zed  <NotZed@Ximian.com>

        ** See bug #52817.

        * camel-session.c (camel_session_get_password): merged reprompt
        and secret into a flags field, and add more options.  Fixed all
        callers.

svn path=/trunk/; revision=24323
2004-01-20 05:33:12 +00:00
2699c4c41f Remove mempool code, we use the stuff in e-util. (PRESERVE_HEADERS): new
2003-11-13  Not Zed  <NotZed@Ximian.com>

        * camel-mime-parser.c: Remove mempool code, we use the stuff in
        e-util.
        (PRESERVE_HEADERS): new compile option, if on, we preserve headers
        and folding exactly rather than unfolding all input.  THIS BREAKS
        EVERYTHING right now, so don't turn it on.

        * camel-gpg-context.c (gpg_decrypt): reset the input memstream
        before passing it to the gpg engine.

        * tests/smime/pgp-mime.c (main): redirect /dev/null to stdin so it
        doesn't hang waiting for input.
        (main): removed from build - this tests multipart/signed
        explictly, but now the details of this is handled directly by the
        cipher context.

        * tests/smime/pgp.c (main): fixes for api changes.
        (main): redirect /dev/null to stdin so it doesn't hang waiting for
        input.

        * tests/message/test1.c (main): update for api changes.

        * camel-smime-context.c (sm_verify): look at the content object's
        mime type, not the container's type.

svn path=/trunk/; revision=23343
2003-11-13 23:17:31 +00:00
52759f2d40 Added a note about api inconsistencies.
2003-10-30  Not Zed  <NotZed@Ximian.com>

        * camel-cipher-context.h: Added a note about api inconsistencies.

2003-10-30  Not Zed  <NotZed@Ximian.com>

        * camel-multipart-encrypted.c (camel_multipart_encrypted_decrypt):
        fix for cipher_decrypt changes.

        * camel-gpg-context.c, camel-cipher-context.c: moved all the init
        code to the end to save having to keep forward declarations
        around.
        (camel_cipher_decrypt): changed to take mimepart input and return
        a mimepart.
        (gpg_decrypt): fix for changed args.

2003-10-29  Not Zed  <NotZed@Ximian.com>

        * camel-smime-context.[ch]: replaced entirely with a new
        implementation which inherits from camel-cipher-context, and add
        to build.

        * camel-multipart-encrypted.c (camel_multipart_encrypted_encrypt):
        fix for cipher_encrypt api changes.
        (camel_multipart_encrypted_decrypt): use g_ascii_strcasecmp.

        * camel-gpg-context.c (gpg_encrypt): Fix to handle input/output as
        parts not streams

        * camel-cipher-context.c (camel_cipher_encrypt): change to take
        mimeparts rather than streams as input/output.  And remove the
        'sign' argument, it is implied if userid is supplied.

2003-10-28  Not Zed  <NotZed@Ximian.com>

        * tests/smime/pgp.c (main): fix for ciphercontext api changes.

        * camel-multipart-signed.c (camel_multipart_signed_verify): pass
        in the part to cipher_verify directly.
        (camel_multipart_signed_sign): let the cipher context setup the
        part details.

        * camel-gpg-context.c (gpg_sign): put the signature stream into a
        mimepart, with appropriate headers/encoding.
        (swrite): write out a mimepart rather than a stream.
        (gpg_verify): handle changed args.

        * camel-cipher-context.c (camel_cipher_sign): write the signature
        to a mimepart rather than a simple stream.
        (camel_cipher_verify): take the signature as a mimepart not a
        stream.

2003-10-22  Not Zed  <NotZed@Ximian.com>

        * camel-utf8.c (camel_ucs2_utf8, camel_utf8_ucs2): helpers for
        ucs2 stuff.  ucs2 is 16 bit truncated unicode.

svn path=/trunk/; revision=23127
2003-10-30 04:58:33 +00:00
4bd500a0d8 Don't try dot-files.
2003-09-23  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/message/test4.c (main): Don't try dot-files.

svn path=/trunk/; revision=22665
2003-09-23 16:50:06 +00:00
91195af48f New function to replace the one from camel-mime-part.c
2003-09-18  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c (camel_transfer_encoding_to_string): New
	function to replace the one from camel-mime-part.c
	(camel_transfer_encoding_from_string): Same.
	(camel_content_transfer_encoding_decode): Renamed from
	camel_header_content_encoding_decode().

	* camel-mime-part.c (camel_mime_part_encoding_to_string): Removed.
	(camel_mime_part_encoding_from_string): Removed.

	* camel-data-wrapper.[c,h]: updated for CamelTransferEncoding
	namespace changes

	* camel-folder-summary.c: updated for CamelTransferEncoding
	namespace changes

	* camel-mime-filter-bestenc.[c,h]: updated for CamelTransferEncoding
	namespace changes

	* camel-mime-message.c: updated for CamelTransferEncoding
	namespace changes

	* camel-mime-part-utils.c: updated for CamelTransferEncoding
	namespace changes

	* camel-multipart-signed.c: updated for CamelTransferEncoding
	namespace changes

	* camel-smime-context.c: updated for CamelTransferEncoding
	namespace changes

	* providers/imapp/camel-imapp-utils.c: updated for
	CamelTransferEncoding namespace changes

	* tests/lib/messages.c: updated for CamelTransferEncoding
	namespace changes

	* tests/message/test1.c: updated for CamelTransferEncoding
	namespace changes

svn path=/trunk/; revision=22617
2003-09-18 19:02:15 +00:00
ae90832e1a return 77 when gpg isn't available rather than 127
also fixed to import the keys from the correct location

svn path=/trunk/; revision=22287
2003-08-19 15:44:33 +00:00
dbf631a87d Various fixes to make it work.
2003-08-18  Not Zed  <NotZed@Ximian.com>

        * camel-http-stream.c: Various fixes to make it work.

        * tests/smime/pgp-mime.c (main): added missing 'ret' variable.

        * providers/smtp/camel-smtp-transport.c (connect_to_server):
        * providers/imapp/camel-imapp-store.c (connect_to_server:
        * providers/imap/camel-imap-store.c (connect_to_server):
        * providers/pop3/camel-pop3-store.c (connect_to_server):
        * camel-http-stream.c (http_connect): change service->session for
        tcp_stream_ssl_new.

        * camel-tcp-stream-ssl.c: Changed service to session, and fix some
        refcounting of it.
        include camel-operation.h

svn path=/trunk/; revision=22275
2003-08-19 02:36:31 +00:00
87b5d92a77 ** See bug #47634.
2003-08-15  Not Zed  <NotZed@Ximian.com>

        ** See bug #47634.

        * tests/lib/messages.c (test_message_compare): check
        write_to_stream returns.
        (message_dump_rec): helper to dump message structure.

        * camel-mime-part-utils.c
        (simple_data_wrapper_construct_from_parser): dont set content
        encoding here.
        (camel_mime_part_construct_content_from_parser): set it here
        instead, on every part.  basically same as setting the
        mime_type_field always.

        * camel-multipart-signed.c (camel_multipart_signed_class_init):
        * camel-mime-message.c (camel_mime_message_class_init):
        * camel-multipart.c (camel_multipart_class_init): override
        decode_to_stream to always do the same as write_to_stream, since
        we can never be encoded.

svn path=/trunk/; revision=22252
2003-08-15 20:57:30 +00:00
c3397634d2 updated mime-tests README
svn path=/trunk/; revision=22178
2003-08-11 20:18:16 +00:00
b328a21e7c New test suite for the mime parser (which is where the below 2 fixes were
* tests/message/test4.c: New test suite for the mime parser (which
	is where the below 2 fixes were noticed).

	* camel-mime-parser.c (folder_boundary_check): Calculate 'len' by
	subtracting the boundary start from inend rather than 'atleast'.
	(folder_scan_content): Calculate 'inend' differently depending on
	the EOF state.

2003-08-08  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-filter-tohtml.c (html_convert): Rather than checking
	*inptr == '\n', check inptr >= inend - this gets rid of an Invalid
	Read report from valgrind.

	* camel-mime-part.c (write_to_stream): Don't necessarily re-encode
	just because the encodings differ. Need to look into making it so
	that message/rfc822 and multipart parts ignore the
	Content-Transfer-Encoding header and just keep their 'encoding'
	bits set to DEFAULT.

2003-08-05  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-folder.c (get_content): Updated.

	* camel-mime-message.c (camel_mime_message_init): Don't override
	the mime_type here.
	(process_header): Updated to use CamelDataWrapper's mime_type
	field.
	(find_best_encoding): Same.
	(best_encoding): Here too.

	* camel-digest-folder.c (camel_digest_folder_new): Updated for
	CamelMimePart::content_type change.

	* camel-mime-part.c (camel_mime_part_init): Override our parent
	class's default mime_type.
	(camel_mime_part_finalize): Don't need to unref the content_type
	anymore.
	(process_header): Updated to use CamelDataWrapper's mime_type
	field.
	(camel_mime_part_set_filename): Same.
	(camel_mime_part_get_filename): Same.
	(camel_mime_part_get_content_type): Same.
	(set_content_object): Here too.
	(write_to_stream): Updated.
	(construct_from_parser): Updated.

	* camel-mime-part.h: Remove the content_type field.

2003-07-31  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/lib/messages.c (test_message_compare_content): If the
	chunks differ, perform a hexdump on the data being compared so
	that we may analyse it easier.

	* camel-multipart-signed.c (write_to_stream): Return ssize_t.

	* camel-mime-utils.h: Added the CamelMimePartEncodingType enum
	here.

	* camel-mime-part.h: Removed the CamelMimePartEncodingType enum
	from here.

	* camel-mime-part.c (write_to_stream): Updated to return
	ssize_t. Also minor changes to only re-encode the content stream
	if the charset or encoding changed (this way we write it out in
	the original raw form if nothing changed).

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): Drastically
	simplify. We no longer scan html content to try and find the
	charset, nor do we care about converting the content to UTF-8 and
	handling broken windows charsets.

	* camel-mime-message.c (find_best_encoding): Use
	decode_to_stream() here. Also updated to not assume the content
	charset is UTF-8 since it is very likely not the case anymore
	since data-wrappers no longer are converted to UTF-8 at parse
	time.

	* camel-folder-summary.c (summary_build_content_info_message): Use
	decode_to_stream instead here too.

	* camel-folder-search.c (match_words_1message): Use
	decode_to_stream instead of write_to_stream so we can search the
	contents.

	* camel-data-wrapper.c (camel_data_wrapper_init): Set the default
	encoding to DEFAULT.
	(write_to_stream): Updated to return ssize_t
	(camel_data_wrapper_decode_to_stream): New virtual function to
	decode a data wrapper to a stream (results in nearly identical
	behaviour to the old write_to_stream method).
	(decode_to_stream): Default implementation of above virtual
	method. Decodes base64/qp/etc streams.

	* camel-data-wrapper.h: Removed the rawtext bit and added an
	encoding member.

svn path=/trunk/; revision=22171
2003-08-11 17:57:45 +00:00
330ecafed4 oops, s/gpgfoo/gpg/
svn path=/trunk/; revision=22058
2003-08-01 19:31:31 +00:00
28adf143a1 updated
svn path=/trunk/; revision=22057
2003-08-01 19:30:50 +00:00
1b7da17c25 Same.
2003-08-01  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/smime/pgp-mime.c: Same.

	* tests/smime/pgp.c: Updated to build and to import some custom
	gpg keys for use with testing.

svn path=/trunk/; revision=22055
2003-08-01 19:13:20 +00:00
bf814df02f removed #ifndef ENABLE_THREADS
svn path=/trunk/; revision=21780
2003-07-09 19:34:15 +00:00
db1672cb69 removed #ifdef ENABLE_THREADS
svn path=/trunk/; revision=21779
2003-07-09 19:32:43 +00:00
41e808deca ** Should fix #41629, #41448, et al.
2003-04-22  Not Zed  <NotZed@Ximian.com>

        ** Should fix #41629, #41448, et al.

        * tests/folder/test10.c: a new torture test for object bag
        creation/unreffing.

        * camel-url.c (camel_url_copy): new function to copy a url.

        * camel-object.c (camel_object_bag_new): add arguments for key
        copy and key free functions.  Fixed all callers.
        (camel_object_bag_destroy): fix a memleak, free the bag key.
        (camel_object_bag_get, camel_object_bag_reserve)
        (camel_object_bag_abort, save_bag, save_object): Make the key a
        void type, rather than char *.
        (camel_object_bag_add): As above, and also copy the key.
        (camel_object_bag_remove_unlocked): free the key using
        bag->free_key.

        * camel-session.c (register_provider)
        (camel_session_destroy_provider, get_service): Changed to use an
        object bag instead of a hash table for the service 'cache'.
        (service_cache_remove): Removed, no longer required.

svn path=/trunk/; revision=20930
2003-04-23 01:34:03 +00:00
223d2354ac Urls are unlikely to end with punctuation or closing braces, so strip any
2003-04-16  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-url-scanner.c (camel_url_web_end): Urls are unlikely to
	end with punctuation or closing braces, so strip any of those off
	the end of the url. Fixes bug #41461.

	* tests/mime-filter/data/html.1.out: Removed a trailing \n at the
	end of the file, this is incorrect (since out input file does not
	contain one).

	* camel-mime-filter-tohtml.c (html_convert): Only output a <br> if
	we found an eoln in the input. Along the same lines, don't write a
	'\n' to the output buffer unless we've encountered that eoln in
	the input. Fixes bug #41407.

svn path=/trunk/; revision=20882
2003-04-17 16:43:07 +00:00
2e7d1434ae filter data test cases.
2003-04-10  Not Zed  <NotZed@Ximian.com>

        * tests/mime-filter/data: filter data test cases.

        * tests/mime-filter/test-tohtml.c: New test for html filter.

        ** See bug #40969

        * camel-mime-filter-tohtml.c (html_convert): Change the logic
        slightly, scan a whole line within the main loop.

svn path=/trunk/; revision=20799
2003-04-10 11:35:00 +00:00
be9db81541 Like camel_url_encode, but works directly on an existing GString.
* camel-url.c (append_url_encoded): Like camel_url_encode, but
	works directly on an existing GString.
	(camel_url_to_string, output_param): Use it.
	(camel_url_encode): Likewise. Remove "escape_unsafe" arg since the
	"unsafe" chars are the ones that should *always* be escaped, and
	the places we were passing FALSE were wrong.
	(camel_url_decode): replace with a new version

	* camel-file-utils.c (camel_file_util_safe_filename): Remove extra
	arg to camel_url_encode.

	* tests/misc/url.c (main): Add tests of basic URL parsing and
	unparsing

svn path=/trunk/; revision=20545
2003-03-27 15:37:47 +00:00
3a49f0dd08 Removed $(GNOME_LIBDIR) and $(GNOMEUI_LIBS)
* tests/*/Makefile.am: Removed $(GNOME_LIBDIR) and $(GNOMEUI_LIBS)

svn path=/trunk/; revision=18839
2002-11-19 17:21:44 +00:00
3cb66ed22a Treat spool as a local folder, so the ref checks work right.
2002-09-26  Not Zed  <NotZed@Ximian.com>

	* tests/folder/test2.c (main): Treat spool as a local folder, so
	the ref checks work right.

	* providers/local/camel-spool-store.c
	(get_folder): Use creat() instead of open() to create file.

svn path=/trunk/; revision=18231
2002-09-26 05:56:12 +00:00
cf4ca10f51 Added a test suite for camel-mime-filter-charset and added a few test cases for it. input charset files should be in the form "charset-%s.%d.in" where %s is the charset name that the file is in and %d is just some number as in a sequence id. Mostly just so we can have multiple test files per charset
svn path=/trunk/; revision=18227
2002-09-25 23:25:05 +00:00
4c66cbd9f1 New regression test for word splitting/search input parsing code.
2002-09-20  Not Zed  <NotZed@Ximian.com>

        * tests/misc/split.c: New regression test for word
        splitting/search input parsing code.

        * tests/folder/test9.c (main): Fix for filter_driver api change.

        * camel-search-private.c (camel_search_words_split): Handle "'s
        and \'s to escape characters.  For fat, lazy, slobs who dont like
        anything changing.

svn path=/trunk/; revision=18130
2002-09-20 05:30:27 +00:00
a52720a921 clear nonfatal stuff.
2002-09-04  Not Zed  <NotZed@Ximian.com>

	* tests/folder/test4.c (main): clear nonfatal stuff.

	* tests/folder/test6.c (main): check inbox and 'another folder'
	because some servers do different things w/ inbox.

	* providers/imap/camel-imap-message-cache.c
	(camel_imap_message_cache_get): Dont try to open the directory
	instead of an empty "" uid.

	* providers/imap/camel-imap-folder.c (imap_get_message): we dont
	want to g_return_if_fail, we need to set an exception and always
	handle the case.
	(get_message_simple): Set an exception if we get a construct
	failure.
	(imap_refresh_info): if we're refreshing inbox, force a reselect.
	this is required for at least cryus.  CHECK doesnt work either :(

	* tests/lib/folders.c (test_folder_basic): for non-local stores,
	the folder will have an extra ref for selection, take this into
	account when checking ref leaks.
	(test_folder_message_ops): Dont try to delete folder with messages
	in it, it works generally with imap.  also, change params so we
	can test different mailbox types.
	(test_folder_message_ops): disconnect remote services before
	finishing off.  doesn't need to stricly but makes ref count
	checking more accurate.
	(test_folder_message_ops): removed explicit remote sync, imap does
	it itself now ...

	* providers/imap/camel-imap-store.c:
	(camel_imap_store_finalize): call service_disconnect, so it isn't
	called later in the finalise chain, to properly cleanup on exit.

svn path=/trunk/; revision=17962
2002-09-04 08:13:38 +00:00
6b132fe48a Change the case sensitive search of subject to expect case insensitive
2002-08-29  Not Zed  <NotZed@Ximian.com>

        * tests/folder/test3.c: Change the case sensitive search of
        subject to expect case insensitive results, as the behaviour has
        changed.
        (main): Made the search content before sync nonfatal.  its
        something that needs to be fixed but not practical concern in
        evolution.

        * camel-block-file.c (block_file_validate_root): Only spit out the
        invalid root warnings if the file isn't empty.

        * camel-text-index.c (text_index_compress_nosync): Swap the path
        as well when we compress.

        * camel-mime-parser.c (folder_scan_content): Treat the end of file
        as a boundary if we're scanning From lines, and drop the last \n.
        (folder_scan_init_with_fd): Dont pre-read from the fd, and init eof.
        (folder_scan_init_with_stream): Similar.
        (folder_read): Handle eof, and set eof on 0 read.
        (folder_seek): Dont pre-read after a seek, and reset eof flag.
        (camel_mime_parser_init_with_fd): Fix doco, no pre-read occurs
        anymore.
        (camel_mime_parser_init_with_stream): Same.

        * providers/local/camel-mbox-summary.c
        (camel_mbox_summary_sync_mbox): Add a \n to end of content of each
        message, not at start.

        * providers/local/camel-mbox-folder.c (mbox_append_message):
        Instead of appending "\nFrom " to a mailbox, start with "From ",
        and append a \n after the message always.  For better mutt/elm
        compatability.  Also, unlock after we've stat'd.
        (mbox_append_message): Set the message's from_pos exactly as the
        mbox size.

svn path=/trunk/; revision=17921
2002-08-29 12:04:34 +00:00
139d78da63 updated readme
svn path=/trunk/; revision=17919
2002-08-29 09:58:33 +00:00
fc6063eabd fix exposes a regression in mbox :-/
2002-08-28  Not Zed  <NotZed@Ximian.com>

	* tests/folder/test8.c (test_add_message): Change message number
	to use hex, so its properly unique.
	(worker): Same here.

svn path=/trunk/; revision=17891
2002-08-28 13:04:29 +00:00
a01639020e some utf7/utf8 tests.
2002-08-28  Not Zed  <NotZed@Ximian.com>

        * tests/misc/utf7.c: some utf7/utf8 tests.

svn path=/trunk/; revision=17890
2002-08-28 12:35:16 +00:00
577c14751f Don't register the noop timeout here anymore, we're gonna handle all this
2002-08-21  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-session.c (get_service): Don't register the noop timeout
	here anymore, we're gonna handle all this in the mailer now.
	(camel_session_register_timeout): Removed.
	(camel_session_remove_timeout): Removed.

svn path=/trunk/; revision=17830
2002-08-21 18:17:21 +00:00
5fb3a28aba Updated to pass the needed arguments to camel_init() and to init gthreads
2002-08-19  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/lib/camel-test.c (camel_test_init): Updated to pass the
	needed arguments to camel_init() and to init gthreads before camel
	(since camel expectes it to be initialised already).

	* tests/lib/session.c: #include <config.h> needed for
	ENABLE_THREADS so that sizeof (CamelSessionClass) gives the
	correct size.

	* tests/*: Updated to work with camel API changes.

svn path=/trunk/; revision=17805
2002-08-19 20:14:15 +00:00
1c309b14c4 Added a protocol field for users to use.
2002-05-30  Not Zed  <NotZed@Ximian.com>

        * camel-cipher-context.h: Added a protocol field for users to use.

        * camel-stream-filter.c (do_read): Sigh, the pre-size is READ_PAD
        not READ_SIZE.  Big difference.
        (READ_PAD): Bumped upto 128 from 64, so we can fit a typical line
        in full.

        * providers/imap/camel-imap-folder.c (get_content): Changed to
        load multipart/signed as an opaque block into the right kind of
        object.

        * camel-multipart.h (struct _CamelMultipart): Removed the boundary
        field.  It wans't actually used anywhere.

        * camel-seekable-substream.c
        (camel_seekable_substream_new_with_seekable_stream_and_bounds):
        Shortened this stupidly long name to just :new(), its the only way
        its ever used.  Fixed all callers.

        * camel-multipart-signed.[ch]: new wrapper for multipart/signed
        types.  We need to treat the entire content as a blob of data for
        transport purposes.  This also cleans up a lot of the sign/verify
        handling.

        * camel-mime-part-utils.c
        (camel_mime_part_construct_content_from_parser): Just call
        camel_multipart_construct_from_parser for multipart parts, also
        use a multipart_signed for multipart/signed types.

        * camel-multipart.c (camel_multipart_construct_from_parser): New
        virtual function for multiparts to buld themselves.
        (construct_from_parser): Implement for normal multiparts.
        (toplevel): Got rid of a warning, it'll never be an abstract
        class.

        * camel-pgp-context.c (pgp_hash_to_id):
        (pgp_id_to_hash): Implement.
        (camel_pgp_context_init): Init the pgp protocol specifier.

        * camel-cipher-context.c (camel_cipher_id_to_hash):
        (camel_cipher_hash_to_id): Util virtual methods to handle the
        cipher id string.

        * camel-mime-filter-canon.[ch]: A new filter, end/start of line
        canonicalisation filter.  Can escape "From " and strip trailing
        whitespace, and canonicalise the end of line to crlf or to lf.

2002-05-29  Not Zed  <NotZed@Ximian.com>

        * camel-multipart.h (struct _CamelMultipart): Removed the
        'parent', nothing used it, anywhere.  Cleaned up some formatting
        slightly.

svn path=/trunk/; revision=17057
2002-05-31 01:05:47 +00:00
4ba09274d6 Clean up some of the Makefiles so we dont' link every library multiple
times, causing big libtool 1.4 pain.

svn path=/trunk/; revision=15461
2002-01-24 23:16:18 +00:00
8a644defbf Pull up test fixes to get them building again
2001-07-20  JP Rosevear  <jpr@ximian.com>

	* Pull up test fixes to get them building again

svn path=/trunk/; revision=11270
2001-07-20 20:55:53 +00:00
fe8b682289 Change a camel_exception_clear to camel_exception_init to fix a
* tests/misc/url.c (main): Change a camel_exception_clear to
	camel_exception_init to fix a sometimes-crash

svn path=/trunk/; revision=10675
2001-07-02 13:06:56 +00:00
f57c621992 Build the test-crlf test program.
2001-06-29  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/mime-filter/Makefile.am: Build the test-crlf test program.

	* tests/mime-filter/test-crlf.c: New test suite for the crlf
	filter.

	* camel-mime-filter-crlf.c (filter): Fixed to correctly encode and
	decode dots.

svn path=/trunk/; revision=10602
2001-06-29 18:09:45 +00:00
6ffa930086 Add a CamelMimeFilterStripHeader that removes a header from mime output. Used
by sendmail to strip the BCC from the email while still sending to the BCC
recipients.

camel:

2001-06-28  Peter Williams  <peterw@ximian.com>

        * camel-mime-filter-stripheader.c: New file. Filter that strips a
        header from mime output.

        * camel-mime-filter-stripheader.h: New file. Header for the above.

        * providers/smtp/camel-smtp-transport.c (smtp_data): Use the stripheader
        filter to remove the "Bcc" header.

        * Makefile.am: Add the stripheader files.

        * tests/lib/Makefile.am (INCLUDES): Get this to compile again.

        * tests/mime-filter/test-stripheader.c: New file. Test suite for
        the CamelMimeFilterStripHeader.

        * tests/mime-filter/Makefile.am: New test section: mime filters.

mail:

2001-06-28  Peter Williams  <peterw@ximian.com>

        * mail-ops.c (mail_send_message): Revert fejj's Bcc header removal;
        this unsets the BCC recipients and so doesn't send to the Bcc'd
        people at all.

svn path=/trunk/; revision=10576
2001-06-28 20:35:43 +00:00
5a223c85b9 Updated to match the current API.
2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/folder/test9.c (main): Updated to match the current API.

	* tests/folder/test3.c: #include <gtk/gtk.h> since we use
	gtk_init().

svn path=/trunk/; revision=10546
2001-06-27 22:21:05 +00:00
a0c711d6c4 Remove DB3_LDADD
* tests/stream/Makefile.am (LDADD):
	* tests/smime/Makefile.am (LDADD):
	* tests/misc/Makefile.am (LDADD):
	* tests/message/Makefile.am (LDADD):
	* tests/folder/Makefile.am (LDADD): Remove DB3_LDADD

svn path=/trunk/; revision=10272
2001-06-18 20:07:35 +00:00
e905364bee Only create a missing uid if we have indexing turned on.
2001-06-18  Not Zed  <NotZed@Ximian.com>

        * camel-folder-summary.c
        (camel_folder_summary_info_new_from_parser): Only create a missing
        uid if we have indexing turned on.

        * camel-lock-helper.c (setup_process): Function to setup
        process/sanity/security checks.  Change to the real uid as soon as
        we can.
        (lock_path): First try to lock as the real uid, if that fails, try
        the root uid.
        (unlock_id): Unlock as the uid we created the lock as.

        * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper
        location.

        * providers/local/camel-spool-folder.c (spool_lock): Implemented,
        using lock helper locking.  Need to work out if the locking
        requires a root created lock?
        (spool_unlock): Likewise.

2001-06-15  Not Zed  <NotZed@Ximian.com>

        * camel-lock-helper.c: Setuid Lock helper process.  Creates and manages
        .locks, keeping them active, removing them, etc.  What real perms it
        needs is a little system dependent.

2001-06-14  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-maildir-store.c (get_folder_info): Implement.
        (scan_dir): Does the work of scanning for maildir directories.

2001-06-13  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-spool-store.c (get_folder_info):
        Implemented, just returns a hardcoded INBOX folder.
        (free_folder_info): implemented, free's the 1 possible level of
        folder info.

        * providers/local/camel-spool-folder.c
        (camel_spool_folder_construct): Set the real unread message
        count on the folder_created thing.

svn path=/trunk/; revision=10261
2001-06-18 14:36:44 +00:00
f14e85f771 A new provider, for spool mailboxes. Mostly a cut and paste of the mbox
2001-06-12  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-spool-*.[ch]: A new provider, for spool
        mailboxes.  Mostly a cut and paste of the mbox code, but not a
        subclass CamelLocal*.  Not tested a lot, doesn't lock yet, use
        with extreme caution.

        * tests/lib/folders.c (test_folder_message_ops): Added spool arg,
        spool folders can't be deleted, renamed, etc.
        (test_folder_basic): Same.

        * tests/folder/test2.c (main): Added checks for spool type.

        * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD):
        Added db3 flags, so make check compiles, doesn't run though.

2001-05-24  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-local-provider.c
        (camel_provider_module_init): Added spool provider.

svn path=/trunk/; revision=10198
2001-06-12 14:29:28 +00:00
2ceef66cce Fix to not get into a recursive loop in get_type().
2001-06-01  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/smime/pgp.c: Fix to not get into a recursive loop in
	get_type().

	* tests/smime/pgp-mime.c: Same.

svn path=/trunk/; revision=10102
2001-06-02 21:06:42 +00:00
618ce2988e Fix an fd leak
* tests/lib/messages.c (test_message_read_file): Fix an fd leak

	* tests/lib/session.c, tests/lib/session.h: a CamelSession
	subclass for the test programs.

	* tests/lib/Makefile.am: include session.[ch]

	* tests/folder/test*.c: Use a CamelTestSession from libcameltest
	instead of cut+pasting everywhere.

	* tests/misc/url.c (main): Update for a camel_url_new change at
	some point.

	* tests/*/.cvsignore: Add stuff.

	* camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!=
	mixup.

svn path=/trunk/; revision=10023
2001-05-27 19:52:07 +00:00
c2940feaaa Don't use EXTRA_GNOME_*, use the new CAMEL_* variables so we don't link in
2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>

	* Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_*
	variables so we don't link in tons of extra cruft that we don't
	need.

svn path=/trunk/; revision=9821
2001-05-15 19:09:03 +00:00
d1fe1c2d89 Added t the test suite - tests the S/MIME pkcs7 functions.
2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/smime/pkcs7.c: Added t the test suite - tests the S/MIME
	pkcs7 functions.

svn path=/trunk/; revision=9818
2001-05-15 18:37:37 +00:00
d538a34c4b Subclass CamelSession since we can no longer specify the passwd callback
2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/folder/test9.c:
	* tests/folder/test8.c:
	* tests/folder/test7.c:
	* tests/folder/test6.c:
	* tests/folder/test5.c:
	* tests/folder/test4.c:
	* tests/folder/test3.c:
	* tests/folder/test2.c:
	* tests/folder/test1.c:
	* tests/smime/pgp-mime.c:
	* tests/smime/pgp.c: Subclass CamelSession since we can no longer
	specify the passwd callback any other way and update code
	accordingly.

svn path=/trunk/; revision=9796
2001-05-14 20:08:25 +00:00
18af050c05 Remove UNICODE_CFLAGS (and some other stuff that's redundant with
* Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other
	stuff that's redundant with EXTRA_GNOME_CFLAGS)
	(libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS.

	* camel-search-private.c:
	* camel-pgp-context.c:
	* camel-mime-utils.c: Use gunicode interfaces rather than
	libunicode.

	* camel-charset-map.c: Use gunicode rather than libunicode. (The
	charmap-regen code still depends on libunicode though.)

	* camel-mime-filter-charset.h:
	* tests/message/test2.c (convert): Use iconv rather than
	unicode_iconv.

	* providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD):
	* providers/pop3/Makefile.am (libcamelpop3_la_LIBADD):
	* providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove
	UNICODE_LIBS.

	* camel.c (camel_init): Remove call to unicode_init.

	* camel-mime-parser.c: Remove unused unicode.h include.

svn path=/trunk/; revision=9585
2001-04-26 18:21:32 +00:00
dc90015fb8 Oops, lets not get into a recursive call here ;-)
2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not
	get into a recursive call here ;-)

	* tests/smime/pgp.c: Updated to reflect changes to the PGP code.

	* tests/smime/pgp-mime.c: Same.

svn path=/trunk/; revision=9287
2001-04-12 22:03:23 +00:00
55bb947869 Added pgp-mime.c to the tests.
2001-04-11  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/smime/Makefile.am: Added pgp-mime.c to the tests.

	* tests/smime/pgp-mime.c: Test suite for camel-pgp-mime.c functions.

	* Makefile.am: Add camel-pgp-mime.[c,h] to the build.

	* camel-pgp-mime.c: Made a number of fixes to get it to compile
	and also fixed a few logic errors (mostly forgetting to reset
	streams) so that it worked (thanks to the pgp-mime test program).

svn path=/trunk/; revision=9247
2001-04-11 20:10:24 +00:00