Re: [Evolution-hackers] camel_mbox_folder_get_full_path equivalent?
- From: Not Zed <notzed ximian com>
- To: smurfd <smurfd gmail com>
- Cc: evolution-hackers lists ximian com
- Subject: Re: [Evolution-hackers] camel_mbox_folder_get_full_path equivalent?
- Date: Thu, 28 Jul 2005 09:39:12 +0800
On Wed, 2005-07-27 at 18:12 +0000, smurfd wrote:
> > 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)
Hmm, that leaks 2 strings ...
> 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?
Ahh right - i'd forgotten what it is for. Well copy it/write your own I
guess. It isn't much code, and you can't use functions from providers.
> 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.
Maybe it used to be exported from the camel-mbox-store, but it isn't
anymore, and even if it was, it shouldn't have been used ...
> So, im guessing there are nicer ways to handle it?
Just write it yourself :)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]