#ifndef __SKEDMENU_H
#define __SKEDMENU_H

#include <vdr/osd.h>
#include <vdr/menuitems.h>
#include <vdr/plugin.h>

class cSkedMenu: public cOsdMenu {
	public:
		int SoftCamFileKeyNbr;
		int SoftCamFileTotalNbr;
		int SoftCamFileSecaNbr;
		int SoftCamFileViacNbr;
		int SoftCamFileNagraNbr;
		int SoftCamFileIrdetoNbr;
		int SoftCamFileUnknownNbr;
		struct Key{
			char Type[2];
			char Prov[10];
			char NRom[6];
			char OK[3];
			char PlainCle[200];
		};
		Key tableau[1000];
		cSkedMenu(void);
		~cSkedMenu(void);
		virtual eOSState ProcessKey(eKeys Key);
		void display(char *text);
		void LoadSoftCam(void);
		void Draw(void);
		void InsertTableau(char *Line,int pos);
		void ImportKey(void);
		void SaveSK(void);
};


class cSkedAdd : public cOsdMenu {
	private: 
		cSkedMenu *SKMenu;
		char cleval[17];
		char prov[7];
		int provlen;
		char clenum[3]; 
		char type[2];
		char oldtype[2];
		//FILE *f;

	public: 
		cSkedAdd(cSkedMenu &SK);
		~cSkedAdd(void);
		void DrawMenu(void);
		virtual eOSState ProcessKey(eKeys Key);
		void CheckProv();
};

class cSkedVisu : public cOsdMenu {
	private: cSkedMenu *SKMenu;
	public:
		//cSkedVisu(void);
		cSkedVisu(cSkedMenu &SK);
		~cSkedVisu(void);
		void display(char *text,bool Sel);
		virtual eOSState ProcessKey(eKeys Key);
};

class cSkedSearch : public cOsdMenu {
	private:
		char type[2];
		char oldtype[2];
		char prov[7];
		int provlen;
		cSkedMenu *SKMenu;
	public:
		//cSkedSearch(void);
		cSkedSearch(cSkedMenu &SK);
		~cSkedSearch(void);
		void SearchMenu(void);
		eOSState ProcessKey(eKeys Key);
		void CheckProv(void);
};

class cResultMenu : public cOsdMenu {
	private:
		cSkedMenu *SKMenu;
	public:
		cResultMenu(char *type, char *prov,cSkedMenu &SK);
		~cResultMenu(void);
		eOSState ProcessKey(eKeys Key);
		void display(char *text,bool Sel);
};
#endif //__SKEDMENU_H
