2001-10-06 14:13:28 +00:00
|
|
|
#ifndef CCLIENT_H
|
|
|
|
#define CCLIENT_H
|
|
|
|
|
2001-11-25 18:32:41 +00:00
|
|
|
#include "CMutex.h"
|
2001-10-06 14:13:28 +00:00
|
|
|
#include "CString.h"
|
|
|
|
#include "BasicTypes.h"
|
|
|
|
|
|
|
|
class CNetworkAddress;
|
|
|
|
class IInputStream;
|
|
|
|
class IOutputStream;
|
2001-10-08 19:24:46 +00:00
|
|
|
class ISecondaryScreen;
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
class CClient {
|
|
|
|
public:
|
|
|
|
CClient(const CString& clientName);
|
|
|
|
~CClient();
|
|
|
|
|
|
|
|
// manipulators
|
|
|
|
|
|
|
|
void run(const CNetworkAddress& serverAddress);
|
|
|
|
|
2001-11-25 18:32:41 +00:00
|
|
|
// handle events on client's screen
|
|
|
|
void onClipboardChanged();
|
|
|
|
|
2001-10-06 14:13:28 +00:00
|
|
|
// accessors
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
2001-10-14 18:29:43 +00:00
|
|
|
void runSession(void*);
|
|
|
|
|
2001-11-19 00:33:36 +00:00
|
|
|
// open/close the primary screen
|
|
|
|
void openSecondaryScreen();
|
|
|
|
void closeSecondaryScreen();
|
|
|
|
|
2001-10-06 14:13:28 +00:00
|
|
|
// message handlers
|
|
|
|
void onEnter();
|
|
|
|
void onLeave();
|
|
|
|
void onGrabClipboard();
|
|
|
|
void onScreenSaver();
|
|
|
|
void onQueryInfo();
|
|
|
|
void onQueryClipboard();
|
|
|
|
void onSetClipboard();
|
|
|
|
void onKeyDown();
|
|
|
|
void onKeyRepeat();
|
|
|
|
void onKeyUp();
|
|
|
|
void onMouseDown();
|
|
|
|
void onMouseUp();
|
|
|
|
void onMouseMove();
|
|
|
|
void onMouseWheel();
|
|
|
|
|
|
|
|
private:
|
2001-11-25 18:32:41 +00:00
|
|
|
CMutex m_mutex;
|
2001-10-06 14:13:28 +00:00
|
|
|
CString m_name;
|
2001-10-08 19:24:46 +00:00
|
|
|
IInputStream* m_input;
|
2001-10-06 14:13:28 +00:00
|
|
|
IOutputStream* m_output;
|
2001-10-08 19:24:46 +00:00
|
|
|
ISecondaryScreen* m_screen;
|
2001-10-14 18:29:43 +00:00
|
|
|
const CNetworkAddress* m_serverAddress;
|
2001-10-06 14:13:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|