#ifndef __ADVCHCTRL_H
#define __ADVCHCTRL_H

#include <vdr/plugin.h>

static const char *VERSION        = "0.0.5";
static const char *DESCRIPTION    = "Advanced Channel Control";
static const char *MAINMENUENTRY  = "Advanced Channel Control";


class cStatusAdvChCtrl : public cStatus {
private:
  bool isMute;
  bool isInReplayMode;
  int  ActualVolume;
protected:
   virtual void ChannelSwitch (const cDevice *Device, int ChannelNumber);
   virtual void SetVolume (int Volume, bool Absolute);
#if VDRVERSNUM >= 10338
   virtual void Replaying (const cControl *Control, const char *Name, const char *FileName, bool On);
#else
   virtual void Replaying (const cControl *Control, const char *Name);
#endif
};

class cPluginAdvChCtrl : public cPlugin {
private:
  // Add any member variables or functions you may need here.
  cStatusAdvChCtrl *statusAdvChCtrl;
  cString SVDRPCmdPvolu(const char *Option, int &ReplyCode);
  cString SVDRPCmdRvolu(const char *Option, int &ReplyCode);
  cString SVDRPCmdSvolu(const char *Option, int &ReplyCode);
public:
  cPluginAdvChCtrl(void);
  virtual ~cPluginAdvChCtrl();
  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 (advchctrlConfig.hidemainmenu ? 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 = NULL);
  virtual const char **SVDRPHelpPages(void);	
  virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode);
};
#endif //__ADVCHCTRL_H
