Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 59 lines (43 sloc) 1.086 kb
d1c0583 @RJ initial checkin
authored
1 #ifndef WEBKITAPI_H
2 #define WEBKITAPI_H
3
4 #include <qobject.h>
2ef4062 @RJ expose qplaydarclient, encapsulate phonon stuff better, change js api…
authored
5 #include <qplaydar.h>
6 #include <player/playengine.h>
7 #include <qjson/parser.h>
8 #include <qjson/serializer.h>
9 #include <qjson/qobjecthelper.h>
d1c0583 @RJ initial checkin
authored
10
11 class QWebView;
12 class QWebFrame;
13
14 class WebkitApi : public QObject
15 {
16 Q_OBJECT
17 public:
2ef4062 @RJ expose qplaydarclient, encapsulate phonon stuff better, change js api…
authored
18 WebkitApi( Playdar::Client * client, Playengine * p, QObject * );
d1c0583 @RJ initial checkin
authored
19
20 void setWebView( QWebView *view );
21
22 signals:
2ef4062 @RJ expose qplaydarclient, encapsulate phonon stuff better, change js api…
authored
23 void tick(int, int);
d1c0583 @RJ initial checkin
authored
24 void stateChange(QString);
2ef4062 @RJ expose qplaydarclient, encapsulate phonon stuff better, change js api…
authored
25 void buffering(int);
d1c0583 @RJ initial checkin
authored
26 void volumeChanged(int);
2ef4062 @RJ expose qplaydarclient, encapsulate phonon stuff better, change js api…
authored
27 // QID, result obj json
28 void result(QString, QString);
29
d1c0583 @RJ initial checkin
authored
30
31 public slots:
2ef4062 @RJ expose qplaydarclient, encapsulate phonon stuff better, change js api…
authored
32
33 // player stuff
d1c0583 @RJ initial checkin
authored
34 void togglePause();
35 void setVolume(int);
36 void play(QString);
37 void stop();
e294af4 @RJ player improvements
authored
38 void log(QString);
d1c0583 @RJ initial checkin
authored
39
2ef4062 @RJ expose qplaydarclient, encapsulate phonon stuff better, change js api…
authored
40
41 // playdar stuff
42 void resolve(const QString &str);
43
44
d1c0583 @RJ initial checkin
authored
45 private slots:
46 void attachObject();
2ef4062 @RJ expose qplaydarclient, encapsulate phonon stuff better, change js api…
authored
47 void reemitStatusChanged(Playengine::STATUS);
48 void onResult(Playdar::q_ptr, Playdar::r_ptr);
d1c0583 @RJ initial checkin
authored
49
50 private:
51 QWebFrame *frame;
2ef4062 @RJ expose qplaydarclient, encapsulate phonon stuff better, change js api…
authored
52 Playdar::Client * pc;
53 Playengine * player;
54 QJson::Serializer serializer;
d1c0583 @RJ initial checkin
authored
55 };
56
57
58 #endif // WEBKITAPI_H
Something went wrong with that request. Please try again.