Music Hub ..
A session-wide music playback service
track_list_stub.h
Go to the documentation of this file.
1/*
2 * Copyright © 2013 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License version 3,
6 * as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Thomas Voß <thomas.voss@canonical.com>
17 */
18
19#ifndef CORE_UBUNTU_MEDIA_TRACK_LIST_STUB_H_
20#define CORE_UBUNTU_MEDIA_TRACK_LIST_STUB_H_
21
23
24#include "track_list_traits.h"
25
26#include <core/dbus/stub.h>
27
28#include <memory>
29
30namespace core
31{
32namespace ubuntu
33{
34namespace media
35{
37{
38public:
40 const std::shared_ptr<Player>& parent,
41 const core::dbus::Object::Ptr& object);
43
44 const core::Property<bool>& can_edit_tracks() const;
45 const core::Property<Container>& tracks() const;
46
49
50 void add_track_with_uri_at(const Track::UriType& uri, const Track::Id& position, bool make_current);
51 void add_tracks_with_uri_at(const ContainerURI& uris, const Track::Id& position);
52 bool move_track(const Track::Id& id, const Track::Id& to);
53 void remove_track(const Track::Id& id);
54
55 void go_to(const Track::Id& track);
56
59
60 void reset();
61
62 const core::Signal<ContainerTrackIdTuple>& on_track_list_replaced() const;
63 const core::Signal<Track::Id>& on_track_added() const;
64 const core::Signal<ContainerURI>& on_tracks_added() const;
65 const core::Signal<TrackIdTuple>& on_track_moved() const;
66 const core::Signal<Track::Id>& on_track_removed() const;
67 const core::Signal<void>& on_track_list_reset() const;
68 const core::Signal<Track::Id>& on_track_changed() const;
69 const core::Signal<Track::Id>& on_go_to_track() const;
70 const core::Signal<void>& on_end_of_tracklist() const;
71
72private:
73 struct Private;
74 std::unique_ptr<Private> d;
75};
76}
77}
78}
79
80#endif // CORE_UBUNTU_MEDIA_TRACK_LIST_STUB_H_
const core::Signal< Track::Id > & on_track_removed() const
TrackListStub(const std::shared_ptr< Player > &parent, const core::dbus::Object::Ptr &object)
void add_tracks_with_uri_at(const ContainerURI &uris, const Track::Id &position)
void add_track_with_uri_at(const Track::UriType &uri, const Track::Id &position, bool make_current)
const core::Signal< Track::Id > & on_track_changed() const
const core::Signal< ContainerURI > & on_tracks_added() const
Track::MetaData query_meta_data_for_track(const Track::Id &id)
const core::Signal< void > & on_track_list_reset() const
const core::Signal< Track::Id > & on_go_to_track() const
const core::Signal< TrackIdTuple > & on_track_moved() const
const core::Signal< void > & on_end_of_tracklist() const
void go_to(const Track::Id &track)
const core::Property< Container > & tracks() const
const core::Signal< ContainerTrackIdTuple > & on_track_list_replaced() const
const core::Signal< Track::Id > & on_track_added() const
void remove_track(const Track::Id &id)
Track::UriType query_uri_for_track(const Track::Id &id)
bool move_track(const Track::Id &id, const Track::Id &to)
const core::Property< bool > & can_edit_tracks() const
std::vector< Track::UriType > ContainerURI
Definition: track_list.h:44
std::string UriType
Definition: track.h:40
Definition: player.h:34