#ifndef CameraControl_INCLUDED
	#define CameraControl_INCLUDED

#include <bncs_script_helper.h>
#include <ccInfodriver.h>

#ifdef WIN32
	#ifdef DOEXPORT_SCRIPT
		#define EXPORT_SCRIPT __declspec(dllexport) 
	#else
		#define EXPORT_SCRIPT __declspec(dllimport) 
	#endif
#else 
	#define EXPORT_SCRIPT
#endif
 

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

	void buttonCallback( buttonNotify *b );
	int revertiveCallback( revertiveNotify * r );
	void databaseCallback( revertiveNotify * r );
	bncs_string parentCallback( parentNotify *p );
	void timerCallback( int );
	
protected:
	virtual void cciSlotRequest( int device, int index, const string & slot );
	virtual void cciClientMessage( int workstation, int device, const string & message, const string & clientHandle, const string & reference );
	virtual void cciRedundancyState(int device, enum cc::redundancyState state );
	virtual void cciConnected( int );
	virtual void cciDisconnected( int );

private:
	ccInfodriver *m_info;
	bool m_tx;
	bncs_string m_myParam;
	bncs_string m_vidRouter;
	bncs_string m_GPIRouter;
	int deviceInfoDriver;
	int myWorkstation;
	bool alertRaised;
	int vidRouter;
	int GPIRouter;
	int vidDest;
	int vidSrc;
	int cam1;
	int alertGPI;
	bncs_string vidDestName;
	bncs_string vidSrcName;

	//bncs_config myVals;
	int getConfigEntry(bncs_string sKey, bncs_string sAttr);
};


#endif // CameraControl_INCLUDED