#ifndef VDR_EM84XX_SETUP_H
#define VDR_EM84XX_SETUP_H

#include <vdr/menuitems.h>

#define NOOFPLAYERKEYS	35
#define NOOFPLAYERACTIONS	23

struct tDiscPlayerKey
{
	eKeys key;
	char *name;
	char *storename;
};

extern tDiscPlayerKey discPlayerKeyTable[];

enum eDiscActions
{
	discActionNone = 0,
	discExit,
	discTimeJump,
	discPrevMinute,
	discNextMinute,
	discPrevTrack,
	discNextTrack,
	discPrevChapter,
	discNextChapter,
	discPlay,
	discPause,
	discForward,
	discRewind,
	discNextAudiostream,
	discNextSubpicture,
	discNextAngle,
	discDvdRootMenu,
	discDvdTitleMenu,
	discDvdSubpictureMenu,
	discDvdAudioMenu,
	discDvdAngleMenu,
	discDvdChapterMenu,
	discDvdResumeBookmark
};

struct cSetupEm84xx
{
public:
	int TvIs169;	
	int Tv169HandleOther;	
	int Tv43HandleOther;
	int Contrast;
	int Brightness;
	int Saturation;
	int SpdifForward;
//	int DoAudioLater;
	int ControlDvdSpeed;
	int DvdMenuOnStart;
	int DvdAudioLanguage;
	int DvdSubpictureLanguage;
	int DvdMenuLanguage;
	int DvdSubpicture;

	int PlayerKeys[NOOFPLAYERKEYS];

	cSetupEm84xx(void);

	bool SetupParse(const char *Name, const char *Value);
};

extern cSetupEm84xx SetupEm84xx;

class cMenuSetupEm84 : public cMenuSetupPage
{
friend class cSubMenuSetupEm84Base;

private:
	cSetupEm84xx mSetup;

protected:
	virtual void Store(void);
public:
	cMenuSetupEm84(void);
	virtual eOSState ProcessKey(eKeys Key);
};

// --- cMenuSetupBase --------------------------------------------------------

class cSubMenuSetupEm84Base : public cMenuSetupPage
{
protected:
	cSetupEm84xx *mSetup;
	cMenuSetupEm84 *mSetupMenu;
public:
	cSubMenuSetupEm84Base(cMenuSetupEm84 *iSetupMenu, cSetupEm84xx *iSetup);
	virtual void Store(void);
};

class cSubMenuSetupEm84_Video : public cSubMenuSetupEm84Base
{
public:
	cSubMenuSetupEm84_Video(cMenuSetupEm84 *iSetupMenu, cSetupEm84xx *iSetup);
};

class cSubMenuSetupEm84_Audio : public cSubMenuSetupEm84Base
{
public:
	cSubMenuSetupEm84_Audio(cMenuSetupEm84 *iSetupMenu, cSetupEm84xx *iSetup);
};

class cSubMenuSetupEm84_DVD : public cSubMenuSetupEm84Base
{
public:
	cSubMenuSetupEm84_DVD(cMenuSetupEm84 *iSetupMenu, cSetupEm84xx *iSetup);
};

class cSubMenuSetupEm84_DVDPlayer : public cSubMenuSetupEm84Base
{
public:
	cSubMenuSetupEm84_DVDPlayer(cMenuSetupEm84 *iSetupMenu, cSetupEm84xx *iSetup);
};
#endif // #ifndef VDR_EM84XX_SETUP_H

