Re: Message Flags Storage for IMAP

DINH Viet Hoa <[email protected]>
Newsgroups gmane.mail.libetpan.user
Message-ID <etPan.40cf03da.4ca1c27d.6110@homer>
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.

-- 
DINH V. Hoa,

"l'informatique est une source inépisable de calembours divers" -- 7th
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQBAzwTm7w+pfAWHa3MRAs5jAJ9QioljnXgAMI6LfcWgB45xFxz/jACdH6Tn
oUN63hLdFEfL7Pci0EE2xrQ=
=2kG+
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.