platform/upstream/evolution-data-server.git
24 years agoRemove. We weren't using the fields that made this different from
Dan Winship [Wed, 26 Apr 2000 21:30:32 +0000 (21:30 +0000)]
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

24 years agosink the content object after referencing it.
Dan Winship [Wed, 26 Apr 2000 20:40:58 +0000 (20:40 +0000)]
sink the content object after referencing it.

* camel-medium.c (set_content_object): sink the content object
after referencing it.

* camel-mime-part.c: fix various little things in the handling
of CamelMedium methods. Change camel_mime_part_set_text to the
more generic camel_mime_part_set_content.

24 years agosync to current reality
Dan Winship [Wed, 26 Apr 2000 20:32:53 +0000 (20:32 +0000)]
sync to current reality

        * camel.h: sync to current reality

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

24 years agofix format specifier for time zone. Fix typo in month names array.
Dan Winship [Wed, 26 Apr 2000 19:53:49 +0000 (19:53 +0000)]
fix format specifier for time zone. Fix typo in month names array.

* camel-mime-utils.c (header_format_date): fix format specifier
for time zone. Fix typo in month names array.

24 years agoBig cleanup of camel-stream-*, got rid of 3 classes, improved the interfaces,
NotZed [Wed, 26 Apr 2000 10:35:25 +0000 (10:35 +0000)]
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.

24 years agoonly return TRUE if the parent is at eos AND the buffer has been exhausted
Dan Winship [Wed, 26 Apr 2000 01:26:29 +0000 (01:26 +0000)]
only return TRUE if the parent is at eos AND the buffer has been exhausted

* camel-stream-buffer.c (_eos): only return TRUE if the parent is
at eos AND the buffer has been exhausted

24 years agofix some incorrect macro usage that resulted in bogus casts
Dan Winship [Tue, 25 Apr 2000 15:31:06 +0000 (15:31 +0000)]
fix some incorrect macro usage that resulted in bogus casts

* camel-mime-message.c: fix some incorrect macro usage that
resulted in bogus casts

24 years agofix a cut-and-pasto.
Dan Winship [Mon, 24 Apr 2000 19:58:28 +0000 (19:58 +0000)]
fix a cut-and-pasto.

* camel-mime-part-utils.c
(simple_data_wrapper_construct_from_parser): fix a cut-and-pasto.

24 years agoref (and sink) the message stream if we're going to unref it later.
Dan Winship [Mon, 24 Apr 2000 19:29:20 +0000 (19:29 +0000)]
ref (and sink) the message stream if we're going to unref it later.

* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): ref
(and sink) the message stream if we're going to unref it later.
Otherwise it could get destroyed while there are still substreams
attached to it. This needs a cleaner solution.

24 years agoremove data-wrapper-repository.h include(s)
Dan Winship [Mon, 24 Apr 2000 19:18:18 +0000 (19:18 +0000)]
remove data-wrapper-repository.h include(s)

* camel.h: remove data-wrapper-repository.h include(s)

24 years agoBig fixes for the last commit which broke the message creation entirely.
Michael Zucci [Mon, 24 Apr 2000 09:12:31 +0000 (09:12 +0000)]
Big fixes for the last commit which broke the message creation entirely.
Plus an address decoder/formatter, etc.

* camel-mime-message.c (construct_from_parser): Allow MESSAGE_END
_or_ EOF as valid termination conditions.

* providers/mbox/camel-mbox-summary.c (message_struct_new): Decode
and then re-encode the addresses, so they are consistently
formatted.

* camel-mime-utils.c (header_decode_mailbox): Store the address in
a _header_address.  And try to get a comment-stored name if there
is one.
(header_decode_address): Actually return an address.
(header_to_decode): Renamed to header_address_decode()
(header_mailbox_decode): New function to get a single mailbox.
(header_mime_decode): Return the major/minor value, as
appropriate.
(header_address_new, and friends): Whole bunch of utility
functions for working with the address thingies.
(header_decode_domain): Free the string header, and dont expand
'.' into ' . '.

(camel_mime_part_construct_content_from_parser): Oops, this was
totally screwed up, try creating the right cotnent on the right
object.

24 years agoNo longer call data_wrapper_repository_init.
NotZed [Mon, 24 Apr 2000 06:05:41 +0000 (06:05 +0000)]
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.

24 years agofix some obvious minor bugs noted by -Wall.
Dan Winship [Sun, 23 Apr 2000 17:17:31 +0000 (17:17 +0000)]
fix some obvious minor bugs noted by -Wall.

* camel-mime-utils.c (header_to_decode, header_mime_decode): fix
some obvious minor bugs noted by -Wall.

24 years agoWhole swag of changes. Still lots of cleanup remaining ...
NotZed [Sun, 23 Apr 2000 10:10:44 +0000 (10:10 +0000)]
Whole swag of changes.  Still lots of cleanup remaining ...

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

* camel-data-wrapper.c (set_mime_type_field): Ref the
content_field when we get it?

* camel-mime-parser.c (camel_mime_parser_unstep): New function.
Cause a subsequent call to mime_parser_step() to return the same
state over again.

* providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
Initial test code using the mime parser to construct the message.

* camel-mime-part.c (construct_from_parser): part constructor.
(camel_mime_part_construct_content): Basically a simpler
replacement for the datawrapper repository.
(camel_mime_part_init): Set the default type to text/plain.

* camel-simple-data-wrapper.c (construct_from_parser): Initial
implementation of a content constructor.

* camel-multipart.c (construct_from_parser): Multipart
construction routine.
(camel_multipart_init): Set the default multipart type to
multipart/mixed.  Duh, no subtype is not allowed anyway.

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

* camel-mime-message.h (struct _CamelMimeMessage): Removed
send_date, and received_date, and replaced it with a time_t
'date' (this is what the header is called), and date_offset to
store the GMT offset of the date.

* camel-mime-message.c (camel_mime_message_set_from): Update raw
header as we go.
(_set_from): Removed.
(_get_from): Removed.
(camel_mime_message_get_from): Moved implementation here.
(camel_mime_message_get_subject): Move implementation here.
(_get_subject): Nuked.
(camel_mime_message_set_subject): Handle utf-8 input, and also
update raw header when changed.
(_set_subject): Removed.
(_set_received_date): Removed.
(camel_mime_message_set_received_date): Removed.
(_get_received_date): Removed.
(camel_mime_message_get_received_date): Removed.
(_get_sent_date): Removed.
(camel_mime_message_get_sent_date): Removed.
(camel_mime_message_get_date): New function to get the date as a
time_t/offset.
(camel_mime_message_set_date): Set the date as a time_t/offset.
(camel_mime_message_get_date_string): Get the date as a string.
(camel_mime_message_init): Initialise the current date as
'CMAEL_MESSAGE_DATE_CURRENT'.
(_set_reply_to): Removed.
(camel_mime_message_set_reply_to): Moved implementation here.
This is still broken, reply-to can have multiple addresses.
(_get_reply_to): Removed.
(_set_field): Removed, no longer used anywhere.
(_get_field): Also removed.
(_init_header_name_table): Add the Date header.
(process_header): Also handle snooping of Date header here.

* camel-stream-filter.c (finalise): Unref the source stream on
finalise, and also call the parent class (oops).

* camel-mime-parser.c (camel_mime_parser_state): New function to
get the current parser state.
(camel_mime_parser_stream): Allow you to get the stream back from
the mime_parser.
(camel_mime_parser_fd): Alternative to allow you to get the fd
back from the mime_parser.
(folder_scan_init_with_stream): Properly ref/unref the stream.
(folder_scan_close): Properly unref the stream/close the fd on
exit.
(folder_scan_init_with_fd): Close the old fd if there is one.

* camel-data-wrapper.c (camel_data_wrapper_construct_from_parser):
New method, construct a data wrapper from an initialised parser.
(construct_from_parser): Empty implementation.

* providers/mbox/camel-mbox-summary.c (message_struct_new):
Convert subject line to unicode, before storing in the summary.
(strdup_trim): Removed, no longer needed.

* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref
the folder after setting it in the new message.

* camel-mime-part.c (my_set_content_object): Have the headers
follow the content-type change here too.
(my_write_to_stream): Dont write content-type here, automatically
stored in the headers ...
(my_write_to_stream): Use header_disposition_format() to format
the content-disposition header.
(my_write_to_stream): Removed old code, all headers are now stored
in the camel-medium level, always.  Need to do the same with
camel-mime-message i suppose ...
(my_write_to_stream): Write the content using the parent class,
not some weird function.
(camel_mime_part_class_init): Dont override get_output_stream.
(camel_mime_part_encoding_from_string): Bleh, make it
case-insensitive.

* camel-mime-utils.c (header_content_type_is): Handle empty types.
(header_encode_string): Start of an implementation of the rfc2047
encoder.  It does iso-8859-1, and us-ascii, and utf-8 (others get
tricky *sigh*)
(rfc2047_encode_word): Convert a single word/string into rfc2047
encoding.
(quoted_encode): Different quoted-printable encoding for rfc2047
encoding of headers.

* gmime-content-field.c (gmime_content_field_write_to_stream): Use
header_content_type_format() to format it.

24 years agoclean, document, etc. (camel_multipart_init): pick a prettier default
Dan Winship [Sat, 22 Apr 2000 18:00:08 +0000 (18:00 +0000)]
clean, document, etc. (camel_multipart_init): pick a prettier default

* camel-multipart.[ch]: clean, document, etc.
(camel_multipart_init): pick a prettier default boundary. Still
need to deal with the larger problem

24 years agoRef the folder after setting it in the new message.
NotZed [Sat, 22 Apr 2000 05:22:20 +0000 (05:22 +0000)]
Ref the folder after setting it in the new message.

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

* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Ref
the folder after setting it in the new message.

* camel-mime-part.c (my_set_content_object): Have the headers
follow the content-type change here too.
(my_write_to_stream): Dont write content-type here, automatically
stored in the headers ...
(my_write_to_stream): Use header_disposition_format() to format
the content-disposition header.
(my_write_to_stream): Removed old code, all headers are now stored
in the camel-medium level, always.  Need to do the same with
camel-mime-message i suppose ...

* camel-mime-utils.c (header_content_type_is): Handle empty types.

* gmime-content-field.c (gmime_content_field_write_to_stream): Use
header_content_type_format() to format it.

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

* camel-mime-utils.h: Add prototype for header_param_list_free.

* camel-recipient.c: New function to remove all the types of a
recipient list.  I think this whole object needs a major review.

* camel-mime-message.c (camel_mime_message_class_init): Removed
parse_header_pair override, override add_header instead.
(_parse_header_pair): Renamed to add_header.
(remove_header): Add this method, to make sure we keep upto date
with removed headers too.
(_set_field): If given a NULL value, clear it out.
(_set_recipient_list_from_string): Constify.
(set_header): Override set_header from camel_medium.
(process_header): Local function to handle set/add/remove of each
header we know about.

* camel-mime-part.c (camel_mime_part_class_init): Removed
parse_header_pair setup.
(my_parse_header_pair): Moved into add_header(), removed.
(my_set_disposition): Allow a NULL disposition to clear it.
(my_set_content_id): Allow NULL content id to clear it.
(remove_header): Track removed headers.
(my_set_description): Allow NULL description to clear it.
(my_set_content_MD5): Make sure we copy the md5 value, and allow a
NULL value to reset it.
(my_set_filename): Copy the filename.
(my_set_header_lines): Removed.  Nothing uses it, it doesn't
actually serve any purpose.
(camel_mime_part_set_header_lines): Ditto.
(my_get_header_lines): Ditto.
(camel_mime_part_get_header_lines): Ditto.
(camel_mime_part_class_init): Remove *_header_lines setup.
(camel_mime_part_init): Remove header_lines init.
(my_finalize): Remove header_lines finalise.
(my_write_to_stream): Write the headers here.  This is just WRONG,
camel_medium should be doing this.
(my_get_output_stream): Kill a warning.
(camel_mime_part_encoding_to_string): Ditto.
(camel_mime_part_set_description): Unvirtualiase, use add_header()
to do the processing.
(my_set_description): Removed.
(set_disposition): Renamed from my_set_disposition.
(camel_mime_part_get_description): Get the descriptionf rom the
get_header method.
(my_get_description): Removed.
(my_set_filename): Removed.
(camel_mime_part_get_filename): Get the parameter from the
disposition.
(camel_mime_part_encoding_from_string): Handle NULL string.
(camel_mime_part_init): Remove reference to filename.
(my_finalize): Dont free filename.

* camel-mime-part.h (CamelMimePartClass): Removed
parse_header_pair() method, it doesn't add anything that
add_header() can't be used for.
(CamelMimePartClass): Remove *_header_lines methods.
(struct _CamelMimePart): Remove header_lines list.
(struct _CamelMimePart): Removed filename attribute.

* camel-medium.c (camel_medium_init): Init headers to null, not a
hashtable.
(add_header): Append the headers as a list.
(remove_header): Remove headers as a list.
(get_header): Likewise for lookup.
(free_header): Removed, no longer needed.
(finalize): Free headers using header_raw_clear().
(camel_medium_set_header): New function, to reset and override all
values of a header with a new value.

* camel-medium.h (struct _CamelMedium): Changed to use a
header_raw struct rather than a hash table, to store headers
(many headers can occur multiple times).

* camel-mime-utils.c (header_raw_find_next): New function, allows
you to find multi-valued header fields.
(header_disposition_format): New function to format/create
content-disposition header string.
(header_param_list_format_append): Function to format parameter
lists into a GString.
(header_content_type_format): Function to format content-type into
a usable format.
(header_set_param): allow NULL value to remove the parameter.
(decode_token): Renamed from header_decode_token.
(header_decode_token): New interface for external use.
(quoted_decode): Made static to kill annoying warnings.
(g_strdup_len): Killed, replaced with calls to g_strndup().
(rfc2047_decode_word): Made static to kill warnings.
(decode_coded_string): Terminated.
(g_string_append_len): Made static to kill warnings.
(header_decode_text): Made static to kill warnings.
(header_decode_text): Constify.
(rfc2047_decode_word): Constify.
(header_param): Constify.
(header_content_type_new): Copy the type/subtype strings.
(header_param_list_decode): Made static.
(header_param_list_format_append): Made static.
(quoted_decode): Constify.
(g_string_append_len): Constify.
(header_token_decode): New function to decode a single token.

* providers/mbox/camel-mbox-summary.c (header_write): Append a
trailing \n when writing headers.
(strdup_trim): Killed a warning.
(camel_mbox_summary_set_uid): Make sure the next uid is at least 1
higher than any existing one.
(header_evolution_decode): Use header_token_decode to get the
token.

* camel-mime-parser.c (folder_scan_header): Strip the trailing \n
of the end of all header lines.

24 years agoRemoved.
NotZed [Fri, 21 Apr 2000 17:39:06 +0000 (17:39 +0000)]
Removed.

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

        * providers/mbox/camel-mbox-utils.[ch]: Removed.

        * providers/mbox/camel-mbox-parser.[ch]: Removed.  Removed
        references to it.

24 years agouse libunicode iconv functions rather than libc ones (since libc might not
Dan Winship [Fri, 21 Apr 2000 04:05:12 +0000 (04:05 +0000)]
use libunicode iconv functions rather than libc ones (since libc might not

* camel-mime-utils.c (rfc2047_decode_word): use libunicode iconv
functions rather than libc ones (since libc might not have them).
(header_decode_date): add autoconfiscation on timezone code

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

24 years agoTrim leading/trailing spaces off the raw headers.
NotZed [Fri, 21 Apr 2000 00:56:27 +0000 (00:56 +0000)]
Trim leading/trailing spaces off the raw headers.

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

        * providers/mbox/camel-mbox-summary.c (message_struct_new): Trim
        leading/trailing spaces off the raw headers.

24 years agoMERGE NEW_PARSER branch into HEAD, fixed conflicts.
NotZed [Thu, 20 Apr 2000 23:48:45 +0000 (23:48 +0000)]
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.

24 years agoThis is a subtype of CamelSeekableStream, not CamelStream.
Dan Winship [Wed, 19 Apr 2000 22:51:33 +0000 (22:51 +0000)]
This is a subtype of CamelSeekableStream, not CamelStream.

* camel-simple-data-wrapper-stream.c
(camel_simple_data_wrapper_stream_get_type): This is a subtype of
CamelSeekableStream, not CamelStream.

24 years agoclean up a lot. (eos): When testing for end-of-stream, reset the parent
Dan Winship [Wed, 19 Apr 2000 22:50:32 +0000 (22:50 +0000)]
clean up a lot. (eos): When testing for end-of-stream, reset the parent

* camel-seekable-substream.c: clean up a lot.
(eos): When testing for end-of-stream, reset the parent position
before testing if it is at end-of-stream, since either (a) it may
have been seek'ed to eos by someone else, or (b) we may have been
seek'ed away from eos and it hasn't been synced yet.

24 years agooops. fix prototype in both places
Dan Winship [Wed, 19 Apr 2000 21:29:33 +0000 (21:29 +0000)]
oops. fix prototype in both places

24 years agoconst poison. (Belatedly goes with my change of 2000-02-23.)
Dan Winship [Wed, 19 Apr 2000 20:30:53 +0000 (20:30 +0000)]
const poison. (Belatedly goes with my change of 2000-02-23.)

* camel-medium.[ch] (camel_medium_add_header): const poison.
(Belatedly goes with my change of 2000-02-23.)
(camel_medium_init): Use g_strcase_{hash,equal} on the header
array.

24 years agodo better reference counting of streams so they actually go away when they
Dan Winship [Wed, 19 Apr 2000 03:20:13 +0000 (03:20 +0000)]
do better reference counting of streams so they actually go away when they

* camel-mime-part.c (my_set_input_stream):
* camel-data-wrapper.c (set_input_stream, set_output_stream): do
better reference counting of streams so they actually go away
when they should.

24 years agokill camel-log
Dan Winship [Tue, 18 Apr 2000 19:05:15 +0000 (19:05 +0000)]
kill camel-log

24 years agoadded 2nd arg to g_return_val_if_fail so this builds
Seth Alves [Tue, 18 Apr 2000 18:22:55 +0000 (18:22 +0000)]
added 2nd arg to g_return_val_if_fail so this builds

24 years agoClean, polish, document. Most of the gtk-doc comments added to
Dan Winship [Tue, 18 Apr 2000 18:11:24 +0000 (18:11 +0000)]
Clean, polish, document. Most of the gtk-doc comments added to

* camel-data-wrapper.[ch]:
* camel-simple-data-wrapper.[ch]:
* camel-medium.[ch]: Clean, polish, document. Most of the gtk-doc
comments added to camel-data-wrapper.c note serious problems that
need to be fixed.

24 years agoRemove the "session" field from CamelMimeMessage. Nothing uses it, about
Dan Winship [Mon, 17 Apr 2000 20:23:29 +0000 (20:23 +0000)]
Remove the "session" field from CamelMimeMessage. Nothing uses it, about

* camel-mime-message.[ch]: Remove the "session" field from
CamelMimeMessage. Nothing uses it, about half of the existing
calls to camel_mime_message_new_with_session pass NULL, and
there's no obvious reason for it to be there.

* others: Use camel_mime_message_new instead of
camel_mime_message_new_with_session

24 years agoSet the exception if no provider is found.
Dan Winship [Mon, 17 Apr 2000 19:38:16 +0000 (19:38 +0000)]
Set the exception if no provider is found.

* camel-session.c (get_store_for_protocol_with_url): Set the
exception if no provider is found.

24 years agoAdd code to encode and decode %-escapes in URLs, and do some additional
Dan Winship [Mon, 17 Apr 2000 18:14:31 +0000 (18:14 +0000)]
Add code to encode and decode %-escapes in URLs, and do some additional

2000-04-17  Dan Winship  <danw@helixcode.com>

* camel-url.c: Add code to encode and decode %-escapes in URLs,
and do some additional correctness-checking on URL syntax. From
Tiago Antào with modifications by me.

24 years agoadd nntp
Chris Toshok [Sat, 15 Apr 2000 02:11:28 +0000 (02:11 +0000)]
add nntp

* providers/Makefile.am (SUBDIRS): add nntp

24 years agoFix switch statement.
Christopher James Lahey [Sat, 15 Apr 2000 01:54:44 +0000 (01:54 +0000)]
Fix switch statement.

2000-04-14  Christopher James Lahey  <clahey@helixcode.com>

* providers/mbox/camel-mbox-folder.c: Fix switch statement.

24 years agoalways return TRUE for now. we need to check the server response to make
Chris Toshok [Sat, 15 Apr 2000 00:46:30 +0000 (00:46 +0000)]
always return TRUE for now. we need to check the server response to make

* providers/nntp/camel-nntp-folder.c (_exists): always return TRUE
for now.  we need to check the server response to make sure the
group exists.
(_get_message_by_uid): make sure to account for the \n we add to
the string after every line.

* providers/nntp/camel-nntp-utils.c (get_XOVER_headers): function
to get the headers using the XOVER command.
(get_HEAD_headers): function to get the headers using the HEAD
command on each message. slooooooow.
(camel_nntp_get_headers): make this function use either XOVER or HEAD
versions depending on whether or not the server extension is present.

24 years agopacked their bags and moved to ../mail/
Dan Winship [Fri, 14 Apr 2000 21:44:03 +0000 (21:44 +0000)]
packed their bags and moved to ../mail/

24 years agoThis didn't belong in Camel. Move to mail/
Dan Winship [Fri, 14 Apr 2000 21:09:19 +0000 (21:09 +0000)]
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.

24 years ago[This was accidentally not committed with its ChangeLog entry somehow...]
Dan Winship [Fri, 14 Apr 2000 20:37:04 +0000 (20:37 +0000)]
[This was accidentally not committed with its ChangeLog entry somehow...]
* camel-provider.h: Clarify what provider.protocol, provider.name,
and provider.description should be.

24 years agoadd XXX so i can find this hardcoded string later.
Chris Toshok [Fri, 14 Apr 2000 20:30:21 +0000 (20:30 +0000)]
add XXX so i can find this hardcoded string later.

24 years agookay. working now.
Chris Toshok [Fri, 14 Apr 2000 20:29:33 +0000 (20:29 +0000)]
okay.  working now.

24 years agoinitial import of nntp store.
Chris Toshok [Fri, 14 Apr 2000 19:05:33 +0000 (19:05 +0000)]
initial import of nntp store.

24 years ago+ * art/Makefile.am: Add tigert's contact-dlg-related images.
Matthew Loper [Wed, 12 Apr 2000 13:46:10 +0000 (13:46 +0000)]
+ * art/Makefile.am: Add tigert's contact-dlg-related images.
+
+ * addressbook/contact-editor/e-contact-editor.c (_add_images): Add
+ tigert's images.
+
+ * addressbook/contact-editor/Makefile.am: add EVOLUTION_IMAGES.
+
+ * camel-folder-pt-proxy.c (_folder_open_cb): Print warning message
+ for broken function.
+ (_folder_close_cb): Same.
+
+ * filter-arg.c (filter_arg_edit_value): Return a value.

24 years agoFix the embarassing cursor bug.
Miguel de Icaza [Wed, 12 Apr 2000 04:50:01 +0000 (04:50 +0000)]
Fix the embarassing cursor bug.

Fix the embarassing cursor bug.

24 years agofix various bugs in APOP code (still untested) and some of the error
Dan Winship [Mon, 10 Apr 2000 19:27:29 +0000 (19:27 +0000)]
fix various bugs in APOP code (still untested) and some of the error

* providers/pop3/camel-pop3-store.c (pop3_connect): fix various
bugs in APOP code (still untested) and some of the error cases.

24 years agoClarify what provider.protocol, provider.name, and provider.description
Dan Winship [Mon, 10 Apr 2000 18:01:45 +0000 (18:01 +0000)]
Clarify what provider.protocol, provider.name, and provider.description

* camel-provider.h: Clarify what provider.protocol, provider.name,
and provider.description should be.

* providers/mbox/camel-mbox-provider.c:
* providers/pop3/camel-pop3-provider.c:
* providers/sendmail/camel-sendmail-provider.c:
* providers/smtp/camel-smtp-provider.c: update protocols, names,
and descriptions

24 years agoimplement get_message_by_number for the mail fetch code.
Dan Winship [Mon, 10 Apr 2000 14:27:22 +0000 (14:27 +0000)]
implement get_message_by_number for the mail fetch code.

* providers/mbox/camel-mbox-folder.c (_get_message_by_number):
implement get_message_by_number for the mail fetch code.

24 years agoo Reformatted providers/smtp/camel-smtp-transport.c to fit the standard
EDT 2000 Jeffrey Stedfast [Mon, 10 Apr 2000 00:47:57 +0000 (00:47 +0000)]
o Reformatted providers/smtp/camel-smtp-transport.c to fit the standard

Sun Apr  9 21:23:15 EDT 2000  Jeffrey Stedfast  <fejj@stampede.org>
  o Reformatted providers/smtp/camel-smtp-transport.c to fit the standard indent format used by helix code

24 years agoNew file with new function to dot-lock an mbox file and copy it to a safe
Dan Winship [Sun, 9 Apr 2000 22:47:42 +0000 (22:47 +0000)]
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.

24 years agopixmap_DATA isn't defined so don't use it as a variable.
Christopher James Lahey [Sat, 8 Apr 2000 22:10:45 +0000 (22:10 +0000)]
pixmap_DATA isn't defined so don't use it as a variable.

2000-04-08  Christopher James Lahey  <clahey@helixcode.com>

* art/Makefile.am: pixmap_DATA isn't defined so don't use it as a variable.

* addressbook/gui/component/,
addressbook/gui/component/.cvsignore, addressbook/gui/Makefile.am,
addressbook/gui/component/addressbook-factory.c,
addressbook/gui/component/addressbook.c,
addressbook/gui/component/addressbook.gnorba,
addressbook/gui/component/addressbook.h: New directory to proivde
the component for contact management.  Simply uses an e-minicard-view.

* addressbook/gui/minicard/e-minicard-view.c,
addressbook/gui/minicard/e-minicard-view.h: New subclass of
e-reflow-sorted that takes an EBook and uses it to compute the
card data to display.

* addressbook/gui/minicard/e-minicard.c,
addressbook/gui/minicard/e-minicard.h: This now backends to a
ECard instead of a ETableModel.

* addressbook/gui/minicard/e-reflow.c,
addressbook/gui/minicard/e-reflow.h: This now has a virtualized
add method.

* addressbook/gui/minicard/e-reflow-sorted.c,
addressbook/gui/minicard/e-reflow-sorted.h: New subclass of
e-reflow that allows the data to be sorted on the fly.

* addressbook/gui/minicard/test-minicard-view.c: New test to test
the new minicard view.

* addressbook/gui/minicard/test-reflow.c: Uses the new ECard
backend of the e-minicard.

* addressbook/gui/minicard/.cvsignore,
addressbook/gui/minicard/Makefile.am: Added new test.  Fixed
dependencies.  Added new files.

* addressbook/gui/, addressbook/gui/Makefile.am,
addressbook/gui/.cvsignore: New directory for addressbook gui
bits.  Added subdirectories.  Created an initial .cvsignore.

* addressbook/Makefile.am (SUBDIRS): Removed demo and added gui.

* addressbook/backend/pas/pas-backend-file.c: Added code to do
notification on bookviews when changes in the backend are made.

* addressbook/backend/pas/pas-book-view.c,
addressbook/backend/pas/pas-book-view.h: Added helper functions to
notify the view about the addition or modification of a single
card.  Fixed a mistaken extra free.

* addressbook/backend/ebook/e-card-list-iterator.h: Fixed
incorrect parent class.

* addressbook/backend/ebook/test-client.c: Made this accept an
optional parameter that specifies the vcard to add.

* configure.in: Replaced widgets/e-minicard/Makefile and
addressbook/demo/Makefile with addressbook/gui/minicard/Makefile
and addressbook/gui/component/Makefile respectively.

* widgets/Makefile.am: Removed e-minicard since it's being moved
to addressbook/gui/minicard.

* widgets/e-text/e-text.c: Fixed the border width around tooltips
and made the main tooltip area yellow.

From camel/ChangeLog:

2000-04-08  Christopher James Lahey  <clahey@helixcode.com>

* providers/smtp/.cvsignore: Added a .cvsignore file.

From calendar/ChangeLog:

2000-04-08  Christopher James Lahey  <clahey@helixcode.com>

* gui/Makefile.am: Removed linking with libetable and libeminicard
since they weren't being used.

24 years agoactually record the pid returned by fork(). Noticed by clahey.
Dan Winship [Sat, 8 Apr 2000 21:53:24 +0000 (21:53 +0000)]
actually record the pid returned by fork(). Noticed by clahey.

* providers/sendmail/camel-sendmail-transport.c (_send_internal):
actually record the pid returned by fork(). Noticed by clahey.

24 years ago#include <sys/param.h> for MAXHOSTNAMELEN. (This is a stopgap: some of the
Dan Winship [Sat, 8 Apr 2000 20:32:01 +0000 (20:32 +0000)]
#include <sys/param.h> for MAXHOSTNAMELEN. (This is a stopgap: some of the

* providers/smtp/camel-smtp-transport.c: #include <sys/param.h>
for MAXHOSTNAMELEN. (This is a stopgap: some of the uses of
MAXHOSTNAMELEN are wrong anyway...)

24 years agoo fixed numerous bugs in providers/smtp/camel-smtp-transport.c; should now
EDT 2000 Jeffrey Stedfast [Fri, 7 Apr 2000 21:40:56 +0000 (21:40 +0000)]
o fixed numerous bugs in providers/smtp/camel-smtp-transport.c; should now

Fri Apr  7 16:49:42 EDT 2000  Jeffrey Stedfast <fejj@stampede.org>
  o fixed numerous bugs in providers/smtp/camel-smtp-transport.c; should now build correctly
  o readded smtp to providers/Makefile.am

CVS

24 years ago (pop3_connect): Remember the password after asking for it the
Dan Winship [Fri, 7 Apr 2000 20:41:01 +0000 (20:41 +0000)]
(pop3_connect): Remember the password after asking for it the
first time.

24 years agoClarify error messages. (finalize): fix a bug in camel_exception usage
Dan Winship [Fri, 7 Apr 2000 19:26:50 +0000 (19:26 +0000)]
Clarify error messages. (finalize): fix a bug in camel_exception usage

* providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error
messages.
(finalize): fix a bug in camel_exception usage

24 years agoRemoved smtp for now, its a long way from building. Removed file that
NotZed [Fri, 7 Apr 2000 15:22:35 +0000 (15:22 +0000)]
Removed smtp for now, its a long way from building. Removed file that

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

        * providers/Makefile.am: Removed smtp for now, its a long way from
        building.
        * providers/smtp/Makefile.in: Removed file that shouldn't have been
        checked in.

24 years agoo Added smtp_helo() request into smtp_connect() (forgott o do this before)
EDT 2000 Jeffrey Stedfast [Fri, 7 Apr 2000 12:51:50 +0000 (12:51 +0000)]
o Added smtp_helo() request into smtp_connect() (forgott o do this before)

Fri Apr  7 08:01:43 EDT 2000  Jeffrey Stedfast <fejj@stampede.org>
  o Added smtp_helo() request into smtp_connect() (forgott o do this before)
  o Modified smtp_helo() to send EHLO if communicating with an ESMTP server

24 years agofix Makefile.am
Chris Toshok [Fri, 7 Apr 2000 05:45:32 +0000 (05:45 +0000)]
fix Makefile.am

24 years agoo Added smtp/ to providers tree under camel o Added makefiles and source
EDT 2000 Jeffrey Stedfast [Fri, 7 Apr 2000 03:49:48 +0000 (03:49 +0000)]
o Added smtp/ to providers tree under camel o Added makefiles and source

Thu Apr  6 22:56:44 EDT 2000  Jeffrey Stedfast <fejj@stampede.org>
  o Added smtp/ to providers tree under camel
  o Added makefiles and source for an smtp module (untested as of yet)

24 years ago+ * camel-folder-pt-proxy.c (_get_full_name): Remove exception param
Matthew Loper [Thu, 6 Apr 2000 22:26:02 +0000 (22:26 +0000)]
+ * camel-folder-pt-proxy.c (_get_full_name): Remove exception param
+ from get_full_name() called, since get_full_name() was changed to
+ not have an exception in the last param (see dan's notes below).
+ (_get_name): same.

24 years agoReorganize the folder-fetching methods and implement a folder cache so
Dan Winship [Thu, 6 Apr 2000 20:10:05 +0000 (20:10 +0000)]
Reorganize the folder-fetching methods and implement a folder cache so

2000-04-06  Dan Winship  <danw@helixcode.com>

* camel-store.[ch]: Reorganize the folder-fetching methods and
implement a folder cache so that multiple requests for the same
folder will yield the same CamelFolder object (as long as it
remains active). Includes some code to remove no-longer-active
folders from the cache, but it doesn't get used since nothing is
ever unref'ed in Camel right now...

* providers/mbox/camel-mbox-store.c:
* providers/pop3/camel-pop3-store.c: update for CamelStore
changes.

* camel-folder.[ch]: Remove the (unused) CamelException argument
from camel_folder_get_name and camel_folder_get_full_name.
(camel_folder_set_name): make this go away since changing a
folder's name after it has been created could result in it
conflicting with a separately-issued folder.

24 years agothe URL RFC says the port must be numeric, so we don't want to do
Dan Winship [Thu, 6 Apr 2000 03:52:39 +0000 (03:52 +0000)]
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.)

24 years agofix a warning
Dan Winship [Wed, 5 Apr 2000 19:21:04 +0000 (19:21 +0000)]
fix a warning

24 years agoCompare mbox_file_size and mbox_modtime to the results of stat()ing the
Dan Winship [Sat, 1 Apr 2000 21:58:27 +0000 (21:58 +0000)]
Compare mbox_file_size and mbox_modtime to the results of stat()ing the

* providers/mbox/camel-mbox-folder.c
(_check_get_or_maybe_generate_summary_file): Compare
mbox_file_size and mbox_modtime to the results of stat()ing the
mbox file, not the summary file. Duh.
(_close): Update the summary's mbox_file_size and mbox_modtime
before writing it to disk.

* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_save,
camel_mbox_summary_load): Wow. I must have been tired when I wrote
this code. First, the comparison bug above. Second, it was using
ntohs and htons instead of ntohl and htonl. Third, I was reading
the status flag byte in two different places and thus getting out
of sync. Fourth, it was writing out field_length bytes of each
header field after having converted field_length to network byte
order, resulting in lots of random crap being appended, and the
summary files being huge. (Fortunately, since the size/modtime
comparison was biffed, the garbage summary read from disk was
always immediately discarded.)

* providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file): fix
an off-by-one error that caused the last-used UID to be reused if
the summary file was regenerated. (That one wasn't my fault. :-)

24 years agoimplement unimplemented methods
Dan Winship [Sat, 1 Apr 2000 04:44:17 +0000 (04:44 +0000)]
implement unimplemented methods

* camel-stream-mem.c: implement unimplemented methods

24 years agoremove debugging printf()s that no longer seem useful
Dan Winship [Sat, 1 Apr 2000 04:16:38 +0000 (04:16 +0000)]
remove debugging printf()s that no longer seem useful

24 years agoAdded "convert_newlines_to_br" boolean param, to give the option of not
Matthew Loper [Fri, 31 Mar 2000 21:58:19 +0000 (21:58 +0000)]
Added "convert_newlines_to_br" boolean param, to give the option of not

* camel-formatter.c (text_to_html): Added "convert_newlines_to_br"
boolean param, to give the option of not converting '\n's to <br>
tags. This way, when we stick stuff in a <pre> tag, newlines stay
newlines.

24 years agoUse <pre> tag to force the use of monospaced fonts.
Matthew Loper [Thu, 30 Mar 2000 20:33:26 +0000 (20:33 +0000)]
Use <pre> tag to force the use of monospaced fonts.

* camel-formatter.c (handle_text_plain): Use <pre> tag to force
the use of monospaced fonts.

24 years agoAdd a htons in the default_number case, and document the fact that the
Dan Winship [Thu, 30 Mar 2000 16:40:33 +0000 (16:40 +0000)]
Add a htons in the default_number case, and document the fact that the

* camel-service.c (camel_service_getport): Add a htons in the
default_number case, and document the fact that the function
returns the port in network byte order.

* providers/pop3/camel-pop3-store.c (pop3_connect): Revert
Miguel's change. The port number bug was actually somewhere
else, and the IP address copying code was fine already.

24 years agoAdd htons (port), and only copy 4 bytes for the IP address to prevent a
Miguel de Icaza [Thu, 30 Mar 2000 00:41:04 +0000 (00:41 +0000)]
Add htons (port), and only copy 4 bytes for the IP address to prevent a

2000-03-29  Miguel de Icaza  <miguel@gnu.org>

* providers/pop3/camel-pop3-store.c (pop3_connect): Add htons
(port), and only copy 4 bytes for the IP address to prevent a DNS
attack.

24 years agomake this return a CamelStream rather than a CamelSeekableSubstream,
Dan Winship [Tue, 28 Mar 2000 21:15:21 +0000 (21:15 +0000)]
make this return a CamelStream rather than a CamelSeekableSubstream,

* camel-seekable-substream.c
(camel_seekable_substream_new_with_seekable_stream_and_bounds):
make this return a CamelStream rather than a
CamelSeekableSubstream, because that's the way Gtk objects tend to
work.

24 years agofix warnings
Dan Winship [Tue, 28 Mar 2000 21:12:12 +0000 (21:12 +0000)]
fix warnings

24 years agoconvenience functions to canonicalize the host and port values of a
Dan Winship [Tue, 28 Mar 2000 20:51:58 +0000 (20:51 +0000)]
convenience functions to canonicalize the host and port values of a

* camel-service.c (camel_service_gethost,
camel_service_getport): convenience functions to canonicalize
the host and port values of a service's URL.
* providers/pop3/camel-pop3-store.c: use them

24 years agoMake this work when the inbox file doesn't yet exist.
Dan Winship [Tue, 28 Mar 2000 18:01:34 +0000 (18:01 +0000)]
Make this work when the inbox file doesn't yet exist.

* providers/mbox/camel-mbox-folder.c
(_check_get_or_maybe_generate_summary_file): Make this work when
the inbox file doesn't yet exist.

24 years agouncomment the call to unlink the temp file: there's no way to tell
Dan Winship [Tue, 28 Mar 2000 03:56:06 +0000 (03:56 +0000)]
uncomment the call to unlink the temp file: there's no way to tell

* providers/mbox/camel-mbox-folder.c (_append_message): uncomment
the call to unlink the temp file: there's no way to tell
camel_stream_fs to truncate a file, so reusing the same file was
resulting in junk at the ends of messages.

24 years agoadd delete_message_by_{number,uid}.
Dan Winship [Tue, 28 Mar 2000 01:57:59 +0000 (01:57 +0000)]
add delete_message_by_{number,uid}.

* camel-folder.[ch]: add delete_message_by_{number,uid}.

* providers/pop3/camel-pop3-folder.[ch]: implement
delete_message_by_uid. Add a close method to do expunging
of deleted messages if requested.

* providers/pop3/camel-pop3-store.[ch]: support for
CamelPop3Folder::close. (You have to close the connection
in order to expunge the folder, thus the store may be
connected in the CamelService::is_connected sense when it
is not actually connected to the server.) Also some bugfixes.

24 years agoUnref the output_stream when done, close doesn't do it. (_append_message):
NotZed [Mon, 27 Mar 2000 22:46:13 +0000 (22:46 +0000)]
Unref the output_stream when done, close doesn't do it. (_append_message):

2000-03-27  NotZed  <NotZed@HelixCode.com>

        * providers/mbox/camel-mbox-folder.c (_append_message): Unref the
        output_stream when done, close doesn't do it.
        (_append_message): Clear all uid's from the appending messages, so
        they are reassigned proper unique id's.

        * gmime-utils.c (get_header_array_from_stream): Actually free the
        header, it is copied elsewhere.

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

        * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Added
        folder parameter to function.  Fixed callers.
        (index_message): Index a message as it is assigned a unique id.

        * camel-mime-part.c (my_set_content_id): Make sure we malloc and
        copy the content_id, otherwise *poof*

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

        * camel-medium.c (_finalize): Another leak, unref the content if
        finished with it.

        * camel-recipient.c (camel_recipient_table_free): Plug another
        memory leak - actually free the recipient table.

        * camel-mime-message.c (_finalize): Plugged a memory leak with the
        flags table.

        * gmime-utils.c (_store_header_pair_from_string): A simpler, more
        debuggable and functionally identical header extraction function.

2000-03-24  NotZed  <NotZed@HelixCode.com>

        * gmime-content-field.c (gmime_content_field_set_parameter):
        Remove the hash table entry before freeing its key and data.

24 years agokeep separate input and output streams so the output doesn't end up being
Dan Winship [Mon, 27 Mar 2000 21:37:49 +0000 (21:37 +0000)]
keep separate input and output streams so the output doesn't end up being

* providers/pop3/camel-pop3-store.c: keep separate input and
output streams so the output doesn't end up being buffered.

* providers/pop3/camel-pop3-folder.c (get_message_by_number):
finish implementing this.

* providers/Makefile.am (SUBDIRS): Add pop3.

24 years agofix nastiness with mime dispositions ( at least for now )
Michael Meeks [Mon, 27 Mar 2000 21:33:34 +0000 (21:33 +0000)]
fix nastiness with mime dispositions ( at least for now )

24 years agoremove camel-stream-buffered-fs here too
Dan Winship [Mon, 27 Mar 2000 19:11:26 +0000 (19:11 +0000)]
remove camel-stream-buffered-fs here too

24 years agofix previous commit: this file wasn't using
Dan Winship [Mon, 27 Mar 2000 19:09:28 +0000 (19:09 +0000)]
fix previous commit: this file wasn't using
camel-stream-buffered-fs.h, but it did need camel-stream-fs.h, which
it wasn't including.

24 years agonew routine to free the data allocated by camel_service_query_auth_types.
Dan Winship [Mon, 27 Mar 2000 16:59:46 +0000 (16:59 +0000)]
new routine to free the data allocated by camel_service_query_auth_types.

* camel-service.c (camel_service_free_auth_types): new routine to
free the data allocated by camel_service_query_auth_types.

* providers/pop3/camel-pop3-store.c (free_auth_types): implement

24 years agorename camel_stream_mem_new_with_buffer to ..._with_byte_array and add a
Dan Winship [Mon, 27 Mar 2000 16:58:32 +0000 (16:58 +0000)]
rename camel_stream_mem_new_with_buffer to ..._with_byte_array and add a

* camel-stream-mem.c (camel_stream_mem_new_with_buffer): rename
camel_stream_mem_new_with_buffer to ..._with_byte_array and add a
new ..._with_buffer that takes a char * rather than a GByteArray.

24 years agoRemove CamelStreamBufferedFs, since CamelStreamBuffer makes it redundant.
Dan Winship [Mon, 27 Mar 2000 16:46:19 +0000 (16:46 +0000)]
Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it redundant.

* Remove CamelStreamBufferedFs, since CamelStreamBuffer makes it
redundant.

24 years agoinclude in.h to quiet compiler
Seth Alves [Mon, 27 Mar 2000 09:19:04 +0000 (09:19 +0000)]
include in.h to quiet compiler

24 years agochange the CamelFolderSummary interfaces to allow partial summary queries
Dan Winship [Sat, 25 Mar 2000 05:18:55 +0000 (05:18 +0000)]
change the CamelFolderSummary interfaces to allow partial summary queries

* camel-folder-summary.[ch]: change the CamelFolderSummary
interfaces to allow partial summary queries (for dealing
with very large folders). Remove the "extended_fields" from
CamelFolderInfo and CamelMessageInfo: this is better dealt
with by subtyping.

* providers/mbox/camel-mbox-summary.[ch]: Make CamelMboxSummary a
subclass of CamelFolderSummary. Update interfaces for that. Remove
the internal/external summary distinction. Remove the (unused) md5
checksum in the folder summary. Change the summary file format
(primarily to make it no longer byte-order dependent) and add a
version number to it so it will be easier to change in the future.

* providers/mbox/camel-mbox-folder.[ch]
* providers/mbox/camel-mbox-search.c
* providers/mbox/camel-mbox-utils.c: update for summary changes

* camel-exception-list.def: add
CAMEL_EXCEPTION_FOLDER_SUMMARY_INVALID

24 years agoAdded flag to provider initialisation, to match changed structure.
NotZed [Thu, 23 Mar 2000 23:47:14 +0000 (23:47 +0000)]
Added flag to provider initialisation, to match changed structure.

2000-03-23  NotZed  <NotZed@HelixCode.com>

        * providers/mbox/camel-mbox-provider.c: Added flag to provider
        initialisation, to match changed structure.

24 years agofix the CamelProvider entry (new flags field was missing)
Dan Winship [Thu, 23 Mar 2000 21:15:26 +0000 (21:15 +0000)]
fix the CamelProvider entry (new flags field was missing)

24 years agoAdded async search api.
NotZed [Thu, 23 Mar 2000 19:57:31 +0000 (19:57 +0000)]
Added async search api.

2000-03-22  NotZed  <NotZed@HelixCode.com>

        * camel-folder.[ch]: Added async search api.

        * providers/mbox/camel-mbox-search.c
        (camel_mbox_folder_search_by_expression): Changed to use an
        asynchronous interface.
        (camel_mbox_folder_search_cancel): Cancel function for async
        interface.

24 years agoFunction to read one line of any size from a stream and return it in
Dan Winship [Thu, 23 Mar 2000 16:22:29 +0000 (16:22 +0000)]
Function to read one line of any size from a stream and return it in

* camel-stream-buffer.c (camel_stream_buffer_read_line): Function
to read one line of any size from a stream and return it in
allocated memory.

Also add camel-stream-buffer.h to camel.h and CamelStreamBuffer to
camel-types.h.

24 years agoNew function to query a service for the authentication protocols it
Dan Winship [Wed, 22 Mar 2000 21:47:21 +0000 (21:47 +0000)]
New function to query a service for the authentication protocols it

* camel-service.c (camel_service_query_auth_types): New function
to query a service for the authentication protocols it supports.
* providers/pop3/camel-pop3-store.c (query_auth_types): implement

24 years agoNew function to scan the provider dir and return a list of all providers.
Dan Winship [Wed, 22 Mar 2000 17:21:31 +0000 (17:21 +0000)]
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.

24 years agofix compile errors. duh.
Dan Winship [Wed, 22 Mar 2000 17:02:13 +0000 (17:02 +0000)]
fix compile errors. duh.

24 years agofill this in partially make camel_pop3_command return the text after
Dan Winship [Wed, 22 Mar 2000 16:55:28 +0000 (16:55 +0000)]
fill this in partially make camel_pop3_command return the text after

* providers/pop3/camel-pop3-folder.c: fill this in partially
* providers/pop3/camel-pop3-store.c: make camel_pop3_command
return the text after "+OK"/"-ERR" and add a separate
camel_pop3_get_additional_data to get the message body or
whatever. Also make them take a CamelPop3Store rather than
a CamelStreamBuffer.

24 years ago+ * shell/main.c (evolution_boot): gtk_signal_connect'ed "destroy"
Matthew Loper [Wed, 22 Mar 2000 16:35:57 +0000 (16:35 +0000)]
+ * shell/main.c (evolution_boot): gtk_signal_connect'ed "destroy"
+ to gtk_main_quit, so that the shell dies when you want it to.
+
+ * shell/e-shell-view.c (get_view): Reorganized, and added
+ assertions.
+ (e_shell_view_set_view): Added assertions.
+
+ * camel/camel-formatter.c (debug): Disabled some useless debug
+ messaging.

24 years agosome initial bits of the POP3 provider, to make Matt happy. Incomplete,
Dan Winship [Tue, 21 Mar 2000 23:40:00 +0000 (23:40 +0000)]
some initial bits of the POP3 provider, to make Matt happy. Incomplete,

* providers/pop3: some initial bits of the POP3 provider, to
make Matt happy. Incomplete, untested, etc.

24 years agodisplay message size
bertrand [Tue, 21 Mar 2000 15:28:36 +0000 (15:28 +0000)]
display message size

2000-03-21  bertrand  <bertrand@helixcode.com>

* message-list.c (ml_value_at): display message size

2000-03-21  bertrand  <bertrand@helixcode.com>

* providers/mbox/camel-mbox-summary.c
(camel_mbox_summary_append_internal_to_external): copy the size field

* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): initialize
message_info to NULL

* camel-folder-summary.h: added the size field.

* providers/mbox/camel-mbox-summary.h:
added the received_date field.

24 years agodocumented all functions.
bertrand [Tue, 21 Mar 2000 15:19:52 +0000 (15:19 +0000)]
documented all functions.

2000-03-21  bertrand  <bertrand@helixcode.com>

* providers/mbox/camel-mbox-summary.c:
documented all functions.

24 years agoname change and new fields.
bertrand [Tue, 21 Mar 2000 14:50:12 +0000 (14:50 +0000)]
name change and new fields.

2000-03-21  bertrand  <bertrand@helixcode.com>

* camel-folder-summary.h: name change and
new fields.

* providers/mbox/camel-mbox-search.c: update to
conform to name change in the summary fields.

24 years agoadd a field refering to a service associated to the efolder. In the case
bertrand [Sun, 12 Mar 2000 05:09:43 +0000 (05:09 +0000)]
add a field refering to a service associated to the efolder. In the case

2000-03-12  bertrand  <bertrand@helixcode.com>

* shell/e-folder.h: add a field refering to a
service associated to the efolder. In the case of
distant folders, it is generally a server.

* shell/e-service.c: New class. Models a service.
A service is an object with an URI and a root folder.
It genreally reporesents a distant folder.
A service is generally a ressource shared amongst
several folders.
* shell/e-service.h:

2000-03-10  bertrand  <bertrand@helixcode.com>

* camel-service.h: cosmetic changes.

24 years agocosmetic changes.
bertrand [Sat, 11 Mar 2000 02:26:08 +0000 (02:26 +0000)]
cosmetic changes.

2000-03-10  bertrand  <bertrand@helixcode.com>

* camel-service.h: cosmetic changes.

24 years agofix the name of "Helix Code, Inc." in all the copyrights
Dan Winship [Thu, 9 Mar 2000 19:52:48 +0000 (19:52 +0000)]
fix the name of "Helix Code, Inc." in all the copyrights