Commit 3b4214c5 authored by Edward Wang's avatar Edward Wang Committed by Jean-Baptiste Kempf

Add vlc.sd.remove_all_items_nodes()

LUA SD: Add vlc.sd.remove_all_items_nodes() to make it easier for LUA script writers.
Close #3397
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 561d5ca2
...@@ -292,6 +292,13 @@ static int vlclua_sd_remove_item( lua_State *L ) ...@@ -292,6 +292,13 @@ static int vlclua_sd_remove_item( lua_State *L )
return 1; return 1;
} }
static int vlclua_sd_remove_all_items_nodes( lua_State *L )
{
services_discovery_t *p_sd = (services_discovery_t *)vlclua_get_this( L );
services_discovery_RemoveAll( p_sd );
return 1;
}
static int vlclua_node_add_subitem( lua_State *L ) static int vlclua_node_add_subitem( lua_State *L )
{ {
services_discovery_t *p_sd = (services_discovery_t *)vlclua_get_this( L ); services_discovery_t *p_sd = (services_discovery_t *)vlclua_get_this( L );
...@@ -417,6 +424,7 @@ static const luaL_Reg vlclua_sd_reg[] = { ...@@ -417,6 +424,7 @@ static const luaL_Reg vlclua_sd_reg[] = {
{ "add_node", vlclua_sd_add_node }, { "add_node", vlclua_sd_add_node },
{ "add_item", vlclua_sd_add_item }, { "add_item", vlclua_sd_add_item },
{ "remove_item", vlclua_sd_remove_item }, { "remove_item", vlclua_sd_remove_item },
{ "remove_all_items_nodes", vlclua_sd_remove_all_items_nodes },
{ NULL, NULL } { NULL, NULL }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment