event-hook: remove the exec type property & enumeration

With the latest changes, we can implement the "after-events" type
with external code that pushes a very low priority event that is
the "rescan" event.
This commit is contained in:
George Kiagiadakis
2022-11-24 17:39:21 +02:00
committed by Julian Bouzas
parent bcb4e80723
commit b100bdda4a
25 changed files with 49 additions and 242 deletions

View File

@@ -592,7 +592,7 @@ wp_default_nodes_enable (WpPlugin * plugin, WpTransition * transition)
/* default metadata added */
hook = wp_simple_event_hook_new ("metadata-added@default-nodes",
WP_EVENT_HOOK_PRIORITY_NORMAL, WP_EVENT_HOOK_EXEC_TYPE_ON_EVENT,
WP_EVENT_HOOK_PRIORITY_NORMAL,
g_cclosure_new ((GCallback) on_metadata_added, self, NULL));
wp_interest_event_hook_add_interest (WP_INTEREST_EVENT_HOOK (hook),
WP_CONSTRAINT_TYPE_PW_PROPERTY, "event.type", "=s", "metadata-added",
@@ -603,7 +603,7 @@ wp_default_nodes_enable (WpPlugin * plugin, WpTransition * transition)
/* default metadata changed */
hook = wp_simple_event_hook_new ("metadata-changed@default-nodes",
WP_EVENT_HOOK_PRIORITY_NORMAL, WP_EVENT_HOOK_EXEC_TYPE_ON_EVENT,
WP_EVENT_HOOK_PRIORITY_NORMAL,
g_cclosure_new ((GCallback) on_metadata_changed, self, NULL));
wp_interest_event_hook_add_interest (WP_INTEREST_EVENT_HOOK (hook),
@@ -632,7 +632,7 @@ wp_default_nodes_enable (WpPlugin * plugin, WpTransition * transition)
/* register rescan hook as an after event */
hook = wp_simple_event_hook_new("rescan@default-nodes",
WP_EVENT_HOOK_PRIORITY_NORMAL, WP_EVENT_HOOK_EXEC_TYPE_AFTER_EVENTS,
WP_EVENT_HOOK_PRIORITY_NORMAL,
g_cclosure_new ((GCallback) rescan, self, NULL));
/* default.configured.audio.sink changed */