#ifndef CueControl_INCLUDED
	#define CueControl_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 CueControl : public bncs_script_helper
{
public:
	CueControl( bncs_client_callback * parent, const char* path );
	virtual ~CueControl();

	void buttonCallback( buttonNotify *b );
	int revertiveCallback( revertiveNotify * r );
	void databaseCallback( revertiveNotify * r );
	bncs_string parentCallback( parentNotify *p );
	void timerCallback( int );
	
private:
	bncs_string m_myParam;
	bncs_string m_instance;
	bool m_bCueActive;
	int m_iCueRouter;
	int m_iMusicRouter;
	int m_iInfoRouter;
	int m_iCueTallyList[17];
	int m_iMusicSource;
	int m_iMusicDest;
	int m_iMusicOff;
	int m_iCueSource;
	int m_iCueSourceIndex;
	int m_iCueDest;
	int m_iCueDestIndex;
	int m_iCueOffSource;
	int m_iWhereSourceCueRouted;
	int m_iWhatRoutedToDestCue;
	bool m_bCueSourceValid;
	bool m_bCueDestValid;
	bool m_bIsDestCueRouted;
	bool m_bIsSourceCueRouted;
	bncs_stringlist m_sValidCueSources;
	bncs_stringlist m_sValidCueDestinations;
	bncs_stringlist m_sCueSourceNames;
	bncs_stringlist m_sCueSources;
	bncs_stringlist m_sMusicDestinations;
	
	int m_checkCueSource(int m_iMusicDest);
	void m_checkCueDest(int m_iMusicSource);
	void m_checkCueDestRouting(int m_iMusicSource);
	void m_checkCueSourceRouting(int m_iMusicDest);
};


#endif // CueControl_INCLUDED