aboutsummaryrefslogtreecommitdiff
path: root/lib/driver/rc.h
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-03-06 12:00:06 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-03-06 12:00:06 +0000
commitc4f2b9b542581bf518bc36476e11ec15074f99b4 (patch)
tree1b92b6e81cb91f471751d8b26b63b9ab7b17378e /lib/driver/rc.h
parentc5245596a287e0519d0684eb10ea111da75b9360 (diff)
downloadenigma2-c4f2b9b542581bf518bc36476e11ec15074f99b4.tar.gz
enigma2-c4f2b9b542581bf518bc36476e11ec15074f99b4.zip
add possibility to lock/unlock the rc devices (remote control) from python
it is usable by this way: from enigma import eRCInput, eRCInputPtr (or *) rcinput = eRCInput.getInstance() rcinput.lock()... unlock()... islocked()
Diffstat (limited to 'lib/driver/rc.h')
-rw-r--r--lib/driver/rc.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/lib/driver/rc.h b/lib/driver/rc.h
index 1ce13c72..e9542ca8 100644
--- a/lib/driver/rc.h
+++ b/lib/driver/rc.h
@@ -12,6 +12,8 @@ class eRCInput;
class eRCDriver;
class eRCKey;
+#ifndef SWIG
+
/**
* \brief A remote control.
*
@@ -161,13 +163,19 @@ public:
rrate; // repeat rate (in ms)
};
+#endif
+
class eRCInput: public Object
{
int locked;
int handle;
static eRCInput *instance;
int keyboardMode;
-
+#ifdef SWIG
+ eRCInput();
+ ~eRCInput();
+public:
+#else
public:
struct lstr
{
@@ -182,10 +190,7 @@ public:
Signal1<void, const eRCKey&> keyEvent;
eRCInput();
~eRCInput();
-
- int lock();
- void unlock();
- int islocked() { return locked; }
+
void close();
bool open();
@@ -224,10 +229,13 @@ public:
void removeDevice(const std::string &id);
eRCDevice *getDevice(const std::string &id);
std::map<std::string,eRCDevice*,lstr> &getDevices();
-
- static eRCInput *getInstance() { return instance; }
-
+
eRCConfig config;
+#endif
+ static eRCInput *getInstance() { return instance; }
+ int lock();
+ void unlock();
+ int islocked() { return locked; }
};
#endif