dbus: Remove legacy mpris1 signals from the tracklist implementation
authorMirsal Ennaime <mirsal@mirsal.fr>
Sat, 4 Jun 2011 15:56:44 +0000 (17:56 +0200)
committerMirsal Ennaime <mirsal@mirsal.fr>
Sat, 4 Jun 2011 18:38:49 +0000 (20:38 +0200)
modules/control/dbus/dbus_tracklist.c
modules/control/dbus/dbus_tracklist.h

index ee00421..d8e6e08 100644 (file)
@@ -289,26 +289,6 @@ DBUS_METHOD( CanEditTracks )
     REPLY_SEND;
 }
 
-/******************************************************************************
- * TrackListChange: tracklist order / length change signal
- *****************************************************************************/
-DBUS_SIGNAL( TrackListChangeSignal )
-{ /* emit the new tracklist lengh */
-    SIGNAL_INIT( DBUS_MPRIS_TRACKLIST_INTERFACE,
-                 DBUS_MPRIS_TRACKLIST_PATH,
-                 "TrackListChange");
-
-    OUT_ARGUMENTS;
-
-    playlist_t *p_playlist = ((intf_thread_t*)p_data)->p_sys->p_playlist;
-    PL_LOCK;
-    dbus_int32_t i_elements = p_playlist->current.i_size;
-    PL_UNLOCK;
-
-    ADD_INT32( &i_elements );
-    SIGNAL_SEND;
-}
-
 #define PROPERTY_MAPPING_BEGIN if( 0 ) {}
 #define PROPERTY_FUNC( interface, property, function ) \
     else if( !strcmp( psz_interface_name, interface ) && \
@@ -373,37 +353,6 @@ handle_tracklist ( DBusConnection *p_conn, DBusMessage *p_from, void *p_this )
     return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 }
 
-/*****************************************************************************
- * TrackListChangeEmit: Emits the TrackListChange signal
- *****************************************************************************/
-/* FIXME: It is not called on tracklist reordering */
-int TrackListChangeEmit( intf_thread_t *p_intf, int signal, int i_node )
-{
-    // "playlist-item-append"
-    if( signal == SIGNAL_PLAYLIST_ITEM_APPEND )
-    {
-        /* don't signal when items are added/removed in p_category */
-        playlist_t *p_playlist = p_intf->p_sys->p_playlist;
-        PL_LOCK;
-        playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_node );
-        assert( p_item );
-        while( p_item->p_parent )
-            p_item = p_item->p_parent;
-        if( p_item == p_playlist->p_root_category )
-        {
-            PL_UNLOCK;
-            return VLC_SUCCESS;
-        }
-        PL_UNLOCK;
-    }
-
-    if( p_intf->p_sys->b_dead )
-        return VLC_SUCCESS;
-
-    TrackListChangeSignal( p_intf->p_sys->p_conn, p_intf );
-    return VLC_SUCCESS;
-}
-
 #undef METHOD_FUNC
 
 /**
index ec6d945..5aba14a 100644 (file)
@@ -39,12 +39,6 @@ DBusHandlerResult handle_tracklist ( DBusConnection *p_conn,
                                      DBusMessage *p_from,
                                      void *p_this );
 
-static const DBusObjectPathVTable dbus_mpris_tracklist_vtable = {
-        NULL, handle_tracklist, /* handler function */
-        NULL, NULL, NULL, NULL
-};
-
-int TrackListChangeEmit( intf_thread_t *, int, int );
 int TrackListPropertiesChangedEmit( intf_thread_t *, vlc_dictionary_t * );
 
 #endif //dbus_tracklist.h