Delta Chat Core C-API
mrchatlist.h
1 /*******************************************************************************
2  *
3  * Delta Chat Core
4  * Copyright (C) 2017 Björn Petersen
5  * Contact: r10s@b44t.com, http://b44t.com
6  *
7  * This program is free software: you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License as published by the Free Software
9  * Foundation, either version 3 of the License, or (at your option) any later
10  * version.
11  *
12  * This program is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15  * details.
16  *
17  * You should have received a copy of the GNU General Public License along with
18  * this program. If not, see http://www.gnu.org/licenses/ .
19  *
20  ******************************************************************************/
21 
22 
23 #ifndef __MRCHATLIST_H__
24 #define __MRCHATLIST_H__
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 
30 typedef struct _mrmailbox mrmailbox_t;
31 typedef struct _mrlot mrlot_t;
32 typedef struct _mrchat mrchat_t;
33 
34 
44 typedef struct _mrchatlist mrchatlist_t;
45 
46 
47 mrchatlist_t* mrchatlist_new (mrmailbox_t*);
48 void mrchatlist_empty (mrchatlist_t*);
51 uint32_t mrchatlist_get_chat_id (mrchatlist_t*, size_t index);
52 uint32_t mrchatlist_get_msg_id (mrchatlist_t*, size_t index);
55 
56 
57 #ifdef __cplusplus
58 } /* /extern "C" */
59 #endif
60 #endif /* __MRCHATLIST_H__ */
An object representing a single chatlist in memory.
uint32_t mrchatlist_get_chat_id(mrchatlist_t *chatlist, size_t index)
Get a single chat ID of a chatlist.
Definition: mrchatlist.c:130
An object representing a single mailbox.
size_t mrchatlist_get_cnt(mrchatlist_t *chatlist)
Find out the number of chats in a chatlist.
Definition: mrchatlist.c:106
mrlot_t * mrchatlist_get_summary(mrchatlist_t *chatlist, size_t index, mrchat_t *chat)
Get a summary for a chatlist index.
Definition: mrchatlist.c:192
uint32_t mrchatlist_get_msg_id(mrchatlist_t *chatlist, size_t index)
Get a single message ID of a chatlist.
Definition: mrchatlist.c:154
An object containing a set of values.
void mrchatlist_unref(mrchatlist_t *chatlist)
Free a chatlist object.
Definition: mrchatlist.c:65
mrmailbox_t * mrchatlist_get_mailbox(mrchatlist_t *chatlist)
Helper function to get the associated mailbox object.
Definition: mrchatlist.c:290
An object representing a single chat in memory.