Delta Chat Core C Interface
|
Opaque object describing a single event. More...
#include <deltachat.h>
Public Member Functions | |
uint32_t | dc_event_get_account_id (dc_event_t *event) |
Get the account ID this event belongs to. | |
int | dc_event_get_data1_int (dc_event_t *event) |
Get data associated with an event object. | |
char * | dc_event_get_data1_str (dc_event_t *event) |
Get data associated with an event object. | |
int | dc_event_get_data2_int (dc_event_t *event) |
Get data associated with an event object. | |
char * | dc_event_get_data2_str (dc_event_t *event) |
Get data associated with an event object. | |
int | dc_event_get_id (dc_event_t *event) |
Get the event ID from an event object. | |
void | dc_event_unref (dc_event_t *event) |
Free memory used by an event object. | |
Opaque object describing a single event.
To get events, call dc_get_next_event() on an event emitter created by dc_get_event_emitter().
uint32_t dc_event_get_account_id | ( | dc_event_t * | event | ) |
Get the account ID this event belongs to.
The account ID is of interest only when using the dc_accounts_t account manager. To get the context object belonging to the event, use dc_accounts_get_account().
event | The event object as returned from dc_get_next_event(). |
int dc_event_get_data1_int | ( | dc_event_t * | event | ) |
Get data associated with an event object.
The meaning of the data depends on the event ID returned as DC_EVENT constants by dc_event_get_id(). See also dc_event_get_data2_int() and dc_event_get_data2_str().
event | Event object as returned from dc_get_next_event(). |
char * dc_event_get_data1_str | ( | dc_event_t * | event | ) |
Get data associated with an event object.
The meaning of the data depends on the event ID returned as DC_EVENT constants.
event | Event object as returned from dc_get_next_event(). |
int dc_event_get_data2_int | ( | dc_event_t * | event | ) |
Get data associated with an event object.
The meaning of the data depends on the event ID returned as DC_EVENT constants by dc_event_get_id(). See also dc_event_get_data2_int() and dc_event_get_data2_str().
event | Event object as returned from dc_get_next_event(). |
char * dc_event_get_data2_str | ( | dc_event_t * | event | ) |
Get data associated with an event object.
The meaning of the data depends on the event ID returned as DC_EVENT constants.
event | Event object as returned from dc_get_next_event(). |
int dc_event_get_id | ( | dc_event_t * | event | ) |
Get the event ID from an event object.
The event ID is one of the DC_EVENT constants. There may be additional data belonging to an event, to get them, use dc_event_get_data1_int(), dc_event_get_data2_int() and dc_event_get_data2_str().
event | Event object as returned from dc_get_next_event(). |
void dc_event_unref | ( | dc_event_t * | event | ) |
Free memory used by an event object.
If you forget to do this for an event, this will result in memory leakage.
event | Event object as returned from dc_get_next_event(). |