InputLIRC.h 632 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef INPUTLIRC_H
  2. #define INPUTLIRC_H
  3. #include <QLocalSocket>
  4. #include <QSocketNotifier>
  5. #include "input/InputComponent.h"
  6. class InputLIRC : public InputBase
  7. {
  8. Q_OBJECT
  9. private:
  10. QLocalSocket* socket;
  11. QSocketNotifier* socketNotifier;
  12. bool connectToLIRC();
  13. void disconnectFromLIRC();
  14. bool isConnected();
  15. public:
  16. InputLIRC(QObject* parent);
  17. ~InputLIRC();
  18. virtual const char* inputName() { return "LIRC"; }
  19. virtual bool initInput();
  20. private Q_SLOTS:
  21. void connected();
  22. void disconnected();
  23. void socketerror(QLocalSocket::LocalSocketError socketError);
  24. void read(int handle);
  25. };
  26. #endif // INPUTLIRC_H