From a111ee6b11112295867f36284ef0f85934c44509 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Mon, 2 Jan 2012 03:39:02 +0100 Subject: initial import --- fmrxservice.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 fmrxservice.h (limited to 'fmrxservice.h') 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 +#include +#include + +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 -- cgit v1.2.3