1
0
mirror of https://github.com/rofafor/vdr-plugin-satip.git synced 2023-10-10 13:37:42 +02:00
vdr-plugin-satip/config.h

69 lines
2.4 KiB
C
Raw Normal View History

2014-03-08 12:07:47 +01:00
/*
* config.h: SAT>IP plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
#ifndef __SATIP_CONFIG_H
#define __SATIP_CONFIG_H
#include <vdr/menuitems.h>
#include "common.h"
class cSatipConfig
{
private:
unsigned int operatingModeM;
unsigned int logLevelM;
2014-03-08 12:07:47 +01:00
unsigned int eitScanM;
unsigned int useBytesM;
2014-10-31 21:07:33 +01:00
int disabledSourcesM[MAX_DISABLED_SOURCES_COUNT];
2014-03-08 12:07:47 +01:00
int disabledFiltersM[SECTION_FILTER_TABLE_SIZE];
char configDirectoryM[PATH_MAX];
public:
enum {
eOperatingModeOff = 0,
eOperatingModeLow,
eOperatingModeNormal,
eOperatingModeHigh,
eOperatingModeCount
};
enum {
eLogLevelNormal = 0x00,
eLogLevelDebug = 0x01,
eLogLevelExtra = 0x02,
eLogLevelMask = 0x0F
};
2014-03-08 12:07:47 +01:00
cSatipConfig();
unsigned int GetOperatingMode(void) const { return operatingModeM; }
bool IsOperatingModeOff(void) const { return (operatingModeM == eOperatingModeOff); }
bool IsOperatingModeLow(void) const { return (operatingModeM == eOperatingModeLow); }
bool IsOperatingModeNormal(void) const { return (operatingModeM == eOperatingModeNormal); }
bool IsOperatingModeHigh(void) const { return (operatingModeM == eOperatingModeHigh); }
void ToggleOperatingMode(void) { operatingModeM = (operatingModeM + 1) % eOperatingModeCount; }
unsigned int GetLogLevel(void) const { return logLevelM; }
bool IsLogLevelDebug(void) const { return (logLevelM & eLogLevelDebug); }
bool IsLogLevelExtra(void) const { return (logLevelM & eLogLevelExtra); }
2014-03-08 12:07:47 +01:00
unsigned int GetEITScan(void) const { return eitScanM; }
unsigned int GetUseBytes(void) const { return useBytesM; }
const char *GetConfigDirectory(void) const { return configDirectoryM; }
2014-10-31 21:07:33 +01:00
unsigned int GetDisabledSourcesCount(void) const;
int GetDisabledSources(unsigned int indexP) const;
2014-03-08 12:07:47 +01:00
unsigned int GetDisabledFiltersCount(void) const;
int GetDisabledFilters(unsigned int indexP) const;
void SetOperatingMode(unsigned int operatingModeP) { operatingModeM = operatingModeP; }
void SetLogLevel(unsigned int logLevelP) { logLevelM = (logLevelP & eLogLevelMask); }
2014-03-08 12:07:47 +01:00
void SetEITScan(unsigned int onOffP) { eitScanM = onOffP; }
void SetUseBytes(unsigned int onOffP) { useBytesM = onOffP; }
void SetConfigDirectory(const char *directoryP);
2014-10-31 21:07:33 +01:00
void SetDisabledSources(unsigned int indexP, int sourceP);
2014-03-08 12:07:47 +01:00
void SetDisabledFilters(unsigned int indexP, int numberP);
};
extern cSatipConfig SatipConfig;
#endif // __SATIP_CONFIG_H