policy-node.lua: Second round of cleanup.

- WirePlumber Lua now facilitates Lua libraries/modules, utilize this and create
  modules. Add some tests around this functionality.
- Create policy-hooks.lua containing all the hooks to find-target events
- Create policy-utils.lua module and push all the policy utility functions to it.
- Create common-utils.lua module and push the common utility functions to it.
- Remove all the above functionality from policy-node.lua and clean it up.
This commit is contained in:
Ashok Sidipotu
2022-08-16 06:05:55 +05:30
committed by Julian Bouzas
parent 3832e14c1c
commit 72536261e9
9 changed files with 1034 additions and 815 deletions

View File

@@ -1675,8 +1675,8 @@ event_dispatcher_push_event (lua_State *L)
g_autoptr (WpEventDispatcher) dispatcher =
wp_event_dispatcher_get_instance (get_wp_core (L));
WpEvent *event = wp_event_new (type, priority, properties, source, subject);
wp_event_dispatcher_push_event (dispatcher, event);
wplua_pushboxed (L, WP_TYPE_EVENT, wp_event_ref (event));
wp_event_dispatcher_push_event (dispatcher, wp_event_ref (event));
wplua_pushboxed (L, WP_TYPE_EVENT, event);
return 0;
}