1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #ifndef NRJ_H
- #define NRJ_H
-
- #include <QObject>
- #include <QNetworkAccessManager>
- #include <QNetworkRequest>
- #include <QNetworkReply>
- #include "radio.h"
-
- class NRJ : public QObject
- {
- Q_OBJECT
- public:
- explicit NRJ(QObject *parent = 0);
-
- QList<Radio*> getRadios();
-
- signals:
- void setupFinished();
- void setupError();
-
- void getAllCurError();
-
- public slots:
- void setupPlayer();
- void getAllCur();
-
- private slots:
- void onSetupFinished();
- void onSetupError(QNetworkReply::NetworkError);
-
- void onGetAllCurFinished();
- void onGetAllCurError(QNetworkReply::NetworkError);
-
- private:
- QNetworkAccessManager* mgr;
- QList<Radio*> radios;
- QUrl apiBase;
- QUrl coverBase;
- int tries;
-
- };
-
- #endif // NRJ_H
|