Commit Graph

25 Commits

Author SHA1 Message Date
George Kiagiadakis
d6ea7ffe76 lua/api: fix client update_permissions()
* the type checks were wrong, it was requiring the key to be string
  and the value integer
* add the ability to use "any" or "all" for a key, saving us the trouble
  of passing -1 from lua (int64) into a uint32 (ugh!)
* use a GArray instead of manual malloc/realloc
* allocate the array as late as possible, to minimize the risk of leaking
  its memory if we hit luaL_error()
2021-02-18 16:41:42 +02:00
George Kiagiadakis
6c85b8958d lua/api: log using a debug category unique for the calling script file
filename: foo.lua -> category: script/foo
2021-02-18 12:52:39 +02:00
George Kiagiadakis
cb8a8936aa lua/api: ensure the function name in the debug output is non-null
NULL crashes the journald writer
2021-02-18 12:24:01 +02:00
Raghavendra
c791ed3a62 m-lua-scripting: add WpPipewireObject api 2021-02-16 20:15:13 +05:30
George Kiagiadakis
807103e9df lua/api: add wp_object_interest_matches() binding 2021-02-13 11:55:00 +02:00
Julian Bouzas
f693e1a4c7 m-lua-scripting: add WpClient LUA api 2021-02-12 14:28:32 -05:00
Julian Bouzas
dc2ad1f25d rename all foo_iterate APIs to foo_new_iterator
Avoids confusion with LUA iterate API
2021-02-05 11:33:23 -05:00
George Kiagiadakis
148a33187e m-lua-scripting/api: fix om:lookup() to return nil when no object was found 2021-02-05 12:03:41 +02:00
George Kiagiadakis
d94b0a2f0c scripts: add suspend-node.lua to replace m-node-suspension
... plus the necessary API for it to work
2021-02-05 12:03:07 +02:00
Julian Bouzas
81163a52c0 m-lua-scripting: add WpSpaPod api 2021-02-05 08:47:27 +00:00
George Kiagiadakis
651b4b7377 m-lua-scripting/api: add wp_object_manager_iterate_filtered() 2021-02-04 17:31:25 +02:00
George Kiagiadakis
096a9b4c15 proxy: add a method to query the interface type 2021-02-04 16:51:25 +02:00
George Kiagiadakis
e0f1c8710f daemon: add a mode to execute lua scripts from the command line
This can be useful for quick testing of scripts, or to build small
utilities that do something in pipewire utilizing our lua API
2021-02-04 16:44:56 +02:00
George Kiagiadakis
02142b899b m-lua-scripting/api: add WpCore bindings 2021-02-04 13:52:24 +02:00
George Kiagiadakis
fb5706eacc m-lua-scripting/api: fix access to core in session_item_new() 2021-02-03 18:02:03 +02:00
George Kiagiadakis
03b17bcb5f m-lua-scripting/api: add WpImplSession bindings 2021-02-03 17:16:51 +02:00
George Kiagiadakis
460ff6591d wplua: allow exchanging arguments and results with scripts 2021-02-03 17:16:51 +02:00
George Kiagiadakis
13a56a7472 lua: add wp_plugin_find binding 2021-01-26 16:36:47 +02:00
Julian Bouzas
62f819013d m-lua-scripting: add session item lua API 2021-01-22 10:04:37 -05:00
Julian Bouzas
823abe03ee m-lua-scripting: fix reference count in object manager's lookup API 2021-01-21 07:47:08 -05:00
George Kiagiadakis
b8f8238fb4 lua: fix some nasty memory leaks 2021-01-21 09:42:07 +02:00
George Kiagiadakis
b88ff15725 m-lua-scripting: add bindings required for device monitors
WpDevice, WpSpaDevice, WpNode, WpImplNode, WpObject and object features
2021-01-21 09:42:07 +02:00
Julian Bouzas
d96c856f28 m-lua-scripting: handle default endpoints from the metadata 2021-01-15 08:59:13 -05:00
George Kiagiadakis
680b0a7d93 m-lua-scripting: expose session, endpoint, endpoint-link APIs
... and make WpIterator Lua-friendly so that it can be used
with the generic for loop
2020-12-22 11:35:04 +02:00
George Kiagiadakis
879f771d7f modules: implement module-lua-scripting
a module that allows loading and executing Lua
scripts from a configured directory
2020-12-20 18:10:22 +02:00