aboutsummaryrefslogtreecommitdiff
path: root/guilib/common/LIRC.h
diff options
context:
space:
mode:
authorAlTheKiller <AlTheKiller@svn>2009-09-23 01:49:50 +0000
committerAlTheKiller <AlTheKiller@svn>2009-09-23 01:49:50 +0000
commit45285e8a9300cd754a760560640b75b09f98035e (patch)
treead9f093885ad5c98e9dd4156674e7691c22ed0a2 /guilib/common/LIRC.h
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
Diffstat (limited to 'guilib/common/LIRC.h')
-rw-r--r--guilib/common/LIRC.h44
1 files changed, 44 insertions, 0 deletions
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