Delta Chat Core C Interface
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dc_event_emitter_t Class Reference

Opaque object that is used to get events from a single context. More...

#include <deltachat.h>

Public Member Functions

void dc_event_emitter_unref (dc_event_emitter_t *emitter)
 Free a context event emitter object. More...
 
dc_event_tdc_get_next_event (dc_event_emitter_t *emitter)
 Get the next event from a context event emitter object. More...
 

Detailed Description

Opaque object that is used to get events from a single context.

You can get an event emitter from a context using dc_get_event_emitter() or dc_accounts_get_event_emitter().

Member Function Documentation

◆ dc_event_emitter_unref()

void dc_event_emitter_unref ( dc_event_emitter_t emitter)

Free a context event emitter object.

Parameters
emitterEvent emitter object as returned from dc_get_event_emitter(). If NULL is given, nothing is done and an error is logged.

◆ dc_get_next_event()

dc_event_t * dc_get_next_event ( dc_event_emitter_t emitter)

Get the next event from a context event emitter object.

Parameters
emitterEvent emitter object as returned from dc_get_event_emitter().
Returns
An event as an dc_event_t object. You can query the event for information using dc_event_get_id(), dc_event_get_data1_int() and so on; if you are done with the event, you have to free the event using dc_event_unref(). If NULL is returned, the context belonging to the event emitter is unref'd and no more events will come; in this case, free the event emitter using dc_event_emitter_unref().

The documentation for this class was generated from the following file: