D-Bus: The MPRIS uses a new services behavior to allow multiple mpris-enabled
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 2 Jul 2007 17:20:49 +0000 (17:20 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 2 Jul 2007 17:20:49 +0000 (17:20 +0000)
players to run simultaneously.
Thus the dbus service name is now org.mpris.vlc instead of org.freedesktop.MediaPlayer.
Patch by Mirsal ENNAIME.

modules/control/dbus.c
modules/control/dbus.h

index b2493a9..e8ad668 100644 (file)
@@ -326,7 +326,7 @@ DBUS_METHOD( Disconnect )
     DBusError error;
     int i;
     dbus_error_init( &error );
-    i = dbus_bus_release_name( p_conn, "org.freedesktop.MediaPlayer", &error );
+    i = dbus_bus_release_name( p_conn, "org.mpris.vlc", &error );
     if( ( i == -1 ) && ( dbus_error_is_set( &error ) ) )
     {
         msg_Err( (vlc_object_t*) p_this, "D-Bus disconnection failed : %s\n",
@@ -737,10 +737,10 @@ static int Open( vlc_object_t *p_this )
     }
 
     /* register a well-known name on the bus */
-    dbus_bus_request_name( p_conn, "org.freedesktop.MediaPlayer", 0, &error );
+    dbus_bus_request_name( p_conn, "org.mpris.vlc", 0, &error );
     if( dbus_error_is_set( &error ) )
     {
-        msg_Err( p_this, "Error requesting org.freedesktop.MediaPlayer service:"                " %s\n", error.message );
+        msg_Err( p_this, "Error requesting org.mpris.vlc service:"                " %s\n", error.message );
         dbus_error_free( &error );
         free( p_sys );
         return VLC_EGENERIC;
index ac7139a..9b4508a 100644 (file)
@@ -25,7 +25,7 @@
 /* DBUS IDENTIFIERS */
 
 /* name registered on the session bus */
-#define VLC_DBUS_SERVICE        "org.freedesktop.MediaPlayer"
+#define VLC_DBUS_SERVICE        "org.mpris.vlc"
 #define VLC_DBUS_INTERFACE      "org.freedesktop.MediaPlayer"
 #define VLC_DBUS_ROOT_PATH      "/"
 #define VLC_DBUS_PLAYER_PATH    "/Player"