* mu-msg-util: some minor cosmetic fixes

This commit is contained in:
Dirk-Jan C. Binnema 2010-08-18 23:45:50 +03:00
parent 6b1fa8db25
commit 5fb3e7fd36
3 changed files with 22 additions and 13 deletions

View File

@ -29,7 +29,6 @@
#include "mu-util.h"
#include "mu-msg-gmime.h"
enum _StringFields {
HTML_FIELD = 0, /* body as HTML */
@ -844,13 +843,13 @@ fill_contact (MuMsgContact *contact, InternetAddress *addr,
if (!addr)
return FALSE;
contact->_name = internet_address_get_name (addr);
contact->_type = ctype;
contact->name = internet_address_get_name (addr);
contact->type = ctype;
/* we only support internet addresses;
* if we don't check, g_mime hits an assert
*/
contact->_addr = internet_address_mailbox_get_addr
contact->address = internet_address_mailbox_get_addr
(INTERNET_ADDRESS_MAILBOX(addr));
return TRUE;
@ -873,7 +872,7 @@ address_list_foreach (InternetAddressList *addrlist,
MuMsgContact contact;
if (!fill_contact(&contact,
internet_address_list_get_address (addrlist, i),
ctype)) {
ctype)) {
MU_WRITE_LOG ("ignoring contact");
continue;
}

View File

@ -293,11 +293,11 @@ gint64 mu_msg_gmime_get_field_numeric (MuMsgGMime *msg,
const MuMsgField* field);
/**
* get the message priority for this message
* (MU_MSG_PRIORITY_LOW, MU_MSG_PRIORITY_NORMAL or MU_MSG_PRIORITY_HIGH)
* the X-Priority, X-MSMailPriority, Importance and Precedence header are
* checked, in that order.
* if no explicit priority is set, MU_MSG_PRIORITY_NORMAL is assumed
* get the message priority for this message (MU_MSG_PRIORITY_LOW,
* MU_MSG_PRIORITY_NORMAL or MU_MSG_PRIORITY_HIGH) the X-Priority,
* X-MSMailPriority, Importance and Precedence header are checked, in
* that order. if no known or explicit priority is set,
* MU_MSG_PRIORITY_NORMAL is assumed
*
* @param msg a valid MuMsgGMime* instance
*
@ -314,6 +314,16 @@ MuMsgPriority mu_msg_gmime_get_priority (MuMsgGMime *msg);
*/
time_t mu_msg_gmime_get_timestamp (MuMsgGMime *msg);
/**
* callback function
*
* @param contact
* @param user_data a user provided data pointer
*
* @return TRUE if we should continue the foreach, FALSE otherwise
*/
typedef gboolean (*MuMsgGMimeContactsForeachFunc) (MuMsgContact* contact,
gpointer user_data);

View File

@ -52,9 +52,9 @@ enum _MuMsgContactType { /* Reply-To:? */
typedef enum _MuMsgContactType MuMsgContactType;
struct _MuMsgContact {
const char *_name; /* Foo Bar */
const char *_addr; /* foo@bar.cuux */
MuMsgContactType _type; /*MU_MSG_CONTACT_TYPE_{TO,CC,BCC,FROM}*/
const char *name; /* Foo Bar */
const char *address; /* foo@bar.cuux */
MuMsgContactType type; /*MU_MSG_CONTACT_TYPE_{TO,CC,BCC,FROM}*/
};
typedef struct _MuMsgContact MuMsgContact;