| 1 |
/* WirePlumber |
| 2 |
* |
| 3 |
* Copyright © 2022 Collabora Ltd. |
| 4 |
* @author George Kiagiadakis <[email protected]> |
| 5 |
* |
| 6 |
* SPDX-License-Identifier: MIT |
| 7 |
*/ |
| 8 |
|
| 9 |
#ifndef __WIREPLUMBER_EVENT_DISPATCHER_H__ |
| 10 |
#define __WIREPLUMBER_EVENT_DISPATCHER_H__ |
| 11 |
|
| 12 |
#include "core.h" |
| 13 |
#include "event.h" |
| 14 |
#include "event-hook.h" |
| 15 |
|
| 16 |
G_BEGIN_DECLS |
| 17 |
|
| 18 |
/*! \defgroup wpeventdispatcher WpEventDispatcher */ |
| 19 |
/*! |
| 20 |
* \struct WpEventDispatcher |
| 21 |
* |
| 22 |
* The event dispatcher holds all the events and hooks and dispatches them. It orchestras the show on event stack. |
| 23 |
*/ |
| 24 |
#define WP_TYPE_EVENT_DISPATCHER (wp_event_dispatcher_get_type ()) |
| 25 |
WP_API |
| 26 |
G_DECLARE_FINAL_TYPE (WpEventDispatcher, wp_event_dispatcher, |
| 27 |
WP, EVENT_DISPATCHER, GObject) |
| 28 |
|
| 29 |
WP_API |
| 30 |
WpEventDispatcher * wp_event_dispatcher_get_instance (WpCore * core); |
| 31 |
|
| 32 |
WP_API |
| 33 |
void wp_event_dispatcher_push_event (WpEventDispatcher * self, WpEvent * event); |
| 34 |
|
| 35 |
WP_API |
| 36 |
void wp_event_dispatcher_register_hook (WpEventDispatcher * self, |
| 37 |
WpEventHook * hook); |
| 38 |
|
| 39 |
WP_API |
| 40 |
void wp_event_dispatcher_unregister_hook (WpEventDispatcher * self, |
| 41 |
WpEventHook * hook); |
| 42 |
|
| 43 |
WP_API |
| 44 |
WpIterator * wp_event_dispatcher_new_hooks_iterator (WpEventDispatcher * self) |
| 45 |
G_GNUC_DEPRECATED_FOR (wp_event_dispatcher_new_hooks_for_event_type_iterator); |
| 46 |
|
| 47 |
WP_API |
| 48 |
WpIterator * wp_event_dispatcher_new_hooks_for_event_type_iterator ( |
| 49 |
WpEventDispatcher * self, const gchar *event_type); |
| 50 |
|
| 51 |
G_END_DECLS |
| 52 |
|
| 53 |
#endif |