#ifndef WSshutdown_INCLUDED
	#define WSshutdown_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
 
#define MAX_WS	10

class WSshutdown : public bncs_script_helper
{
public:
	WSshutdown( bncs_client_callback * parent, const char* path );
	virtual ~WSshutdown();

	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;

	int wsID;					// My workstation ID
	int sdMode;					// 0=unknown, 1=shutdown, 2=reboot
	int wList[MAX_WS + 1];		// Hold list of workstation IDs
	int selWS[MAX_WS + 1];		// Which workstation is selected for shutdown
	int wsOpSys[MAX_WS + 1];	// Operating system code for workstation

	bncs_stringlist wslist;		// Holds data returned from object settings 

	bncs_string area;			// Holds the studio name - "stc" or "sta"
	bncs_string screenWidth;	// Holds the screenwidth parameter read from workstation_settings.xml
	bncs_string panelName;		// The panel to displays is chosen to match teh workstation screen size.
	
	void closeBootShow(int mode);	// Sets the Restart of Shutdown indicators according to mode
	void ConfirmEnable(void);		// Checks if confirm button should be enabled or disbaled
	void clearButtons(void);		// Called to de-select any buttons.
};


#endif // WSshutdown_INCLUDED