Delta Chat Core C-API
|
An object representing a single contact in memory. More...
#include <mrcontact.h>
Public Member Functions | |
mrcontact_t * | mrcontact_new () |
Create a new contact object in memory. | |
void | mrcontact_unref (mrcontact_t *ths) |
Free a contact object. | |
void | mrcontact_empty (mrcontact_t *ths) |
Empty a contact object. | |
char * | mrcontact_get_first_name (const char *full_name) |
Get the first name. More... | |
void | mrcontact_normalize_name (char *full_name) |
Normalize a name in-place. More... | |
Public Attributes | |
uint32_t | m_id |
The contact ID. More... | |
char * | m_name |
Name given by the user to the contact. More... | |
char * | m_authname |
Name authorized by the contact himself. More... | |
char * | m_addr |
The E-Mail-Address of the contact. More... | |
int | m_blocked |
Blocked state. More... | |
An object representing a single contact in memory.
The contact object is not updated. If you want an update, you have to recreate the object.
char * mrcontact_get_first_name | ( | const char * | full_name | ) |
Get the first name.
In a string, get the part before the first space. If there is no space in the string, the whole string is returned.
full_name | Full name of the contct. |
void mrcontact_normalize_name | ( | char * | full_name | ) |
Normalize a name in-place.
full_name | Buffer with the name, is modified during processing; the resulting string may be shorter but never longer. |
char* mrcontact_t::m_addr |
The E-Mail-Address of the contact.
May be NULL or empty.
char* mrcontact_t::m_authname |
Name authorized by the contact himself.
May be NULL or empty, this is the name authorized by the sender, only this name may be speaded to others, eg. in To:-lists; for displaying in the app, use m_name
int mrcontact_t::m_blocked |
Blocked state.
1=contact is blocked, 0=contact is not blocked. To block or unblock a contact, use mrmailbox_block_contact().
uint32_t mrcontact_t::m_id |
The contact ID.
Special message IDs:
Normal contact IDs are larger than these special ones (larger than MR_CONTACT_ID_LAST_SPECIAL).
char* mrcontact_t::m_name |
Name given by the user to the contact.
Should be used for displaying everywhere and is editable by the user but must not be spreaded via mail (To:, CC: ...) as it as it may be sth. like "Daddy".
May be NULL or empty, initially set to m_authname