2002-10-06 10:25:42 +02:00
|
|
|
/*
|
|
|
|
* sources.h: Source handling
|
|
|
|
*
|
|
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
|
|
* how to reach the author.
|
|
|
|
*
|
2004-01-11 15:54:37 +01:00
|
|
|
* $Id: sources.h 1.2 2004/01/11 10:35:36 kls Exp $
|
2002-10-06 10:25:42 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SOURCES_H
|
|
|
|
#define __SOURCES_H
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
class cSource : public cListObject {
|
|
|
|
public:
|
|
|
|
enum eSourceType {
|
|
|
|
stNone = 0x0000,
|
|
|
|
stCable = 0x4000,
|
|
|
|
stSat = 0x8000,
|
|
|
|
stTerr = 0xC000,
|
|
|
|
st_Mask = 0xC000,
|
|
|
|
st_Neg = 0x0800,
|
2004-01-11 15:54:37 +01:00
|
|
|
st_Pos = 0x07FF,
|
2002-10-06 10:25:42 +02:00
|
|
|
};
|
|
|
|
private:
|
|
|
|
int code;
|
|
|
|
char *description;
|
|
|
|
public:
|
|
|
|
cSource(void);
|
|
|
|
~cSource();
|
|
|
|
int Code(void) const { return code; }
|
|
|
|
const char *Description(void) const { return description; }
|
|
|
|
bool Parse(const char *s);
|
|
|
|
static const char *ToString(int Code);
|
|
|
|
static int FromString(const char *s);
|
2004-01-11 15:54:37 +01:00
|
|
|
static int FromData(eSourceType SourceType, int Position = 0, bool East = false);
|
2002-10-06 10:25:42 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class cSources : public cConfig<cSource> {
|
|
|
|
public:
|
|
|
|
cSource *Get(int Code);
|
|
|
|
};
|
|
|
|
|
|
|
|
extern cSources Sources;
|
|
|
|
|
|
|
|
#endif //__SOURCES_H
|