/*$cb
 *    This file is a part of OpenMHP VDR plugin.
 *
 *    Copyright (C) 2005 Mikko Novaro <miknov@gmail.com>
 *
 *    See README file for licensing and contact information.
 $ce*/

#ifndef _OPENMHP_H_
#define _OPENMHP_H_

#include <vdr/plugin.h>
#include "menu.h"
#include "setup.h"
#include "osd.h"
#include "i18n.h"
#include "libopenmhp/openmhp.h"
// #include <assert.h>

static const char *VERSION        = "0.0.1b";
static const char *DESCRIPTION    = "OpenMHP plugin";
static const char *MAINMENUENTRY  = "OpenMHP";

#define MAXPATHLENGTH 200

class cOpenmhpSetup {
public:
  // Setup variables (see setup.h):
  int DitheringEnabled;
  int OsdBitdepth;
  int OsdScale;
  int VirtualXServer;
  int VirtualXDisplay;
  int OpenmhpOutput;
  char *MhpCacheDir;
  
  cOpenmhpSetup(void);
  ~cOpenmhpSetup(void);
};


class cPluginOpenmhp : public cPlugin {
private:
  // Add any member variables or functions you may need here.
  cOpenmhpMenu *menu;

public:
  cOpenmhpSetup *setup;
  cXlet *xlet;

  cPluginOpenmhp(void);
  virtual ~cPluginOpenmhp();
  virtual const char *Version(void) { return VERSION; }
  virtual const char *Description(void) { return DESCRIPTION; }
  virtual const char *CommandLineHelp(void);
  virtual bool ProcessArgs(int argc, char *argv[]);
  virtual bool Initialize(void);
  virtual bool Start(void);
  virtual void Housekeeping(void);
  virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; }
  virtual cOsdObject *MainMenuAction(void);
  virtual cMenuSetupPage *SetupMenu(void);
  virtual bool SetupParse(const char *Name, const char *Value);
};


#endif
