diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2000-05-01 16:29:46 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2000-05-01 16:29:46 +0200 |
commit | eff7aa4a3d2247ee3c44031e6bf5d745723cc5ce (patch) | |
tree | 398ba3859a89204ba24fe1e47ca5eab815745ed1 /interface.c | |
parent | f7ac74ede445b099e8fa97a15674f2b4ecde279a (diff) | |
download | vdr-eff7aa4a3d2247ee3c44031e6bf5d745723cc5ce.tar.gz vdr-eff7aa4a3d2247ee3c44031e6bf5d745723cc5ce.tar.bz2 |
Prepared for more than one DVB card
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/interface.c b/interface.c index 446f9c43..add13bec 100644 --- a/interface.c +++ b/interface.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: interface.c 1.6 2000/04/24 09:44:23 kls Exp $ + * $Id: interface.c 1.7 2000/05/01 10:11:26 kls Exp $ */ #include "interface.h" @@ -15,8 +15,6 @@ cRcIo RcIo("/dev/ttyS1"); #endif -cDvbApi DvbApi; //XXX member of cInterface??? - cInterface Interface; cInterface::cInterface(void) @@ -36,7 +34,7 @@ void cInterface::Init(void) void cInterface::Open(int NumCols, int NumLines) { if (!open++) - DvbApi.Open(NumCols, NumLines); + cDvbApi::PrimaryDvbApi->Open(NumCols, NumLines); } void cInterface::Close(void) @@ -44,7 +42,7 @@ void cInterface::Close(void) if (open == 1) Clear(); if (!--open) - DvbApi.Close(); + cDvbApi::PrimaryDvbApi->Close(); } unsigned int cInterface::GetCh(bool Wait) @@ -91,13 +89,13 @@ eKeys cInterface::Wait(int Seconds, bool KeepChar) void cInterface::Clear(void) { if (open) - DvbApi.Clear(); + cDvbApi::PrimaryDvbApi->Clear(); } void cInterface::ClearEol(int x, int y, eDvbColor Color) { if (open) - DvbApi.ClrEol(x, y, Color); + cDvbApi::PrimaryDvbApi->ClrEol(x, y, Color); } void cInterface::SetCols(int *c) @@ -112,7 +110,7 @@ void cInterface::SetCols(int *c) void cInterface::Write(int x, int y, const char *s, eDvbColor FgColor, eDvbColor BgColor) { if (open) - DvbApi.Text(x, y, s, FgColor, BgColor); + cDvbApi::PrimaryDvbApi->Text(x, y, s, FgColor, BgColor); } void cInterface::WriteText(int x, int y, const char *s, bool Current) @@ -198,8 +196,8 @@ void cInterface::HelpButton(int Index, const char *Text, eDvbColor FgColor, eDvb int l = (w - strlen(Text)) / 2; if (l < 0) l = 0; - DvbApi.Fill(Index * w, -1, w, 1, BgColor); - DvbApi.Text(Index * w + l, -1, Text, FgColor, BgColor); + cDvbApi::PrimaryDvbApi->Fill(Index * w, -1, w, 1, BgColor); + cDvbApi::PrimaryDvbApi->Text(Index * w + l, -1, Text, FgColor, BgColor); } } @@ -337,3 +335,9 @@ void cInterface::DisplayChannel(int Number, const char *Name) Close(); } } + +bool cInterface::Recording(void) +{ + // This is located here because the Interface has to do with the "PrimaryDvbApi" anyway + return cDvbApi::PrimaryDvbApi->Recording(); +} |