[vlc-commits] Add vlc.sd.remove_all_items_nodes()

Edward Wang git at videolan.org
Fri Mar 16 00:52:47 CET 2012


vlc | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Tue Jan 10 19:12:18 2012 -0500| [3b4214c51ae85e8bc9557eef956ad34957771054] | committer: 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: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3b4214c51ae85e8bc9557eef956ad34957771054
---

 modules/lua/libs/sd.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/modules/lua/libs/sd.c b/modules/lua/libs/sd.c
index 48a2434..e1325e6 100644
--- a/modules/lua/libs/sd.c
+++ b/modules/lua/libs/sd.c
@@ -292,6 +292,13 @@ static int vlclua_sd_remove_item( lua_State *L )
     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 )
 {
     services_discovery_t *p_sd = (services_discovery_t *)vlclua_get_this( L );
@@ -417,6 +424,7 @@ static const luaL_Reg vlclua_sd_reg[] = {
     { "add_node", vlclua_sd_add_node },
     { "add_item", vlclua_sd_add_item },
     { "remove_item", vlclua_sd_remove_item },
+    { "remove_all_items_nodes", vlclua_sd_remove_all_items_nodes },
     { NULL, NULL }
 };
 



More information about the vlc-commits mailing list