2
* Copyright (C) 2012 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 3 as
6
* published by the Free Software Foundation.
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 General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by Pawel Stolowski <pawel.stolowski@canonical.com>
19
namespace PreviewPlayer
21
[DBus (name = "com.canonical.Unity.Lens.Music.PreviewPlayer")]
22
public class PreviewPlayerService : Object
24
private PreviewPlayer player;
25
private bool released;
27
public PreviewPlayerService (PreviewPlayer preview_player)
30
player = preview_player;
31
player.progress.connect (on_progress_change);
34
private void on_progress_change (string uri, uint32 state, double value)
36
progress (uri, state, value);
39
public void play (string uri)
44
var app = GLib.Application.get_default ();
60
public void pause_resume ()
62
player.pause_resume ();
76
var app = GLib.Application.get_default ();
81
public HashTable<string, Variant> video_properties (string uri)
86
var app = GLib.Application.get_default ();
89
return player.get_video_file_props (uri);
92
public signal void progress (string uri, uint32 state, double value);
b'\\ No newline at end of file'