platform/upstream/evolution-data-server.git
24 years agoAnd same here ...
NotZed [Fri, 5 May 2000 08:47:02 +0000 (08:47 +0000)]
And same here ...

2000-05-05  NotZed  <NotZed@HelixCode.com>

        * camel-folder-summary.c: And same here ...

        * camel-mime-utils.c: Defined out some memory profiling stuff I
        left there by mistake.

        * camel-mime-parser.c (folder_scan_content): Apply the fix from
        the header scanner to here too.
        (folder_scan_header): Only check for end of header if we have
        space for it (didn't end the read with a newline)
        (folder_scan_header): inptr is the only real thing we need
        registerised for performance.  Try to help the compiler be smart
        about it ..
        (folder_scan_header): Simplified the save header case a tad.

        Commented out some memory profiling stuff.

24 years agoPlug a memory leak. (header_decode_text): Fixed memory leaks with
5 [Fri, 5 May 2000 07:28:20 +0000 (07:28 +0000)]
Plug a memory leak. (header_decode_text): Fixed memory leaks with

2000-05-05    <notzed@helixcode.com>

        * camel-mime-utils.c (header_decode_mailbox): Plug a memory leak.
        (header_decode_text): Fixed memory leaks with g_string_append().
        (header_encode_string): And here too, and a few other places.  The
        glib api is so awful ...
        (header_content_type_decode): More memory leaks, more left ...

2000-05-05    <notzed@helixcode.com>

        * camel-mime-parser.c (folder_scan_init_with_fd): Make sure we
        init the end of buffer sentinal!
        (folder_scan_init_with_stream): And here too ...

24 years agoMaxcount is minimum of the max and the requested count, not the maximum :)
NotZed [Fri, 5 May 2000 03:46:07 +0000 (03:46 +0000)]
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.

24 years agoMake this compile again in the !KRB4 case
Dan Winship [Thu, 4 May 2000 18:28:08 +0000 (18:28 +0000)]
Make this compile again in the !KRB4 case

24 years agoDon't fall back to plaintext passwords if APOP fails, since it should also
Dan Winship [Thu, 4 May 2000 16:02:49 +0000 (16:02 +0000)]
Don't fall back to plaintext passwords if APOP fails, since it should also

* providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall
back to plaintext passwords if APOP fails, since it should also
fail.

24 years agoNew function to replace camel_provider_scan. Returns a list of either (a)
Dan Winship [Thu, 4 May 2000 15:23:43 +0000 (15:23 +0000)]
New function to replace camel_provider_scan. Returns a list of either (a)

        * camel-session.c (camel_session_list_providers): New function to
        replace camel_provider_scan. Returns a list of either (a) all
        currently-loaded providers, or (b) all available providers.

        * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that
        it contains only a protocol).

        * camel-service.c (camel_service_query_auth_types): Make this take
        a CamelException (since it may have to try to connect to the
        server, and it might not able to.)

        * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP)
        support. This is mostly so I have two kinds of authmech to play
        with instead of just one. (But it does actually work.)

        * providers/smtp/camel-smtp-transport.c (query_auth_types): update
        for prototype change, but disable the functionality, since it
        doesn't really support any auth types yet.
        (camel_smtp_transport_get_type): add an object init function to
        set the service url_flags.

24 years agoNo, we're not going to have g_strcasecmp for no good reason,
NotZed [Thu, 4 May 2000 05:45:30 +0000 (05:45 +0000)]
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.

24 years agoSome small build fixes:
Jacob Leach [Thu, 4 May 2000 01:15:10 +0000 (01:15 +0000)]
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)/

24 years agos/strcasecmp/g_strcasecamp/ everywhere except intl/, per michael's
Jacob Leach [Wed, 3 May 2000 14:43:09 +0000 (14:43 +0000)]
s/strcasecmp/g_strcasecamp/ everywhere except intl/, per michael's
request.

24 years agoIf the iconv handle is -1, then dont try and convert (crashes
NotZed [Wed, 3 May 2000 04:20:26 +0000 (04:20 +0000)]
If the iconv handle is -1, then dont try and convert (crashes

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

        * camel-mime-utils.c (rfc2047_decode_word): If the iconv handle is
        -1, then dont try and convert (crashes unicode_iconv?).
        (rfc2047_decode_word): Use alloca for variables instead of
        g_malloc - by the rfc they should always be short.
        (rfc2047_decode_word): If we can't do the charset conversion, undo
        the quoted-printable/base64 at least?  Should probably convert
        unknown characters to the utf-8 unknown character.

24 years agofix typo when dereferencing saveoffset.
Larry Ewing [Wed, 3 May 2000 03:35:31 +0000 (03:35 +0000)]
fix typo when dereferencing saveoffset.

2000-05-02  Larry Ewing  <lewing@helixcode.com>

* camel-mime-utils.c (header_decode_date): fix typo when
dereferencing saveoffset.

24 years ago Missed these ...
Michael Zucci [Tue, 2 May 2000 23:22:33 +0000 (23:22 +0000)]
Missed these ...

24 years agoREmove gmime-utils.h from here.
NotZed [Tue, 2 May 2000 23:08:20 +0000 (23:08 +0000)]
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.

24 years agoSet G_LOG_DOMAIN in following files.
Matthew Loper [Tue, 2 May 2000 21:33:55 +0000 (21:33 +0000)]
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

24 years ago> * providers/mbox/camel-mbox-search.c
Michael Zucci [Tue, 2 May 2000 20:58:23 +0000 (20:58 +0000)]
>  * providers/mbox/camel-mbox-search.c
>  (camel_mbox_folder_search_by_expression): Dont store/remove
>  current search from the search list.
>
>  * providers/mbox/camel-mbox-folder.h: Removed searches list,
>  searches are all sync now.

24 years ago> * gmime-utils.[ch]: What the hell, remove it. This will break the
Michael Zucci [Tue, 2 May 2000 20:37:06 +0000 (20:37 +0000)]
>  * 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.

24 years agoRemoved bizarre string_dichotomy version of this. This code is somewhat
Michael Zucci [Tue, 2 May 2000 20:31:47 +0000 (20:31 +0000)]
Removed bizarre string_dichotomy version of this. This code is somewhat

* 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.

24 years agoFix the previous overflow problem properly (can happen in 2 places).
NotZed [Tue, 2 May 2000 19:06:55 +0000 (19:06 +0000)]
Fix the previous overflow problem properly (can happen in 2 places).

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

        * camel-mime-parser.c (folder_scan_header): Fix the previous
        overflow problem properly (can happen in 2 places).
        (header_append): A new macro to include the code changed above, so
        it only appears in one place.
        (folder_scan_step): Change the content type to text/plain if the
        multipart is broken.  Doesn't actually change the header though.
        (header_append): Also move the header-start tracking stuff here.
        Could be a static function to save code.

24 years agoDont use autofill on these fucking long function anmes!!!!!!
2 [Tue, 2 May 2000 18:05:13 +0000 (18:05 +0000)]
Dont use autofill on these fucking long function anmes!!!!!!

2000-05-02    <notzed@helixcode.com>

        * camel-mime-part-utils.c
        (simple_data_wrapper_construct_from_parser): Dont use autofill on
        these fucking long function anmes!!!!!!

24 years agoFix the offset for the summary when an item is expunged to take account of
NotZed [Tue, 2 May 2000 17:36:32 +0000 (17:36 +0000)]
Fix the offset for the summary when an item is expunged to take account of

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

        * providers/mbox/camel-mbox-summary.c
        (camel_mbox_summary_expunge): Fix the offset for the summary when
        an item is expunged to take account of the From line.

24 years agoDeleted messages properly get removed from the index.
Michael Zucci [Tue, 2 May 2000 03:32:23 +0000 (03:32 +0000)]
Deleted messages properly get removed from the index.
A new folder signal for gui/etc's to track changes.

(camel_mbox_summary_expunge): Oops, my wrong, use the string uid
to unindex on.
(mbox_expunge): Emit a folder_changed signal on expunge (uh, even
if it didn't ...)
(camel_folder_class_init): Added a folder_changed signal.

24 years ago> (camel_folder_expunge): Changed to only allow expunge on an open
Michael Zucci [Tue, 2 May 2000 02:59:01 +0000 (02:59 +0000)]
>  (camel_folder_expunge): Changed to only allow expunge on an open
>  folder.  It doesn't make sense for mbox, otherwise (?)

24 years ago> (func_header_contains): Debug out some search stuff.
Michael Zucci [Tue, 2 May 2000 01:57:55 +0000 (01:57 +0000)]
>  (func_header_contains): Debug out some search stuff.
>  (index_folder): Make sure we index using a decimal uid, since
>  thats what everything else indexes off (oops).
>  Upped SUMMARY_VERSION as a result.
>
>  * camel-folder.h: Removed CamelSearchFunc.

24 years agoRemoved search_id.
Michael Zucci [Mon, 1 May 2000 21:50:46 +0000 (21:50 +0000)]
Removed search_id.

* providers/mbox/camel-mbox-folder.h (CamelMboxFolder): Removed
search_id.

* providers/mbox/camel-mbox-search.c
(camel_mbox_folder_search_cancel): Remove.d
(camel_mbox_folder_search_complete): Removed.
(camel_mbox_folder_search_by_expression): Changed back to sync
api.
(struct _searchcontext): Removed cancelled flag.
(find_context): Removed.

* providers/mbox/camel-mbox-search.h
(camel_mbox_folder_search_by_expression): Moved back to sync api.

(camel_folder_search_complete): Removed.
(camel_folder_search_cancel): Removed.
(CamelFolderClass): New function summary_get_by_uid() to get a single
summary.
(*search*): Moved back to synchronous search api ... *sigh*

24 years agoMore message cleanup. Flags now work, are saved, and the delete
NotZed [Mon, 1 May 2000 19:47:12 +0000 (19:47 +0000)]
More message cleanup.  Flags now work, are saved, and the delete
flag causes an expunge to expunge the deleted messages.

2000-05-01  NotZed  <NotZed@HelixCode.com>

        * providers/mbox/camel-mbox-summary.c
        (camel_mbox_summary_set_flags_by_uid): New function to update the
        flags in the summary.
        (camel_mbox_summary_expunge): Expunge messages from a folder.
        (offset_content): Re-align offsets of summary when messages
        added/removed to an existing summary.
        (camel_mbox_summary_remove_uid): Remove a message summary entry by
        uid.
        (index_folder): Restore flags from X-Evolution header, if they are set.

        * providers/mbox/camel-mbox-folder.c (_get_message_by_uid):
        Connect to the message_changed signal.
        (_init): Set permanent flags to something reasonable.  No user
        flags yet ...
        (message_changed): If the flags of the message change, update the
        flags in the summary.
        (mbox_expunge): Implement the expunge.
        (camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s

        * camel-folder.c (_finalize): Uh, dont free permanent_flags
        anymore (this wouldn't failed anyway, it was a GList !!!)

        * camel-folder.h (struct _CamelFolder): Change permanent_flags to
        a bitfield.
        (list_permanent_flags): Renamed to get_permanent_flags, and
        returns a bitfield.
        (camel_folder_expunge): Changed expunge to a void type.  The
        messages would no longer be useful after they have been removed
        ...

        * camel-mime-message.c (set_flag): Removed.
        (camel_mime_message_set_flag): Removed.
        (get_flag): Removed.
        (camel_mime_message_get_flag): Removed.
        (add_flag_to_list): Removed.
        (get_flag_list): Removed.
        (camel_mime_message_get_flag_list): Removed.
        (camel_mime_message_get_flags): New interface to get system flags.
        (camel_mime_message_set_flags):  " to set ".
        (camel_mime_message_get_user_flag): To get a user flag.
        (camel_mime_message_set_user_flag): To set a user flag.
        (finalize): Hmm, the old one free'd the key and data, not good
        when the data is a boolean ...

24 years agooops. s/CAMEL_TRANSPORT_TYPE/CAMEL_PROVIDER_TRANSPORT/
Dan Winship [Sun, 30 Apr 2000 16:58:38 +0000 (16:58 +0000)]
oops. s/CAMEL_TRANSPORT_TYPE/CAMEL_PROVIDER_TRANSPORT/

24 years agoTweak the definition of CamelProvider. Among other things, a provider may
Dan Winship [Sun, 30 Apr 2000 15:36:16 +0000 (15:36 +0000)]
Tweak the definition of CamelProvider. Among other things, a provider may

* camel-provider.h: Tweak the definition of CamelProvider. Among
other things, a provider may now be both a store and a transport.

* camel-provider.c: Remove a lot of code we had no intention of
using. This now only contains two functions: camel_provider_init
to read the installed .urls files, and camel_provider_load to
load and register a new provider.

* camel-session.c: Remove more unused code and simplify some of
the remaining code. The list of available provider modules is now
stored in the session, and it handles calling camel_provider_load
to load them as needed. Provider registration is now done by
calling back from the module init routine, which allows a single
module to register providers for multiple URL types.

* providers/*: Update provider structures and init routines for
the new stuff. Add a .urls file to each provider specifying what
urls it handles, and install that with the library.

* providers/nntp/camel-nntp-provider.c: Add hints towards
supporting both news: and nntp: URLs, and using nntp as both a
store and a transport.

24 years agoconst poison
Dan Winship [Sat, 29 Apr 2000 15:57:54 +0000 (15:57 +0000)]
const poison

* camel-internet-address.c (camel_internet_address_get): const
poison

24 years agocamel_mime_parser_tell() returns an offset from where it started parsing,
Dan Winship [Sat, 29 Apr 2000 15:57:11 +0000 (15:57 +0000)]
camel_mime_parser_tell() returns an offset from where it started parsing,

* camel-mime-part-utils.c
(simple_data_wrapper_construct_from_parser):
camel_mime_parser_tell() returns an offset from where it started
parsing, not necessarily from the start of data. Since we're
parsing a bounded seekable_stream, we need to add the stream's
starting bound to camel_mime_parser_tell's return value to
create the substream in the right place.

* camel-seekable-substream.c
(camel_seekable_substream_new_with_seekable_stream_and_bounds):
say CAMEL_STREAM_UNBOUND rather than -1 in doc.

* camel-seekable-stream.c (camel_seekable_stream_seek): Add more
info to docs.

24 years agoremove an unused #include
Dan Winship [Sat, 29 Apr 2000 15:53:37 +0000 (15:53 +0000)]
remove an unused #include

24 years agofix a bug that would cause corruption with very long headers.
Dan Winship [Fri, 28 Apr 2000 21:42:32 +0000 (21:42 +0000)]
fix a bug that would cause corruption with very long headers.

* camel-mime-parser.c (folder_scan_header): fix a bug that would
cause corruption with very long headers.

24 years agoMade Evolution OAF-compatible.
Ettore Perazzoli [Fri, 28 Apr 2000 04:23:09 +0000 (04:23 +0000)]
Made Evolution OAF-compatible.

24 years agoDont try and check a NULL header.
NotZed [Fri, 28 Apr 2000 03:06:44 +0000 (03:06 +0000)]
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.

24 years agoClass to represent news addresses - currently empty, and not built.
NotZed [Fri, 28 Apr 2000 01:24:05 +0000 (01:24 +0000)]
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.

24 years agoRevert previous change. I was confused.
Dan Winship [Thu, 27 Apr 2000 22:43:43 +0000 (22:43 +0000)]
Revert previous change. I was confused.

* camel-mime-part.c (write_to_stream): Revert previous change. I
was confused.

24 years agoexpose these routines.
Dan Winship [Thu, 27 Apr 2000 19:00:04 +0000 (19:00 +0000)]
expose these routines.

* camel-url.[ch] (camel_url_encode, camel_url_decode): expose
these routines.

24 years ago Diagram of the camel-stream and derived classes used within
Michael Zucci [Thu, 27 Apr 2000 03:59:11 +0000 (03:59 +0000)]
Diagram of the camel-stream and derived classes used within
camel.

24 years agoOnly write a newline between the headers and the content object if the
Dan Winship [Wed, 26 Apr 2000 21:50:34 +0000 (21:50 +0000)]
Only write a newline between the headers and the content object if the

* camel-mime-part.c (write_to_stream): Only write a newline
between the headers and the content object if the content object
is not a CamelMedium. (If the content is a medium, it may have its
own headers, which then need to go before the blank line.)

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. :-)