Commit Graph

56 Commits

Author SHA1 Message Date
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
eee943f21e Added camel-pgp-context.[c,h] to the build. Also added tests/smime/pgp.c
2001-04-06  Jeffrey Stedfast  <fejj@ximian.com>

	* Makefile.am: Added camel-pgp-context.[c,h] to the build. Also
	added tests/smime/pgp.c and Makefile.am

	* tests/smime/pgp.c: New test suite for PGP functions.

	* camel-pgp-context.c: Various fixes to get it to build.

svn path=/trunk/; revision=9213
2001-04-10 15:47:00 +00:00
bd52985962 change "gboolean show_passwd" to "guint32 flags".
* camel-url.c (camel_url_to_string): change "gboolean show_passwd"
	to "guint32 flags".

	* tests/misc/url.c (main): Update calls to camel_url_to_string

	* providers/imap/camel-imap-store.c (construct): Call
	camel_url_to_string with flags to hide password, authtype, and
	params to create the base_url.
	(etc): Update for the fact that the base_url no longer has the "/"
	at the end.

	* camel-service.c (construct): Update calls to camel_url_to_string
	(pass CAMEL_URL_HIDE_PASSWORD)

svn path=/trunk/; revision=9014
2001-03-29 17:34:00 +00:00
182c699c39 New URL parser with full RFC1808 relative URL support. Yum.
* camel-url.c (camel_url_new_with_base): New URL parser with full
	RFC1808 relative URL support. Yum.
	(camel_url_new): Wrapper around camel_url_new_with_base now.
	Removed the CamelException since no one ever used it...

	* tests/Makefile.am: add misc subdir

	* tests/misc/url.c: relative URL test cases from RFC 1808

	* camel-session.c (camel_session_get_service): Update
	camel_url_new call.

svn path=/trunk/; revision=8933
2001-03-25 22:55:27 +00:00
5870f8ab9b Added more test rules.
svn path=/trunk/; revision=8102
2001-02-08 03:53:15 +00:00
1a403012d4 Changed the subject search to handle case sensitive when it is mixed case.
2001-01-25  Not Zed  <NotZed@Ximian.com>

	* tests/folder/test3.c: Changed the subject search to handle case
	sensitive when it is mixed case.

	* Makefile.am (libcamel_la_SOURCES): Added camel-ssearch-private.c
	(noinst_HEADERS): Added camel-search-private.h

	* camel-folder-search.c (check_header): New function to do the
	work of the various header checks.
	(search_header_matches):
	(search_header_starts_with):
	(search_header_ends_with):
	(search_header_contains): Use check_header to do the work.
	(build_match_regex): Removed.

	* camel-search-private.c (header_soundex):  New
	function to match words to phrases using soundex algorithm.

	* camel-filter-search.c (soundexcmp): Removed.
	(check_match): Moved to search-private.h

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

	* camel-search-private.c (camel_search_build_match_regex): Added
	extra flags, so the same function can be used for
	start/end/whole/partial matches.
	(camel_search_header_match): Convenience function to check a
	single header against all sorts of different matches.

	* providers/imap/camel-imap-search.c (imap_body_contains): Fix for
	e_sexp api changes.

	* camel-folder-search.c: Fix for e_sexp api changes.
	(search_header_contains): Free args/quit on unknown header.
	(search_header_matches): "
	(search_header_starts_with): "
	(search_header_ends_with): "
	(match_message): Add an exception argument.
	(search_body_contains): Free args/quit on fatal error.
	(message_body_contains): Removed (moved to
	camel-search-private.c), fixed callers.

	* camel-filter-search.c: Fix for e_sexp api changes.
	(build_match_regex, message_body_contains): Moved into
	camel-filter-private.c  Fixed callers.
	(check_header): moved guts to camel-search-private, and
	changed to use regex's for everything.  Just calls that with the
	right args.
	(check_header): GEts the header, decodes it, and checks for
	failure, and whatnot.
	(check_match): Removed.
	(header_soundex): Changed significantly.  Now it soundexes each
	word in the header separately, and compares it to the first
	argument.

	* tests/folder/test9.c (main): Fix for api changes.
	(main): Added tests to see that invalid match and action
	rules are properly detected.

	* camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove
	the 'finished message' bit.
	(camel_filter_driver_filter_message): Remove an accidentally
	checked in debug.
	(camel_filter_driver_filter_message): Fix for e-sexp api changes.

svn path=/trunk/; revision=7796
2001-01-25 02:04:28 +00:00
3a8e66e4f2 Added tests to see that invalid match and action rules are properly
2001-01-24  Not Zed  <NotZed@Ximian.com>

        * tests/folder/test9.c
        (main): Added tests to see that invalid match and action
        rules are properly detected.

svn path=/trunk/; revision=7767
2001-01-24 00:36:46 +00:00
8b35e075d2 Fix for api changes.
2001-01-24  Not Zed  <NotZed@Ximian.com>

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

svn path=/trunk/; revision=7765
2001-01-23 23:52:30 +00:00
881c6eb752 Added profiling temp files.
2001-01-22  Not Zed  <NotZed@Ximian.com>

        * .cvsignore */*/.cvsignore: Added profiling temp
        files.

svn path=/trunk/; revision=7705
2001-01-22 11:57:29 +00:00
4f5effdf88 Index: ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.684
diff -r1.684 ChangeLog
0a1,34
> 2001-01-17  Not Zed  <NotZed@Ximian.com>
>
> 	* camel-folder.c (free_summary): Call
> 	camel_folder_summary_array_free() to do the work.
> 	(get_summary): Use camel_folder_summary_array() to get the array
> 	atomically.  These fixes allow folder/test8 to work again, and fix
> 	a sort of race where the summary size can change while we were
> 	making a copy of it.
>
> 	* camel-folder-summary.c (camel_folder_summary_array): Get the
> 	summary array atomically, so it can't contain empty records.
> 	(camel_folder_summary_array_free): And free it.
>
> 	* tests/lib/camel-test.c (die): If we are verbose & in threads,
> 	then goto sleep so we can debug.
>
> 	* tests/folder/test8.c (worker): Add a missing pull() for
> 	comnparing content.
>
> 	* camel-filter-search.c: Fix the symbol table, so match-all is an
> 	immediate function, as it should be.
>
> 	* tests/folder/test9.c (main): New test, tests some filtering
> 	things.
>
> 	* tests/message/test3.c (main): Dont use a boundary string with
> 	spaces in it.  Folding can corrupt it.  Maybe the folding isn't
> 	working entirely right, but anyway.
>
> 	* camel-session.c: Debug out the debug.
>
> 	* camel-filter-driver.c (camel_filter_driver_filter_folder): Plug
> 	a messageinfo leak.
>
1a36,94
>
> 	* camel-filter-search.c (header_exists): Changed to support
> 	multiple args (or'd together).
> 	(header_contains): Cleaned up to match the search code.  Why did
> 	fejj change it? I'll never know.
> 	(header_matches):
> 	(header_starts_with):
> 	(header_ends_with): Big cleanup of fejj's "i'm the cut & paste
> 	king" code.  Also properly handle or'ing of additional args to
> 	match what the folder-search code should do.
> 	(check_match): New function which does the annoying matching
> 	stuff (for header matches).
> 	(check_header): Similarly, handles or'ing of the matches together.
> 	(header_contains):
> 	(header_matches):
> 	(header_starts_with):
> 	(header_ends_with): Call check_header to do the actual work.
> 	(header_soundex): And here too.
> 	(match_all): Yeah like match-all isn't passed expression results,
> 	its passed expression terms.  Fix this so match-all works like it
> 	should, by executing the contained expression.
> 	(message_body_contains): Copied directly from
> 	camel-folder-search.c, a more robust/faster/simpler body search
> 	code.
> 	(mime_part_matches): Removed entirely.
> 	(handle_multipart): Removed entirely.
> 	(build_match_regex): Copied from camel-folder-search.  Builds a
> 	set of simple strings into a regex pattern that matches any of
> 	them (for faster & simpler matching).  Expanded to accept regex
> 	patterns itself, so it can merge them together.
> 	(body_contains): Use build match/match message to match using a
> 	built regex.
> 	(body_regex): Likewise, this time we tell it we're building a
> 	regex though.
> 	(header_full_regex): Use build_match_regex to take the drudgery
> 	out of it, and expand it to handle multiple regex's at once.
> 	(get_full_header): slightly cleaner (well i dunno, the sprintf
> 	stuff just got to me).
> 	(header_regex): Cleaned up to use build_match_Regex too, and to
> 	properly check types.
> 	(filter_message_search): Just allocate 'fms' on the stack.
>
> 	* camel-filter-driver.c (camel_filter_driver_finalise):
> 	(camel_filter_driver_init):
> 	(camel_filter_driver_class_init):
> 	(camel_filter_driver_get_type): Changed from gtk object to camel
> 	object.
> 	(camel_filter_driver_add_rule): New function to add a rule to be
> 	processed in sexp form.
> 	(camel_filter_driver_init): Init the rules list.
> 	(camel_filter_driver_finalise): Clear the rules/rules list.
> 	(camel_filter_driver_filter_message): Scan rules list directly
> 	rather than creating on the fly.
>
> 	* Makefile.am (libcamelinclude_HEADERS): Added camel-filter-driver.h
> 	(libcamel_la_SOURCES): Added camel-filter-driver.c, code taken
> 	from filter-driver, which can drive, uh, filters based on sexp's.
> 	(libcamelinclude_HEADERS):
> 	(libcamel_la_SOURCES): Added camel-filter-search.[ch]

svn path=/trunk/; revision=7560
2001-01-17 01:07:02 +00:00
356797dc29 fix includes for compilation
2001-01-04  JP Rosevear  <jpr@helixcode.com>

	* tests/lib/Makefile.am: fix includes for compilation

	* tests/message/Makefile.am: Build test3 again

	* tests/message/test2.c: Kill warnings with header includes

	* tests/message/test3.c: ditto

	* tests/lib/streams.c: ditto

	* tests/lib/camel-test.c: ditto

	* tests/lib/messages.c: ditto

	* tests/lib/folders.c: ditto

svn path=/trunk/; revision=7253
2001-01-04 19:40:10 +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
6621536150 Add missing .h file. (From campd.)
* tests/lib/Makefile.am: Add missing .h file. (From campd.)

svn path=/trunk/; revision=6951
2000-12-12 23:10:39 +00:00
d75cbc249d oops
svn path=/trunk/; revision=6864
2000-12-08 18:06:19 +00:00
683427c0bc Shush
svn path=/trunk/; revision=6863
2000-12-08 17:55:42 +00:00
d0aff6462a Remove test3 from build until the files show up
2000-12-08  JP Rosevear  <jpr@helixcode.com>

	* tests/message/Makefile.am: Remove test3 from build until the files
	show up

2000-12-08  JP Rosevear  <jpr@helixcode.com>

	* Makefile.am: Remove files from extra_dist since they are already
	listed

svn path=/trunk/; revision=6861
2000-12-08 17:52:28 +00:00
a791b442b5 Change line no format so that emacs can detect it.
2000-12-06  Not Zed  <NotZed@HelixCode.com>

        * tests/lib/camel-test.h (check): Change line no format so that
        emacs can detect it.

svn path=/trunk/; revision=6848
2000-12-07 22:28:59 +00:00
e57a50f532 Stream testing stuff.
svn path=/trunk/; revision=6792
2000-12-05 12:07:01 +00:00
a8d65409de stream_flush does make sense for a substream afterall (if you have a
2000-12-05  Not Zed  <NotZed@HelixCode.com>

        * camel-seekable-substream.c (stream_flush): stream_flush does
        make sense for a substream afterall (if you have a stream_write).
        (stream_write): Implement this.
        (stream_seek): Change the STREAM_END behaviour to be more sane.
        if bounded go from the end of the bound, if unbounded, go from the
        end of the parent stream.

        * camel-stream-mem.c (stream_read): Dont return error if reading
        past the end of data, just return 0.

        * camel-stream-fs.c (camel_stream_fs_init): Initialise the stream
        to be unbound.
        (stream_seek): Fix the logic when seeking from the end of an
        unbounded stream.
        (camel_stream_fs_new_with_fd): If the fd is invalid (-1), then
        return NULL immediately.
        (stream_seek): Range check a SEEK_END so it fits within
        bound_start.

2000-12-01  Not Zed  <NotZed@HelixCode.com>

        * tests/lib/folders.c (test_folder_basic): New test to perform
        basic store operations on folders (taken from folders/test1).
        (test_folder_message_ops): Tkane the guts out of folders/test2.

svn path=/trunk/; revision=6790
2000-12-05 11:50:32 +00:00
a2391a3e11 added some imap tests, tho they dont get far yet and dont
recover automatically.

svn path=/trunk/; revision=6772
2000-12-04 12:59:01 +00:00
1fbfdbd43e Remove assertion that content is there, when it no longer can be.
2000-11-30  Not Zed  <NotZed@HelixCode.com>

	* providers/local/camel-mbox-folder.c (mbox_get_message): Remove
	assertion that content is there, when it no longer can be.

	* camel-folder-summary.h: Removed pos/bodypos/endpos from
	camelmeessagecontentinfo.
	(CamelMessageFlags): Added an attachments flag.

	* providers/local/camel-local-summary.h: Added load virtual
	function.

	* tests/lib/folders.c (test_message_info): Accessors.
	(test_folder_message): "

	* camel-folder-thread.c (get_root_subject): Fix accessors.
	(dump_tree_rec): "

	* camel-folder-search.c (camel_folder_search_execute_expression):
	Accessors for messageinfo.
	(search_match_all): "
	(search_header_contains): "
	(search_header_contains): "
	(search_body_contains): "
	(camel_folder_search_execute_expression): Use mepool_strdup.

	* providers/local/camel-mbox-summary.c (summary_update): Accessors
	for messageinfo.
	(mbox_summary_sync_full): "

	* providers/local/camel-mh-summary.c (remove_summary): Accessors
	for messageinfo.
	(mh_summary_check): "
	(mh_summary_sync_message): "
	(mh_summary_sync): "

	* providers/local/camel-mh-folder.c (mh_append_message): Use
	accessor for uid.

	* providers/local/camel-local-summary.c
	(local_summary_decode_x_evolution): Use accessor to uid.
	(local_summary_encode_x_evolution): Likewise.
	(message_info_new): And here.
	(camel_local_summary_load): Call virtual load function.
	(local_summary_load): Default load function, load summary.
	(camel_local_summary_load): Check file exists before trying to
	load.
	(camel_local_summary_construct): Turn off building content info!
	(CAMEL_LOCAL_SUMMARY_VERSION): Bump, since we dont build content
	info anymore.
	(camel_local_summary_load): After a successful load/check, do a
	save too so we dont have to go through it again randomly.

	* providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Use
	accessors for messageinfo.

	* providers/nntp/camel-nntp-folder.c (nntp_folder_get_uids): Use
	accessors for uid.

	* providers/imap/camel-imap-folder.c (imap_refresh_info): Use
	accessor for uid.
	(imap_sync): Likewise.
	(imap_get_uids): Likewise.
	(imap_update_summary): And here.

	* providers/vee/camel-vee-folder.c (vfolder_remove_match): Use
	accessor for uid.
	(vfolder_add_match): Handle estrv stuff.
	(vfolder_change_match): Accessor for uid.
	(get_real_message): "
	(vee_get_uids): "
	(vee_folder_build): " + estrv.
	(vee_folder_build_folder): "

	* providers/local/camel-maildir-folder.c (maildir_append_message):
	Use acccessors for uid's.
	(maildir_get_message): Here too.

	* providers/local/camel-maildir-summary.c
	(camel_maildir_summary_init): Setup the string count for us.
	(message_info_new): Access the string array directly.
	(message_info_free): No need to free string if using array.
	(camel_maildir_summary_info_to_name): Use accessor to get to uid.
	(remove_summary): And here.
	(maildir_summary_check): Likewise.
	(maildir_summary_sync): And here.
	(maildir_summary_load): Load up a cache of uid->filename mappings
	before loading the actual summary file.  This saves us having to
	waste the diskspace storing the filenames in the summary itself,
	and also helps us sync the summary better on load.
	(message_info_load): If we have the load_map setup, and the uid
	exists, then set the filename cache from it, and update the flags
	from the name, incase our summary mismatches it.

	* camel-folder-summary.c (camel_folder_summary_init): Setup string
	count for compressed info record.  An optional compile mode which
	stores all strings for a given messageinfo into a packed array,
	which should save 36-50 bytes/record.
	(camel_folder_summary_info_new): Init the string array.
	(message_info_new): Set the string array items, as required.
	(message_info_load): And here too.
	(message_info_save): Use accessors to get to strings.
	(message_info_free): Free strings as one.
	(camel_message_info_dup_to): Handle packed array case.
	(camel_folder_summary_add): Use accessors.  And pack the strv
	before storing it.
	(summary_assign_uid): New function to assign a unique uid to a
	message, if it doesn't have one.
	(camel_folder_summary_add): Call assign_uid instead of doing it
	ourselves.
	(camel_folder_summary_info_new_from_parser): "
	(camel_folder_summary_info_new_from_message): "
	(camel_folder_summary_encode_string): constify.
	(camel_folder_summary_encode_token): "
	(summary_build_content_info_message): Fix accessors to messageinfo.
	(CAMEL_FOLDER_SUMMARY_VERSION): Bumped, for removal of
	contentinfo->pos data.
	(camel_folder_summary_info_new_from_parser): Calculate the size
	based on the parser position, not the removed contentinfo stuff.
	(camel_folder_summary_info_new_from_message): Remove size stuff.
	(camel_folder_summary_offset_content): Removed, no longer means anything.
	(content_info_new):
	(content_info_load):
	(content_info_save):
	(summary_build_content_info): Remove stuff for contentinfo->pos*.
	(summary_build_content_info): Take a msginfo argument, set
	attachments flag if we find any attachments.
	(summary_build_content_info_message): set attachments flag if we
	find any attachments.
	(camel_folder_summary_info_new_from_parser): Always scan the
	content info, even if we dont save it.
	(camel_folder_summary_info_new_from_message): And here too.
	(summary_build_content_info): Only create the contentinfo stuff if
	we have it turned on, otherwise just parse and discard.
	(summary_build_content_info_message): Likewise.

svn path=/trunk/; revision=6731
2000-11-30 11:05:36 +00:00
571a286c62 Builddir != srcdir loving.
svn path=/trunk/; revision=6712
2000-11-29 12:33:21 +00:00