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 {
39  char* m_text1;
40  char* m_text2;
41  time_t m_timestamp;
42  int m_state;
43 } mrlot_t;
44 
45 
46 #define MR_TEXT1_DRAFT 1
47 #define MR_TEXT1_USERNAME 2
48 #define MR_TEXT1_SELF 3
49 
50 
51 mrlot_t* mrlot_new ();
52 void mrlot_empty (mrlot_t*);
53 void mrlot_unref (mrlot_t*);
54 
55 
56 /* library-internal */
57 #define MR_SUMMARY_CHARACTERS 160 /* in practice, the user additionally cuts the string himself pixel-accurate */
58 void mrlot_fill (mrlot_t*, const mrmsg_t*, const mrchat_t*, const mrcontact_t*);
59 
60 
61 #ifdef __cplusplus
62 } /* /extern "C" */
63 #endif
64 #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:40
int m_state
The meaning of this value is defined by the creator of the object.
Definition: mrlot.h:42
int m_text1_meaning
The meaning of this value is defined by the creator of the object.
Definition: mrlot.h:38
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:52
time_t m_timestamp
The meaning of this value is defined by the creator of the object.
Definition: mrlot.h:41
char * m_text1
The meaning of this string is defined by the creator of the object.
Definition: mrlot.h:39
An object representing a single chat in memory.
Definition: mrchat.h:39