Delta Chat Core C-API
mrchat-private.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 __MRCHAT_PRIVATE_H__
24 #define __MRCHAT_PRIVATE_H__
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 
30 /* values for the chats.blocked database field */
31 #define MR_CHAT_NOT_BLOCKED 0
32 #define MR_CHAT_MANUALLY_BLOCKED 1
33 #define MR_CHAT_DEADDROP_BLOCKED 2
34 
35 
37 struct _mrchat
38 {
40  uint32_t m_magic;
41  uint32_t m_id;
42  int m_type;
43  char* m_name;
44  char* m_draft_text;
45  time_t m_draft_timestamp;
46  int m_archived;
47  mrmailbox_t* m_mailbox;
48  char* m_grpid;
49  int m_blocked;
50  mrparam_t* m_param;
51 };
52 
53 
54 int mrchat_load_from_db__ (mrchat_t*, uint32_t id);
55 int mrchat_update_param__ (mrchat_t*);
56 
57 
58 #define MR_CHAT_PREFIX "Chat:" /* you MUST NOT modify this or the following strings */
59 #define MR_CHATS_FOLDER "Chats" /* if we want to support Gma'l-labels - "Chats" is a reserved word for Gma'l */
60 
61 
62 #ifdef __cplusplus
63 } /* /extern "C" */
64 #endif
65 #endif /* __MRCHAT_PRIVATE_H__ */
An object representing a single mailbox.
An object representing a single chat in memory.