barrier/client/CClient.h

74 lines
1.5 KiB
C
Raw Normal View History

2001-10-06 18:13:28 +04:00
#ifndef CCLIENT_H
#define CCLIENT_H
#include "CMutex.h"
2001-10-06 18:13:28 +04:00
#include "CString.h"
#include "BasicTypes.h"
#include "ClipboardTypes.h"
#include "IClipboard.h"
2001-10-06 18:13:28 +04:00
class CNetworkAddress;
class IInputStream;
class IOutputStream;
class ISecondaryScreen;
2001-10-06 18:13:28 +04:00
class CClient {
2002-04-29 18:40:01 +04:00
public:
2001-10-06 18:13:28 +04:00
CClient(const CString& clientName);
~CClient();
// manipulators
void run(const CNetworkAddress& serverAddress);
// handle events on client's screen
void onClipboardChanged(ClipboardID);
void onResolutionChanged();
2001-10-06 18:13:28 +04:00
// accessors
2002-04-29 18:40:01 +04:00
private:
void runSession(void*);
// open/close the primary screen
void openSecondaryScreen();
void closeSecondaryScreen();
2001-10-06 18:13:28 +04:00
// message handlers
void onEnter();
void onLeave();
void onGrabClipboard();
void onScreenSaver();
void onQueryInfo();
void onQueryInfoNoLock();
void onInfoAcknowledgment();
2001-10-06 18:13:28 +04:00
void onSetClipboard();
void onKeyDown();
void onKeyRepeat();
void onKeyUp();
void onMouseDown();
void onMouseUp();
void onMouseMove();
void onMouseWheel();
void onErrorIncompatible();
void onErrorBusy();
void onErrorBad();
2001-10-06 18:13:28 +04:00
2002-04-29 18:40:01 +04:00
private:
CMutex m_mutex;
2001-10-06 18:13:28 +04:00
CString m_name;
IInputStream* m_input;
2001-10-06 18:13:28 +04:00
IOutputStream* m_output;
ISecondaryScreen* m_screen;
const CNetworkAddress* m_serverAddress;
bool m_active;
UInt32 m_seqNum;
bool m_ignoreMove;
bool m_ownClipboard[kClipboardEnd];
IClipboard::Time m_timeClipboard[kClipboardEnd];
CString m_dataClipboard[kClipboardEnd];
2001-10-06 18:13:28 +04:00
};
#endif