9390c8b95a6576b0db2946b6eafd8470d69e78ab
[groove] / splayer.h
1 #ifndef SPLAYER_H
2 #define SPLAYER_H
3 #include <QtNetwork>
4 //#include <parser.h>
5 #include <QObject>
6 #include <phonon>
7 #include "streamio.h"
8 #include <QProgressDialog>
9 #include "grooveprogressbar.h"
10 #include "playlist.h"
11
12 class sPlayer : public QObject
13 {
14     Q_OBJECT
15 public:
16     explicit sPlayer(QObject *parent = 0);
17     void play(int p);
18
19     void play();
20     void stop();
21     void pause();
22     void setPlaylist(playlist *playList);
23     ~sPlayer();
24
25 signals:
26     void finishedPlaying();
27     void downloadComplete();
28 public slots:
29     void start(int p);
30     void playNext();
31     void putb(int p,qint64,qint64);
32     void abortDownload();
33     void back();
34 private slots:
35     void markComplete();
36 private:
37     QNetworkAccessManager *manager;
38     Phonon::AudioOutput *audioOutput;
39     Phonon::MediaObject *media;
40     QNetworkReply *reply;
41     QBuffer *buffer;
42     Phonon::Path *path;
43     bool playing;
44     QObject *internal;
45     QTime startStreamT;
46     grooveProgressBar *pd;
47     playlist *pl;
48 };
49 #endif // SPLAYER_H