Music Hub  ..
A session-wide music playback service
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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 {
36 class TrackListStub : public core::dbus::Stub<core::ubuntu::media::TrackList>
37 {
38 public:
40  const std::shared_ptr<Player>& parent,
41  const core::dbus::types::ObjectPath& op);
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);
53 
54  const core::Signal<void>& on_track_list_replaced() const;
55  const core::Signal<Track::Id>& on_track_added() const;
56  const core::Signal<Track::Id>& on_track_removed() const;
57  const core::Signal<Track::Id>& on_track_changed() const;
58 
59 private:
60  struct Private;
61  std::unique_ptr<Private> d;
62 };
63 }
64 }
65 }
66 
67 #endif // CORE_UBUNTU_MEDIA_TRACK_LIST_STUB_H_
void go_to(const Track::Id &track)
const core::Signal< void > & on_track_list_replaced() const
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::Property< Container > & tracks() const
const core::Signal< Track::Id > & on_track_removed() const
std::string UriType
Definition: track.h:40
TrackListStub(const std::shared_ptr< Player > &parent, const core::dbus::types::ObjectPath &op)