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:
|
2014-03-10 20:21:08 +01:00
|
|
|
unsigned int operatingModeM;
|
2014-12-05 23:02:51 +01:00
|
|
|
unsigned int loggingM;
|
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:
|
2014-03-10 20:21:08 +01:00
|
|
|
enum {
|
2014-03-13 17:23:55 +01:00
|
|
|
eOperatingModeOff = 0,
|
|
|
|
eOperatingModeLow,
|
|
|
|
eOperatingModeNormal,
|
|
|
|
eOperatingModeHigh,
|
|
|
|
eOperatingModeCount
|
2014-03-10 20:21:08 +01:00
|
|
|
};
|
2014-12-03 18:57:23 +01:00
|
|
|
enum {
|
2014-12-05 23:02:51 +01:00
|
|
|
eLoggingNormal = 0x00,
|
2014-12-06 16:02:45 +01:00
|
|
|
eLoggingDebug1 = 0x01,
|
|
|
|
eLoggingDebug2 = 0x02,
|
|
|
|
eLoggingDebug3 = 0x04,
|
|
|
|
eLoggingDebug4 = 0x08,
|
|
|
|
eLoggingDebug5 = 0x10,
|
|
|
|
eLoggingDebug6 = 0x20,
|
|
|
|
eLoggingDebug7 = 0x40,
|
|
|
|
eLoggingDebug8 = 0x80,
|
|
|
|
eLoggingMask = 0xFF
|
2014-12-03 18:57:23 +01:00
|
|
|
};
|
2014-03-08 12:07:47 +01:00
|
|
|
cSatipConfig();
|
2014-03-10 20:21:08 +01:00
|
|
|
unsigned int GetOperatingMode(void) const { return operatingModeM; }
|
2014-03-13 17:23:55 +01:00
|
|
|
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; }
|
2014-12-05 23:02:51 +01:00
|
|
|
unsigned int GetLogging(void) const { return loggingM; }
|
2014-12-06 16:02:45 +01:00
|
|
|
bool IsLoggingDebug1(void) const { return (loggingM & eLoggingDebug1); }
|
|
|
|
bool IsLoggingDebug2(void) const { return (loggingM & eLoggingDebug2); }
|
|
|
|
bool IsLoggingDebug3(void) const { return (loggingM & eLoggingDebug3); }
|
|
|
|
bool IsLoggingDebug4(void) const { return (loggingM & eLoggingDebug4); }
|
|
|
|
bool IsLoggingDebug5(void) const { return (loggingM & eLoggingDebug5); }
|
|
|
|
bool IsLoggingDebug6(void) const { return (loggingM & eLoggingDebug6); }
|
|
|
|
bool IsLoggingDebug7(void) const { return (loggingM & eLoggingDebug7); }
|
|
|
|
bool IsLoggingDebug8(void) const { return (loggingM & eLoggingDebug8); }
|
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;
|
|
|
|
|
2014-03-10 20:21:08 +01:00
|
|
|
void SetOperatingMode(unsigned int operatingModeP) { operatingModeM = operatingModeP; }
|
2014-12-05 23:02:51 +01:00
|
|
|
void SetLogging(unsigned int logLevelP) { loggingM = (logLevelP & eLoggingMask); }
|
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
|