//
//
// DVBCore/MyTheatre header for Plugins.
// Copyright ®2002 - 2004 Saar Software
// www.dvbcore.com
//
//
#include <windows.h>
#if !defined(_DVBCORE_H_)
#define _DVBCORE_H_

//#pragma once
#pragma pack(push, pack1, 1) //All structures are packed!

#define DVB_HDRVER_TP_INFO			0x105
#define DVB_HDRVER_PLG_INFO			0x101
#define DVB_HDRVER_TUNER_INFO		0x102
#define DVB_HDRVER_EPG_EVENT		0x101

// errors 
#define	DVB_ERROR_NONE				0	 
#define	DVB_ERROR_DRIVER			1	 
#define	DVB_ERROR_HARDWARE			2	 
#define	DVB_ERROR_PARAMETER			3	 
#define	DVB_ERROR_TIMEOUT			4	 
#define	DVB_ERROR_STATE				5	 
#define	DVB_ERROR_RESOURCES			6	 
#define	DVB_ERROR_GENERAL			7	 
#define DVB_ERROR_PAT_INVALID		1000 // Error in Program Association Table
#define DVB_ERROR_NO_SIGNAL			1001 // No signal after setting tuner
#define DVB_ERROR_NOT_SUPPORTED		1002 // function isn't supported
#define DVB_ERROR_CANCELED			1003 // canceled
#define DVB_ERROR_NOTFOUND			1004 // for DVBEPGProc



//***************************** GENERAL FUNCTIONS *************************************************************************


//Get Version of DVBCore
extern "C" DWORD __stdcall DVBGetCoreVer(char String[100] = NULL);				


//****************************** MAIN CONTROL FUNCTION OF DVBCORE *******************************************


#define GET_PATINFO			0x0000100	//Get Program Association Table (PMT PIDs, Channel IDs)
#define GET_CATINFO			0x0000200	//Get Condotion Access Table (All EMM PIDs)
#define GET_PMTINFO			0x0000400	//Get Program Map Table for specified channel (Audio, Video, PCR, ECM PIDs)
#define GET_SDTINFO			0x0000800	
#define GET_ALLPMTINFO		0x0001000	//Same as before but for all channels from current transponder
#define GET_ALLTABLESINFO	GET_PATINFO | GET_CATINFO | GET_ALLPMTINFO | GET_SDTINFO
#define GET_TUNERDISEQINFO	0x0002000	//Get current parameters from Tuner and DiSEq (allways from cache)
#define GET_ALLINFO			GET_PATINFO | GET_CATINFO | GET_ALLPMTINFO | GET_SDTINFO | GET_TUNERDISEQINFO


//
// Tip: You may mix some flags. for example: (SET_DISEQ | SET_TUNER | GET_ALLINFO| SET_PIDS) 
// It will setup DiSEq and Tuner then gat all info about this transponder, then setup PIDS of first channel.
//

#define LNB_VOLT00		0  // zero volt (power off)
#define LNB_POWEROFF	0  // zero volt (power off)
#define LNB_VOLT13		13 // 13 volt (vertical polarisation)
#define	LNB_POL_VERT	13 // 13 volt (vertical polarisation)
#define LNB_VOLT18		18 // 18 volt (horizontal polarisation)
#define LNB_POL_HORZ	18 // 18 volt (horizontal polarisation)



// const for wDataValid
#define PAT_VALID		1	//info about PAT is valid
#define CAT_VALID		2	//info about Condition Access in current structure is valid
#define PMT_VALID		4	
#define SDT_VALID		8


//const for wCount, wChCount
#define CURRENT_NONE	0xFFFF	//No current options..

#define TPI_CA_COUNT	64
#define TPI_AUD_COUNT	16
#define TXT_MGZ_COUNT	4
#define TPI_CH_COUNT	128
#define TPI_NAME_LEN	64


//For AUD_PID->dwFlags
#define DVB_AUDIO_ISO11172  0x00
#define DVB_AUDIO_ISO13818  0x01
#define DVB_AUDIO_AC3		0x02
#define DVB_AUDIO_TYPEMASK	0x0F


struct CA_INFO
{
	WORD	wCount;					//Quantity of PIDs
	WORD	wCurrent;				//Current PID. for current EMM dont use this field. use Channel.wEMMCurrent instead!
	WORD	wCA_Type[TPI_CA_COUNT];	//Type of CA system (i.e. Viaccess = 0x0500)
	WORD	wPID[TPI_CA_COUNT];		//PID for CA
};

struct AUD_PID
{
	WORD	wCount;					//Quantity of PIDs
	WORD	wCurrent;				//Current PID
	WORD	wPID[TPI_AUD_COUNT];	//PID :)
	DWORD	dwFlags[TPI_AUD_COUNT];	//see DVB_AUDIO_*
};

struct TXT_MGZ
{
	WORD	wCount;					//Quantity of Magazines
	WORD	wCurrent;				//Current Magazine
	WORD	wOpt[TXT_MGZ_COUNT];	//Option bits: 0-7 page number, 8-10 - magazine number, 11-15 - Teletext Type
	DWORD	dwLang[TXT_MGZ_COUNT];	//Language ID for Magazine
};


struct CH_INFO
{
	WORD	wDataValid;				//Flag for validating data in all fields except wSID and wPMT (validate these fields by TP_INFO.wDataValid)
	DWORD   dwUserFlags;			//User defined flags or variable;
	WORD	wSID;					//Channel ID
	WORD	wPMT;					//PID for Program Map Table  
	WORD	wTeletext;				//Teletext PID. 0 if none
	WORD	wType;					//Type of Channel. i.e. 1- Video, 2 - Radio
	WORD	wScrambleFlg;			//$10 means channel is scrambled
	char	Ch_Name[TPI_NAME_LEN];	//Channel Name		
	char	Prov_Name[TPI_NAME_LEN];//Provider Name		
	WORD	wPCR;					//PID for Program Clock Reference
	WORD	wVideo;					//Video PID
	AUD_PID	Audio;					//Array of Audio PIDs
	TXT_MGZ TxtMgz;					//Array of Teletext Magazines
	WORD	wEMMCurrent;			//Current EMM pid for current channel  
	CA_INFO	ECM;					//Array or ECM PIDs
};


struct TP_INFO
{
	DWORD	HdrVer;					//Structure version. Please check this for sure data is in expected form
	WORD	wDataValid;				//Flag for validating data in wChCount, wChCurrent, all EMMs, all wPMT and all wSID
	DWORD   dwUserFlags;			//User defined flags or variable;
	BYTE	DiSEqData[32];			//Data for DiSEq
	BYTE	bDiSEqLen;				//Length of DiSEq Data
	BYTE	bDiSEqToneburst;		
    DWORD	dwSymbRate;				//Symbol Rate of Transponder (DVB-S and DVB-C only)
    DWORD	dwFreq;					//Frequency
    DWORD	dwLNB_Power;			//Power for LNB (DVB-S only)
	DWORD	dwInversion;			//Spectral Inversion
	DWORD	dwLOF;					//LOF for DVB-S, QAM for DVB-C
	BOOL	bF22KHz;				//ON/OFF 22KHz (DVB-S only)
	DWORD	dwViterbi;				//Viterbi Rate (DVB-S only)
	WORD	wChCount;				//Quantity of Channels of current transponder
	WORD	wChCurrent;				//Current Channel
	CH_INFO	Channel[TPI_CH_COUNT];	//Channel Map
	CA_INFO EMM;					//Array of EMM PIDs
	WORD	wSatID;				    //it's a position of Satellite in degrees. i.e.: 0360, 0192, 0050..
									//mustbe filled by application before set-up tuner if it supports DiSEqC plugins.
	WORD	wNetID;					//Network ID
	WORD    wTSID;					//Transport Stream ID
};


//Main management function to SET/GET parameters about transponder and channels
extern "C" DWORD	__stdcall DVBParams(TP_INFO* TP_Info, DWORD Options);	



//****************************************** FILTER FUNCTIONS ************************************************************


//Filter Types
#define	FT_NO_FILTER_TYPE			0
#define	FT_STREAMING_FILTER			1
#define	FT_PIPING_FILTER			2
#define	FT_SECTION_FILTER			3
#define	FT_PES_FILTER			    4

//Capture full TS packets (i.e. 188 bytes per packet)
//SkyStar-1 doesn't support this filter!
//You may grab it from SS1, but these packets will be emulated.
#define FT_TS_STREAMING_FILTER		90

//DWORD PID parameter consist of two WORDs which identifies range of PIDs [LOWWord...HIGHWord]
#define FT_TS_MULTIPID_FILTER		91


//Alternative Section Filter. Behaviour is the same as FT_SECTION_FILTER but might be mixed 
//with FT_STREAMING_FILTER from one PID. Also multiple masks suppirted!
//I strongly suggest use this kind of filter instead FT_SECTION_FILTER.
#define FT_ALT_SECTION_FILTER		100  

//Experimetal Alternative High-Speed Section filter. 
//I not recommend use it now. 
//Need some more testings for compatibility.
#define FT_ALT_HS_SECTION_FILTER	101



#define FT_CMD_CLOSE						0x80000001	//Filter to be closed
#define FT_CMD_CHANNEL_WILLBE_CHANGED		0x80000100	//Channel is going to change. Param = 0;
#define FT_CMD_CHANNEL_CHANGED				0x80000101	//Channel was changed. Param points to CH_INFO structure.
#define FT_CMD_STOPCAPTURE					0x80000102	//Stop Capture AV
#define FT_CMD_STARTCAPTURE					0x80000103	//Start Capture AV
#define FT_CMD_TRANSPONDER_WILLBE_CHANGED	0x80000104	//This Event may be used for plugin that controls LNB switches. Satellite ID (SatID = tenths of degrees genarally) passed as parameter.
#define FT_CMD_TRANSPONDER_CHANGED			0x80000105		
#define FT_CMD_DISEQC_WILLBE_CHANGED		0x80000106		
#define FT_CMD_DISEQC_CHANGED				0x80000107
#define FT_CMD_PLAYBACK_POSCHANGED			0x80000110  // Need for DirectShow walkthrough playback


#define FT_CMD_USER							0xF0000000	// to 0xFFFFFFFF User defined commands


// Pass HOOK_MAINSTREAM value to DVBAddFilter to hook main AV stream
// ATTENTION: AV stream is very high loaded. Use it carefully..
#define HOOK_MAINSTREAM_PS		0x4000
#define HOOK_COMMANDS			0x4001  //Filter to recieve commands FT_CMD_*

//This type of filter is independent of record function and thus can be used 
//in various network broadcast plugins.
//Due to high rate of RAW stream only one instance of this filter is possible.
//ATTN: Two plugins can not use this filter simultaneusly.
//NOTE: stream which comes from cards SkyStar-1 and DEC3000 isn't transport stream, so
//plugins which supposed to work on this cards need convert PVA stream to acceptable format.
#define HOOK_RAWSTREAM			0x4002

//Hook Elementary Streams from directshow source filter's output pins.
#define HOOK_VIDEO_ES			0x4020
#define HOOK_AUDIO_ES			0x4021

// Type of callback function for filter implementation
typedef void  (__stdcall *LPCB_STREAMHOOK) (BYTE* Buf, ULONG Len, DWORD hFilter);

//Add PID parser
extern "C" DWORD	__stdcall  DVBAddFilter(DWORD PID, LPCB_STREAMHOOK StreamHook, DWORD FilterType = FT_STREAMING_FILTER, BYTE* pbFilterData = NULL, BYTE* pbFilterMask = NULL, BYTE bLength = 0);	//Add PID parser

//Delete PID parser
extern "C" BOOL		__stdcall DVBDelFilter(DWORD hFilter);							

//Send Message to Filter(s)
extern "C" void		__stdcall DVBSendFltMsg(DWORD hFilter, DWORD Msg, DWORD Param);

#ifndef _DVBCORE_EXPORT_

extern "C" void		__stdcall DVBSendSAACmd(WORD CmdBuf[32], int CmdLen);				

#endif

//********************************* TUNER FUNCTIONS ******************************************************

//Tuner Hardware Info/Capabilities
//Only Lock, Level and Quality fields are guarantied to be valid!

struct DVB_TUNER_INFO
{
	DWORD	HdrVer;
	DWORD	Lock;		// non-zero if frequency is locked
	int		nAFC;		
	double	BER;		
	BYTE	Streaming;	
	BYTE	SNR_SQE;	
	WORD	Level;		// Level 0..100
	WORD	Quality;	// Quality 0..100
	DWORD	FreqMin;	
	DWORD	FreqMax;	
	DWORD	SRMin;		
	DWORD	SRMax;		
	DWORD	BandWidth;	
	DWORD	GapMin;		
	DWORD	GapMax;		
	DWORD	Type;       
};

//Get Info about Tuner state and capabilities
extern "C" DWORD __stdcall DVBGetTunerInfo(DVB_TUNER_INFO* TunerInfo);



//****************************** Electronic Program Guide ****************************************

#define DVB_EPG_STOP		 0x0000
#define DVB_EPG_START		 0x0001


#define DVB_EPG_GET_BYCOOKIE 0x0010 //Get events sequentally event by event
									//First Call must have *Cookie = 0
									//If there is no more events in queue then DVBEPG returns DVB_ERROR_NOTFOUND

#define DVB_EPG_CHECK_PRESN	 0x0011 //Pass EventID as ID of current Event or 0 for first time, Cookie is pointer to NIDSID of required channel
#define DVB_EPG_CHECK_FOLLW	 0x0012 //Pass EventID as ID of following Event or 0 for first time, Cookie is pointer to NIDSID of required channel


struct EPG_DESCR
{
	DWORD	Lang;					//Language ID according ISO 639-2 (three bytes on language name plus zero byte)
	char	EventName[260];			//Event name
	char	ShortDescr[260];		//Short Description
	char	ExtendedDescr[10000];	//Extended Description
};

struct EPG_EVENT
{
	DWORD	HdrVer;			
	DWORD	NIDSID;			//Network ID [16..31], Channel ID [0..15]
	DWORD   StartTime;		//Start time of event in UNIX form
	DWORD   Duration;		//Duration of event in UNIX form
	DWORD	EventID;		//Event ID
	DWORD	LangCount;		//Count of languages of description
	EPG_DESCR Descr[5];		//Event Description
};


extern "C" DWORD __stdcall DVBEPGProc(DWORD Cmd, EPG_EVENT* Event= NULL, DWORD* Cookie = NULL, DWORD EventID=0);


//************************************************************************************************

/**********************************************
*                                             *
*		definitions for MyTheatre             *
*                                             *
**********************************************/

struct MTEPG_EVENT 
{
	HANDLE Sync;    //Sync Event which must be created as Manual-reset event.
    EPG_EVENT EPGEvent;
};

#define MT_CMD_NEW_EPG_EVENT	 0x90000001
// This filter command may be used by external EPG parser to
// add event into MyTheatre EPG DataBase (see function DVBSendFltMsg)
// Param must be pointer to MTEPG_EVENT structure
// to send EPG event to MT you need:
//
// 1) fill MTEPG_EVENT structure
// 2) Call DVBSendFltMsg(0, MT_CMD_NEW_EPG_EVENT, &MTEPG_EVENT);
// 3) wait for MTEPG_EVENT.Sync signalyze
// 4) reset event MTEPG_EVENT.Sync
// 5) go to 1)

//////////////////////////////////////////////////////////////////////////

struct PLG_INFO
{
    DWORD	HdrVer;			//Version of structure
    DWORD   dwShortCut;     //ShortCut for this plugin. actual type is Delphi's TShortCut
    DWORD	dwTTL;			//reserved. not used. 
    char	Name[100];
};

//Plugin Functions:

//MustBe named DVBPLGInit in Plugin dll
typedef BOOL (__stdcall *LPF_DVBPLGInit) (DWORD CardType, HWND Handle, void *ExtraInfo);

//MustBe named DVBPLGCall in Plugin dll
typedef BOOL (__stdcall *LPF_DVBPLGCall) (DWORD Code , void *ExtraInfo);

//MustBe named DVBPLGGetInfo in Plugin dll
typedef BOOL (__stdcall *LPF_DVBPLGGetInfo) (PLG_INFO* PLG_Info);

//MustBe named DVBPLGClose in Plugin dll
typedef BOOL (__stdcall *LPF_DVBPLGClose) (DWORD Reason );

//////////////////////////////////////////////////////////////////////////

// Switch channel by CHID. Param is CHID.
#define MT_CMD_SWITCH_CHAN_BY_CHID  0x90000003;

// Switch channel by Number. Param is Channel Number.
#define MT_CMD_SWITCH_CHAN_BY_NUM   0x90000004;

//////////////////////////////////////////////////////////////////////////

//For external MyTheatre management

//must be issued by SendMessage to window with Class: "TDVBMainForm", Text: "MyTheatre"
//WParam = 0, LParam = 0
//Result - state of MyTheatre, combination of MT_STATE_* flags
#define WM_GET_MT_STATE     (WM_USER + 2005)

#define MT_STATE_LIVE       0x01
#define MT_STATE_FILE       0x02
#define MT_STATE_DVD        0x04
#define MT_STATE_OSDACT     0x08
#define MT_STATE_SIDELIST   0x10
#define MT_STATE_EPGWACT    0x20
#define MT_STATE_PLGACT     0x40
#define MT_STATE_DVDMENU    0x80

//may be issued by PostMessage or SendMessage to window with Class: "TDVBMainForm", Text: "MyTheatre"
//WParam - shortcut
//LParam - not used must be 0
#define WM_SHORTCUT         (WM_USER + 2001)

//user defined shortcuts:  USER_SHORTCUT + n. where 0 < n < FFFFFF
#define SHORTCUT_USER       0x81000000

//direct function execute from shortcut settings (independed from assigned key)
#define SHORTCUT_DIRECT     0x8F000000

#define SHORTCUT_0           (SHORTCUT_DIRECT + 120)
#define SHORTCUT_1           (SHORTCUT_DIRECT + 121)
#define SHORTCUT_2           (SHORTCUT_DIRECT + 122)
#define SHORTCUT_3           (SHORTCUT_DIRECT + 123)
#define SHORTCUT_4           (SHORTCUT_DIRECT + 124)
#define SHORTCUT_5           (SHORTCUT_DIRECT + 125)
#define SHORTCUT_6           (SHORTCUT_DIRECT + 126)
#define SHORTCUT_7           (SHORTCUT_DIRECT + 127)
#define SHORTCUT_8           (SHORTCUT_DIRECT + 128)
#define SHORTCUT_9           (SHORTCUT_DIRECT + 129)

#define SHORTCUT_PAUSE       (SHORTCUT_DIRECT + 103)
#define SHORTCUT_FF          (SHORTCUT_DIRECT + 102)
#define SHORTCUT_RW          (SHORTCUT_DIRECT + 101)
#define SHORTCUT_VOLUP       (SHORTCUT_DIRECT + 105)
#define SHORTCUT_VOLDN       (SHORTCUT_DIRECT + 104)
#define SHORTCUT_MUTE        (SHORTCUT_DIRECT + 106)
#define SHORTCUT_SLEEP       (SHORTCUT_DIRECT + 113)
#define SHORTCUT_FS          (SHORTCUT_DIRECT + 107)
#define SHORTCUT_INFO        (SHORTCUT_DIRECT + 108)
#define SHORTCUT_TOLIVE      (SHORTCUT_DIRECT + 109)
#define SHORTCUT_TOPLAY      (SHORTCUT_DIRECT + 110)
#define SHORTCUT_OSD         (SHORTCUT_DIRECT + 112)
#define SHORTCUT_OPTWS       (SHORTCUT_DIRECT + 134)
#define SHORTCUT_CANCEL      (SHORTCUT_DIRECT + 199)
#define SHORTCUT_EXIT        (SHORTCUT_DIRECT + 111)
#define SHORTCUT_FAV1        (SHORTCUT_DIRECT + 131)
#define SHORTCUT_FAV2        (SHORTCUT_DIRECT + 132)
#define SHORTCUT_FAV3        (SHORTCUT_DIRECT + 133)
#define SHORTCUT_OPENFILE    (SHORTCUT_DIRECT + 135)
#define SHORTCUT_SLTIMERSET  (SHORTCUT_DIRECT + 136)
#define SHORTCUT_BESTFIT     (SHORTCUT_DIRECT + 137)
#define SHORTCUT_STAYONTOP   (SHORTCUT_DIRECT + 138)
#define SHORTCUT_MAKEVISIBLE (SHORTCUT_DIRECT + 139)
#define SHORTCUT_SETTINGS    (SHORTCUT_DIRECT + 140)
#define SHORTCUT_BKGMODE     (SHORTCUT_DIRECT + 141)

#define SHORTCUT_SIDECLIST   (SHORTCUT_DIRECT + 201)
#define SHORTCUT_OSDCHLIST   (SHORTCUT_DIRECT + 202)
#define SHORTCUT_LAST        (SHORTCUT_DIRECT + 203)
#define SHORTCUT_RECORD      (SHORTCUT_DIRECT + 204)
#define SHORTCUT_RECPOS      (SHORTCUT_DIRECT + 210)
#define SHORTCUT_INCSPEED    (SHORTCUT_DIRECT + 213)
#define SHORTCUT_DECSPEED    (SHORTCUT_DIRECT + 214)
#define SHORTCUT_EPGWIN      (SHORTCUT_DIRECT + 205)
#define SHORTCUT_EPGOSD      (SHORTCUT_DIRECT + 211)
#define SHORTCUT_NEXTFAV     (SHORTCUT_DIRECT + 207)
#define SHORTCUT_PREVFAV     (SHORTCUT_DIRECT + 206)
#define SHORTCUT_NEXTENUM    (SHORTCUT_DIRECT + 209)
#define SHORTCUT_PREVENUM    (SHORTCUT_DIRECT + 208)
#define SHORTCUT_STREAMINF   (SHORTCUT_DIRECT + 212)
#define SHORTCUT_VIDEO       (SHORTCUT_DIRECT + 215)
#define SHORTCUT_IVRGEN      (SHORTCUT_DIRECT + 216)
#define SHORTCUT_APID        (SHORTCUT_DIRECT + 217)
#define SHORTCUT_AB          (SHORTCUT_DIRECT + 218)
#define SHORTCUT_SUBS        (SHORTCUT_DIRECT + 219)
#define SHORTCUT_RECTIMERWND (SHORTCUT_DIRECT + 220)
#define SHORTCUT_OPENSCHED   (SHORTCUT_DIRECT + 221)
#define SHORTCUT_PIDGRABBER  (SHORTCUT_DIRECT + 223)
#define SHORTCUT_PIDLIST     (SHORTCUT_DIRECT + 224)
#define SHORTCUT_PIDSTAT     (SHORTCUT_DIRECT + 225)
#define SHORTCUT_LNBSETTINGS (SHORTCUT_DIRECT + 226)
#define SHORTCUT_POSCONSOLE  (SHORTCUT_DIRECT + 227)
#define SHORTCUT_CI_CONSOLE  (SHORTCUT_DIRECT + 228)

#define SHORTCUT_SIDEFILST   (SHORTCUT_DIRECT + 301)
#define SHORTCUT_OSDFLIST    (SHORTCUT_DIRECT + 302)
#define SHORTCUT_NEXTFILE    (SHORTCUT_DIRECT + 304)
#define SHORTCUT_PREVFILE    (SHORTCUT_DIRECT + 303)

#define SHORTCUT_DVDSUBS     (SHORTCUT_DIRECT + 403)
#define SHORTCUT_NEXTCHAP    (SHORTCUT_DIRECT + 405)
#define SHORTCUT_PREVCHAP    (SHORTCUT_DIRECT + 404)
#define SHORTCUT_OSDCHPLIST  (SHORTCUT_DIRECT + 406)
#define SHORTCUT_CHAPLIST    (SHORTCUT_DIRECT + 402)
#define SHORTCUT_DVDMENU     (SHORTCUT_DIRECT + 401)
#define SHORTCUT_DVDMUP      (SHORTCUT_DIRECT + 407)
#define SHORTCUT_DVDMDN      (SHORTCUT_DIRECT + 408)
#define SHORTCUT_DVDMLEFT    (SHORTCUT_DIRECT + 409)
#define SHORTCUT_DVDMRIGHT   (SHORTCUT_DIRECT + 410)
#define SHORTCUT_DVDMSELECT  (SHORTCUT_DIRECT + 411)

#define SHORTCUT_OSDUP       (SHORTCUT_DIRECT + 501)
#define SHORTCUT_OSDDN       (SHORTCUT_DIRECT + 502)
#define SHORTCUT_OSDLEFT     (SHORTCUT_DIRECT + 503)
#define SHORTCUT_OSDRIGHT    (SHORTCUT_DIRECT + 504)
#define SHORTCUT_CATUP       (SHORTCUT_DIRECT + 505)
#define SHORTCUT_CATDN       (SHORTCUT_DIRECT + 506)
#define SHORTCUT_SELECT      (SHORTCUT_DIRECT + 507)
#define SHORTCUT_EVINFO      (SHORTCUT_DIRECT + 509)

#define SHORTCUT_SCFUP       (SHORTCUT_DIRECT + 601)
#define SHORTCUT_SCFDN       (SHORTCUT_DIRECT + 602)
#define SHORTCUT_SCFSELECT   (SHORTCUT_DIRECT + 603)
#define SHORTCUT_SCFDELETE   (SHORTCUT_DIRECT + 604)
#define SHORTCUT_SCFSAT      (SHORTCUT_DIRECT + 605)
#define SHORTCUT_SCFPROV     (SHORTCUT_DIRECT + 606)
#define SHORTCUT_SCFPROVID   (SHORTCUT_DIRECT + 607)
#define SHORTCUT_SCFTRANSP   (SHORTCUT_DIRECT + 608)
#define SHORTCUT_SCFFAV      (SHORTCUT_DIRECT + 609)
#define SHORTCUT_SCFALL      (SHORTCUT_DIRECT + 610)

#define SHORTCUT_EPGWUP      (SHORTCUT_DIRECT + 701)
#define SHORTCUT_EPGWDN      (SHORTCUT_DIRECT + 702)
#define SHORTCUT_EPGWPGUP    (SHORTCUT_DIRECT + 703)
#define SHORTCUT_EPGWPGDN    (SHORTCUT_DIRECT + 704)
#define SHORTCUT_EPGWCHUP    (SHORTCUT_DIRECT + 705)
#define SHORTCUT_EPGWCHDN    (SHORTCUT_DIRECT + 706)
#define SHORTCUT_EPGWSEL     (SHORTCUT_DIRECT + 707)
#define SHORTCUT_EPGWSHED    (SHORTCUT_DIRECT + 708)
#define SHORTCUT_EPGWANN     (SHORTCUT_DIRECT + 709)

#define SHORTCUT_PRESET1     (SHORTCUT_DIRECT + 801)
#define SHORTCUT_PRESET2     (SHORTCUT_DIRECT + 802)
#define SHORTCUT_PRESET3     (SHORTCUT_DIRECT + 803)
#define SHORTCUT_PRESET4     (SHORTCUT_DIRECT + 804)
#define SHORTCUT_PRESET5     (SHORTCUT_DIRECT + 805)
#define SHORTCUT_PRESET6     (SHORTCUT_DIRECT + 806)

#define SHORTCUT_PLGUP       (SHORTCUT_DIRECT + 901)
#define SHORTCUT_PLGDN       (SHORTCUT_DIRECT + 902)
#define SHORTCUT_PLGLEFT     (SHORTCUT_DIRECT + 903)
#define SHORTCUT_PLGRIGHT    (SHORTCUT_DIRECT + 904)
#define SHORTCUT_PLGPGUP     (SHORTCUT_DIRECT + 905)
#define SHORTCUT_PLGPGDN     (SHORTCUT_DIRECT + 906)
#define SHORTCUT_PLGSEL      (SHORTCUT_DIRECT + 907)
#define SHORTCUT_PLGALTSEL   (SHORTCUT_DIRECT + 908)
#define SHORTCUT_PLGCANCEL   (SHORTCUT_DIRECT + 909)
#define SHORTCUT_PLGTAB      (SHORTCUT_DIRECT + 910)


#pragma pack(pop, pack1)

#endif
