Music Hub  ..
A session-wide music playback service
core::ubuntu::media::TrackList Class Referenceabstract

#include <track_list.h>

+ Inheritance diagram for core::ubuntu::media::TrackList:
+ Collaboration diagram for core::ubuntu::media::TrackList:

Public Types

typedef std::vector< Track::IdContainer
 
typedef std::tuple< std::vector< Track::Id >, Track::IdContainerTrackIdTuple
 
typedef Container::iterator Iterator
 
typedef Container::const_iterator ConstIterator
 

Public Member Functions

 TrackList (const TrackList &)=delete
 
 ~TrackList ()
 
TrackListoperator= (const TrackList &)=delete
 
bool operator== (const TrackList &) const =delete
 
virtual const core::Property< bool > & can_edit_tracks () const =0
 
virtual const core::Property< Container > & tracks () const =0
 
virtual Track::MetaData query_meta_data_for_track (const Track::Id &id)=0
 
virtual void add_track_with_uri_at (const Track::UriType &uri, const Track::Id &position, bool make_current)=0
 
virtual void remove_track (const Track::Id &id)=0
 
virtual void go_to (const Track::Id &track, bool toggle_player_state)=0
 
bool has_next () const
 
bool has_previous () const
 
virtual Track::Id next ()=0
 
virtual Track::Id previous ()=0
 
virtual void shuffle_tracks ()=0
 
virtual void unshuffle_tracks ()=0
 
virtual void reset ()=0
 
virtual const core::Signal< ContainerTrackIdTuple > & on_track_list_replaced () const =0
 
virtual const core::Signal< Track::Id > & on_track_added () const =0
 
virtual const core::Signal< Track::Id > & on_track_removed () const =0
 
virtual const core::Signal< Track::Id > & on_track_changed () const =0
 
virtual const core::Signal< std::pair< Track::Id, bool > > & on_go_to_track () const =0
 

Static Public Member Functions

static const Track::Idafter_empty_track ()
 

Protected Member Functions

 TrackList ()
 

Detailed Description

Definition at line 39 of file track_list.h.

Member Typedef Documentation

typedef Container::const_iterator core::ubuntu::media::TrackList::ConstIterator

Definition at line 45 of file track_list.h.

Definition at line 42 of file track_list.h.

Definition at line 43 of file track_list.h.

typedef Container::iterator core::ubuntu::media::TrackList::Iterator

Definition at line 44 of file track_list.h.

Constructor & Destructor Documentation

core::ubuntu::media::TrackList::TrackList ( const TrackList )
delete
core::ubuntu::media::TrackList::~TrackList ( )

Definition at line 33 of file track_list.cpp.

core::ubuntu::media::TrackList::TrackList ( )
protected

Definition at line 29 of file track_list.cpp.

Member Function Documentation

virtual void core::ubuntu::media::TrackList::add_track_with_uri_at ( const Track::UriType uri,
const Track::Id position,
bool  make_current 
)
pure virtual
const media::Track::Id & core::ubuntu::media::TrackList::after_empty_track ( )
static

Definition at line 23 of file track_list.cpp.

virtual const core::Property<bool>& core::ubuntu::media::TrackList::can_edit_tracks ( ) const
pure virtual

If set to false, calling add_track_with_uri_at or remove_track will have no effect.

Implemented in core::ubuntu::media::NullTrackList, core::ubuntu::media::TrackListSkeleton, and core::ubuntu::media::TrackListStub.

virtual void core::ubuntu::media::TrackList::go_to ( const Track::Id track,
bool  toggle_player_state 
)
pure virtual

Skip to the specified TrackId. Calls stop() and play() on the player if toggle_player_state is true.

Implemented in core::ubuntu::media::TrackListStub, and core::ubuntu::media::TrackListImplementation.

bool core::ubuntu::media::TrackList::has_next ( ) const

Returns true if there is a next track in the TrackList after the current one playing

Definition at line 37 of file track_list.cpp.

bool core::ubuntu::media::TrackList::has_previous ( ) const

Returns true if there is a previous track in the TrackList before the current one playing

Definition at line 42 of file track_list.cpp.

virtual Track::Id core::ubuntu::media::TrackList::next ( )
pure virtual
virtual const core::Signal<std::pair<Track::Id, bool> >& core::ubuntu::media::TrackList::on_go_to_track ( ) const
pure virtual

Used to notify the Player of when the client requested that the Player should immediately play a new track.

Implemented in core::ubuntu::media::TrackListStub, and core::ubuntu::media::TrackListSkeleton.

virtual const core::Signal<Track::Id>& core::ubuntu::media::TrackList::on_track_added ( ) const
pure virtual

Indicates that a track has been added to the track list.

Implemented in core::ubuntu::media::NullTrackList, core::ubuntu::media::TrackListStub, and core::ubuntu::media::TrackListSkeleton.

virtual const core::Signal<Track::Id>& core::ubuntu::media::TrackList::on_track_changed ( ) const
pure virtual

Indicates that the track list advanced from one track to another.

Implemented in core::ubuntu::media::NullTrackList, core::ubuntu::media::TrackListStub, and core::ubuntu::media::TrackListSkeleton.

virtual const core::Signal<ContainerTrackIdTuple>& core::ubuntu::media::TrackList::on_track_list_replaced ( ) const
pure virtual

Indicates that the entire tracklist has been replaced.

Implemented in core::ubuntu::media::NullTrackList, core::ubuntu::media::TrackListStub, and core::ubuntu::media::TrackListSkeleton.

virtual const core::Signal<Track::Id>& core::ubuntu::media::TrackList::on_track_removed ( ) const
pure virtual

Indicates that a track has been removed from the track list.

Implemented in core::ubuntu::media::NullTrackList, core::ubuntu::media::TrackListStub, and core::ubuntu::media::TrackListSkeleton.

TrackList& core::ubuntu::media::TrackList::operator= ( const TrackList )
delete
bool core::ubuntu::media::TrackList::operator== ( const TrackList ) const
delete
virtual Track::Id core::ubuntu::media::TrackList::previous ( )
pure virtual

Skip to the previous Track in the TrackList if there is one.

Implemented in core::ubuntu::media::TrackListStub, and core::ubuntu::media::TrackListSkeleton.

virtual Track::MetaData core::ubuntu::media::TrackList::query_meta_data_for_track ( const Track::Id id)
pure virtual
virtual void core::ubuntu::media::TrackList::remove_track ( const Track::Id id)
pure virtual
virtual void core::ubuntu::media::TrackList::reset ( )
pure virtual

Clears and resets the TrackList to the same as a newly constructed instance.

Implemented in core::ubuntu::media::TrackListStub, and core::ubuntu::media::TrackListImplementation.

virtual void core::ubuntu::media::TrackList::shuffle_tracks ( )
pure virtual

Reorders the tracks such that they are in a random order.

Implemented in core::ubuntu::media::TrackListStub, and core::ubuntu::media::TrackListImplementation.

virtual const core::Property<Container>& core::ubuntu::media::TrackList::tracks ( ) const
pure virtual

An array which contains the identifier of each track in the tracklist, in order.

Implemented in core::ubuntu::media::NullTrackList, core::ubuntu::media::TrackListSkeleton, and core::ubuntu::media::TrackListStub.

Referenced by core::ubuntu::media::operator<<().

virtual void core::ubuntu::media::TrackList::unshuffle_tracks ( )
pure virtual

Restores the original order of tracks before shuffle mode was turned on.

Implemented in core::ubuntu::media::TrackListStub, and core::ubuntu::media::TrackListImplementation.


The documentation for this class was generated from the following files: