
#ifndef __ARGHDIRECTOR_H
#define __ARGHDIRECTOR_H

#include <vdr/menuitems.h>
#include <vdr/plugin.h>
#include <vdr/status.h>
#include <vdr/remote.h>
#include "osdproxy.h"

static const char *VERSION        = "0.2.6b";
static const char *DESCRIPTION    = "plugin to use the premiere multifeed option";
static const char *MAINMENUENTRY  = "arghDirector";

#define NOOFALLOWEDBUTTONS 14

class cMenuDirectorData : public cOsdProxyData
{
   public:

      int mHidePluginEntryInMainMenu;
      int mPortalmode;
      int mSwapKeys;
      int mSwapKeysInMenu;
      int mDisplayChannelInfo;
      int mSwitchChannelOnItemSelect;
      int mHidePluginAfterChannelSwitch;
      int mDisplayShortcutNumbers;
      int mDisplayEpgInfo;
      int mShowNext;
      int mShowOldDirectorOsd;
      eKeys mHideButton;
      int mHideButtonIndex;
      int mAutoStart;

      cMenuDirectorData();
      virtual ~cMenuDirectorData() {}
};

class cMenuSetupDirector : public cMenuSetupPage 
{
   public:

      cMenuSetupDirector(cMenuDirectorData* Config);

      static const char* allowedButtonNames[];
      static eKeys allowedButtons[];

   protected:

      virtual void Store(void);
      cMenuDirectorData* config;
};

#if VDRVERSNUM >= 10332

class cDirectorStatus : public cStatus
{
   private:
      cPlugin* parent;
   protected:
      virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber);
   public:
      cDirectorStatus(cPlugin* plugin);
};
#endif

class cMenuEditStraItemTr : public cMenuEditIntItem 
{
   private:
      const char* const *strings;
   protected:
      virtual void Set(void);
   public:
      cMenuEditStraItemTr(const char *Name, int *Value, int NumStrings, const char * const *Strings);
};

class cPluginDirector : public cPlugin 
{
   private:	

#if VDRVERSNUM >= 10332
      cDirectorStatus *directorStatus;
#endif
      cMenuDirectorData* config;

   public:

      cPluginDirector(void);
      virtual ~cPluginDirector();
      virtual const char *Version(void)                { return VERSION; }
      virtual const char *Description(void)            { return DESCRIPTION; }
      virtual const char *CommandLineHelp(void)        { return NULL; }
      virtual bool ProcessArgs(int argc, char *argv[]) { return true; }
      virtual bool Start(void);
      virtual void Housekeeping(void);
      virtual const char *MainMenuEntry(void) 
      { return config->mHidePluginEntryInMainMenu ? NULL : tr(MAINMENUENTRY); }
      virtual cOsdObject *MainMenuAction(void);
      virtual cMenuSetupPage *SetupMenu(void);
      virtual bool SetupParse(const char *Name, const char *Value);
};

#endif //__ARGHDIRECTOR_H
