#ifndef LRSCONNECTION_STATUS
#define LRSCONNECTION_STATUS

class CLrsClient;

/////////////////////////////////////////////////////////////////////////////
// LrsConnectionStatus
// Singleton class containing connection status to the target
// See lrsconnectionstatus.cpp for the implementation of this class
//
class LrsConnectionStatus 
{
protected:
	
	// Constructor.  
	LrsConnectionStatus();
	
public:		
	// Sets connection state to target; TRUE if connected
	// FALSE otherwise
	void set(BOOL connectstate);

	// Returns TRUE if the client is connected to the target
	// otherwise returns FALSE
	BOOL isConnected();

	// Returns AlarmManager singleton instance
	static LrsConnectionStatus *instance();
	
	// Destructor
	~LrsConnectionStatus();

	// Init
	void init(CLrsClient *client);

	// Returns elapsed connection time in seconds
	int elapsedConnectTime();

	// Returns elapsed time target has been on in seconds
	int elapsedOnTime();

private:
	static LrsConnectionStatus *_pInstance;
	int _startTime;
	CLrsClient *_client;
	BOOL _connect;
};
#endif
