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 
38 typedef struct _mrlot mrlot_t;
39 
40 
41 #define MR_TEXT1_DRAFT 1
42 #define MR_TEXT1_USERNAME 2
43 #define MR_TEXT1_SELF 3
44 
45 
46 mrlot_t* mrlot_new ();
47 void mrlot_empty (mrlot_t*);
48 void mrlot_unref (mrlot_t*);
49 char* mrlot_get_text1 (mrlot_t*);
50 char* mrlot_get_text2 (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__ */
int mrlot_get_text1_meaning(mrlot_t *lot)
Get the meaning of the first string.
Definition: mrlot.c:131
int mrlot_get_state(mrlot_t *lot)
Get the associated state.
Definition: mrlot.c:149
char * mrlot_get_text1(mrlot_t *lot)
Get first string.
Definition: mrlot.c:93
An object representing a single message in memory.
An object containing a set of values.
An object representing a single chat in memory.
time_t mrlot_get_timestamp(mrlot_t *lot)
Get the associated timestamp.
Definition: mrlot.c:167
char * mrlot_get_text2(mrlot_t *lot)
Get second string.
Definition: mrlot.c:111
void mrlot_unref(mrlot_t *set)
Frees an object containing a set of parameters.
Definition: mrlot.c:55
An object representing a single contact in memory.