Complete rewrite. Does not work yet.
[irwi] / src / irctrl.h
index 13ef634..3bc71b4 100644 (file)
@@ -4,24 +4,26 @@
 #include <QObject>
 #include <QString>
 
+class QTimer;
+
 class IrCtrl : public QObject
 {
     Q_OBJECT
-public:
-    IrCtrl();
 
-    void setRemoteName(const QString &newRemoteName);
+public:
+    explicit IrCtrl(QObject *parent = 0);
+    ~IrCtrl();
 
 public slots:
-    void sendCmd0(bool);
-    void sendCmd1(bool);
-    void sendCmd2(bool);
-    void sendCmd3(bool);
-    void sendCmd4(bool);
-    void sendCmd5(bool);
+    void sendCmd(const QString &remoteName, const QString &cmd);
+
+private:
+    void startLirc();
+    void stopLirc();
 
 private:
-    QString remoteName;
+    static const quint16 LIRC_PORT = 8765;
+    QTimer *killLircTimer;
 };
 
 #endif