Re: Encoder/Decoder library

On Sun, 2006-05-14 at 14:48 +0200, Philip Van Hoof wrote:
> On Sun, 2006-05-14 at 14:45 +0200, Philip Van Hoof wrote:
> > Tinymail does not yet have a decoder library. This means that saving an
> > attachment (a mime-part) happens using the encoding that was used in the
> > e-mail.
> > 
> > Camel has encoder/decoder helpers implemented (or usable via) the
> > CamelMimeFilter* stuff.
> For more information about how to use it, check out mail/em-format.c of
> evolution.

It goes something like this:

Say we have a CamelDataWrapper dw and a target stream target_stream. And
we want to write the data wrapper to the stream using a filter in

CamelStreamFilter *filter_stream;
CamelMimeFilter *filter;

filter_stream = camel_stream_filter_new_with_stream (target_stream);
filter = camel_mime_filter_FILTERTYPE_new (...);
camel_stream_filter_add (filter_stream, filter);
camel_data_wrapper_decode_to_stream (dw, filter_stream);

For available filters, take a look at:

This is probably the most important one (decoder/encoder):

I'm not sure how I'm going to support the filtering, decoding and
encoding of data. I'm thinking about simplifying this rather than
wrapping all available filters. If others have a different opinion, let
me know.

Philip Van Hoof, software developer at x-tend 
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
work: vanhoof at x-tend dot be -

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]