[vlc-devel] Question about input_item_node_* functions
Jakob Leben
jakob.leben at gmail.com
Wed Jun 9 04:35:00 CEST 2010
On Wed, Jun 9, 2010 at 4:14 AM, Austin Burrow <atburrow at gmail.com> wrote:
> One solution would be to check each item from the old list and check if
> it's in the new list, if not, simply delete it and move on. But it is not
> possible with input_item_node_* and please correct me if I'm wrong, but it
> doesn't look like services_discovery_RemoveItem is capable of removing a
> sub-item of "MyUPnPServer" without removing "MyUPnPServer" as well.
Thanks for the explanation!
No, indeed services_discovery_RemoveItem does allow removing any item at any
level of hierarchy. But it will also delete the top node (in your example
"MyUPnPServer", or the "category" node if you think of
services_discovery_AddItem) when the last child of it is being deleted.
(This functionality is necessary in a normal case when a SD module uses
strictly only the two SD functions to add and remove items)
So using services_discovery_RemoveItem( ) should work for you, but keeping
in mind that the top node has to always contain at least 1 item if you don't
want it to be removed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100609/48d887a6/attachment.html>
More information about the vlc-devel
mailing list