From 342c4d2ec427a3c9b9646182aeb10f66d943435d Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 16 Nov 2012 08:26:59 +0100 Subject: [PATCH] * Added itemAt( uint ) and indexOfResult( result ) to PlaylistInterface. --- src/libtomahawk/PlaylistInterface.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/libtomahawk/PlaylistInterface.h b/src/libtomahawk/PlaylistInterface.h index 3fcd8e6d4..c29d67215 100644 --- a/src/libtomahawk/PlaylistInterface.h +++ b/src/libtomahawk/PlaylistInterface.h @@ -45,11 +45,16 @@ public: virtual int trackCount() const = 0; virtual Tomahawk::result_ptr currentItem() const = 0; - virtual Tomahawk::result_ptr previousItem(); + virtual bool hasNextItem() { return true; } virtual bool hasPreviousItem() { return true; } virtual Tomahawk::result_ptr nextItem(); - virtual Tomahawk::result_ptr siblingItem( int itemsAway ) = 0; + virtual Tomahawk::result_ptr previousItem(); + + virtual Tomahawk::result_ptr siblingItem( int itemsAway, bool readOnly = false ) = 0; + + virtual Tomahawk::query_ptr itemAt( unsigned int position ) const = 0; + virtual int indexOfResult( const Tomahawk::result_ptr& result ) const = 0; virtual PlaylistModes::RepeatMode repeatMode() const = 0;