/*
 * config.h: A plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id$
 */

#include <stdlib.h>
#include <strings.h>
#include <vdr/plugin.h>
#include "config.h"

cHideSubtitlesConfig::cHideSubtitlesConfig() {
  x = (OSD_WIDTH - BAR_WIDTH)/2-1;
  y = BAR_Y;
  width = BAR_WIDTH;
  height = BAR_HEIGHT;
  space = BAR_SPACE;
}

cHideSubtitlesConfig::~cHideSubtitlesConfig() { }

	
bool cHideSubtitlesConfig::SetupParse(const char *Name, const char *Value) {
  if      (!strcasecmp(Name, "x"))         x = atoi(Value);
  else if (!strcasecmp(Name, "y"))         y = atoi(Value);
  else if (!strcasecmp(Name, "width"))     width = atoi(Value);
  else if (!strcasecmp(Name, "height"))    height = atoi(Value);
  else if (!strcasecmp(Name, "space"))     space = atoi(Value);
  else
    return false;
  return true;
}

void cHideSubtitlesConfig::Store(void) {
  cPluginManager::GetPlugin(PLUGIN_NAME_I18N)->SetupStore("x", x);
  cPluginManager::GetPlugin(PLUGIN_NAME_I18N)->SetupStore("y", y);
  cPluginManager::GetPlugin(PLUGIN_NAME_I18N)->SetupStore("width", width);
  cPluginManager::GetPlugin(PLUGIN_NAME_I18N)->SetupStore("height", height);
  cPluginManager::GetPlugin(PLUGIN_NAME_I18N)->SetupStore("space", space);
}

cHideSubtitlesConfig hsc;
