diff options
author | Midas <vdrportal_midas@gmx.de> | 2010-06-08 12:52:10 +0200 |
---|---|---|
committer | Midas <vdrportal_midas@gmx.de> | 2010-06-08 12:52:10 +0200 |
commit | 891bfb5ba9f052f9a97ef0abedeb039236701755 (patch) | |
tree | 839838706677c12ff9f0b9a6a1ee0bdd5926fba3 /config.c | |
parent | 4753e96fbaaf0ac96ea8a8512e90819591cdc723 (diff) | |
download | vdr-plugin-block-891bfb5ba9f052f9a97ef0abedeb039236701755.tar.gz vdr-plugin-block-891bfb5ba9f052f9a97ef0abedeb039236701755.tar.bz2 |
This version completes the basic parental guidance
functions. I will update README soon.
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -13,19 +13,28 @@ cSetupBlock SetupBlock; int cSetupBlock::LastChannel=0; +int cSetupBlock::DetectionMethod=0; +int cSetupBlock::OkAllowed=1; cSetupBlock::cSetupBlock(void): - HideMenuEntry(0), - MessageTimeout(2), - DetectionMethod(0) + HideMenuEntry(0), + MessageTimeout(2), + ExtraOptionsVisible(1) { } bool cSetupBlock::Parse(const char *Name, const char *Value) { if (strcmp(Name, "HideMenuEntry") == 0) HideMenuEntry = atoi(Value); - else if (strcmp(Name, "MessageTimeout") == 0) MessageTimeout = atoi(Value); - else if (strcmp(Name, "DetectionMethod") == 0) DetectionMethod = atoi(Value); - else return false; + else if (strcmp(Name, "MessageTimeout") == 0) MessageTimeout = atoi(Value); + else if (strcmp(Name, "DetectionMethod") == 0) DetectionMethod = atoi(Value); + + //if you want to make use of the following you have to manually add Block.ExtraOptionsVisible to your setup.conf + //0 means options 'Detection Method' and 'Ok temporarily deblocks' are not visible (eg for parental guidance) + //1 means the options are visible in the setup of vdr and everybody could alter the values + else if (strcmp(Name, "ExtraOptionsVisible") == 0) ExtraOptionsVisible = atoi(Value); + + else if (strcmp(Name, "OkAllowed")==0) OkAllowed = atoi(Value); + else return false; return true; } |