Delta Chat Core C-API
|
An object representing a single chatlist in memory. More...
#include <mrchatlist.h>
Public Member Functions | |
void | mrchatlist_unref (mrchatlist_t *chatlist) |
Free a mrchatlist_t object as created eg. More... | |
void | mrchatlist_empty (mrchatlist_t *chatlist) |
Empty a chatlist object. More... | |
size_t | mrchatlist_get_cnt (mrchatlist_t *chatlist) |
Find out the number of chats in a chatlist. More... | |
uint32_t | mrchatlist_get_chat_id (mrchatlist_t *chatlist, size_t index) |
Get a single chat ID of a chatlist. More... | |
uint32_t | mrchatlist_get_msg_id (mrchatlist_t *chatlist, size_t index) |
Get a single message ID of a chatlist. More... | |
mrpoortext_t * | mrchatlist_get_summary (mrchatlist_t *chatlist, size_t index, mrchat_t *chat) |
Get a summary for a chatlist index. More... | |
Public Attributes | |
mrmailbox_t * | m_mailbox |
The mailbox, the chatlist belongs to. | |
An object representing a single chatlist in memory.
Chatlist objects contain chat IDs and, if possible, message IDs belonging to them. Chatlist objects are created eg. using mrmailbox_get_chatlist(). The chatlist object is not updated. If you want an update, you have to recreate the object.
void mrchatlist_empty | ( | mrchatlist_t * | chatlist | ) |
Empty a chatlist object.
chatlist | The chatlist object to empty. |
uint32_t mrchatlist_get_chat_id | ( | mrchatlist_t * | chatlist, |
size_t | index | ||
) |
Get a single chat ID of a chatlist.
chatlist | The chatlist object as created eg. by mrmailbox_get_chatlist(). |
index | The index to get the chat ID for. |
size_t mrchatlist_get_cnt | ( | mrchatlist_t * | chatlist | ) |
Find out the number of chats in a chatlist.
chatlist | The chatlist object as created eg. by mrmailbox_get_chatlist(). |
uint32_t mrchatlist_get_msg_id | ( | mrchatlist_t * | chatlist, |
size_t | index | ||
) |
Get a single message ID of a chatlist.
chatlist | The chatlist object as created eg. by mrmailbox_get_chatlist(). |
index | The index to get the chat ID for. |
mrpoortext_t * mrchatlist_get_summary | ( | mrchatlist_t * | chatlist, |
size_t | index, | ||
mrchat_t * | chat | ||
) |
Get a summary for a chatlist index.
The summary is returned by a mrpoortext_t object with the following fields:
chatlist | The chatlist to query as returned eg. from mrmailbox_get_chatlist(). |
index | The index to query in the chatlist. |
chat | Giving the correct chat object here, this this will speed up things a little. If the chat object is not available by you, it is faster to pass NULL here. |
void mrchatlist_unref | ( | mrchatlist_t * | chatlist | ) |
Free a mrchatlist_t object as created eg.
chatlist | The chatlist object to free. |