From 45285e8a9300cd754a760560640b75b09f98035e Mon Sep 17 00:00:00 2001 From: AlTheKiller Date: Wed, 23 Sep 2009 01:49:50 +0000 Subject: step 3/4: Move linuxport to trunk. How'd I get roped into this? git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@23097 568bbfeb-2a22-0410-94d2-cc84cf5bfa90 --- guilib/common/LIRC.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 guilib/common/LIRC.h (limited to 'guilib/common/LIRC.h') diff --git a/guilib/common/LIRC.h b/guilib/common/LIRC.h new file mode 100644 index 0000000000..fc6882ab6d --- /dev/null +++ b/guilib/common/LIRC.h @@ -0,0 +1,44 @@ +#ifndef LIRC_H +#define LIRC_H + +#include "../system.h" +#include "StdString.h" + +class CRemoteControl +{ +public: + CRemoteControl(); + ~CRemoteControl(); + void Initialize(); + void Disconnect(); + void Reset(); + void Update(); + WORD GetButton(); + bool IsHolding(); + void setDeviceName(const CStdString& value); + void setUsed(bool value); + bool IsInUse() const { return m_used; } + bool IsInitialized() const { return m_bInitialized; } + +private: + int m_fd; + int m_inotify_fd; + int m_inotify_wd; + int m_lastInitAttempt; + int m_initRetryPeriod; + FILE* m_file; + bool m_isHolding; + WORD m_button; + char m_buf[128]; + bool m_bInitialized; + bool m_skipHold; + bool m_used; + bool m_bLogConnectFailure; + Uint32 m_firstClickTime; + CStdString m_deviceName; + bool CheckDevice(); +}; + +extern CRemoteControl g_RemoteControl; + +#endif -- cgit v1.2.3