![]() |
Delta Chat Core C Interface
|
Opaque object that is used to create an event emitter which can be used log events during startup of an accounts manger. More...
#include <deltachat.h>
Public Member Functions | |
| dc_event_emitter_t * | dc_event_channel_get_event_emitter (dc_event_channel_t *event_channel) |
| Create the event emitter that is used to receive events. | |
| dc_event_channel_t * | dc_event_channel_new (void) |
| Create a new event channel. | |
| void | dc_event_channel_unref (dc_event_channel_t *event_channel) |
| Release/free the events channel structure. | |
Opaque object that is used to create an event emitter which can be used log events during startup of an accounts manger.
Only used for dc_accounts_new_with_event_channel(). To use it:
dc_event_channel_new().dc_event_channel_get_event_emitter().dc_accounts_new_with_event_channel(), which consumes the channel.dc_event_channel_unref(). | dc_event_emitter_t * dc_event_channel_get_event_emitter | ( | dc_event_channel_t * | event_channel | ) |
Create the event emitter that is used to receive events.
The library will emit various DC_EVENT events, such as "new message", "message read" etc. To get these events, you have to create an event emitter using this function and call dc_get_next_event() on the emitter.
Events are broadcasted to all existing event emitters. Events emitted before creation of event emitter are not available to event emitter.
| The | event channel. |
| dc_event_channel_t * dc_event_channel_new | ( | void | ) |
Create a new event channel.
| void dc_event_channel_unref | ( | dc_event_channel_t * | event_channel | ) |
Release/free the events channel structure.
This function releases the memory of the dc_event_channel_t structure.
you can call it after calling dc_accounts_new_with_event_channel, which took the events channel out of it already, so this just frees the underlying option.