#ifndef MDEXTERN82_H
#define MDEXTERN82_H

/* Part specific for MD8.2+ */

#define MDAPI_GET_VERSION            0x01020100
#define MAX_CA_SYSTEMS 32
#define MAX_PID_IDS 32


struct TCA_System82 {
		 unsigned short CA_Typ;
		 unsigned short ECM;
		 unsigned short EMM;
		 unsigned int   Provider_Id;   // Neu -> Viaccess und Seca Provider in der Kanalliste
};


typedef struct TProgramm82
{
	char              Name[30];
	char              Anbieter[30];
	char              Land[30];
    unsigned long     freq;
    unsigned char     Typ;
	unsigned char     volt;              
	unsigned char     afc;
	unsigned char     diseqc;            
	unsigned int      srate;         
	unsigned char     qam;               
	unsigned char     fec;   
	unsigned char     norm;
	unsigned short    tp_id;        
	unsigned short    Video_pid;        
	unsigned short    Audio_pid;
    unsigned short    TeleText_pid;          /* Teletext PID */
	unsigned short    PMT_pid;
    unsigned short    PCR_pid;
	unsigned short    ECM_PID;
	unsigned short    SID_pid;
	unsigned short    AC3_pid;
	unsigned char     TVType; //  == 00 PAL ; 11 == NTSC    
	unsigned char     ServiceTyp;
    unsigned char     CA_ID;
	unsigned short    Temp_Audio;
	unsigned short    Filteranzahl;
    struct TPIDFilters Filters[MAX_PID_IDS];    // Vergrößert auf 32 Einträge
	unsigned short    CA_Anzahl;
    struct TCA_System82 CA_System[MAX_CA_SYSTEMS];  // Vergrößert auf 32 Einträge  ( Neues PMT-Parsing ) 
    char    CA_Land[5];
    unsigned char Merker;
    unsigned short Link_TP;
    unsigned short Link_SID;
    unsigned char Dynamisch;

    char Extern_Buffer[16];
} TProgramm82;


struct TTPCatio82 {
	int TPCatAnzahl;
    struct TTPCat TPCat[32];
};


#endif

