summaryrefslogtreecommitdiff
path: root/interface.h
blob: 9e10f40b272f8a0ddeb98c271286e17e4e38b593 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 * interface.h: Abstract user interface layer
 *
 * See the main source file 'vdr.c' for copyright information and
 * how to reach the author.
 *
 * $Id: interface.h 2.0 2004/05/01 11:11:13 kls Exp $
 */

#ifndef __INTERFACE_H
#define __INTERFACE_H

#include "config.h"
#include "remote.h"
#include "skins.h"
#include "svdrp.h"

class cInterface {
private:
  bool interrupted;
  cSVDRP *SVDRP;
  bool QueryKeys(cRemote *Remote, cSkinDisplayMenu *DisplayMenu);
public:
  cInterface(int SVDRPport = 0);
  ~cInterface();
  bool HasSVDRPConnection(void) { return SVDRP && SVDRP->HasConnection(); }
  void Interrupt(void) { interrupted = true; }
  eKeys GetKey(bool Wait = true);
  eKeys Wait(int Seconds = 0, bool KeepChar = false);
  bool Confirm(const char *s, int Seconds = 10, bool WaitForTimeout = false);
  void LearnKeys(void);
  };

extern cInterface *Interface;

#endif //__INTERFACE_H