Re: [Evolution-hackers] camel_mbox_folder_get_full_path equivalent?



> Hmm, no, I doubt that!  Publically accessible camel functions work on an
> abstraction.  The abstraction knows nothing - really - nothing about
> 'mbox' or 'maildir' or 'imap' or whatever.  This means we can use the
> same api to access any backend ... but also means the frontend has no
> knowledge of fiddly unecessary details like which file the folder is
> stored in.
> 
> It really depends on what you're using it for.  Perhaps it is something
> you shoudln't be using it for, and wont reliably work for other
> backends.  Or perhaps it is something else.  You would already have to
> test for the appropriate email or mbox uri, so you can interpret that in
> a way which will give you the physical file, yourself.

The thing is, i Had it working (the whole plugin) very well with it.
Doing imap, local mail folders and similar.

Im using the camel_mbox_folder_get_full_path() at 3 locations.
Though, using the same value at each 3 of them, could ofcourse be
using one tmp variable to all of them.

As an example,  when i use mail_save_messages() to save the mails,
localy, at the location where im about to export the mailfolder to.
The camel_mbox.... function is used as the 3rd parameter.


Like this, 

mail_save_messages(data->folder, data->uids, (void
*)camel_mbox_folder_get_full_path(NULL, g_strdup_printf("%s/",
data->path), info->full_name), NULL, NULL)

Where camel_mbox_folder_get_full_path would have pointed out the path
to, if i pointed and rightclicked to Inbox/OldInbox/Private and wanted
it in /home/backup it would have done it to a
/home/backup/Inbox.sbd/Oldinbox.sbd/Private path. If i remember
correctly. And That is what i want to use it for.  Are you following
me?

Im Somewhat sure that it has been used earlier on, in the Evolution
source, this camel_mbox_folder_get_full_path() function. Im guessing
that is why i choosed to use it. Most likely because it handled the
same stuff as i wanted it to handle.

So, im guessing there are nicer ways to handle it?



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