Delta Chat Core C Interface
Public Member Functions | List of all members
dc_event_emitter_t Class Reference

#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(). If you are using the dc_accounts_t account manager, dc_accounts_event_emitter_t must be used instead.

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.
Returns
None.

◆ 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 the 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: