| 1 | #ifndef RAOPSERVICE_H |
| 2 | #define RAOPSERVICE_H |
| 3 | |
| 4 | #include <QObject> |
| 5 | #include <QThread> |
| 6 | |
| 7 | #include "raopcallbackhandler.h" |
| 8 | |
| 9 | #include "raop.h" |
| 10 | |
| 11 | class RaopService : public QObject |
| 12 | { |
| 13 | Q_OBJECT |
| 14 | public: |
| 15 | explicit RaopService(QObject *parent = 0); |
| 16 | ~RaopService(); |
| 17 | |
| 18 | bool init(int max_clients, RaopCallbacks *callbacks); |
| 19 | bool start(quint16 port, const QByteArray & hwaddr); |
| 20 | bool isRunning(); |
| 21 | void stop(); |
| 22 | |
| 23 | private: |
| 24 | raop_t * m_raop; |
| 25 | |
| 26 | QThread m_thread; |
| 27 | RaopCallbackHandler m_handler; |
| 28 | |
| 29 | signals: |
| 30 | |
| 31 | public slots: |
| 32 | |
| 33 | }; |
| 34 | |
| 35 | #endif // RAOPSERVICE_H |