]> git.sesse.net Git - vlc/commitdiff
Add services discovery handling in http interface.
authorAntoine Cellerier <dionoea@videolan.org>
Sat, 18 Mar 2006 00:29:57 +0000 (00:29 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sat, 18 Mar 2006 00:29:57 +0000 (00:29 +0000)
share/http/dialogs/playlist
share/http/images/sd.png [new file with mode: 0644]
share/http/js/functions.js
share/http/requests/status.xml
share/http/style.css

index 40ba0a0caa499225c7f52d14fe18e5c8ce297430..4eb89f577fa72354a8e2b14b382d628ed9240bbd 100644 (file)
@@ -65,6 +65,16 @@ This dialog needs the following dialogs to be fully functional: <none>
         <button onclick="pl_sort(0,1);hide_menu('menu_sort');" onmouseover="button_over(this);" onmouseout="button_out_menu(this);" title="Sort by Id descending" >Id reverse</button><br/>
       </div>
     </button>
+    <button id="btn_sd" onmouseover="show_menu('menu_sd');" onmouseout="hide_menu('menu_sd');" title="Services Discovery" >
+      <img src="images/sd.png" alt="Services Discovery" />
+      <span class="btn_text">Services Discovery</span>
+      <div id="menu_sd" class="menu" >
+        <vlc id="rpn" param1="services_discovery" />
+        <vlc id="foreach" param1="sd" param2="object" />
+        <button onclick="pl_sd('<vlc id="value" param1="sd" />');hide_menu('menu_sd');" onmouseover="button_over(this);" onmouseout="button_out_menu(this);" title="<vlc id="value" param1="sd.name" />" ><vlc id="value" param1="sd.name" /></button><br/>
+        <vlc id="end" />
+      </div>
+    </button>
   </div>
   <div id="playtree">
     (?)
diff --git a/share/http/images/sd.png b/share/http/images/sd.png
new file mode 100644 (file)
index 0000000..6e72704
Binary files /dev/null and b/share/http/images/sd.png differ
index 0e3d06c1964cd280ea29b2896742eb0567e7d627..5bab8699dc3e741a1dc1b2b4d67588c3c2183e11 100644 (file)
@@ -330,6 +330,10 @@ function pl_repeat()
 {
     loadXMLDoc( 'requests/status.xml?command=pl_repeat', parse_status );
 }
+function pl_sd( value )
+{
+    loadXMLDoc( 'requests/status.xml?command=pl_sd&val='+value, parse_status );
+}
 
 /* misc actions */
 function volume_down()
index 4f5f931bb68214a158cd11611b6c4af9a2df98df..5ee7a05d4a6b9674bd40525c9c8ccf822b1af43e 100644 (file)
   <vlc id="if" param1="command value 'pl_repeat' strcmp 0 =" />
     <vlc id="rpn" param1="'repeat' 'VLC_OBJECT_PLAYLIST' vlc_var_get 1 + 2 % 'repeat' 'VLC_OBJECT_PLAYLIST' vlc_var_set" />
   <vlc id="end" />
+  <vlc id="if" param1="command value 'pl_sd' strcmp 0 =" />
+    <vlc id="if" param1="val value services_discovery_is_loaded" />
+      <vlc id="rpn" param1="val value services_discovery_remove" />
+    <vlc id="else" />
+      <vlc id="rpn" param1="val value services_discovery_add" />
+    <vlc id="end" />
+  <vlc id="end" />
 
   <!-- misc commands -->
   <vlc id="if" param1="command value 'fullscreen' strcmp 0 =" />
index 0b3534611c8f7e5a6b02f001bdce0748afd06d67..56d4a30679df01741c43e7d27a3b41097ea44925 100644 (file)
@@ -124,6 +124,9 @@ div#infotree dt {
        text-decoration: underline;
 }
 
+div#playtree {
+       min-height: 150px;
+}
 div.pl_node {
        padding-left: 20px;
        font-style: italic;