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 
48 
49  void add_track_with_uri_at(const Track::UriType& uri, const Track::Id& position, bool make_current);
50  void remove_track(const Track::Id& id);
51 
52  void go_to(const Track::Id& track, bool toggle_player_state);
53 
54  void shuffle_tracks();
55  void unshuffle_tracks();
56 
57  void reset();
58 
59  const core::Signal<ContainerTrackIdTuple>& on_track_list_replaced() const;
60  const core::Signal<Track::Id>& on_track_added() const;
61  const core::Signal<Track::Id>& on_track_removed() const;
62  const core::Signal<Track::Id>& on_track_changed() const;
63  const core::Signal<std::pair<Track::Id, bool>>& on_go_to_track() const;
64 
65 private:
66  struct Private;
67  std::unique_ptr<Private> d;
68 };
69 }
70 }
71 }
72 
73 #endif // CORE_UBUNTU_MEDIA_TRACK_LIST_STUB_H_
Definition: player.h:33
const core::Property< bool > & can_edit_tracks() const
void add_track_with_uri_at(const Track::UriType &uri, const Track::Id &position, bool make_current)
Track::MetaData query_meta_data_for_track(const Track::Id &id)
void remove_track(const Track::Id &id)
const core::Signal< Track::Id > & on_track_changed() const
const core::Signal< Track::Id > & on_track_added() const
const core::Signal< std::pair< Track::Id, bool > > & on_go_to_track() const
void go_to(const Track::Id &track, bool toggle_player_state)
TrackListStub(const std::shared_ptr< Player > &parent, const core::dbus::Object::Ptr &object)
const core::Property< Container > & tracks() const
const core::Signal< Track::Id > & on_track_removed() const
const core::Signal< ContainerTrackIdTuple > & on_track_list_replaced() const
std::string UriType
Definition: track.h:40