new file: Groove.pro
[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
9 class sPlayer : public QObject
10 {
11     Q_OBJECT
12 public:
13     explicit sPlayer(QObject *parent = 0);
14     void play(QString StreamKey, QUrl server);
15     void stop();
16     ~sPlayer();
17
18 signals:
19     void finishedPlaying();
20     void downloadComplete();
21 public slots:
22     void start();
23     void putb(qint64,qint64);
24 private:
25     QNetworkAccessManager *manager;
26     Phonon::AudioOutput *audioOutput;
27     Phonon::MediaObject *media;
28     QNetworkReply *reply;
29     QBuffer *buffer;
30     Phonon::Path *path;
31     bool playing;
32     QObject *internal;
33     QTime startStreamT;
34 };
35
36 #endif // SPLAYER_H