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 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... | |
mrlot_t * | mrchatlist_get_summary (mrchatlist_t *chatlist, size_t index, mrchat_t *chat) |
Get a summary for a chatlist index. More... | |
mrmailbox_t * | mrchatlist_get_mailbox (mrchatlist_t *chatlist) |
Helper function to get the associated mailbox object. More... | |
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_unref | ( | mrchatlist_t * | chatlist | ) |
Free a chatlist object.
chatlist | The chatlist object to free, created eg. by mrmailbox_get_chatlist(), mrmailbox_search_msgs(). |
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_chat_id | ( | mrchatlist_t * | chatlist, |
size_t | index | ||
) |
Get a single chat ID of a chatlist.
To get the message object from the message ID, use mrmailbox_get_chat().
chatlist | The chatlist object as created eg. by mrmailbox_get_chatlist(). |
index | The index to get the chat ID for. |
uint32_t mrchatlist_get_msg_id | ( | mrchatlist_t * | chatlist, |
size_t | index | ||
) |
Get a single message ID of a chatlist.
To get the message object from the message ID, use mrmailbox_get_msg().
chatlist | The chatlist object as created eg. by mrmailbox_get_chatlist(). |
index | The index to get the chat ID for. |
mrlot_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 mrlot_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 | To speed up things, pass an already available chat object here. If the chat object is not yet available, it is faster to pass NULL. |
mrmailbox_t * mrchatlist_get_mailbox | ( | mrchatlist_t * | chatlist | ) |
Helper function to get the associated mailbox object.
chatlist | The chatlist object to empty. |