Hi Philip,

I've not done any work on this recently, but I've not forgotten it; just
been busy with other things.

On Tue, 2007-01-16 at 05:44 +0100, Philip Van Hoof wrote:
[snip]
> If you want to implement a specialised version for "spool" folders, fill
> in the function pointer like this:

(in camel-spool-folder.c)

> static void
> camel_spool_folder_class_init(CamelSpoolFolderClass *klass)
> {
>       CamelLocalFolderClass *lklass = (CamelLocalFolderClass *)klass;
> +     CamelFolderClass *camel_folder_class = 
> CAMEL_FOLDER_CLASS(camel_local_folder_class);
> 
>       parent_class = (CamelFolderClass *)camel_mbox_folder_get_type();
> 
>       lklass->create_summary = spool_create_summary;
>       lklass->lock = spool_lock;
>       lklass->unlock = spool_unlock;
> 
>       camel_folder_class->expunge = spool_expunge;
> 
> }
> 
> And implement it:
> 
> + static void
> + spool_expunge(CamelFolder *folder, CamelException *ex)
> + {
> +     /* Call the method on super */
> +     parent_class->expunge (folder, ex);
> +     return;
> + }

Ok, I guess in this function, I'm going to have to get down and dirty
with the spool file: 

Call spool_lock()
Read it in, skipping expunged entries
Write it out, sans expunged messages
Call spool_unlock().

Questions for anyone on the list:
Is there a formalised way of getting the path to the spool file?
What are the camel functions for stepping through a mail file, looking
at each message?
Is there a "camel read message to data structure" kind of function?

Seb

My original posting:

> On Sun, 2007-01-14 at 21:00 +0000, Seb James wrote:
> > Hi List,
> > 
> > I'm looking at the local provider for camel, written by Michael Zucchi.
> > It seems to be related to Bug 213072, which is now rather old, and which
> > affects me.
> > 
> > I'm trying to understand the code to begin with.
> > 
> > I use a standard unix mail spool as my inbox, and I am wondering why it
> > is that I can't expunge deleted messages from the spool. The spool just
> > gets bigger and bigger, filling up with messages, flagged as deleted.
> > 
> > So, question one to get me started is: What function in e-d-s carries
> > out message expunging, as distinct from message deletion?
> > 
> > regards,
> > 
> > Seb James


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

Reply via email to