InputAppleRemote.h 751 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef __INPUT_APPLE_REMOTE_H__
  2. #define __INPUT_APPLE_REMOTE_H__
  3. #include <QObject>
  4. #include <QString>
  5. #include "input/InputComponent.h"
  6. #ifdef __OBJC__
  7. @class AppleRemoteDelegate;
  8. typedef AppleRemoteDelegate delegate;
  9. #else
  10. typedef void delegate;
  11. #endif
  12. class InputAppleRemote : public InputBase
  13. {
  14. public:
  15. InputAppleRemote(QObject* parent = nullptr) : InputBase(parent) { }
  16. virtual const char* inputName() { return "AppleRemote"; }
  17. virtual bool initInput();
  18. void remoteButtonEvent(quint8 code, bool pressed, const QString& name);
  19. void addRemote(const QString& name);
  20. void removeRemote(const QString& name);
  21. void addRemoteFailed(const QString& error);
  22. private:
  23. delegate* m_delegate;
  24. QStringList m_remotes;
  25. };
  26. #endif