Commit Graph

82 Commits

Author SHA1 Message Date
234e613bc3 New code to keep an on-disk cache of what UIDs have been seen in a folder.
* camel-uid-cache.c: New code to keep an on-disk cache of what
	UIDs have been seen in a folder.

	* camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail
	can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE
	(you can work with mail directly without needing to copy it local).

	* providers/*/camel-*-provider.c: Add flags as needed: imap and
	mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is
	just SOURCE.

	* camel-mime-message.c (process_header): Add another subject
	g_strstrip that fejj's earlier commit missed.

svn path=/trunk/; revision=4616
2000-08-09 00:07:56 +00:00
34057bd1f0 Bye bye bye.
* camel-folder-pt-proxy.[ch], camel-arg-collector.c,
	camel-marshal-utils.[ch]: Bye bye bye.

	* Makefile.am: remove reference to camel-arg-collector.c

svn path=/trunk/; revision=4291
2000-07-24 15:13:07 +00:00
c07840479d Utilities for parsing broken date strings.
2000-06-30  Jeffrey Stedfast  <fejj@helixcode.com>

	* broken-date-parser.[c,h]: Utilities for parsing broken
	date strings.

	* providers/imap/camel-imap-folder.c: fixed some mem leaks

svn path=/trunk/; revision=3840
2000-07-01 00:11:01 +00:00
9d229d236a Removed the camel-mime-filter-smtp.h entry from Makefile.am - oops!
svn path=/trunk/; revision=3537
2000-06-12 22:34:28 +00:00
d6291ddc1f Deprecated.
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-filter-smtp

	* camel-mime-part.c (write_to_stream): Updated to reflect changes
	made to camel-mime-filter-crlf.c

	* camel-mime-filter-crlf.c (filter): Modified to be able to
	encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder
	so that it should no longer get caught in an infinite loop.

svn path=/trunk/; revision=3536
2000-06-12 22:32:54 +00:00
9573b501a8 New filter to do CRLF<->LF conversion. (Currently only tested in the
* 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
2000-06-12 16:49:59 +00:00
b8a53f033d Added a missing smtp-related file to the dist.
svn path=/trunk/; revision=3242
2000-05-28 11:56:20 +00:00
1ead1f0174 Removed camel-simple-data-wrapper again. Less code to maintain == better
2000-05-25  NotZed  <NotZed@HelixCode.com>

	* Makefile.am (libcamel_la_SOURCES): Removed
	camel-simple-data-wrapper again.  Less code to maintain == better
	code.

	* camel-data-wrapper.c (construct_from_stream): Fixes for bug
	where text attachments dont work.  Made data-wrapper concrete for
	the second time.

svn path=/trunk/; revision=3207
2000-05-25 21:40:58 +00:00
92f2cbe161 stuff
svn path=/trunk/; revision=3168
2000-05-23 03:04:19 +00:00
0cd1c1934c remove get/set_output_stream operations. They're redundant with
* camel-data-wrapper.c: remove get/set_output_stream operations.
	They're redundant with write_to_stream, and CamelMimePart and
	CamelMimeMessage only implement the latter, meaning that trying to
	get_output_stream on a CamelMimeMessage that was built from pieces
	rather than being parsed from a stream doesn't work. Anything that
	uses get_output_stream can be rewritten to use write_to_stream, so
	we'll standardize on that.
	(camel_data_wrapper_new): remove this: CamelDataWrapper is
	supposed to be an abstract class.
	(write_to_stream): remove default implementation. (Moved to
	CamelSimpleDataWrapper)

	* camel-simple-data-wrapper.c: resurrect, although it's not really
	the same thing it was before. A simple data wrapper, which is
	backed by a CamelStream.

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): Use
	construct_from_stream rather than set_output_stream.
	(camel_mime_part_construct_content_from_parser): Change
	camel_data_wrapper_new to camel_simple_data_wrapper_new.

	* camel-mime-part.c (camel_mime_part_set_content): Change
	camel_data_wrapper_new to camel_simple_data_wrapper_new.

svn path=/trunk/; revision=3112
2000-05-18 01:00:25 +00:00
d55e9e0406 remove some cruft that we're not currently using.
* Makefile.am: remove some cruft that we're not currently using.

svn path=/trunk/; revision=3002
2000-05-12 00:48:40 +00:00
4a2777a279 Removed dist-hook section.
2000-05-10  Christopher James Lahey  <clahey@helixcode.com>

	* Makefile.am: Removed dist-hook section.

	* configure.in: Set the version number.  Added a check for gnome
	window icons.  Removed a bunch of unused Makefiles.

	* tools/Makefile.am: Created a proper EXTRA_DIST section.

	* widgets/e-text/Makefile.am: Added
	e-text-event-processor-types.h.

From addressbook/ChangeLog:

2000-05-10  Christopher James Lahey  <clahey@helixcode.com>

	* backend/ebook/Makefile.am: Added e-book-types.h, e-card-pairs.h,
	e-card-types.h.

	* backend/pas/Makefile.am: Added pas-backend-ldap.h.

	* contact-editor/Makefile.am: Added a proper EXTRA_DIST section.
	Removed some old defines.

	* ename/Makefile.am: Added e-name-western-tables.h.

	* gui/component/Makefile.am: Added e-ldap-server-dialog.h.  Added
	a proper EXTRA_DIST section.

	* gui/minicard/e-reflow.c: Added a missed cast.

	* printing/Makefile.am: Added a proper EXTRA_DIST section.

From calendar/ChangeLog:

2000-05-10  Christopher James Lahey  <clahey@helixcode.com>

	* gui/Makefile.am: Added main.h.  Combined the two EXTRA_DIST
	sections.

From camel/ChangeLog:

2000-05-10  Christopher James Lahey  <clahey@helixcode.com>

	* Makefile.am: Added camel-types.h, camel-folder-pt-proxy.h, and
	camel-thread-proxy.h.

From default_user/ChangeLog:

2000-05-10  Christopher James Lahey  <clahey@helixcode.com>

	* Makefile.am, local/Calendar/Makefile.am,
	local/Contacts/Makefile.am, local/Directories/Makefile.am,
	local/Directories/subfolders/Bigfoot/Makefile.am,
	local/Directories/subfolders/Netcenter/Makefile.am,
	local/Drafts/Makefile.am, local/Inbox/Makefile.am,
	local/Outbox/Makefile.am, local/Trash/Makefile.am: Created a
	proper EXTRA_DIST section.

From filter/ChangeLog:

2000-05-10  Christopher James Lahey  <clahey@helixcode.com>

	* filter-arg.h: Changed tree.h to gnome-xml/tree.h.

	* Makefile.am: Added filter-arg-types.h, filter-arg.h,
	filter-xml.h, filter-format.h, filter-druid.h, filter-editor.h.

From libical/ChangeLog:

2000-05-10  Christopher James Lahey  <clahey@helixcode.com>

	* configure.in: Reorder Makefiles so that it will build.

From mail/ChangeLog:

2000-05-09  Christopher James Lahey  <clahey@helixcode.com>

	* Makefile.am: Removed folder-browser-factory.h since it doesn't
	exist.  Added mail-display.h, mail-types.h, pixmaps.h.

From widgets/e-table/ChangeLog:

2000-05-10  Christopher James Lahey  <clahey@helixcode.com>

	* Makefile.am: Added e-table-col-dnd.h and table-test.h.

From wombat/ChangeLog:

2000-05-10  Christopher James Lahey  <clahey@helixcode.com>

	* Makefile.am: Added an include for the pcs directory.

svn path=/trunk/; revision=2966
2000-05-10 14:47:09 +00:00
b7f49ccf57 Merged NEW_SUMMARY branch back to trunk, and resolved conflicts.
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
2000-05-08 05:24:54 +00:00
580d885820 Make camel not leak like a sieve.
* camel-object.c: New subclass of GtkObject which is now the base
	of the Camel object hierarchy. Currently the only difference
	between CamelObject and GtkObject is that CamelObjects don't start
	out floating.

	* *.h: Move a bunch of typedefs to camel-types.h. Standardize on
	using <camel/foo.h> in header files rather than <foo.h>, "foo.h",
	or "camel/foo.h". Remove some unneeded includes.

	* camel-address.c, camel-data-wrapper.c, camel-folder-search.c,
	camel-folder-summary.c, camel-folder.c, camel-mime-filter.c,
	camel-mime-parser.c, camel-service.c, camel-session.c,
	camel-stream.c: These are now subclasses of CamelObject.

	* camel-data-wrapper.c (set_output_stream):
	* camel-medium.c (set_content_object):
	* camel-seekable-substream.c
	(init_with_seekable_stream_and_bounds):
	* providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
	remove gtk_object_sink calls.

	* camel-stream-buffer.c (init_vbuf):
	* camel-stream-filter.c (camel_stream_filter_new_with_stream):
	ref the original stream.

	* camel-folder-summary.c (camel_folder_summary_finalise): unref
	the filters when finalizing.

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser,
	camel_mime_part_construct_content_from_parser):
	* camel-mime-part.c (camel_mime_part_set_content): Unref objects
	that are created only to be handed off to other objects. If
	they're going to be needed later, they will have been additionally
	ref'ed by the object that needs them.

	* providers/pop3/camel-pop3-folder.c (get_message_by_number):
	unref the message stream after creating the data from it.

	* camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c,
	camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close,
	since its semantics are dubious (what happens when you close a
	stream other people still have references on?).

	* providers/nntp/camel-nntp-store.c:
	* providers/smtp/camel-smtp-transport.c:
	* providers/pop3/camel-pop3-store.c:
	replace camel_stream_close calls with gtk_object_unref.

	* providers/mbox/camel-mbox-folder.c:
	* providers/nntp/camel-nntp-folder.c:
	* providers/sendmail/camel-sendmail-transport.c:
	replace camel_stream_close with camel_stream_flush +
	gtk_object_unref

svn path=/trunk/; revision=2882
2000-05-07 21:56:32 +00:00
214c910550 Maxcount is minimum of the max and the requested count, not the maximum :)
2000-05-04  NotZed  <NotZed@HelixCode.com>

        * providers/mbox/camel-mbox-folder.c (summary_get_message_info):
        Maxcount is minimum of the max and the requested count, not the
        maximum :)

        * camel-mime-parser.c (folder_scan_content): Properly set midline,
        so we dont falsely catch offset boundary markers (i.e. From inside
        content).
        (folder_read): Set a sentinal on the end of the read data (\n) so
        we dont have to check the buffer boundary in the inner loop.
        (mempool_*): New experimental memory management routines, speed
        up simple structure parsing by about 25% ... not compiled in by
        default.  Something similar may be needed for camel-mime-utils to
        address performance issues with g_malloc and friends.

        * camel-mime-utils.c: Added a macro w(x) used to wrap all warnings
        about mime/rfc violations, so they can be turned off.

        * camel-folder-summary.c (summary_build_content_info): Step after
        the end of a message ...
        Turn into a stand-alone program for testing and profiling.

svn path=/trunk/; revision=2808
2000-05-05 03:46:07 +00:00
f8bfbef0a7 No, we're not going to have g_strcasecmp for no good reason,
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
2000-05-04 05:45:30 +00:00
d4d70c5c3c Some small build fixes:
* camel/Makefile.am (INCLUDES): add $(UNICODE_CFLAGS) to the INCLUDES,
	people who installed libunicde in non-standard include paths
	need this.

        * mail/Makefile.am (evolution_mail_LDADD):
	s/-lunicode/$(UNICODE_LIBS)/

svn path=/trunk/; revision=2785
2000-05-04 01:15:11 +00:00
0780002f95 REmove gmime-utils.h from here.
2000-05-02  NotZed  <NotZed@HelixCode.com>

        * camel.h: REmove gmime-utils.h from here.

        * providers/mbox/camel-mbox-search.[ch]: Removed.  Functionally
        redundant.

        * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
        Use the new CamelFolderSearch class to do the actual searching,
        just setup the search here.

        * camel-folder-search.[ch]: A helper class that providers may
        subclass to provide their own search functionality, or they can
        simply use as is, it supports body searches if an ibex is
        supplied, and header searches if a summary is supplied.

svn path=/trunk/; revision=2762
2000-05-02 23:08:20 +00:00
855b85657d Set G_LOG_DOMAIN in following files.
addressbook/demo/Makefile.am
 addressbook/printing/Makefile.am
 camel/Makefile.am
 camel/providers/MH/Makefile.am
 camel/providers/maildir/Makefile.am
 camel/providers/mbox/Makefile.am
 camel/providers/nntp/Makefile.am
 camel/providers/pop3/Makefile.am
 camel/providers/sendmail/Makefile.am
 camel/providers/smtp/Makefile.am
 composer/Makefile.am
 e-util/Makefile.am
 filter/Makefile.am
 libibex/Makefile.am
 mail/Makefile.am
 shell/Makefile.am
 tests/Makefile.am
 tests/ui-tests/Makefile.am
 widgets/e-table/Makefile.am
 widgets/e-text/Makefile.am
 widgets/meeting-time-sel/Makefile.am
 widgets/shortcut-bar/Makefile.am

svn path=/trunk/; revision=2756
2000-05-02 21:34:01 +00:00
44575d972d > * gmime-utils.[ch]: What the hell, remove it. This will break the
> 	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
2000-05-02 20:37:06 +00:00
19e9448267 Dont try and check a NULL header.
2000-04-27  NotZed  <NotZed@HelixCode.com>

        * camel-mime-utils.c (check_header): Dont try and check a NULL
        header.

        * camel-recipient.[ch]: Dead.  Its not pining.

        * camel-mime-message.h: Dont include recipients.h anymore.

        * camel-mime-message.c (camel_mime_message_add_recipient): Accept
        name/address separately, and store in an CamelInternetAddress.
        (add_recipient): Removed.
        (remove_recipient): Removed.
        (remove_recipient_address): Renamed from remove_receipient, works
        via address.
        (camel_mime_message_remove_recipient_name): New function to remove
        by name.
        (get_recipients): Removed.
        (camel_mime_message_get_recipients): Return a camel-internet-address.
        (write_to_stream): No longer write receipients directly.
        (write_recipients_to_stream): Removed.
        (write_one_recipient_to_stream): Removed.
        (camel_mime_message_init): Setup recipients hashtable, rather than
        usign the recipients stuff.
        (set_recipient_list_from_string): Killed, a violent and lengthy
        death.
        (process_header): Simplified recipient handling code a lot.
        (received_date_str, sent_date_str, reply_to_str, subject_str,
        from_str): Removed some oddly-defined global statics.
        (camel_mime_message_class_init): Dont initialise above variables
        anymore.
        (init_header_name_table): Removed, use a table to init this, and
        do it in class init (2 lines of code ...).

        * camel-news-address.c: Class to represent news addresses -
        currently empty, and not built.

        * camel-internet-address.h: Class to represent internet (email)
        addresses.

        * camel-address.h: Abstract class to represent (lists of)
        addresses.

svn path=/trunk/; revision=2671
2000-04-28 03:06:44 +00:00
b53a001ef2 Class to represent news addresses - currently empty, and not built.
2000-04-27  NotZed  <NotZed@HelixCode.com>

	* camel-news-address.c: Class to represent news addresses -
	currently empty, and not built.

	* camel-internet-address.h: Class to represent internet (email)
	addresses.

	* camel-address.h: Abstract class to represent (lists of)
	addresses.

svn path=/trunk/; revision=2667
2000-04-28 01:24:05 +00:00
2a6a191e05 Remove. We weren't using the fields that made this different from
* camel-mime-body-part.[ch]: Remove. We weren't using the fields
	that made this different from camel-mime-part, so it basically
	just forced us to do lots of gratuitous typecasting.

	* camel-multipart.[ch]: Use CamelMimePart. Remove the multipart
	parent stuff, since we weren't using that either.

	* etc: update for CamelMimeBodyPart -> CamelMimePart

svn path=/trunk/; revision=2645
2000-04-26 21:30:32 +00:00
dcccb0484d sync to current reality
* camel.h: sync to current reality

        * camel-folder-utils.[ch]: removed

svn path=/trunk/; revision=2642
2000-04-26 20:32:53 +00:00
c93a2e37f5 Big cleanup of camel-stream-*, got rid of 3 classes, improved the interfaces,
and fixed at least one problem (end of stream never happening in certain
cases).  Things that can fail now have a way of saying they failed too.

So much for taking ANZAC day off to get drunk!

2000-04-26  NotZed  <NotZed@HelixCode.com>

	* camel-seekable-substream.c (stream_seek): Changed to have
	absolute seek semantics, not relative to the bounds.

	* camel-seekable-stream.c (reset): When we reset, seek to the
	start of the bound, if there is one.
	(stream_tell): Make tell virtual.

	* camel-stream-filter.c (do_available): Removed.

	* camel-stream-buffer.c: Remove leading _'s from static functions.
	(stream_read): Renamed from read().  Fancy that conflicting!  (my
	boo!)  Others too.

	* providers/pop3/camel-pop3-folder.c (get_message_by_number):
	Changed to stream_mem interface.

	* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed
	for streamfs interface changes, and implement a failure case.
	(_append_message): Changed for fs stream interface change.

	* camel-multipart.c (print_part): Iterate rahter than callback.  I
	hate glists's interface (hence, move this to write_to_stream).
	(write_to_stream): Return an error (yuck, this is a royal PITA to
	do with the stream write interface).

	* camel-mime-message.c: Removed leading _ from static names.

	* camel-mime-part.h: construct_from_parser() now returns an error
	code.

	* camel-mime-part-utils.c
	(camel_mime_part_construct_content_from_parser): Changed to use a
	camel-data-wrapper instead of a camel-simple-data-wrapper (no
	change needed elsewhere?).
	(simple_data_wrapper_construct_from_parser): Fixes for stream-mem
	interface changes.

	* camel-simple-data-wrapper.[ch],
	camel-simple-data-wrapper-stream.[ch],
	camel-stream-data-wrapper.[ch], removed.  Fixed including of these
	files.

	* camel-mime-part.c (camel_mime_part_set_text): Remove the use of
	the camel-simple-data-wrapper-stream, just use a mem stream.
	(write_to_stream): Renamed from my_*
	(construct_from_stream): Return an error on error.

	* camel-stream-mem.c (camel_stream_mem_new*): Remove mode
	parameter.

	* camel-stream-mem.h (enum CamelStreamMemMode): Removed.  It
	wasn't used at all.

	* camel-data-wrapper.h: Add camel_data_wrapper_new() to create
	these.
	(write_to_stream, construct_from_stream): Return an error
	indicator for success.  Fixed all methods to match (ICK).

	* Makefile.am (libcamel_la_SOURCES): Remove
	camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c,
	camel-stream-data-wrapper.c.  Obsoleted by code re-use!

	* camel-data-wrapper.c (construct_from_stream): Change the default
	implementation to just set the output stream == construction
	stream.  Well, this lets me get rid of both simple-data-wrapper
	and stream-data-wrapper (unused anyway), and
	simple-data-wrapper-stream in one hit.  CamelDataWrapper is now
	also a concrete class.
	(write_to_stream): Use camel_stream_write_to_stream() to
	calculate/return values (and save code).
	Include <errno.h> for obvious reasons.

	* camel-stream.c (eos): Provide a default implementation of .eos().
	(camel_stream_write_to_stream): Make it return an error code on
	error.
	(camel_stream_printf): Changed to return the number of bytes
	written/error.
	(camel_stream_available): Removed.

	* camel-stream-fs.h (enum CamelStreamFsMode): Removed.  Changed to
	use unix modes and so forth (wasn't used for anything but new file
	creation and didn't work well either).

	* camel-stream-fs.c: Removed leading _'s for names.  And removed
	some virtual method 'documentation'.
	(destroy): Dont try and close a closed/error fd.  Only report
	error if close returns -1.  Moved all the code to finalise(), and
	killed this function.
	(init_with_fd): Properly setup the seek offset, if it is a
	valid and seekable file descriptor.
	(init_with_fd_and_bounds): Use off_t for bounds, set bounds on the
	seekable stream.
	(init_with_name): Return error codes.
	(init_with_name_and_bounds): Ditto.
	(camel_stream_fs_new_with_name): REturn NULL object if it failed.
	(camel_stream_fs_new_with_name_and_bounds): Return NULL object on
	failure.  Changed with_name* api's to take unix open style args
	and flags.
	(read): The bounded stream bounds checking seemed off, simplified
	code a bit.
	(write): Implement bounds checking for writing, the comment was
	wrong, it could make sense to bound writing.  Cleaned up a little.
	(available): Gone.
	(eos): Removed.  Use CamelStream's implementation now.
	(close): Reset the fd to -1, provide a warning for bad usage.
	(seek): Cleaned up.  Changed the behaviour a little, the returned
	offset is the absolute position in the file, even in bounded
	streams.
	(seek): Seek from end mirrors lseek() behaviour (reverse seeking).

2000-04-25  NotZed  <NotZed@HelixCode.com>

	* camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof
	indicator to other parent classes.

	* camel-stream.c (camel_stream_printf): New utility
	function.  Obvious use.

	* camel-stream-mem.c: Removed leading _'s from static func's.
	(camel_stream_mem_new_with_byte_array): Fixed for api changes, set
	the owner for the byte array to us.
	: Removed A bunch of gtk doc stuff for static (implementation) functions.
	(available): Removed.
	(write): Fixed the write implementation so that seek() works on a
	seekable memory stream, as expected.  Seeking past the end of the
	buffer has unix semantics (filling with 0).
	(available): Removed.
	(write): Implement seekable stream bounded stream.
	(read): Implement seekable stream bounded stream.
	(close): Dont free the stream_mem if we're not the owner.
	(seek): Allow to seek beyond the end of memory area,
	implement bounds checking.
	(seek): Set errno on bad policy.

	* camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t.
	(new_with_buffer): Changed len to be a size_t.
	(set_buffer, set_byte_array): New interface functions.
	(struct _CamelStreamMem): Removed position, it is stored in the
	superclass.

	* camel-stream.h: Removed some of the seemingly random
	whitespace.  Removed the available method (its not
	impelemented/useful enough).

	* camel-seekable-substream.c
	(init_with_seekable_stream_and_bounds): Remove the data_available
	stuff, it hasn't been properly implemented/finished, and may never
	work (unfortunately *sigh).
	(reemit_parent_signal): Removed part of the above change.
	(set_bounds): Removed (moved to seekable-stream).
	: Fixed up some of the generally unreadable indenting (sorry,
	wrapping at 80 characters with
	camels_really_long_function_names()
	just_doesnt_work_very_well_does_it().
	(available): Removed.
	(stream_seek): Fixup for object changes.  Make sure we return -1
	if the parent stream can't seek.

	* camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New
	function to bound any seekable stream.
	: Removed _'s.
	(camel_seekable_stream_class_init): Implement an init function, to
	setup the stream bounds to unbound.

	* camel-seekable-stream.h (CamelSeekableStreamClass): New virtual
	method set_bounds for seekable streams.
	(CAMEL_STREAM_UNBOUND): New define for no bound.

	* camel-seekable-substream.h (struct _CamelSeekableSubstream):
	Removed sup_bound and inf_bound, moved to CamelSeekableStream (and
	renamed, and changed to off_t's).
	(new_with_seekable_stream_and_bounds): Use off_t as the bounds.
	(CamelSeekableSubstreamClass): Uh, why was the intialiser virtual?
	Removed.

	* camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek
	to accept an off_t as the offset.
	(struct _CamelSeekableStream): Renamed cur_pos to position and
	changed it to an off_t type.
	(enum CamelStreamSeekPolicy): Set to match the SEEK_* constants
	from lseek().
	(get_current_position): Renamed to tell().

	* camel-stream-buffer.h: Commented out set_vbuf - never implemented.

svn path=/trunk/; revision=2624
2000-04-26 10:35:25 +00:00
8c9b0cc3f0 No longer call data_wrapper_repository_init.
2000-04-24  NotZed  <NotZed@HelixCode.com>

	* camel.c (camel_init): No longer call
	data_wrapper_repository_init.

	* camel-medium.c (write_to_stream): Moved (back) to
	camel-mime-part.
	(add_header):
	(set_header):
	(remove_header):
	(get_header): Make all these abstract, and spit warnings if
	called.  I guess it could manage the list, but well, it doesn't.

	* camel-medium.h (struct _CamelMedium): Dont store headers here,
	the implementor is the only one who knows their format.
	(CamelMediumClass): Changed header values to be void *'s.  They
	need not be strings?

	* camel-simple-data-wrapper.c (construct_from_stream): And we're
	back.  Set the output stream.
	(construct_from_parser): Moved to camel-mime-part-utils.

	* camel-mime-part-utils.c
	(camel_mime_part_construct_content_from_parser): Create the
	contents of multipart and simple messages.

	* camel-multipart.c (construct_from_parser): Moved to
	camel-mime-part-utils.
	(separate_part): Removed.

	* camel-mime-part.c (construct_from_stream): Back again!  This now
	switches over to using a mime parser for any mime parts, only.
	(my_write_to_stream): Write our headers and so forth here.
	(add_header): Add header directly, parent class is abstract.
	(remove_header): Ditto.
	(set_header): Ditto.

	* camel-data-wrapper.c (camel_data_wrapper_construct_from_stream):
	Remade abstract.
	(camel_data_wrapper_construct_from_parser): Moved to
	camel_mime_part.

	* camel-data-wrapper.h: Put back construct_from_stream.

	* camel-mime-part.h: Put construct_from_parser in here, the
	data-wrapper shouldn't know about mime.  Ok, so now to undo half
	of the last hours changes ... duh.

2a51,93
	* providers/pop3/camel-pop3-folder.c (get_message_by_number): Use
	construct_from_stream instead of set_input_stream().

	* camel-simple-data-wrapper-stream.c
	(camel_simple_data_wrapper_stream_construct): REmoved the destroy
	callback code.
	(wrapper_destroy_cb): Removed.

	* camel-simple-data-wrapper.h: Add prototype for _construct()
	method.

	* camel.c: Include unicode.h to kill a warning.

	* camel-data-wrapper.h (CameldataWrapperClass): Removed
	construct_from_stream virtual method.
	Removed get/set input stream.

	* data-wrapper-repository.[ch]: Removed&from build.  Obsoleted?
	The justification as is follows: It is mixing storage
	protocol/format with message architecture.  It really just doesn't
	serve any purpose, as each medium implementor will have to have its
	own type->handler mapping, and the only current implementor,
	mimepart has a very simple structure and no need for this.

	* camel-medium.c (write_to_stream): Moved here from most of the
	stuff in camel-mime-part.  Well, the MEDIUM is the one that knows
	what the headers are, and the content is, let it write it out.

	* camel-mime-part-utils.c (camel_mime_part_construct_content):
	Copied from camel-mime-part.c, removed handling of message
	followon state (moved to camel-mime-message).
	(camel_mime_part_construct_content_from_parser): Renamed from
	construct_content.
	(camel_mime_part_construct_headers_from_stream):
	(camel_mime_part_construct_content_from_stream):
	(camel_mime_part_store_stream_in_buffer): Removed.  Replaced by
	the new construct from parser stuff.

	* camel-mime-message.c (construct_from_parser): Do
	construct_from_parser for mime-message.
	(_write_to_stream): Set the mime-version header for medium to
	write out, rather than writing it out ourselves.

4a96,102
	(construct_from_stream): Removed.
	(camel_data_wrapper_construct_from_stream): Changed to a helper
	function, creates a mime_parser, and constructs from that.
	(set_input_stream): Removed.
	(camel_data_wrapper_set_input_stream): Removed.
	(get_input_stream): Removed.
	(camel_data_wrapper_get_input_stream): Removed.
11a110,111
	(_get_message_by_uid): Use construct_from_stream() instead of
	creating our own parser.
16a117,131
	(camel_mime_part_construct_content): Removed to
	camel-mime-part-utils.c
	(my_get_output_stream): Removed.  The streeam is in the
	data-wrapper.
	(my_get_content_object): Removed.  The content object is stored in
	the medium.  If none is there, the object wasn't created properly.
	(my_write_content_to_stream): Removed.  The content object is the
	one that knows how to write itself out!!!!!!!!
	(my_write_to_stream): Remove the base header writing stuff - has
	been moved to camel-medium, where it belongs.  This can just be
	used to check for mandatory headers.
	(my_construct_from_stream): Removed.
	(my_set_input_stream): What the hell, i'll remove this too.
	Nobody seems to understand how it differs from create from stream,
	and they both seem to serve the same purpose ...
19a135,136
	(construct_from_stream): Removed!  Job taken over by
	construct_from_parser.
24a142
	(set_input_stream): REmoved.  Replaced by construct_from_parser.

svn path=/trunk/; revision=2577
2000-04-24 06:05:41 +00:00
383f245d39 MERGE NEW_PARSER branch into HEAD, fixed conflicts.
2000-04-20  NotZed  <NotZed@HelixCode.com>

	* MERGE NEW_PARSER branch into HEAD, fixed conflicts.

	* gmime-content-field.c (_print_parameter): Duh, removed again
	(@@#$@ cvs merge).

	* camel-mime-utils.c (header_content_type_is): Constify.
	(header_content_type_unref): Killed a couple warnings.

	* camel-folder.c (_init): Removed more log crap.

	* providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for
	summary changes.

	* providers/mbox/camel-mbox-folder.c (_get_message_by_number):
	Fixed for new summary interface.  Added a warning for using this
	broken api.
	(_get_message_by_uid): Fixed for message new with session
	vanishing.

svn path=/trunk/; revision=2531
2000-04-20 23:48:45 +00:00
fe97fa2fbb kill camel-log
svn path=/trunk/; revision=2487
2000-04-18 19:05:15 +00:00
0937d957d6 This didn't belong in Camel. Move to mail/
2000-04-14  Dan Winship  <danw@helixcode.com>

	* camel-formatter.[ch]: This didn't belong in Camel. Move to mail/

	* Makefile.am, camel-types.h: remove references to
	camel-formatter.

svn path=/trunk/; revision=2436
2000-04-14 21:09:19 +00:00
3ef836d8a7 Fix the embarassing cursor bug.
Fix the embarassing cursor bug.

svn path=/trunk/; revision=2404
2000-04-12 04:50:02 +00:00
fc87a9ba54 New file with new function to dot-lock an mbox file and copy it to a safe
* camel-movemail.c: New file with new function to dot-lock an mbox
	file and copy it to a safe private directory.

svn path=/trunk/; revision=2356
2000-04-09 22:47:42 +00:00
2e4a546307 the URL RFC says the port must be numeric, so we don't want to do
* g_url_new really wanted to take a CamelException. So, rename
	Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new
	taking an exception), and url-util.[ch] to camel-url.[ch]. Also
	force url->port to be numeric and remove camel_service_getport. (I
	was confused before: the URL RFC says the port must be numeric, so
	we don't want to do getportbyname.)

svn path=/trunk/; revision=2300
2000-04-06 03:52:39 +00:00
3666952c23 remove camel-stream-buffered-fs here too
svn path=/trunk/; revision=2192
2000-03-27 19:11:26 +00:00
0f5f6d7919 New function to scan the provider dir and return a list of all providers.
* camel-provider.c (camel_provider_scan): New function to
	scan the provider dir and return a list of all providers.

svn path=/trunk/; revision=2145
2000-03-22 17:21:31 +00:00
b2a4e0b529 Added camel-stream-buffer to build.
2000-02-29  NotZed  <NotZed@HelixCode.com>

	* Makefile.am (libcamelinclude_HEADERS): Added camel-stream-buffer
	to build.

	* camel-stream-buffer.[ch]: Generic buffer which can be applied to
	any stream.

svn path=/trunk/; revision=1995
2000-03-01 00:06:05 +00:00
88f846d342 include camel-transport
svn path=/trunk/; revision=1923
2000-02-24 22:10:28 +00:00
d28c85dd04 A lot of changes in the way the parsing works. I am too lazy
to find all the changes.
Important notice, I added uggly hacks to camel-formatter.c
and message-browser so that I could test b64 decoding.

Saving streams works. Have to implement qp now.

svn path=/trunk/; revision=1893
2000-02-22 00:10:22 +00:00
fe058b1be7 make a blocking version of the header parser. When the fs stream uses
2000-02-14  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/gmime-utils.c (get_header_array_from_stream):
	make a blocking version of the header parser.
	When the fs stream uses gnome-vfs, this should
	be changed.
	(gmime_read_line_from_stream): ditto.

2000-02-11  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/camel-stream-fs.c:
	everywhere, when using the cur_pos field, do it
	on the CamelSeekableStream object.
	(_seek): small fix.

	* camel/camel-seekable-stream.c (camel_seekable_stream_seek):
	s/camel_stream_seek/camel_seekable_stream_seek/g

	* camel/camel-seekable-stream.h:
	(struct ): added a field to store the
	current position.

	* camel/camel-seekable-stream.c (camel_seekable_stream_get_current_position):
	New function. Allows to get the current position
	of a seekable stream.


In fact much more changes, but I am lazy.
This is the begining of some major changes
in camel.

svn path=/trunk/; revision=1778
2000-02-14 22:03:58 +00:00
5db48f5ddd remove camel-stream-buffer from compilation process. It is not here
svn path=/trunk/; revision=1775
2000-02-14 10:46:26 +00:00
aeaa2ed700 New file, implements the search api for mbox folders.
2000-02-13  NotZed  <notzed@zedzone.helixcode.com>

        * providers/mbox/camel-mbox-search.c: New file, implements the
        search api for mbox folders.

        * providers/mbox/Makefile.am: Link with ibex.

        * camel-folder.c (camel_folder_has_search_capability): Api
        additions.
        (camel_folder_search_by_expression): Ditto.

2000-02-12  NotZed  <notzed@zedzone.helixcode.com>

        * providers/mbox/camel-mbox-folder.c (_set_name): Setup index
        filename as well.
        (_init_with_store): Init index filename.  Hmm, none of these
        names ever seem to get free'd (FIXME?)

        * providers/mbox/camel-mbox-folder.h: Add index file name.

2000-02-12  NotZed  <notzed@helixcode.com>

        * camel-folder.h: Add folder search functions.

        ** Created ChangeLog just for camel **
         - refer to ../ChangeLog for changes prior to this date.

svn path=/trunk/; revision=1772
2000-02-14 05:39:02 +00:00
784c1184a8 don't build thread related tests if evolution has been compiled with no
2000-02-10  bertrand  <Bertrand.Guiheneuf@aful.org>

	* tests/Makefile.am (THREAD_RELATED_TESTS): don't
	build thread related tests if evolution has been
	compiled with no thread support.

	* configure.in (have_pthread): allow user to enable/disable
	thread support at configure time
	(EXTRA_GNOME_CFLAGS):
	(EXTRA_GNOME_LIBS): thread support is directly
	included in this variable if enabled. No more
	EXTRA_GNOME_CFLAGS_THREADS
	Other special support should be added in
	EXTRA_GNOME_LIBS and EXTRA_GNOME_CFLAGS
	instead of redefining a new variable
	each time we want to add a new lib.
	(bonobo, ....)

	* camel/camel.c (camel_init): only try to initialize threads if
	we enabled threads support.

	* tests/ui-tests/Makefile.am (message_browser_LDADD): use
	EXTRA_GNOME_LIBS

	* configure.in (have_pthread): remove HAVE_PTHREADS
	variable. Define ENABLE_THREADS instead.

	* camel/Makefile.am: use ENABLE_THREADS not HAVE_PTHREADS
	to test if we build thread relateed code.

	* tests/Makefile.am: use EXTRA_GNOME_LIBS,
	not EXTRA_GNOME_LIBS_THREADS


I need to be able to disable thread support to use Insure.

svn path=/trunk/; revision=1725
2000-02-11 00:43:23 +00:00
50e5c22f0f parent class is now CamelSeekableStream idem idem idem idem (_seek):
2000-01-24  bertrand  <bertrand@helixcode.com>

	* camel/camel-seekable-stream.c:
	* camel/camel-seekable-stream.h:

	* camel/camel-simple-data-wrapper-stream.h:  parent class is now
	CamelSeekableStream
	* camel/camel-stream-buffered-fs.h: idem
	* camel/camel-stream-buffered-fs.c: idem
	* camel/camel-stream-mem.h: idem
	* camel/camel-stream-mem.c: idem
	(_seek): change declaration
	* camel/camel-stream-fs.c: parent class is now
	CamelSeekableStream
	(_seek): change declaration

	* camel/camel-stream-fs.h: parent class is now
	CamelSeekableStream

Major compatible change in the stream hierarchy.
Removed the seek method from the general streams
so that we can use them as "DataSources".

svn path=/trunk/; revision=1622
2000-01-25 01:09:56 +00:00
733a9024ae New files. You'll be able to use a CamelFormatter to get html-formatted
* camel/camel-formatter.c, camel/camel-formatter.h: New
	files. You'll be able to use a CamelFormatter to get
	html-formatted versions of a CamelMimeMessage.

svn path=/trunk/; revision=1600
2000-01-21 02:38:56 +00:00
095c53bace remove non updated tests from the build process.
2000-01-12  bertrand  <bertrand@helixcode.com>

	* tests/Makefile.am (noinst_PROGRAMS):
	remove non updated tests from the build
	process.

	* camel/Makefile.am :
	remove the rfc2047 related files from
	the build process as for the moment, nothing
	has been decided concerning unicode.

	* Makefile.am (evolution_msg_composer_LDADD):
	use $(EXTRA_GNOME_LIBS_THREADS) to link with gthread

svn path=/trunk/; revision=1564
2000-01-13 04:07:33 +00:00
ed4e8afecd Lots of reorganization to get the Evolution shell to begin its life. It
Lots of reorganization to get the Evolution shell to begin its life.
It also includes a new evolution widget from Damon.

Miguel.

svn path=/trunk/; revision=1536
2000-01-06 05:48:27 +00:00
fe17c00980 part of the mbox provider.
1999-12-22  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/providers/mbox/camel-mbox-store.h:
	* camel/providers/mbox/camel-mbox-store.c:
	* camel/providers/mbox/camel-mbox-folder.h:
	* camel/providers/mbox/camel-mbox-folder.c:
	part of the mbox provider.

svn path=/trunk/; revision=1510
1999-12-21 23:17:03 +00:00
6bd8382bd6 implemented. The routines in this file will be called by providers to
1999-12-16  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/camel-folder-utils.c (camel_aml_expunge_messages):
	implemented. The routines in this file will be
	called by providers to handle the list of
	message already standing in memory.

1999-12-15  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/camel-folder-utils.c:
	* camel/camel-folder-utils.h:
	New files, misc utilities for the
	folder providers. Includes active message
	list utilities.


	* camel/camel-folder.c (_has_message_number_capability):
	(camel_folder_has_message_number_capability):
	Added this to know if a folder provides
	number-based message access.

	* camel/camel-folder.c (_get_message_count):
	added warning when called directly.
	(_append_message): ditto
	(_open_async):  ditto
	(_close_async):  ditto
	(_delete_messages): ditto
	(_expunge):  ditto
	(_get_message_by_number):  ditto
	(_get_message_uid):  ditto
	(_get_message_uid_by_number):  ditto
	(_get_message_by_uid):  ditto
	(_get_uid_list):  ditto

svn path=/trunk/; revision=1492
1999-12-15 23:48:23 +00:00
5f7a40affc Make `make distcheck' work.
svn path=/trunk/; revision=1397
1999-11-17 15:51:01 +00:00
ca7044930f Added streaming capability to CamelDataWrapper. This makes it possible, for
example, to build multipart messages out of files that are on disk without
loading them in memory.

svn path=/trunk/; revision=1394
1999-11-17 14:39:25 +00:00
b681ec2b9a Here is my initial Evolution work: message composition widget and some
installation fixes for Camel.

svn path=/trunk/; revision=1369
1999-11-05 23:06:09 +00:00