Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
df28caa3
Commit
df28caa3
authored
Jan 21, 2014
by
Julien 'Lta' BALLET
Committed by
Jean-Baptiste Kempf
Jan 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extends lua's SD API to add a remove_node method, similar for remove_item
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
0eb37e84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
modules/lua/libs/sd.c
modules/lua/libs/sd.c
+16
-0
No files found.
modules/lua/libs/sd.c
View file @
df28caa3
...
...
@@ -319,6 +319,21 @@ static int vlclua_sd_remove_item( lua_State *L )
return
1
;
}
static
int
vlclua_sd_remove_node
(
lua_State
*
L
)
{
services_discovery_t
*
p_sd
=
(
services_discovery_t
*
)
vlclua_get_this
(
L
);
if
(
!
lua_isnil
(
L
,
1
)
)
{
input_item_t
**
pp_input
=
luaL_checkudata
(
L
,
1
,
"node"
);
if
(
*
pp_input
)
services_discovery_RemoveItem
(
p_sd
,
*
pp_input
);
/* Make sure we won't try to remove it again */
*
pp_input
=
NULL
;
}
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
);
...
...
@@ -458,6 +473,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_node"
,
vlclua_sd_remove_node
},
{
"remove_all_items_nodes"
,
vlclua_sd_remove_all_items_nodes
},
{
NULL
,
NULL
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment