Re: Message Flags Storage for IMAP
Jason Beard <jasonbeard-b/[email protected]>
| Newsgroups | gmane.mail.libetpan.user |
|---|---|
| Organization | Lucent Technologies |
| Message-ID | <[email protected]> |
Thanks,
Could you give me some sample code on how to set the message flags for a
particular message before calling mailsession_check()?
Regards
Jason
DINH Viet Hoa wrote:
> Jason Beard wrote :
>
>
>>libetpan library version 0.32 under Fedora Core 2.
>>
>>Could someone point me in the direction of some sample code or examples
>>on how to store message flags to a uid? I was hoping to use the
>>mailimap_uid_store_att_flags function but I dont have a handle to an
>>mailimap session, but I have a folder session.
>
>
> maybe you are looking for this function :
>
> static struct mailimap * imapstorage_get_imap(struct mailstorage *
> storage, mailsession * session)
> {
> struct imap_mailstorage * imap_storage;
>
> imap_storage = storage->sto_data;
> if (imap_storage->imap_cached) {
> struct imap_cached_session_state_data * cached_session_data;
> mailsession * non_cached_session;
> struct imap_session_state_data * session_data;
>
> cached_session_data = session->sess_data;
> non_cached_session = cached_session_data->imap_ancestor;
> session_data = non_cached_session->sess_data;
> return session_data->imap_session;
> }
> else {
> struct imap_session_state_data * session_data;
>
> session_data = session->sess_data;
> return session_data->imap_session;
> }
> }
>
> I am curious about how you are using this ...
> I thought high-level API could be sufficient :
>
> You have to set the message flags and call mailmessage_check() on it
> and you are garanteed that flags are set after calling
> mailsession_check() but flags are stored when disconnecting the folder.
>
>
>>An example based on some of the frm-simple examples that came with the
>>source would be a great help.
>
>
jasonbeard.vcf
(text/x-vcard, 329 B)
begin:vcard fn:Jason Beard n:Beard;Jason org:Lucent Worldwide Services;Professional Services adr:Broad lane;;Sterling Court;Bracknell;Berks;RG12 9GU;United Kingdom email;internet:jasonbeard-b/[email protected] title:Software Engineer tel;work:+44 1344 827567 url:http://www.lucent.com/ version:2.1 end:vcard