#ifndef __ADVCHCTRLCHANNEL_H
#define __ADVCHCTRLCHANNEL_H

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

#define CHANNELSMAX 255

class cAdvChCtrlChannel : public cListObject {
private:
  tChannelID Index;
  int        Volume;		// This is the advaced channel control volume
public:
  bool Parse(char *s);
  bool Save(FILE *f);
  const tChannelID GetIndex() { return Index; }
  void SetIndex(tChannelID index) { Index = index; }
  void SetVolume(int volume) { Volume = volume; }
  int GetVolume(tChannelID index);
//  virtual int Compare(const cListObject &ListObject) const;
};

class cAdvChCtrlChannels : public cConfig<cAdvChCtrlChannel> {
private:
  const char *FileName_;
public:
  static tChannelID channel_to_remove;
  virtual bool Load(const char *filename, bool dummy=false);
  bool Save(void);
  cAdvChCtrlChannel *GetAVolCtrlChannelNumber(int number);
  void AddAVolCtrlChannel(const tChannelID Index, int Volume, int DefaultVolume);
  void RemoveAVolCtrlChannel(tChannelID number);
  int  GetVolume(tChannelID Index);
};

extern cAdvChCtrlChannels   AdvChCtrlChannelsList;
#endif //__ADVCHCTRLCHANNEL_H

