#include <track_list_skeleton.h>
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::Id & | current () |
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::Container & | shuffled_tracks ()=0 |
![]() | |
TrackList (const TrackList &)=delete | |
~TrackList () | |
TrackList & | operator= (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::ConstIterator & | current_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 () |
![]() | |
TrackList () | |
Additional Inherited Members | |
![]() | |
typedef std::vector< Track::Id > | Container |
typedef std::vector< Track::UriType > | ContainerURI |
typedef std::tuple< std::vector< Track::Id >, Track::Id > | ContainerTrackIdTuple |
typedef std::tuple< Track::Id, Track::Id > | TrackIdTuple |
typedef Container::iterator | Iterator |
typedef Container::const_iterator | ConstIterator |
![]() | |
static const Track::Id & | after_empty_track () |
Definition at line 36 of file track_list_skeleton.h.
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 | ||
) |
core::ubuntu::media::TrackListSkeleton::~TrackListSkeleton | ( | ) |
|
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().
|
protected |
const Track::Id& core::ubuntu::media::TrackListSkeleton::current | ( | ) |
|
protected |
Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it(), and is_last_track().
|
protected |
Referenced by is_last_track().
|
protected |
Referenced by is_last_track().
|
protected |
Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it(), and is_last_track().
bool core::ubuntu::media::TrackListSkeleton::has_next | ( | ) |
bool core::ubuntu::media::TrackListSkeleton::has_previous | ( | ) |
|
inlineprotected |
Definition at line 87 of file track_list_skeleton.h.
References tracks().
|
inlineprotected |
Definition at line 89 of file track_list_skeleton.h.
References can_edit_tracks(), current_iterator(), emit_on_end_of_tracklist(), get_current_shuffled(), get_current_track(), core::ubuntu::media::operator<<(), reset(), reset_current_iterator_if_needed(), set_current_track(), tracks(), and update_current_iterator().
core::ubuntu::media::Player::LoopStatus core::ubuntu::media::TrackListSkeleton::loop_status | ( | ) | const |
|
virtual |
Skip to the next Track in the TrackList if there is one.
Implements core::ubuntu::media::TrackList.
|
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().
core::Signal<void>& core::ubuntu::media::TrackListSkeleton::on_end_of_tracklist | ( | ) |
|
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().
core::Signal<Track::Id>& core::ubuntu::media::TrackListSkeleton::on_go_to_track | ( | ) |
void core::ubuntu::media::TrackListSkeleton::on_loop_status_changed | ( | const core::ubuntu::media::Player::LoopStatus & | loop_status | ) |
void core::ubuntu::media::TrackListSkeleton::on_position_changed | ( | uint64_t | position | ) |
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
|
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().
core::Signal<Track::Id>& core::ubuntu::media::TrackListSkeleton::on_track_added | ( | ) |
|
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().
core::Signal<Track::Id>& core::ubuntu::media::TrackListSkeleton::on_track_changed | ( | ) |
|
virtual |
Indicates that the entire tracklist has been replaced.
Implements core::ubuntu::media::TrackList.
core::Signal<ContainerTrackIdTuple>& core::ubuntu::media::TrackListSkeleton::on_track_list_replaced | ( | ) |
|
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().
core::Signal<void>& core::ubuntu::media::TrackListSkeleton::on_track_list_reset | ( | ) |
|
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().
core::Signal<TrackIdTuple>& core::ubuntu::media::TrackListSkeleton::on_track_moved | ( | ) |
|
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().
core::Signal<Track::Id>& core::ubuntu::media::TrackListSkeleton::on_track_removed | ( | ) |
|
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().
core::Signal<ContainerURI>& core::ubuntu::media::TrackListSkeleton::on_tracks_added | ( | ) |
|
virtual |
Skip to the previous Track in the TrackList if there is one.
Implements core::ubuntu::media::TrackList.
|
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().
|
protected |
Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it(), and is_last_track().
|
protected |
Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it(), and is_last_track().
|
pure virtual |
Implemented in core::ubuntu::media::TrackListImplementation.
|
pure virtual |
Implemented in core::ubuntu::media::TrackListImplementation.
|
pure virtual |
Implemented in core::ubuntu::media::TrackListImplementation.
|
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().
core::Property<Container>& core::ubuntu::media::TrackListSkeleton::tracks | ( | ) |
|
protected |
Referenced by media::TrackListImplementation::Private::get_shuffled_insert_it(), and is_last_track().