Delta Chat Core C-API
Macros
mrevent.h File Reference

The following constants are used as events reported to the callback given to mrmailbox_new(). More...

Go to the source code of this file.

Macros

#define MR_EVENT_INFO   100
 The user may write an informational string to the log. More...
 
#define MR_EVENT_WARNING   300
 The user should write an warning string to the log. More...
 
#define MR_EVENT_ERROR   400
 The user should show an error. More...
 
#define MR_EVENT_MSGS_CHANGED   2000
 One or more messages changed for some reasons in the database. More...
 
#define MR_EVENT_INCOMING_MSG   2005
 There is a fresh message. More...
 
#define MR_EVENT_MSG_DELIVERED   2010
 A single message is send successfully (state changed from MR_STATE_OUT_PENDING to MR_STATE_OUT_DELIVERED, see mrmsg_t::m_state). More...
 
#define MR_EVENT_MSG_READ   2015
 A single message is read by the receiver (state changed from MR_STATE_OUT_DELIVERED to MR_STATE_OUT_MDN_RCVD, see mrmsg_t::m_state). More...
 
#define MR_EVENT_CHAT_MODIFIED   2020
 group name/image changed or members added/removed
 
#define MR_EVENT_CONTACTS_CHANGED   2030
 contact(s) created, renamed, blocked or deleted
 
#define MR_EVENT_CONFIGURE_ENDED   2040
 connection state changed, data1=0:failed-not-connected, 1:configured-and-connected
 
#define MR_EVENT_CONFIGURE_PROGRESS   2041
 data1=percent
 
#define MR_EVENT_IMEX_ENDED   2050
 mrmailbox_imex() done: data1=0:failed, 1=success
 
#define MR_EVENT_IMEX_PROGRESS   2051
 data1=permille
 
#define MR_EVENT_IMEX_FILE_WRITTEN   2052
 file written, event may be needed to make the file public to some system services. More...
 
#define MR_EVENT_IS_ONLINE   2080
 check, if the system is online currently ret=0: not online, ret=1: online
 
#define MR_EVENT_GET_STRING   2091
 get a string from the frontend, data1=MR_STR_*, ret=string which will be free()'d by the backend
 
#define MR_EVENT_GET_QUANTITY_STRING   2092
 synchronous http/https(!) call, data1=url, ret=content which will be free()'d by the backend, 0 on errors
 
#define MR_EVENT_HTTP_GET   2100
 synchronous http/https(!) call, data1=url, ret=content which will be free()'d by the backend, 0 on errors
 
#define MR_EVENT_WAKE_LOCK   2110
 acquire wakeLock (data1=1) or release it (data1=0), the backend does not make nested or unsynchronized calls
 

Detailed Description

The following constants are used as events reported to the callback given to mrmailbox_new().

Macro Definition Documentation

#define MR_EVENT_ERROR   400

The user should show an error.

The error must be reported to the user by a non-disturbing bubble or so.

Parameters
data10
data2Error string
Returns
0
#define MR_EVENT_IMEX_FILE_WRITTEN   2052

file written, event may be needed to make the file public to some system services.

data1=file name, data2=mime type

#define MR_EVENT_INCOMING_MSG   2005

There is a fresh message.

Typically, the user will show an notification when receiving this message.

Parameters
data1chat_id
data2msg_id
Returns
0
#define MR_EVENT_INFO   100

The user may write an informational string to the log.

Passed to the callback given to mrmailbox_new(). This event should not be reported using a popup or something like that.

Parameters
data10
data2Info string
Returns
0
#define MR_EVENT_MSG_DELIVERED   2010

A single message is send successfully (state changed from MR_STATE_OUT_PENDING to MR_STATE_OUT_DELIVERED, see mrmsg_t::m_state).

Parameters
data1chat_id
data2msg_id
Returns
0
#define MR_EVENT_MSG_READ   2015

A single message is read by the receiver (state changed from MR_STATE_OUT_DELIVERED to MR_STATE_OUT_MDN_RCVD, see mrmsg_t::m_state).

Parameters
data1chat_id
data2msg_id
Returns
0
#define MR_EVENT_MSGS_CHANGED   2000

One or more messages changed for some reasons in the database.

Messages may be added or removed.

Parameters
data1chat_id for single added messages
data2msg_id for single added messages
Returns
0
#define MR_EVENT_WARNING   300

The user should write an warning string to the log.

Passed to the callback given to mrmailbox_new(). This event should not be reported using a popup or something like that.

Parameters
data10
data2Warning string
Returns
0