Re: [Evolution-hackers] Raw access to message

2010-03-12 Thread Stefan Schulze Frielinghaus
On Do, 2010-03-11 at 12:58 -0500, Jeffrey Stedfast wrote:
 Stefan Schulze Frielinghaus wrote:
  On Do, 2010-03-11 at 10:45 -0500, Jeffrey Stedfast wrote:

  On 03/11/2010 09:16 AM, Stefan Schulze Frielinghaus wrote:
  
  Hi,
 
  Is it possible to get raw access to an email (including header and
  body)? Or, if that is not possible, raw access to the body of the
  message?
 
  Raw access is important for me because I want to write a plugin which
  uses some kind of cryptography, e.g. character encoding is important to
  me.


  You can get the raw message from a CamelMimeMessage object by writing it
  to a stream buffer.
  
 
  This sounds great. I'm quite new to evolution could you give me a hint
  how to do that? I'm starting with an EMEventTargetMessage object where I
  can get an CamelMimeMessage object from. But how can I dump this one
  into a stream? Writing to a stream requires a buffer of type gchar, but
  I have a CamelMimeMessage object and I even do not know the length of
  the message. What function calls could I look at?

 
 CamelStream *stream = camel_stream_mem_new ();
 camel_data_wrapper_write_to_stream (message, stream);
 
 It's been 4 or 5 years since I did any evo hacking, so the above code
 might not be quite right - but it should give you a general idea.

Ah perfect, thanks! I was not aware of a function like
camel_data_wrapper_write_to_stream().

Just for the records if someone else is looking for a similar solution:

CamelStreamMem *stream = (CamelStreamMem *)camel_stream_mem_new ();
camel_data_wrapper_write_to_stream ((CamelDataWrapper*)t-message,
(CamelStream *)stream);

And then you can access the message via

stream-buffer-data;

and

stream-buffer-len;

cheers,
Stefan

___
Evolution-hackers mailing list
Evolution-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-hackers


[Evolution-hackers] Problems with Migration from 2.28.4 to 2.30 (master): calendar, task, memo not there

2010-03-12 Thread Thomas Mittelstaedt
Hallo,

Just tried the latest git version (master). Building and compiling went
relatively smooth.
After following advice at
http://www.mail-archive.com/evolution-hackers@gnome.org/msg03339.html
the app came up okay. Unfortunately, when I opened the calendar, the
different calendars would show up in the list to the left, but no data
is displayed, even though the ics files clearly exist and contain data.
When I tried to import one of those ics files the app crashed.
What is the correct way to migrate from 2.28.x to the latest version?


-- 
thomas


___
Evolution-hackers mailing list
Evolution-hackers@gnome.org
http://mail.gnome.org/mailman/listinfo/evolution-hackers