summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-05-28 14:28:36 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-05-28 14:28:36 +0200
commitd63e99d8efc20a84fa0720092ee098cc1c02e157 (patch)
tree656024b219ed3d7b7d629ef7ca5257bc4b861523 /remote.c
parenteb13b8eadd845efab288a87e0bc263bfdc46bc64 (diff)
downloadvdr-d63e99d8efc20a84fa0720092ee098cc1c02e157.tar.gz
vdr-d63e99d8efc20a84fa0720092ee098cc1c02e157.tar.bz2
Implemented a default cRemote::Initialize()
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/remote.c b/remote.c
index 227f640c..b435bc46 100644
--- a/remote.c
+++ b/remote.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remote.c 1.39 2003/10/18 11:35:32 kls Exp $
+ * $Id: remote.c 1.40 2004/05/28 14:19:52 kls Exp $
*/
#include "remote.h"
@@ -18,6 +18,8 @@
// --- cRemote ---------------------------------------------------------------
+#define INITTIMEOUT 10000 // ms
+
eKeys cRemote::keys[MaxKeys];
int cRemote::in = 0;
int cRemote::out = 0;
@@ -48,6 +50,17 @@ void cRemote::PutSetup(const char *Setup)
Keys.PutSetup(Name(), Setup);
}
+bool cRemote::Initialize(void)
+{
+ if (Ready()) {
+ char *NewCode = NULL;
+ eKeys Key = Get(INITTIMEOUT, &NewCode);
+ if (Key != kNone || NewCode)
+ return true;
+ }
+ return false;
+}
+
void cRemote::Clear(void)
{
cMutexLock MutexLock(&mutex);