summaryrefslogtreecommitdiff
path: root/fmrxproxy.h
diff options
context:
space:
mode:
Diffstat (limited to 'fmrxproxy.h')
-rw-r--r--fmrxproxy.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/fmrxproxy.h b/fmrxproxy.h
new file mode 100644
index 0000000..ccd544a
--- /dev/null
+++ b/fmrxproxy.h
@@ -0,0 +1,35 @@
+#ifndef FMRXPROXY_H
+#define FMRXPROXY_H
+
+#include <QtCore/QObject>
+#include <QtCore/QString>
+#include <dbus/dbus.h>
+
+class FmRxProxy : public QObject
+{
+ Q_OBJECT
+public:
+ explicit FmRxProxy(QObject *parent = 0);
+ ~FmRxProxy();
+
+ int Connect();
+ void Tune(double frequency);
+ void SearchBackward();
+ void SearchForward();
+
+signals:
+ void Tuned(double frequency);
+ void Stopped();
+ void PiReceived(ushort pi);
+ void PsReceived(const QString &ps);
+ void RtReceived(const QString &rt);
+
+private:
+ DBusConnection *m_conn;
+
+ static DBusHandlerResult bus_message_filter(DBusConnection *conn,
+ DBusMessage *m, void *user_data);
+
+};
+
+#endif // FMRXPROXY_H