Commit Graph

312 Commits

Author SHA1 Message Date
c343245386 in the case of images, put the content object output stream in the url.
2000-03-03  bertrand  <bertrand@helixcode.com>

	* camel-formatter.c (handle_image): in the case
	of images, put the content object output stream
	in the url. This allows the message browser
	to show inline images.

svn path=/trunk/; revision=2021
2000-03-03 19:42:47 +00:00
fac011bad6 fixed state 0 keep value.
2000-03-03  bertrand  <bertrand@helixcode.com>

	* camel-stream-b64.c (my_read_encode): fixed state
	0 keep value.

svn path=/trunk/; revision=2019
2000-03-03 13:15:43 +00:00
2392d67981 don't forget to set the state to 0 after 3. (my_read_encode): don't forget
2000-03-02  bertrand  <bertrand@helixcode.com>

	* camel-stream-b64.c (my_read_encode): don't forget to
	set the state to 0 after 3.
	(my_read_encode): don't forget to encode, even in state 3.

	* camel-simple-data-wrapper.c: static functions are prefixed
	with my_ instead of _
	* camel-multipart.c: static functions are prefixed
	with my_ instead of _
	(my_write_to_stream): commented.
	(my_write_to_stream): warning in case the boudary is set
	but is a zero length string.

	* camel-mime-part.c (camel_mime_part_encoding_from_string):
	remove debug trace.

	* camel-mime-part.c: Replaced all static functions
	with name begining with _ by the same name begining
	with "my_" to prevent the possible conflicts
	with system symbols Dan warned us about.

Mime mail generation works now, at least with b64 encoding.
QP needs to be done now.

svn path=/trunk/; revision=2016
2000-03-03 02:54:25 +00:00
8e356d0601 use CamelStreamB64 type for the input stream.
2000-03-02  bertrand  <bertrand@helixcode.com>

	* camel-stream-b64.c (camel_stream_b64_write_to_stream):
	use CamelStreamB64 type for the input stream.

	* camel-mime-part.c (_get_content_object): remove
	debugging trace
	(_write_content_to_stream): implement the b64
	encoding the new way (that is using camel_stream_b64)

svn path=/trunk/; revision=2014
2000-03-02 16:21:05 +00:00
01b2d34d03 fix implementation so that it writes properly to the output stream even.
2000-03-02  bertrand  <bertrand@helixcode.com>

	* camel-data-wrapper.c (my_write_to_stream):
	fix implementation so that it writes properly
	to the output stream even.

	* camel-stream-b64.c (camel_stream_b64_write_to_stream):
	fix implementation.

svn path=/trunk/; revision=2013
2000-03-02 15:09:45 +00:00
799d7f54fd Various building fixes. At least, now it builds for me.
svn path=/trunk/; revision=2007
2000-03-02 00:09:45 +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
39cbe68b8a new utility function.
2000-02-29  bertrand  <bertrand@helixcode.com>

	* camel-stream-b64.c (camel_stream_b64_write_to_stream): new
	utility function.

	* camel-data-wrapper.c (_write_to_stream): default
	implementation.

svn path=/trunk/; revision=1989
2000-02-29 14:12:59 +00:00
57bf3cc473 revert strange changes.
2000-02-29  bertrand  <bertrand@helixcode.com>

	* gmime-utils.c (_store_header_pair_from_string):
	revert strange changes.

	* camel-stream-b64.c (my_read_decode): set eos to true when we
	have read the whole input stream.
	(my_reset): set eos to FALSE.

svn path=/trunk/; revision=1988
2000-02-29 13:07:19 +00:00
f81ae069e4 Fix a bunch of serious small bugs.
2000-02-28  NotZed  <NotZed@HelixCode.com>

        * camel-mime-part.c (_parse_header_pair): Dont free this either.

        * camel-medium.c (_remove_header): Ugh, dont free the header
        before we actually remove it.
        (_add_header): Ugh, dont free hashtable entries which may be
        duplicated (hash_insert _will_ reference that memory).

        * string-utils.c (string_trim): Trimming a 0-length string is not
        an error.

        * camel-mime-message.c (_parse_header_pair): Fixed very broken
        memory handling of header_name/value.

        * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev):
        Initialise end_of_last_message always.
        (camel_mbox_copy_file_chunk): Stop trying to read if we run out of
        data, rather than looping forever.

        * providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
        (_open): Call parent class to perform open.  Remove folder-open
        check to parent instead.
        (_create): open takes a creation mask, dont use umask to try and
        set the open mode.
        (_delete): Dont bother checking folder==NULL, its already been
        checked on the external interface (changed to an assertion, this
        would have to be a camel bug).
        (_delete_messages): Likewise.
        (_create): Ditto.
        (_init): Dont go and clear all the paths and shit that the parent
        open just setup for us.
        (_delete_messages): Get rid of more umask stuff.
        (_append_message): Make sure we pass file mode to open with create.
        (_append_message): Cleaned up some indenting to make it readable.

svn path=/trunk/; revision=1985
2000-02-28 23:26:13 +00:00
bbbee6ba11 No, its not a fatal error to search on a non-searchable folder, you just
2000-02-28  NotZed  <NotZed@HelixCode.com>

        * camel-folder.c (camel_folder_search_by_expression): No, its not
        a fatal error to search on a non-searchable folder, you just dont
        get any matches.
        (_open): Dont open an opened folder (i dont see why this is really
        a bug, but what the hell ...)

        * providers/mbox/camel-mbox-folder.c (_init): Set search cap on.
        (_open): Call parent class to perform open.  Remove folder-open
        check to parent instead.

svn path=/trunk/; revision=1984
2000-02-28 20:10:54 +00:00
afd0dcbd68 Fixed a typo.
2000-02-28  NotZed  <NotZed@HelixCode.com>

        * camel-stream-b64.c (my_read_encode): Fixed a typo.

        * providers/mbox/camel-mbox-search.c: Changed to use e-sexp,
        rather than filter-sexp.

svn path=/trunk/; revision=1979
2000-02-28 18:25:38 +00:00
9aefcae16c non blocking b64 encoding is a PITA
svn path=/trunk/; revision=1974
2000-02-28 13:36:46 +00:00
6efd6e1755 chuuuut.
svn path=/trunk/; revision=1937
2000-02-25 20:08:08 +00:00
d83721f8b7 last set of changes for CamelFolder changes. Evolution builds again...
svn path=/trunk/; revision=1928
2000-02-25 00:03:17 +00:00
15343155c5 update for CamelFolder changes
svn path=/trunk/; revision=1927
2000-02-24 23:46:47 +00:00
f4bdc23dbc another typo
svn path=/trunk/; revision=1926
2000-02-24 23:46:35 +00:00
ac659fe698 remove some camel_store_get_separators that I missed before
svn path=/trunk/; revision=1925
2000-02-24 23:40:39 +00:00
a94bccd4e8 fix variable name
svn path=/trunk/; revision=1924
2000-02-24 23:31:34 +00:00
88f846d342 include camel-transport
svn path=/trunk/; revision=1923
2000-02-24 22:10:28 +00:00
64edd4d5de add camel_session_get_transport_for_protocol
svn path=/trunk/; revision=1922
2000-02-24 21:19:05 +00:00
8034bd1254 Add CamelTransport abstract class and CamelSendmailTransport
svn path=/trunk/; revision=1921
2000-02-24 21:17:27 +00:00
3c81d8bb9e oops. ChangeLog entry for previous
svn path=/trunk/; revision=1920
2000-02-24 16:43:47 +00:00
4ec5c4b998 Move "separator" from camel-store to camel-folder, since it can vary from
location to location in an IMAP store. Rename CamelFolder::init_with_store
to init and add parent_folder, name, and separator arguments.

svn path=/trunk/; revision=1919
2000-02-24 16:43:09 +00:00
55e6218d59 use CamelExceptions for run-time errors, not incorrect code. Don't bother
* camel-folder.c: use CamelExceptions for run-time errors, not
	incorrect code. Don't bother validating that an object exists from
	inside one of its methods, since you couldn't have gotten there if
	it didn't. Fix some code style bugs.

svn path=/trunk/; revision=1918
2000-02-24 16:25:23 +00:00
e4842dc1b1 Free the data in the headers hash table. (_add_header): g_strdup the
* camel-medium.c (_finalize): Free the data in the headers hash
        table.
        (_add_header): g_strdup the header name and value when adding it.

        * camel-mime-part-utils.c
        (camel_mime_part_construct_headers_from_stream): Free the header
        data after calling camel_medium_add_header, since it will have
        g_strdup()ed it itself.

svn path=/trunk/; revision=1913
2000-02-23 21:04:30 +00:00
f034506958 Fix an exception error message.
svn path=/trunk/; revision=1909
2000-02-23 17:21:46 +00:00
fb1382a725 Dont compile by default.
2000-02-22  NotZed  <NotZed@HelixCode.com>

        * providers/mbox/camel-mbox-search.c: Dont compile by default.

        * providers/mbox/Makefile.am: Fuck off the filter code.

svn path=/trunk/; revision=1907
2000-02-22 20:59:30 +00:00
460d479d8b don't read the char if we reached the length of the output buffer. Hours
2000-02-22  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel-stream-b64.c (read_decode__static):
	don't read the char if we reached the length
	of the output buffer. Hours lost on this
	%$!@# bug : 3.5

svn path=/trunk/; revision=1903
2000-02-22 13:53:26 +00:00
f65a2d78c6 fix to show a sample correct implementation.
2000-02-22  bertrand  <Bertrand.Guiheneuf@aful.org>

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

	* camel-folder.c (camel_folder_get_subfolder):
	(camel_folder_create):
	(camel_folder_delete):
	(camel_folder_delete_messages):
	(camel_folder_list_subfolders):
	(camel_folder_expunge):
	(camel_folder_get_message_by_number):
	(camel_folder_get_message_count):
	(camel_folder_append_message):
	(camel_folder_copy_message_to):
	(camel_folder_get_summary):
	(camel_folder_get_message_uid):
	(camel_folder_get_message_by_uid):
	(camel_folder_get_uid_list):
	Check folder state (open/close) and raise an
	exception if it is not ok.

	* providers/mbox/camel-mbox-folder.c (_create):
	create the file and the path with two different
	names.

	* camel-folder.c (_create): handle the case
	when the folder name starts with '/'

	* camel-exception.c (camel_exception_new): use
	(void) instead of () in decl.

	* camel-exception.h: cosmetic fixes.

	* camel-exception.c (camel_exception_init): new routine.
	Fix a bug in mail/message-list.c


	* camel-folder.h: cosmetic changes.

	* camel-stream-b64.c (reset__static): added a
	reset method. Thanks message-browser to find
	so much bugs :)

	* providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
	Unicode libs.

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

svn path=/trunk/; revision=1902
2000-02-22 11:16:36 +00:00
6b21505b40 added a reset method. Thanks message-browser to find so much bugs :)
2000-02-22  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel-stream-b64.c (reset__static): added a
	reset method. Thanks message-browser to find
	so much bugs :)

	* providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): readd
	Unicode libs.

	* shell/Makefile.am (evolution_LDADD):
	add libetext.a.

Fixes.

svn path=/trunk/; revision=1900
2000-02-22 08:13:34 +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
e9bd59b86e Uh, fixed LIBADD again. What was there was never ever going to work,
2000-02-21  NotZed  <NotZed@HelixCode.com>

        * providers/mbox/Makefile.am: Uh, fixed LIBADD again.  What was
        there was never ever going to work, wasn't it tested?

svn path=/trunk/; revision=1891
2000-02-21 23:26:59 +00:00
8ea1212d99 Add "authenticator" to CamelSession and update things to use it.
svn path=/trunk/; revision=1890
2000-02-21 19:56:49 +00:00
d3d2adb98c add CamelExceptions to several functions. Use camel_session_new to
* camel-session.h:
        * camel-session.c: add CamelExceptions to several functions. Use
        camel_session_new to initialize the session and URL fields of
        created CamelStores as appropriate.

        * camel-store.h:
        * camel-store.c
        * camel-service.h:
        * camel-service.c: Move the session and url (and associated
        functions) from CamelStore to CamelService. Add url_flags to
        CamelService so subclasses can specify which URL components
        are mandatory for them. Add camel_session_new for
        camel_session_get_store* to use.

        * providers/mbox/camel-mbox-folder.c:
        * providers/mbox/camel-mbox-store.c:
        * providers/mbox/camel-mbox-store.h: Update for above changes.

svn path=/trunk/; revision=1888
2000-02-21 18:38:58 +00:00
a81eaf4588 Once camel is being used for real, exceptions won't be renumberable. So
* camel-exception-list.def: Once camel is being used for real,
       exceptions won't be renumberable. So renumber them now to make
       more room to add exceptions to the various categories later, and
       add a big warning message.

svn path=/trunk/; revision=1887
2000-02-21 15:24:27 +00:00
11dc8ba44b add libibex back to libcamelmbox_la_LIBADD
svn path=/trunk/; revision=1872
2000-02-20 23:30:24 +00:00
6d9c8329e4 clean up warnings
svn path=/trunk/; revision=1869
2000-02-20 20:28:12 +00:00
8997a54b42 Michael created camel/ChangeLog on 2/12 but didn't commit it until 2/18,
meaning his ChangeLog entries ended up there and everyone else's ended
up in the top-level ChangeLog. Move the post-2/12 ChangeLog entries from
ChangeLog to camel/ChangeLog so that you don't need to look in two
different places for that week's worth of commits.

svn path=/trunk/; revision=1868
2000-02-20 19:59:35 +00:00
1c70e00905 Added exception to call, and fixed caller.
2000-02-18  NotZed  <NotZed@HelixCode.com>

        * providers/mbox/camel-mbox-search.h
        (camel_mbox_folder_search_by_expression): Added exception to call,
        and fixed caller.

        * providers/mbox/camel-mbox-search.c
        (camel_mbox_folder_search_by_expression): Major changes, to use
        the sexp evaluator from filter/filter-sexp.c to implement the
        searching.
        (func_body_contains): Changed to support multiple strings in 1
        command (results or'd together)

        * url-util.c (g_url_new): Fixed a typo (colon == 0 isn't right),
        and made it so full url's are absolute pathed (Dan, this is how it
        has to work!).  Also, always include a path part, even if it is an
        empty string.

2000-02-16  NotZed  <NotZed@HelixCode.com>

        * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Added
        libfilter to link line (temporarily?).  Required for
        filter-sexp.

svn path=/trunk/; revision=1855
2000-02-19 04:12:40 +00:00
bafcec400c Statically link with ibex
svn path=/trunk/; revision=1853
2000-02-19 02:05:23 +00:00
e72c45d304 New header with the typedefs for all camel classes. Now the class headers
* camel/camel-types.h: New header with the typedefs for all camel
	classes. Now the class headers can just include this and the
	header for the parent type. This makes it possible for
	CamelService to include a CamelSession without creating an
	#include loop.

	* camel/*:
	* composer/e-msg-composer-attachment-bar.h:
	* mail/folder-browser.c:
	* mail/message-list.c: frob #includes to match the new reality

svn path=/trunk/; revision=1850
2000-02-19 01:40:57 +00:00
fcd0df7c8b fix a stupid typo (thank you gcc -Wall)
svn path=/trunk/; revision=1849
2000-02-19 00:50:33 +00:00
586de6bb25 #include <ctype.h> so the hash function doesn't get stuck using the
function version of toupper!

svn path=/trunk/; revision=1848
2000-02-19 00:40:31 +00:00
5e836ee59c make the / between the host and the path part of the path: it's wrong
according to rfc1738, but convenient

svn path=/trunk/; revision=1840
2000-02-18 22:11:02 +00:00
3e317e1b17 Modification in the automake/libtool building process so that
camel and tests at least compile.
Current libtool doen't seem to support lib dependancy unless
the lib is installed.
Removed the dependancy on libex in mbox and added it to the
other Makefile.am that link with libcamel.

svn path=/trunk/; revision=1838
2000-02-17 23:31:16 +00:00
037af79b9e libraries come from $(top_builddir)/..., not $(top_srcdir)/...
svn path=/trunk/; revision=1837
2000-02-17 22:23:38 +00:00
39400a38c7 use camel_stream_reset instead of seek. The formatter should be able to
2000-02-17  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/camel-formatter.c (handle_text_plain):
	(handle_text_html): use camel_stream_reset instead
	of seek. The formatter should be able to work
	with all streams, not only seekable streams.
	In the case where some provider implementation
	would not be able to provide a reset method
	to their stream, implementors would have
	to find a workaround.

	* camel/camel-session.c (camel_session_new): use
	(void) instean of () in function decl.

	* camel/camel-folder.c: ifdef async operation
	related code.

	* camel/camel-seekable-stream.c (_seek): added a warning.
	(_reset): default implementation of reset for seekable
	stream.

	* camel/camel-mime-message.h: set_received_date declaration fix.
	cosmetic changes.

	* camel/providers/mbox/camel-mbox-provider.c (camel_provider_module_init):
	use (void) instead of ().

	* camel/camel-stream.c (camel_stream_reset):
	new method for CamelStream.

svn path=/trunk/; revision=1835
2000-02-17 22:16:33 +00:00
0996e4f1ac Make camel-service use a Gurl internally. Remove the login/password
interfaces and instead provide camel_service_connect_with_url.

Also, added CamelExceptions and return values, so the functions can
indicate failure to the caller if they can't connect.

svn path=/trunk/; revision=1834
2000-02-17 22:16:00 +00:00
53fec3133a New function g_url_to_string to convert a Gurl back into a char *
svn path=/trunk/; revision=1833
2000-02-17 22:13:16 +00:00