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 
22 #include <core/media/track_list.h>
23 
24 #include "track_list_traits.h"
25 
26 #include <core/dbus/stub.h>
27 
28 #include <memory>
29 
30 namespace core
31 {
32 namespace ubuntu
33 {
34 namespace media
35 {
37 {
38 public:
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 
57  Track::Id next();
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 
72 private:
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< TrackIdTuple > & on_track_moved() const
void go_to(const Track::Id &track)
const core::Property< bool > & can_edit_tracks() const
Definition: player.h:33
void add_track_with_uri_at(const Track::UriType &uri, const Track::Id &position, bool make_current)
const core::Signal< void > & on_track_list_reset() const
Track::MetaData query_meta_data_for_track(const Track::Id &id)
void remove_track(const Track::Id &id)
const core::Signal< ContainerTrackIdTuple > & on_track_list_replaced() const
Track::UriType query_uri_for_track(const Track::Id &id)
const core::Signal< Track::Id > & on_track_added() const
const core::Signal< Track::Id > & on_track_removed() const
const core::Signal< Track::Id > & on_go_to_track() const
void add_tracks_with_uri_at(const ContainerURI &uris, const Track::Id &position)
TrackListStub(const std::shared_ptr< Player > &parent, const core::dbus::Object::Ptr &object)
const core::Signal< ContainerURI > & on_tracks_added() const
const core::Signal< void > & on_end_of_tracklist() const
const core::Signal< Track::Id > & on_track_changed() const
bool move_track(const Track::Id &id, const Track::Id &to)
std::string UriType
Definition: track.h:40
const core::Property< Container > & tracks() const
std::vector< Track::UriType > ContainerURI
Definition: track_list.h:44