![]() |
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 () |
| 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.
This is similar to dc_get_event_emitter(), which, however, must not be called for accounts handled by the account manager.
| The | event channel. |
Note: Use only one event emitter per account manager / event channel. The result of having multiple event emitters is unspecified. Currently events are broadcasted to all existing event emitters, but previous versions delivered events to only one event emitter and this behavior may change again in the future. Events emitted before creation of event emitter are not available to event emitter.
| dc_event_channel_t * dc_event_channel_new | ( | ) |
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.