diff options
Diffstat (limited to 'fmrxservice.h')
-rw-r--r-- | fmrxservice.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/fmrxservice.h b/fmrxservice.h new file mode 100644 index 0000000..1f9e278 --- /dev/null +++ b/fmrxservice.h @@ -0,0 +1,58 @@ +#ifndef FMRXSERVICE_H +#define FMRXSERVICE_H + +#include <QAudio> +#include <QMediaService> +#include <QRadioTuner> + +struct FmRxPriv; +class FmRxProxy; +class FmRxControl; +class FmRxRds; + +class FmRxService : public QMediaService +{ + Q_OBJECT + +public: + explicit FmRxService(QObject *parent = 0); + ~FmRxService(); + + QMediaControl *requestControl(const char *name); + void releaseControl(QMediaControl *control); + + void start(); + void stop(); + + bool isAvailable() const; + QtMultimediaKit::AvailabilityError availabilityError() const; + + bool isActive() const; + + double frequency(); + void setFrequency(double frequency); + + void searchForward(); + void searchBackward(); + +signals: + void tuned(double frequency); + void started(); + void stopped(); + void piReceived(ushort pi); + void psReceived(const QString &ps); + void rtReceived(const QString &rt); + +private slots: + void handleTuned(double frequency); + void handleStopped(); + void handleOutState(QAudio::State state); + +private: + FmRxPriv *m_priv; + FmRxProxy *m_proxy; + FmRxControl *m_control; + FmRxRds *m_rds; +}; + +#endif // FMRXSERVICE_H |