Delta Chat Core C-API
mrlot.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 __MRLOT_H__
24 #define __MRLOT_H__
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 
36 typedef struct mrlot_t
37 {
38  uint32_t m_magic;
40  char* m_text1;
41  char* m_text2;
42  time_t m_timestamp;
43  int m_state;
44 } mrlot_t;
45 
46 
47 #define MR_TEXT1_DRAFT 1
48 #define MR_TEXT1_USERNAME 2
49 #define MR_TEXT1_SELF 3
50 
51 
52 mrlot_t* mrlot_new ();
53 void mrlot_empty (mrlot_t*);
54 void mrlot_unref (mrlot_t*);
55 
56 
57 /* library-internal */
58 #define MR_SUMMARY_CHARACTERS 160 /* in practice, the user additionally cuts the string himself pixel-accurate */
59 void mrlot_fill (mrlot_t*, const mrmsg_t*, const mrchat_t*, const mrcontact_t*);
60 
61 
62 #ifdef __cplusplus
63 } /* /extern "C" */
64 #endif
65 #endif /* __MRLOT_H__ */
An object representing a single contact in memory.
Definition: mrcontact.h:38
char * m_text2
The meaning of this string is defined by the creator of the object.
Definition: mrlot.h:41
int m_state
The meaning of this value is defined by the creator of the object.
Definition: mrlot.h:43
int m_text1_meaning
The meaning of this value is defined by the creator of the object.
Definition: mrlot.h:39
An object representing a single message in memory.
Definition: mrmsg.h:40
An object containing a set of values.
Definition: mrlot.h:36
void mrlot_unref(mrlot_t *set)
Frees an object containing a set of parameters.
Definition: mrlot.c:55
time_t m_timestamp
The meaning of this value is defined by the creator of the object.
Definition: mrlot.h:42
char * m_text1
The meaning of this string is defined by the creator of the object.
Definition: mrlot.h:40
An object representing a single chat in memory.
Definition: mrchat.h:39