Changeset c6e29a7dda6734857ce5e28d03ea953b9e12fe35
- Timestamp:
- 05/15/06 07:57:19
(2 years ago)
- Author:
- Clément Stenac <zorglub@videolan.org>
- git-committer:
- Clément Stenac <zorglub@videolan.org> 1147672639 +0000
- git-parent:
[28bd3a4a6af005742657f8a0ea7fa92a4fef0618]
- git-author:
- Clément Stenac <zorglub@videolan.org> 1147672639 +0000
- Message:
New helper to create nodes for services discovery
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| red0b72e |
rc6e29a7 |
|
| 280 | 280 | VLC_EXPORT( int, playlist_NodeDelete, ( playlist_t *, playlist_item_t *, vlc_bool_t , vlc_bool_t ) ); |
|---|
| 281 | 281 | VLC_EXPORT( int, playlist_NodeEmpty, ( playlist_t *, playlist_item_t *, vlc_bool_t ) ); |
|---|
| | 282 | VLC_EXPORT( void, playlist_NodesCreateForSD, (playlist_t *, char *, playlist_item_t **, playlist_item_t ** ) ); |
|---|
| 282 | 283 | |
|---|
| 283 | 284 | /* Tree walking - These functions are only for playlist, not plugins */ |
|---|
| red0b72e |
rc6e29a7 |
|
| 513 | 513 | int (*__intf_UserOkayCancel_inner) (vlc_object_t*, const char*, const char*); |
|---|
| 514 | 514 | int (*__intf_UserStringInput_inner) (vlc_object_t*, const char*, const char*, char **); |
|---|
| | 515 | void (*playlist_NodesCreateForSD_inner) (playlist_t *, char *, playlist_item_t **, playlist_item_t **); |
|---|
| 515 | 516 | }; |
|---|
| 516 | 517 | # if defined (__PLUGIN__) |
|---|
| … | … | |
| 980 | 981 | # define __intf_UserOkayCancel (p_symbols)->__intf_UserOkayCancel_inner |
|---|
| 981 | 982 | # define __intf_UserStringInput (p_symbols)->__intf_UserStringInput_inner |
|---|
| | 983 | # define playlist_NodesCreateForSD (p_symbols)->playlist_NodesCreateForSD_inner |
|---|
| 982 | 984 | # elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__) |
|---|
| 983 | 985 | /****************************************************************** |
|---|
| … | … | |
| 1450 | 1452 | ((p_symbols)->__intf_UserOkayCancel_inner) = __intf_UserOkayCancel; \ |
|---|
| 1451 | 1453 | ((p_symbols)->__intf_UserStringInput_inner) = __intf_UserStringInput; \ |
|---|
| | 1454 | ((p_symbols)->playlist_NodesCreateForSD_inner) = playlist_NodesCreateForSD; \ |
|---|
| 1452 | 1455 | (p_symbols)->net_ConvertIPv4_deprecated = NULL; \ |
|---|
| 1453 | 1456 | (p_symbols)->playlist_ItemAddParent_deprecated = NULL; \ |
|---|
| r2cb472d |
rc6e29a7 |
|
| 63 | 63 | { |
|---|
| 64 | 64 | /* playlist node */ |
|---|
| 65 | | playlist_item_t *p_node; |
|---|
| | 65 | playlist_item_t *p_node_cat, *p_node_one; |
|---|
| 66 | 66 | playlist_t *p_playlist; |
|---|
| 67 | 67 | |
|---|
| … | … | |
| 303 | 303 | } |
|---|
| 304 | 304 | |
|---|
| 305 | | p_view = playlist_ViewFind( p_sys->p_playlist, VIEW_CATEGORY ); |
|---|
| 306 | | p_sys->p_node = playlist_NodeCreate( p_sys->p_playlist, VIEW_CATEGORY, |
|---|
| 307 | | _("Bonjour"), p_view->p_root ); |
|---|
| 308 | | |
|---|
| 309 | | p_sys->p_node->i_flags |= PLAYLIST_RO_FLAG; |
|---|
| 310 | | val.b_bool = VLC_TRUE; |
|---|
| 311 | | var_Set( p_sys->p_playlist, "intf-change", val ); |
|---|
| 312 | | |
|---|
| | 305 | playlist_NodesCreateForSD( p_playlist, _("Bonjour"), &p_sys->p_node_cat, |
|---|
| | 306 | &p_sys->p_node_one ); |
|---|
| 313 | 307 | p_sd->pf_run = Run; |
|---|
| 314 | 308 | |
|---|
| red0b72e |
rc6e29a7 |
|
| 128 | 128 | } |
|---|
| 129 | 129 | |
|---|
| 130 | | p_sys->p_node_cat = playlist_NodeCreate( p_playlist, _("Devices"), |
|---|
| 131 | | p_playlist->p_root_category ); |
|---|
| 132 | | p_sys->p_node_cat->i_flags |= PLAYLIST_RO_FLAG; |
|---|
| 133 | | p_sys->p_node_one = playlist_NodeCreate( p_playlist, _("Devices"), |
|---|
| 134 | | p_playlist->p_root_onelevel ); |
|---|
| 135 | | p_sys->p_node_one->i_flags |= PLAYLIST_RO_FLAG; |
|---|
| 136 | | |
|---|
| 137 | | val.b_bool = VLC_TRUE; |
|---|
| 138 | | var_Set( p_playlist, "intf-change", val ); |
|---|
| 139 | | |
|---|
| | 130 | playlist_NodesCreateForSD( p_playlist, _("Devices"), |
|---|
| | 131 | &p_sys->p_node_cat, &p_sys->p_node_one ); |
|---|
| 140 | 132 | vlc_object_release( p_playlist ); |
|---|
| 141 | 133 | |
|---|
| red0b72e |
rc6e29a7 |
|
| 319 | 319 | return VLC_EGENERIC; |
|---|
| 320 | 320 | } |
|---|
| 321 | | p_sys->p_node_cat = playlist_NodeCreate( p_sys->p_playlist, |
|---|
| 322 | | _("SAP sessions"), |
|---|
| 323 | | p_sys->p_playlist->p_root_category ); |
|---|
| 324 | | p_sys->p_node_cat->i_flags |= PLAYLIST_RO_FLAG; |
|---|
| 325 | | p_sys->p_node_cat->i_flags |= PLAYLIST_SKIP_FLAG; |
|---|
| 326 | | |
|---|
| 327 | | p_sys->p_node_one = playlist_NodeCreate( p_sys->p_playlist, |
|---|
| 328 | | _("SAP sessions"), |
|---|
| 329 | | p_sys->p_playlist->p_root_onelevel ); |
|---|
| 330 | | p_sys->p_node_one->i_flags |= PLAYLIST_RO_FLAG; |
|---|
| 331 | | p_sys->p_node_one->i_flags |= PLAYLIST_SKIP_FLAG; |
|---|
| 332 | | |
|---|
| 333 | | val.b_bool = VLC_TRUE; |
|---|
| 334 | | var_Set( p_sys->p_playlist, "intf-change", val ); |
|---|
| | 321 | |
|---|
| | 322 | playlist_NodesCreateForSD( p_sys->p_playlist, _("SAP sessions"), |
|---|
| | 323 | &p_sys->p_node_cat, &p_sys->p_node_one ); |
|---|
| 335 | 324 | |
|---|
| 336 | 325 | p_sys->i_announces = 0; |
|---|
| re0e7b2e |
rc6e29a7 |
|
| 293 | 293 | } |
|---|
| 294 | 294 | |
|---|
| | 295 | |
|---|
| | 296 | void playlist_NodesCreateForSD( playlist_t *p_playlist, char *psz_name, |
|---|
| | 297 | playlist_item_t **pp_node_cat, |
|---|
| | 298 | playlist_item_t **pp_node_one ) |
|---|
| | 299 | { |
|---|
| | 300 | *pp_node_cat = playlist_NodeCreate( p_playlist, psz_name, |
|---|
| | 301 | p_playlist->p_root_category ); |
|---|
| | 302 | (*pp_node_cat)->i_flags |= PLAYLIST_RO_FLAG; |
|---|
| | 303 | (*pp_node_cat)->i_flags |= PLAYLIST_SKIP_FLAG; |
|---|
| | 304 | |
|---|
| | 305 | *pp_node_one = playlist_NodeCreate( p_playlist, psz_name, |
|---|
| | 306 | p_playlist->p_root_onelevel ); |
|---|
| | 307 | (*pp_node_one)->i_flags |= PLAYLIST_RO_FLAG; |
|---|
| | 308 | (*pp_node_one)->i_flags |= PLAYLIST_SKIP_FLAG; |
|---|
| | 309 | } |
|---|
| | 310 | |
|---|
| | 311 | |
|---|
| 295 | 312 | /********************************************************************** |
|---|
| 296 | 313 | * Tree walking functions |
|---|