2007-09-15 17:38:38 +02:00
|
|
|
/*
|
|
|
|
* config.h: IPTV plugin for the Video Disk Recorder
|
|
|
|
*
|
|
|
|
* See the README file for copyright information and how to reach the author.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __IPTV_CONFIG_H
|
|
|
|
#define __IPTV_CONFIG_H
|
|
|
|
|
|
|
|
#include <vdr/menuitems.h>
|
2007-10-07 22:08:44 +02:00
|
|
|
#include "common.h"
|
2007-09-15 17:38:38 +02:00
|
|
|
|
|
|
|
class cIptvConfig
|
|
|
|
{
|
2007-10-20 00:54:03 +02:00
|
|
|
private:
|
2015-03-08 13:33:18 +01:00
|
|
|
unsigned int traceModeM;
|
2014-02-19 20:38:11 +01:00
|
|
|
unsigned int protocolBasePortM;
|
2013-02-23 14:31:11 +01:00
|
|
|
unsigned int useBytesM;
|
|
|
|
unsigned int sectionFilteringM;
|
|
|
|
int disabledFiltersM[SECTION_FILTER_TABLE_SIZE];
|
|
|
|
char configDirectoryM[PATH_MAX];
|
2014-03-09 15:04:54 +01:00
|
|
|
char resourceDirectoryM[PATH_MAX];
|
2007-09-28 18:44:59 +02:00
|
|
|
|
2007-09-15 17:38:38 +02:00
|
|
|
public:
|
2015-03-08 13:33:18 +01:00
|
|
|
enum eTraceMode {
|
|
|
|
eTraceModeNormal = 0x0000,
|
|
|
|
eTraceModeDebug1 = 0x0001,
|
|
|
|
eTraceModeDebug2 = 0x0002,
|
|
|
|
eTraceModeDebug3 = 0x0004,
|
|
|
|
eTraceModeDebug4 = 0x0008,
|
|
|
|
eTraceModeDebug5 = 0x0010,
|
|
|
|
eTraceModeDebug6 = 0x0020,
|
|
|
|
eTraceModeDebug7 = 0x0040,
|
|
|
|
eTraceModeDebug8 = 0x0080,
|
|
|
|
eTraceModeDebug9 = 0x0100,
|
|
|
|
eTraceModeDebug10 = 0x0200,
|
|
|
|
eTraceModeDebug11 = 0x0400,
|
|
|
|
eTraceModeDebug12 = 0x0800,
|
|
|
|
eTraceModeDebug13 = 0x1000,
|
|
|
|
eTraceModeDebug14 = 0x2000,
|
|
|
|
eTraceModeDebug15 = 0x4000,
|
|
|
|
eTraceModeDebug16 = 0x8000,
|
|
|
|
eTraceModeMask = 0xFFFF
|
|
|
|
};
|
2007-09-15 17:38:38 +02:00
|
|
|
cIptvConfig();
|
2015-03-08 13:33:18 +01:00
|
|
|
unsigned int GetTraceMode(void) const { return traceModeM; }
|
|
|
|
bool IsTraceMode(eTraceMode modeP) const { return (traceModeM & modeP); }
|
2014-02-19 20:38:11 +01:00
|
|
|
unsigned int GetProtocolBasePort(void) const { return protocolBasePortM; }
|
2013-02-23 14:31:11 +01:00
|
|
|
unsigned int GetUseBytes(void) const { return useBytesM; }
|
|
|
|
unsigned int GetSectionFiltering(void) const { return sectionFilteringM; }
|
|
|
|
const char *GetConfigDirectory(void) const { return configDirectoryM; }
|
2014-03-09 15:04:54 +01:00
|
|
|
const char *GetResourceDirectory(void) const { return resourceDirectoryM; }
|
2008-01-05 00:36:37 +01:00
|
|
|
unsigned int GetDisabledFiltersCount(void) const;
|
2013-02-23 14:31:11 +01:00
|
|
|
int GetDisabledFilters(unsigned int indexP) const;
|
2015-03-08 13:33:18 +01:00
|
|
|
void SetTraceMode(unsigned int modeP) { traceModeM = (modeP & eTraceModeMask); }
|
2014-02-19 20:38:11 +01:00
|
|
|
void SetProtocolBasePort(unsigned int portNumberP) { protocolBasePortM = portNumberP; }
|
2013-02-23 14:31:11 +01:00
|
|
|
void SetUseBytes(unsigned int onOffP) { useBytesM = onOffP; }
|
|
|
|
void SetSectionFiltering(unsigned int onOffP) { sectionFilteringM = onOffP; }
|
|
|
|
void SetDisabledFilters(unsigned int indexP, int numberP);
|
2007-10-20 00:54:03 +02:00
|
|
|
void SetConfigDirectory(const char *directoryP);
|
2014-03-09 15:04:54 +01:00
|
|
|
void SetResourceDirectory(const char *directoryP);
|
2007-09-15 17:38:38 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extern cIptvConfig IptvConfig;
|
|
|
|
|
|
|
|
#endif // __IPTV_CONFIG_H
|