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 |
may be NULL or empty, this name should not be spreaded as it may be "Daddy" and so on; initially set to m_authname | |
char * | m_authname |
may be NULL or empty, this is the name authorized by the sender, only this name may be speaded to others, eg. More... | |
char * | m_addr |
may be NULL or empty | |
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_authname |
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.
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).