#if !defined(AFX_ROUTERSHIM_H__95694C36_5949_4B62_AD1E_3605485E69CD__INCLUDED_)
#define AFX_ROUTERSHIM_H__95694C36_5949_4B62_AD1E_3605485E69CD__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#pragma warning(disable:4786)


#include <map>
using namespace std;

#define VIRTUAL	0x00
#define HD		0x01
#define SD		0x02
#define PAL		0x03

//!Virtual Router Association Fields
enum VRA_Fields	
{
	VRA_VIRTUAL,	//0
	VRA_HD,			//1
	VRA_SD			//2
};

//!Route mode parameter constants for getSpecialSource()
enum Route_Mode {
	ROUTE_FOLLOW,	//0
	ROUTE_HD,		//1
	ROUTE_SD,		//2
	ROUTE_VIRTUAL	//3
};

//!Source types
#define SOURCE_TYPE_NAMES "VIRTUAL,HD,SD,PAL,REAL"
enum Source_Types 
{
	SRCE_VIRTUAL,	//0
	SRCE_HD,		//1
	SRCE_SD,		//2
	SRCE_PAL,		//3
	SRCE_REAL		//4
};

//Destination types as defined in DB9
#define DEST_TYPE_NAMES "UNKNOWN,HD,SD,PAL"
enum Dest_Types 
{
	DEST_UNKNOWN,	//0
	DEST_HD,		//1
	DEST_SD,		//2
	DEST_PAL		//3
};

//The Big Switch Modes
enum TBS_Modes {
	TBS_SD=0,		//0
	TBS_HD			//1
};

#include "bncs_string.h"

class routerShim  
{
public:
	Dest_Types getDestType(int dest);
	routerShim( int device );
	virtual ~routerShim();

	bncs_string getSourceInfo(int intSource);
	bncs_stringlist getSourceListVirtuals(void);
	bncs_stringlist getSourceListSinglePresentedHD(void);
	bncs_stringlist getSourceListSinglePresentedSD(void);
	bncs_string getSpecialRevertive(int intSource, int intDest);
	int getSpecialSource(int intSource, int intDest, Route_Mode mode);
	void setTBSMode(int mode);
	

private:
	map<int, int> virtualToSD;
	map<int, int> virtualToHD;
	map<int, int> HDToVirtual;
	map<int, int> SDToVirtual;
	
	map<int, int> destType;
	map<int, int> sourceType;

	int maxSources;
	int maxDests;

	int intTBS_mode;

	int firstVirtual;

};

#endif // !defined(AFX_ROUTERSHIM_H__95694C36_5949_4B62_AD1E_3605485E69CD__INCLUDED_)
