/*
 */

#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <vdr/tools.h>
#include <vdr/config.h>
#include "digicam-setup.h"
#include "i18n.h"

cDigicamSetup DigicamSetup;

// --- cDigicamSetup -----------------------------------------------------------

cDigicamSetup::cDigicamSetup(void)
{
  DownloadThread = 1;
}

bool cDigicamSetup::SetupParse(const char *szName, const char *szValue)
{
  if(!strcasecmp(szName, "DownloadThread"))
    DownloadThread = atoi(szValue);
    
  return true;
}

// --- cMenuSetupDigicam --------------------------------------------------------
void cMenuSetupDigicam::Store(void)
{
  DigicamSetup = m_tmpSetup;
  SetupStore("DownloadThread", DigicamSetup.DownloadThread);
}

cMenuSetupDigicam::cMenuSetupDigicam(void)
: m_tmpSetup(DigicamSetup)
{
  SetSection(tr("Digicam"));
  
  Add( new cMenuEditBoolItem(tr("Threaded directory download"), &m_tmpSetup.DownloadThread, 
    tr("no"), tr("yes") ));
}
