2001-10-06 14:13:28 +00:00
|
|
|
#ifndef CSERVERPROTOCOL_H
|
|
|
|
#define CSERVERPROTOCOL_H
|
|
|
|
|
|
|
|
#include "IServerProtocol.h"
|
|
|
|
|
|
|
|
class CServer;
|
|
|
|
class IInputStream;
|
|
|
|
class IOutputStream;
|
|
|
|
|
|
|
|
class CServerProtocol : public IServerProtocol {
|
2002-04-29 14:40:01 +00:00
|
|
|
public:
|
2001-10-06 14:13:28 +00:00
|
|
|
CServerProtocol(CServer*, const CString& clientName,
|
2002-06-10 22:06:45 +00:00
|
|
|
IInputStream*, IOutputStream*);
|
2001-10-06 14:13:28 +00:00
|
|
|
~CServerProtocol();
|
|
|
|
|
|
|
|
// manipulators
|
|
|
|
|
|
|
|
// accessors
|
|
|
|
|
2001-10-14 16:58:01 +00:00
|
|
|
virtual CServer* getServer() const;
|
|
|
|
virtual CString getClient() const;
|
|
|
|
virtual IInputStream* getInputStream() const;
|
|
|
|
virtual IOutputStream* getOutputStream() const;
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
static IServerProtocol* create(SInt32 major, SInt32 minor,
|
2002-06-10 22:06:45 +00:00
|
|
|
CServer*, const CString& clientName,
|
|
|
|
IInputStream*, IOutputStream*);
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
// IServerProtocol overrides
|
2001-10-14 16:58:01 +00:00
|
|
|
virtual void run() = 0;
|
|
|
|
virtual void queryInfo() = 0;
|
|
|
|
virtual void sendClose() = 0;
|
2002-04-30 17:48:11 +00:00
|
|
|
virtual void sendEnter(SInt32 xAbs, SInt32 yAbs,
|
2002-06-10 22:06:45 +00:00
|
|
|
UInt32 seqNum, KeyModifierMask mask) = 0;
|
2001-10-14 16:58:01 +00:00
|
|
|
virtual void sendLeave() = 0;
|
2002-04-27 14:19:53 +00:00
|
|
|
virtual void sendClipboard(ClipboardID, const CString&) = 0;
|
|
|
|
virtual void sendGrabClipboard(ClipboardID) = 0;
|
2001-10-14 16:58:01 +00:00
|
|
|
virtual void sendScreenSaver(bool on) = 0;
|
2002-05-24 17:54:28 +00:00
|
|
|
virtual void sendInfoAcknowledgment() = 0;
|
2001-10-14 16:58:01 +00:00
|
|
|
virtual void sendKeyDown(KeyID, KeyModifierMask) = 0;
|
2001-11-25 18:32:41 +00:00
|
|
|
virtual void sendKeyRepeat(KeyID, KeyModifierMask, SInt32 count) = 0;
|
2001-10-14 16:58:01 +00:00
|
|
|
virtual void sendKeyUp(KeyID, KeyModifierMask) = 0;
|
|
|
|
virtual void sendMouseDown(ButtonID) = 0;
|
|
|
|
virtual void sendMouseUp(ButtonID) = 0;
|
|
|
|
virtual void sendMouseMove(SInt32 xAbs, SInt32 yAbs) = 0;
|
|
|
|
virtual void sendMouseWheel(SInt32 delta) = 0;
|
2001-10-06 14:13:28 +00:00
|
|
|
|
2002-04-29 14:40:01 +00:00
|
|
|
protected:
|
2001-10-06 14:13:28 +00:00
|
|
|
//IServerProtocol overrides
|
2001-10-14 16:58:01 +00:00
|
|
|
virtual void recvInfo() = 0;
|
2001-11-25 18:32:41 +00:00
|
|
|
virtual void recvClipboard() = 0;
|
|
|
|
virtual void recvGrabClipboard() = 0;
|
2001-10-06 14:13:28 +00:00
|
|
|
|
2002-04-29 14:40:01 +00:00
|
|
|
private:
|
2001-10-06 14:13:28 +00:00
|
|
|
CServer* m_server;
|
|
|
|
CString m_client;
|
|
|
|
IInputStream* m_input;
|
|
|
|
IOutputStream* m_output;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|