device: add new wp_spa_device_managed_object_new_iterator API

This commit is contained in:
Julian Bouzas
2022-06-16 15:27:31 -04:00
committed by George Kiagiadakis
parent c86410e708
commit 04198820f1
3 changed files with 29 additions and 0 deletions

View File

@@ -910,6 +910,14 @@ spa_device_new (lua_State *L)
return d ? 1 : 0;
}
static int
spa_device_iterate_managed_objects (lua_State *L)
{
WpSpaDevice *device = wplua_checkobject (L, 1, WP_TYPE_SPA_DEVICE);
WpIterator *it = wp_spa_device_new_managed_object_iterator (device);
return push_wpiterator (L, it);
}
static int
spa_device_get_managed_object (lua_State *L)
{
@@ -934,6 +942,7 @@ spa_device_store_managed_object (lua_State *L)
}
static const luaL_Reg spa_device_methods[] = {
{ "iterate_managed_objects", spa_device_iterate_managed_objects },
{ "get_managed_object", spa_device_get_managed_object },
{ "store_managed_object", spa_device_store_managed_object },
{ NULL, NULL }