Delta Chat Core C-API
mrstock.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 __MRSTOCK_H__
24 #define __MRSTOCK_H__
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 
30 #include "mrmailbox.h"
31 #include <stdlib.h>
32 #include <string.h>
33 
34 
35 /* Strings requested by MR_EVENT_GET_STRING and MR_EVENT_GET_QUANTITY_STRING */
36 #define MR_STR_FREE_ 0
37 #define MR_STR_NOMESSAGES 1
38 #define MR_STR_SELF 2
39 #define MR_STR_DRAFT 3
40 #define MR_STR_MEMBER 4
41 #define MR_STR_CONTACT 6
42 #define MR_STR_VOICEMESSAGE 7
43 #define MR_STR_DEADDROP 8
44 #define MR_STR_IMAGE 9
45 #define MR_STR_VIDEO 10
46 #define MR_STR_AUDIO 11
47 #define MR_STR_FILE 12
48 #define MR_STR_STATUSLINE 13
49 #define MR_STR_NEWGROUPDRAFT 14
50 #define MR_STR_MSGGRPNAME 15
51 #define MR_STR_MSGGRPIMGCHANGED 16
52 #define MR_STR_MSGADDMEMBER 17
53 #define MR_STR_MSGDELMEMBER 18
54 #define MR_STR_MSGGROUPLEFT 19
55 #define MR_STR_ERROR 20
56 #define MR_STR_SELFNOTINGRP 21
57 #define MR_STR_NONETWORK 22
58 #define MR_STR_GIF 23
59 #define MR_STR_ENCRYPTEDMSG 24
60 #define MR_STR_ENCR_E2E 25
61 #define MR_STR_ENCR_TRANSP 27
62 #define MR_STR_ENCR_NONE 28
63 #define MR_STR_FINGERPRINTS 30
64 #define MR_STR_READRCPT 31
65 #define MR_STR_READRCPT_MAILBODY 32
66 #define MR_STR_MSGGRPIMGDELETED 33
67 #define MR_STR_E2E_FINE 34
68 #define MR_STR_E2E_NO_AUTOCRYPT 35
69 #define MR_STR_E2E_DIS_BY_YOU 36
70 #define MR_STR_E2E_DIS_BY_RCPT 37
71 #define MR_STR_ARCHIVEDCHATS 40
72 #define MR_STR_STARREDMSGS 41
73 
74 
75 /* should be set up by mrmailbox_new() */
76 extern mrmailbox_t* s_localize_mb_obj;
77 
78 
79 /* Return the string with the given ID by calling MR_EVENT_GET_STRING.
80 The result must be free()'d! */
81 char* mrstock_str (int id);
82 
83 
84 /* Replaces the first `%1$s` in the given String-ID by the given value.
85 The result must be free()'d! */
86 char* mrstock_str_repl_string (int id, const char* value);
87 char* mrstock_str_repl_int (int id, int value);
88 
89 
90 /* Replaces the first `%1$s` and `%2$s` in the given String-ID by the two given strings.
91 The result must be free()'d! */
92 char* mrstock_str_repl_string2 (int id, const char*, const char*);
93 
94 
95 /* Return a string with a correct plural form by callint MR_EVENT_GET_QUANTITY_STRING.
96 The result must be free()'d! */
97 char* mrstock_str_repl_pl (int id, int cnt);
98 
99 
100 #ifdef __cplusplus
101 } /* /extern "C" */
102 #endif
103 #endif /* __MRSTOCK_H__ */
104 
An object representing a single mailbox.
Definition: mrmailbox.h:178