diff --git a/src/mu-msg-gmime.c b/src/mu-msg-gmime.c index 7a5afbd4..74f6f87c 100644 --- a/src/mu-msg-gmime.c +++ b/src/mu-msg-gmime.c @@ -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; } diff --git a/src/mu-msg-gmime.h b/src/mu-msg-gmime.h index bcc79b43..88d41e39 100644 --- a/src/mu-msg-gmime.h +++ b/src/mu-msg-gmime.h @@ -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); diff --git a/src/mu-msg.h b/src/mu-msg.h index 6094effb..50bc5a95 100644 --- a/src/mu-msg.h +++ b/src/mu-msg.h @@ -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;