/*
 * Least Cost Routing plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id$
 */

#ifndef __LCR_H
#define __LCR_H

#include <getopt.h>
#include <vdr/plugin.h>

#include "lcrcfg.h"
#include "lcri18n.h"
#include "lcrosd.h"

static const char *VERSION        = "0.0.8";
static const char *DESCRIPTION    = "Displays telephone rates on OSD";
static const char *MAINMENUENTRY  = "Least Cost Routing";
static const char *SOURCE         = "www.teltarif.de";

// default if no script is given on command line:
#ifndef RETRIEVAL_SCRIPT
#define RETRIEVAL_SCRIPT /usr/bin/vdr-lcr-retrieve_data.pl
#endif

#ifndef XQUOTE
#define XQUOTE(S) QUOTE(S)
#define QUOTE(S) #S
#endif

extern char *retrievalScript;

class cPluginLcr : public cPlugin {
private:
  // Add any member variables or functions you may need here.
  cLcrOsd *vLcrOsd;

public:
  cPluginLcr(void);
  virtual ~cPluginLcr();
  virtual const char *Version(void) { return VERSION; }
  virtual const char *Description(void) { return tr(DESCRIPTION); }
  virtual const char *CommandLineHelp(void);
  virtual bool ProcessArgs(int argc, char *argv[]);
  virtual bool Initialize(void);
  virtual bool Start(void);
  virtual void Stop(void);
  virtual void Housekeeping(void);
  virtual const char *MainMenuEntry(void) { return (lcrConfig.hidemenu ? NULL : tr(MAINMENUENTRY)); }
  virtual cOsdObject *MainMenuAction(void);
  virtual cMenuSetupPage *SetupMenu(void);
  virtual bool SetupParse(const char *Name, const char *Value);
  virtual bool Service(const char *Id, void *Data);
  };

class cMenuLcrSetup : public cMenuSetupPage {
  private:
    int hidemenuNew;
    int displaymodeNew;
    int themeNew;
    int preferredEntryNew;
    int otherDisplaysNew;
    int highlightEntryNew;
    int updateintervalNew;
    int osdheightNew;
    int osdoffsetXNew;
    int osdoffsetYNew;
    int zoomInNew;
    int logoFrameNew;
    int destinationNew[10];
    const char *themes[eLcrThemeMaxNumber];
    virtual void Setup(void);
  protected:
//    virtual eOSState ProcessKey(eKeys Key);
    virtual void Store(void);
  public:
    cMenuLcrSetup(void);
  };

#endif //__LCR_H

