[Evolution-hackers] EPlugin, export mail folder, Working!!!
Not Zed
notzed@ximian.com
Fri, 04 Mar 2005 10:30:41 +0800
--=-l3RReVPaqG1ubN3adzRN
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
On Thu, 2005-03-03 at 03:12 +0100, smurfd wrote:
> > Well, you should be running the whole shooting match in another thread already? You are right
> yes, i am!
>
> > You could also perhaps do mail_msg_wait() on the return of
> > mail_get_folder(), although it would be simpler to avoid all that
> > extra thread stuff entirely.
>
> Well, i adopted both methods. I éxchanged the mail_get_folder with
> mail_tool_uri_to_folder() wich cleaned up the source alot i think.
> Then, after my first e_put_thread() (wich handles all the exportion
> things) i put a mail_msg_wait_all() wich totaly solved all the problems
> i have had.
> thats okey to do that, right?
Better to avoid the mail_msg_wait_all() (infact you should never use
this, if you need to wait for a specific thread, you need to use the seq
id from the created message before you queue it. But in this case,
since you're creating your own 'job', just use the done callback. If
you need something to run after it is complete, in the gui thread, then
you can put code in the "done" callback of the "mail ops" structure.
> > > So im gonna have to borrow some more code i guess... and make small
> > > modifications on it to fit my needs.
> > >
> didnt have to borrow any more.
>
> It took a hellofa time, but its working now, just gotta clean it up, and
> see that it frees all the memmory and objects that it should do.
>
> Tried it earlier on a mailbox of 200+ MB worth of mails, and it seemed
> to handle that very well. (took some time ofcourse)
> The same with one of my imap accounts, took time, but its working :)
> with compression and all. Since i decided to run the compression on
> where you had it exported.
>
>
> Thanks for your patience, Notzed.
No worries.
--=-l3RReVPaqG1ubN3adzRN
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.5.7">
</HEAD>
<BODY>
On Thu, 2005-03-03 at 03:12 +0100, smurfd wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">> Well, you should be running the whole shooting match in another thread already? You are right</FONT>
<FONT COLOR="#000000">yes, i am!</FONT>
<FONT COLOR="#000000">> You could also perhaps do mail_msg_wait() on the return of</FONT>
<FONT COLOR="#000000">> mail_get_folder(), although it would be simpler to avoid all that</FONT>
<FONT COLOR="#000000">> extra thread stuff entirely.</FONT>
<FONT COLOR="#000000">Well, i adopted both methods. I éxchanged the mail_get_folder with</FONT>
<FONT COLOR="#000000">mail_tool_uri_to_folder() wich cleaned up the source alot i think. </FONT>
<FONT COLOR="#000000">Then, after my first e_put_thread() (wich handles all the exportion</FONT>
<FONT COLOR="#000000">things) i put a mail_msg_wait_all() wich totaly solved all the problems</FONT>
<FONT COLOR="#000000">i have had. </FONT>
<FONT COLOR="#000000">thats okey to do that, right? </FONT>
</PRE>
</BLOCKQUOTE>
<BR>
Better to avoid the mail_msg_wait_all() (infact you should never use this, if you need to wait for a specific thread, you need to use the seq id from the created message before you queue it. But in this case, since you're creating your own 'job', just use the done callback. If you need something to run after it is complete, in the gui thread, then you can put code in the "done" callback of the "mail ops" structure.<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">> > So im gonna have to borrow some more code i guess... and make small</FONT>
<FONT COLOR="#000000">> > modifications on it to fit my needs.</FONT>
<FONT COLOR="#000000">> > </FONT>
<FONT COLOR="#000000">didnt have to borrow any more. </FONT>
<FONT COLOR="#000000">It took a hellofa time, but its working now, just gotta clean it up, and</FONT>
<FONT COLOR="#000000">see that it frees all the memmory and objects that it should do. </FONT>
<FONT COLOR="#000000">Tried it earlier on a mailbox of 200+ MB worth of mails, and it seemed</FONT>
<FONT COLOR="#000000">to handle that very well. (took some time ofcourse)</FONT>
<FONT COLOR="#000000">The same with one of my imap accounts, took time, but its working :)</FONT>
<FONT COLOR="#000000">with compression and all. Since i decided to run the compression on</FONT>
<FONT COLOR="#000000">where you had it exported. </FONT>
<FONT COLOR="#000000">Thanks for your patience, Notzed.</FONT>
</PRE>
</BLOCKQUOTE>
No worries.<BR>
<BR>
</BODY>
</HTML>
--=-l3RReVPaqG1ubN3adzRN--