#ifndef TV_Mon_Select_PKG_INCLUDED
	#define TV_Mon_Select_PKG_INCLUDED

#include <bncs_script_helper.h>

#ifdef WIN32
	#ifdef DOEXPORT_SCRIPT
		#define EXPORT_SCRIPT __declspec(dllexport) 
	#else
		#define EXPORT_SCRIPT 
	#endif
#else 
	#define EXPORT_SCRIPT
#endif
 
class TV_Mon_Select_PKG : public bncs_script_helper
{
public:
	TV_Mon_Select_PKG( bncs_client_callback * parent, const char* path );
	virtual ~TV_Mon_Select_PKG();

	void buttonCallback( buttonNotify *b );
	int revertiveCallback( revertiveNotify * r );
	void databaseCallback( revertiveNotify * r );
	bncs_string parentCallback( parentNotify *p );
	void timerCallback( int );
	
private:
	bncs_string m_instance;
	bncs_string m_sdiID_name;
	bncs_string m_xptID_name;
	bncs_string deselectedStatesheet;
	bncs_string selectedStatesheet;

	int selectedSource;		// New source package number to route sent by host
	int m_selSrcSDI;		// Source SDI crosspoint requested
	int m_instancePkgXpt;	// Package crosspoint BNCS ID extracted from the instance data. 
	int m_destID;			// Destination package extracted from the instance data
	int m_destIDsdi;		// Destination SDI crosspoint
	int m_sdiID;			// BNCS SDI matrix ID
	int m_revertIDreg;		// Holds the device id that is currently registered for revertive.
	
	bool I_am_active;		// Set true when this component instance
							// should process source change requests.
	bool revertiveRegistered;	// Set true when we have a revertive registration for the SDI destination.
	bool revertiveRx;		// True when have received a revertive from SDI driver
	bool hnTimerActive;		// True when the hostNotify timer is running

	void validateSDIdest(void);	// Called to validate the conditions for revertuve registration.

};


#endif // TV_Mon_Select_PKG_INCLUDED