Re: Message Flags Storage for IMAP
Jason Beard <jasonbeard-b/[email protected]>
| Newsgroups | gmane.mail.libetpan.user |
|---|---|
| Organization | Lucent Technologies |
| Message-ID | <[email protected]> |
Ok I have finally got time to implement something, at the moment I am using mailsession_get_message_by_uid to get a handle to the msg, then I call mailmessage_get_flags to get the message flags. Then I set the flags I want i.e msg->msg_flags->fl_flags |= MAIL_FLAG_DELETED. Then I call mailmessage_check(). What I would like to know is at which point does the IMAP server get the actual message deleted? Also after I make this call I call mailsession_expunge_folder.. which core dumps, all the pointers to the folder session looks fine, the core dump is in mmap_string function.. nothing obvious at the moment I will investigate more, but is this the create of function calling to delete a message?: mailsession_get_message_by_uid mailmessage_get_flags msg->msg_flags->fl_flags |= MAIL_FLAG_DELETED mailmessage_check mailsession_expunge_folder Thanks Jason DINH Viet Hoa wrote: > Jason Beard wrote : > > >>We have some custom flags to add to messages i.e. \Archived... does the >>mailmessage_check() work in the same way with the fl_extension flags? > > > Yes, but note that the following calls exist to help you to play with > fl_extension : > > > /* > mail_flags_add_extension adds the given flag if it does not exists in > the flags. > > @param flags this is the flag to change > > @param ext_flag this is the name of an extension flag > the given flag name is duplicated and is no more needed after > the function call. > > @return MAIL_NO_ERROR is returned on success, MAIL_ERROR_XXX is returned > on error > */ > > > int mail_flags_add_extension(struct mail_flags * flags, > char * ext_flag); > > /* > mail_flags_remove_extension removes the given flag if it does not exists in > the flags. > > @param flags this is the flag to change > > @param ext_flag this is the name of an extension flag > the given flag name is no more needed after the function call. > > @return MAIL_NO_ERROR is returned on success, MAIL_ERROR_XXX is returned > on error > */ > > int mail_flags_remove_extension(struct mail_flags * flags, > char * ext_flag); > > /* > mail_flags_has_extension returns 1 if the flags is in the given flags, > 0 is returned otherwise. > > @param flags this is the flag to change > > @param ext_flag this is the name of an extension flag > the given flag name is no more needed after the function call. > > @return MAIL_NO_ERROR is returned on success, MAIL_ERROR_XXX is returned > on error > */ > > > All these functions will copy the string for you, so that you can free > it after you passed it to one of these functions. >
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