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

#include <track_list_skeleton.h>

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

Public Member Functions

 TrackListSkeleton (const core::dbus::Bus::Ptr &bus, const core::dbus::Object::Ptr &object, const core::ubuntu::media::apparmor::ubuntu::RequestContextResolver::Ptr &request_context_resolver, const core::ubuntu::media::apparmor::ubuntu::RequestAuthenticator::Ptr &request_authenticator)
 
 ~TrackListSkeleton ()
 
bool has_next ()
 
bool has_previous ()
 
Track::Id next ()
 
Track::Id previous ()
 
const Track::Idcurrent ()
 
const core::Property< bool > & can_edit_tracks () const
 
const core::Property< Container > & tracks () const
 
const core::Signal< ContainerTrackIdTuple > & on_track_list_replaced () const
 
core::Signal< ContainerTrackIdTuple > & on_track_list_replaced ()
 
const core::Signal< Track::Id > & on_track_added () const
 
core::Signal< Track::Id > & on_track_added ()
 
const core::Signal< ContainerURI > & on_tracks_added () const
 
core::Signal< ContainerURI > & on_tracks_added ()
 
const core::Signal< TrackIdTuple > & on_track_moved () const
 
core::Signal< TrackIdTuple > & on_track_moved ()
 
const core::Signal< Track::Id > & on_track_removed () const
 
const core::Signal< void > & on_track_list_reset () const
 
const core::Signal< Track::Id > & on_track_changed () const
 
core::Signal< Track::Id > & on_track_changed ()
 
const core::Signal< Track::Id > & on_go_to_track () const
 
core::Signal< Track::Id > & on_go_to_track ()
 
const core::Signal< void > & on_end_of_tracklist () const
 
core::Signal< void > & on_end_of_tracklist ()
 
core::Signal< Track::Id > & on_track_removed ()
 
core::Signal< void > & on_track_list_reset ()
 
core::Property< Container > & tracks ()
 
void on_loop_status_changed (const core::ubuntu::media::Player::LoopStatus &loop_status)
 
core::ubuntu::media::Player::LoopStatus loop_status () const
 
void on_position_changed (uint64_t position)
 
void on_shuffle_changed (bool shuffle)
 
virtual void set_shuffle (bool shuffle)=0
 
virtual bool shuffle ()=0
 
virtual const media::TrackList::Containershuffled_tracks ()=0
 
- Public Member Functions inherited from core::ubuntu::media::TrackList
 TrackList (const TrackList &)=delete
 
 ~TrackList ()
 
TrackListoperator= (const TrackList &)=delete
 
bool operator== (const TrackList &) const =delete
 
virtual Track::MetaData query_meta_data_for_track (const Track::Id &id)=0
 
virtual Track::UriType query_uri_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 add_tracks_with_uri_at (const ContainerURI &uris, const Track::Id &position)=0
 
virtual bool move_track (const Track::Id &id, const Track::Id &to)=0
 
virtual void remove_track (const Track::Id &id)=0
 
virtual void go_to (const Track::Id &track)=0
 
bool has_next () const
 
bool has_previous () const
 

Protected Member Functions

bool is_first_track (const ConstIterator &it)
 
bool is_last_track (const ConstIterator &it)
 
const TrackList::ConstIteratorcurrent_iterator ()
 
bool update_current_iterator (const TrackList::ConstIterator &it)
 
void reset_current_iterator_if_needed ()
 
media::Track::Id get_current_track (void)
 
void set_current_track (const media::Track::Id &id)
 
TrackList::ConstIterator get_current_shuffled ()
 
core::Property< bool > & can_edit_tracks ()
 
void emit_on_end_of_tracklist ()
 
void reset ()
 
- Protected Member Functions inherited from core::ubuntu::media::TrackList
 TrackList ()
 

Additional Inherited Members

- Public Types inherited from core::ubuntu::media::TrackList
typedef std::vector< Track::IdContainer
 
typedef std::vector< Track::UriTypeContainerURI
 
typedef std::tuple< std::vector< Track::Id >, Track::IdContainerTrackIdTuple
 
typedef std::tuple< Track::Id, Track::IdTrackIdTuple
 
typedef Container::iterator Iterator
 
typedef Container::const_iterator ConstIterator
 
- Static Public Member Functions inherited from core::ubuntu::media::TrackList
static const Track::Idafter_empty_track ()
 

Detailed Description

Definition at line 36 of file track_list_skeleton.h.

Constructor & Destructor Documentation

◆ TrackListSkeleton()

core::ubuntu::media::TrackListSkeleton::TrackListSkeleton ( const core::dbus::Bus::Ptr &  bus,
const core::dbus::Object::Ptr &  object,
const core::ubuntu::media::apparmor::ubuntu::RequestContextResolver::Ptr request_context_resolver,
const core::ubuntu::media::apparmor::ubuntu::RequestAuthenticator::Ptr request_authenticator 
)

◆ ~TrackListSkeleton()

core::ubuntu::media::TrackListSkeleton::~TrackListSkeleton ( )

Member Function Documentation

◆ can_edit_tracks() [1/2]

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

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

Implements core::ubuntu::media::TrackList.

Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it(), and is_last_track().

◆ can_edit_tracks() [2/2]

core::Property<bool>& core::ubuntu::media::TrackListSkeleton::can_edit_tracks ( )
protected

◆ current()

const Track::Id& core::ubuntu::media::TrackListSkeleton::current ( )

◆ current_iterator()

const TrackList::ConstIterator& core::ubuntu::media::TrackListSkeleton::current_iterator ( )
protected

◆ emit_on_end_of_tracklist()

void core::ubuntu::media::TrackListSkeleton::emit_on_end_of_tracklist ( )
protected

Referenced by is_last_track().

◆ get_current_shuffled()

TrackList::ConstIterator core::ubuntu::media::TrackListSkeleton::get_current_shuffled ( )
protected

Referenced by is_last_track().

◆ get_current_track()

media::Track::Id core::ubuntu::media::TrackListSkeleton::get_current_track ( void  )
protected

◆ has_next()

bool core::ubuntu::media::TrackListSkeleton::has_next ( )

◆ has_previous()

bool core::ubuntu::media::TrackListSkeleton::has_previous ( )

◆ is_first_track()

bool core::ubuntu::media::TrackListSkeleton::is_first_track ( const ConstIterator it)
inlineprotected

Definition at line 87 of file track_list_skeleton.h.

References tracks().

+ Here is the call graph for this function:

◆ is_last_track()

bool core::ubuntu::media::TrackListSkeleton::is_last_track ( const ConstIterator it)
inlineprotected

◆ loop_status()

core::ubuntu::media::Player::LoopStatus core::ubuntu::media::TrackListSkeleton::loop_status ( ) const

◆ next()

Track::Id core::ubuntu::media::TrackListSkeleton::next ( )
virtual

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

Implements core::ubuntu::media::TrackList.

◆ on_end_of_tracklist() [1/2]

const core::Signal<void>& core::ubuntu::media::TrackListSkeleton::on_end_of_tracklist ( ) const
virtual

Used to notify the Player of when the end of the tracklist has been reached.

Implements core::ubuntu::media::TrackList.

Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it().

◆ on_end_of_tracklist() [2/2]

core::Signal<void>& core::ubuntu::media::TrackListSkeleton::on_end_of_tracklist ( )

◆ on_go_to_track() [1/2]

const core::Signal<Track::Id>& core::ubuntu::media::TrackListSkeleton::on_go_to_track ( ) const
virtual

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

Implements core::ubuntu::media::TrackList.

Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it().

◆ on_go_to_track() [2/2]

core::Signal<Track::Id>& core::ubuntu::media::TrackListSkeleton::on_go_to_track ( )

◆ on_loop_status_changed()

void core::ubuntu::media::TrackListSkeleton::on_loop_status_changed ( const core::ubuntu::media::Player::LoopStatus loop_status)

◆ on_position_changed()

void core::ubuntu::media::TrackListSkeleton::on_position_changed ( uint64_t  position)

◆ on_shuffle_changed()

void core::ubuntu::media::TrackListSkeleton::on_shuffle_changed ( bool  shuffle)

Gets called when the shuffle property on the Player interface is changed by the client

◆ on_track_added() [1/2]

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

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

Implements core::ubuntu::media::TrackList.

Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it().

◆ on_track_added() [2/2]

core::Signal<Track::Id>& core::ubuntu::media::TrackListSkeleton::on_track_added ( )

◆ on_track_changed() [1/2]

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

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

Implements core::ubuntu::media::TrackList.

Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it().

◆ on_track_changed() [2/2]

core::Signal<Track::Id>& core::ubuntu::media::TrackListSkeleton::on_track_changed ( )

◆ on_track_list_replaced() [1/2]

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

Indicates that the entire tracklist has been replaced.

Implements core::ubuntu::media::TrackList.

◆ on_track_list_replaced() [2/2]

core::Signal<ContainerTrackIdTuple>& core::ubuntu::media::TrackListSkeleton::on_track_list_replaced ( )

◆ on_track_list_reset() [1/2]

const core::Signal<void>& core::ubuntu::media::TrackListSkeleton::on_track_list_reset ( ) const
virtual

Indicates that the track list has been reset and there are no tracks now

Implements core::ubuntu::media::TrackList.

Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it().

◆ on_track_list_reset() [2/2]

core::Signal<void>& core::ubuntu::media::TrackListSkeleton::on_track_list_reset ( )

◆ on_track_moved() [1/2]

const core::Signal<TrackIdTuple>& core::ubuntu::media::TrackListSkeleton::on_track_moved ( ) const
virtual

Indicates that a track has been moved within the track list. First template param holds the id of the track being moved. Second param holds the id of the track of the position to move the track to in the TrackList.

Implements core::ubuntu::media::TrackList.

Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it().

◆ on_track_moved() [2/2]

core::Signal<TrackIdTuple>& core::ubuntu::media::TrackListSkeleton::on_track_moved ( )

◆ on_track_removed() [1/2]

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

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

Implements core::ubuntu::media::TrackList.

Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it().

◆ on_track_removed() [2/2]

core::Signal<Track::Id>& core::ubuntu::media::TrackListSkeleton::on_track_removed ( )

◆ on_tracks_added() [1/2]

const core::Signal<ContainerURI>& core::ubuntu::media::TrackListSkeleton::on_tracks_added ( ) const
virtual

Indicates that one or more tracks have been added to the track list.

Implements core::ubuntu::media::TrackList.

Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it().

◆ on_tracks_added() [2/2]

core::Signal<ContainerURI>& core::ubuntu::media::TrackListSkeleton::on_tracks_added ( )

◆ previous()

Track::Id core::ubuntu::media::TrackListSkeleton::previous ( )
virtual

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

Implements core::ubuntu::media::TrackList.

◆ reset()

void core::ubuntu::media::TrackListSkeleton::reset ( )
protectedvirtual

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

Implements core::ubuntu::media::TrackList.

Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it(), and is_last_track().

◆ reset_current_iterator_if_needed()

void core::ubuntu::media::TrackListSkeleton::reset_current_iterator_if_needed ( )
protected

◆ set_current_track()

void core::ubuntu::media::TrackListSkeleton::set_current_track ( const media::Track::Id id)
protected

◆ set_shuffle()

virtual void core::ubuntu::media::TrackListSkeleton::set_shuffle ( bool  shuffle)
pure virtual

◆ shuffle()

virtual bool core::ubuntu::media::TrackListSkeleton::shuffle ( )
pure virtual

◆ shuffled_tracks()

virtual const media::TrackList::Container& core::ubuntu::media::TrackListSkeleton::shuffled_tracks ( )
pure virtual

◆ tracks() [1/2]

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

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

Implements core::ubuntu::media::TrackList.

Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it(), is_first_track(), and is_last_track().

◆ tracks() [2/2]

core::Property<Container>& core::ubuntu::media::TrackListSkeleton::tracks ( )

◆ update_current_iterator()

bool core::ubuntu::media::TrackListSkeleton::update_current_iterator ( const TrackList::ConstIterator it)
protected

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