not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / plasma / dataengines / nowplaying / playerinterface / juk_p.h
blob153c1e8cc586d287b3ea7776106dd482845fe8d2
1 /*
2 * Copyright 2008 Alex Merry <alex.merry@kdemail.net>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef JUK_P_H
18 #define JUK_P_H
20 #include "juk.h"
21 #include "player.h"
23 #include <QObject>
25 class OrgKdeJukPlayerInterface;
29 class Juk : public Player
31 public:
32 Juk(PlayerFactory* factory = 0);
33 ~Juk();
35 bool isRunning();
36 State state();
37 QString artist();
38 QString album();
39 QString title();
40 int trackNumber();
41 QString comment();
42 QString genre();
43 int length();
44 int position();
45 float volume();
47 bool canPlay() { return state() != Playing; }
48 void play();
49 bool canPause() { return true; }
50 void pause();
51 bool canStop() { return state() != Stopped; }
52 void stop();
53 bool canGoPrevious() { return true; }
54 void previous();
55 bool canGoNext() { return true; }
56 void next();
58 bool canSetVolume() { return true; }
59 void setVolume(qreal volume);
61 bool canSeek() { return state() != Stopped; }
62 void seek(int time);
64 private:
65 typedef OrgKdeJukPlayerInterface JukPlayer;
66 JukPlayer* jukPlayer;
69 #endif // JUK_P_H