dropped "c" prefix from class names

This commit is contained in:
Nick Bolton 2014-11-11 13:51:47 +00:00
parent f6c05e7635
commit e8e156f0e2
382 changed files with 7430 additions and 7423 deletions

View file

@ -32,35 +32,35 @@
#include "common/stdset.h"
#include "common/stdvector.h"
class CBaseClientProxy;
class CEventQueueTimer;
class CPrimaryClient;
class CInputFilter;
class CScreen;
class BaseClientProxy;
class EventQueueTimer;
class PrimaryClient;
class InputFilter;
class Screen;
class IEventQueue;
class CThread;
class Thread;
//! Synergy server
/*!
This class implements the top-level server algorithms for synergy.
*/
class CServer : public INode {
class Server : public INode {
public:
//! Lock cursor to screen data
class CLockCursorToScreenInfo {
class LockCursorToScreenInfo {
public:
enum State { kOff, kOn, kToggle };
static CLockCursorToScreenInfo* alloc(State state = kToggle);
static LockCursorToScreenInfo* alloc(State state = kToggle);
public:
State m_state;
};
//! Switch to screen data
class CSwitchToScreenInfo {
class SwitchToScreenInfo {
public:
static CSwitchToScreenInfo* alloc(const CString& screen);
static SwitchToScreenInfo* alloc(const String& screen);
public:
// this is a C-string; this type is a variable size structure
@ -68,31 +68,31 @@ public:
};
//! Switch in direction data
class CSwitchInDirectionInfo {
class SwitchInDirectionInfo {
public:
static CSwitchInDirectionInfo* alloc(EDirection direction);
static SwitchInDirectionInfo* alloc(EDirection direction);
public:
EDirection m_direction;
};
//! Screen connected data
class CScreenConnectedInfo {
class ScreenConnectedInfo {
public:
CScreenConnectedInfo(CString screen) : m_screen(screen) { }
ScreenConnectedInfo(String screen) : m_screen(screen) { }
public:
CString m_screen; // was char[1]
String m_screen; // was char[1]
};
//! Keyboard broadcast data
class CKeyboardBroadcastInfo {
class KeyboardBroadcastInfo {
public:
enum State { kOff, kOn, kToggle };
static CKeyboardBroadcastInfo* alloc(State state = kToggle);
static CKeyboardBroadcastInfo* alloc(State state,
const CString& screens);
static KeyboardBroadcastInfo* alloc(State state = kToggle);
static KeyboardBroadcastInfo* alloc(State state,
const String& screens);
public:
State m_state;
@ -104,12 +104,12 @@ public:
client (local screen) \p primaryClient. The client retains
ownership of \p primaryClient.
*/
CServer(CConfig& config, CPrimaryClient* primaryClient, CScreen* screen, IEventQueue* events, bool enableDragDrop);
~CServer();
Server(Config& config, PrimaryClient* primaryClient, Screen* screen, IEventQueue* events, bool enableDragDrop);
~Server();
#ifdef TEST_ENV
CServer() : m_mock(true), m_config(NULL) { }
void setActive(CBaseClientProxy* active) { m_active = active; }
Server() : m_mock(true), m_config(NULL) { }
void setActive(BaseClientProxy* active) { m_active = active; }
#endif
//! @name manipulators
@ -121,14 +121,14 @@ public:
configuration was accepted (it must include the server's name).
This will disconnect any clients no longer in the configuration.
*/
bool setConfig(const CConfig&);
bool setConfig(const Config&);
//! Add a client
/*!
Adds \p client to the server. The client is adopted and will be
destroyed when the client disconnects or is disconnected.
*/
void adoptClient(CBaseClientProxy* client);
void adoptClient(BaseClientProxy* client);
//! Disconnect clients
/*!
@ -143,16 +143,16 @@ public:
void clearReceivedFileData();
//! Set the expected size of receiving file
void setExpectedFileSize(CString data);
void setExpectedFileSize(String data);
//! Received a chunk of file data
void fileChunkReceived(CString data);
void fileChunkReceived(String data);
//! Create a new thread and use it to send file to client
void sendFileToClient(const char* filename);
//! Received dragging information from client
void dragInfoReceived(UInt32 fileNum, CString content);
void dragInfoReceived(UInt32 fileNum, String content);
//@}
//! @name accessors
@ -168,7 +168,7 @@ public:
/*!
Set the \c list to the names of the currently connected clients.
*/
void getClients(std::vector<CString>& list) const;
void getClients(std::vector<String>& list) const;
//! Return true if recieved file size is valid
bool isReceivedFileSizeValid();
@ -180,7 +180,7 @@ public:
private:
// get canonical name of client
CString getName(const CBaseClientProxy*) const;
String getName(const BaseClientProxy*) const;
// get the sides of the primary screen that have neighbors
UInt32 getActivePrimarySides() const;
@ -195,32 +195,32 @@ private:
bool isLockedToScreen() const;
// returns the jump zone of the client
SInt32 getJumpZoneSize(CBaseClientProxy*) const;
SInt32 getJumpZoneSize(BaseClientProxy*) const;
// change the active screen
void switchScreen(CBaseClientProxy*,
void switchScreen(BaseClientProxy*,
SInt32 x, SInt32 y, bool forScreenSaver);
// jump to screen
void jumpToScreen(CBaseClientProxy*);
void jumpToScreen(BaseClientProxy*);
// convert pixel position to fraction, using x or y depending on the
// direction.
float mapToFraction(CBaseClientProxy*, EDirection,
float mapToFraction(BaseClientProxy*, EDirection,
SInt32 x, SInt32 y) const;
// convert fraction to pixel position, writing only x or y depending
// on the direction.
void mapToPixel(CBaseClientProxy*, EDirection, float f,
void mapToPixel(BaseClientProxy*, EDirection, float f,
SInt32& x, SInt32& y) const;
// returns true if the client has a neighbor anywhere along the edge
// indicated by the direction.
bool hasAnyNeighbor(CBaseClientProxy*, EDirection) const;
bool hasAnyNeighbor(BaseClientProxy*, EDirection) const;
// lookup neighboring screen, mapping the coordinate independent of
// the direction to the neighbor's coordinate space.
CBaseClientProxy* getNeighbor(CBaseClientProxy*, EDirection,
BaseClientProxy* getNeighbor(BaseClientProxy*, EDirection,
SInt32& x, SInt32& y) const;
// lookup neighboring screen. given a position relative to the
@ -228,18 +228,18 @@ private:
// if the position is sufficiently far from the source then we
// cross multiple screens. if there is no suitable screen then
// return NULL and x,y are not modified.
CBaseClientProxy* mapToNeighbor(CBaseClientProxy*, EDirection,
BaseClientProxy* mapToNeighbor(BaseClientProxy*, EDirection,
SInt32& x, SInt32& y) const;
// adjusts x and y or neither to avoid ending up in a jump zone
// after entering the client in the given direction.
void avoidJumpZone(CBaseClientProxy*, EDirection,
void avoidJumpZone(BaseClientProxy*, EDirection,
SInt32& x, SInt32& y) const;
// test if a switch is permitted. this includes testing user
// options like switch delay and tracking any state required to
// implement them. returns true iff a switch is permitted.
bool isSwitchOkay(CBaseClientProxy* dst, EDirection,
bool isSwitchOkay(BaseClientProxy* dst, EDirection,
SInt32 x, SInt32 y, SInt32 xActive, SInt32 yActive);
// update switch state due to a mouse move at \p x, \p y that
@ -275,46 +275,46 @@ private:
// returns the corner (EScreenSwitchCornerMasks) where x,y is on the
// given client. corners have the given size.
UInt32 getCorner(CBaseClientProxy*,
UInt32 getCorner(BaseClientProxy*,
SInt32 x, SInt32 y, SInt32 size) const;
// stop relative mouse moves
void stopRelativeMoves();
// send screen options to \c client
void sendOptions(CBaseClientProxy* client) const;
void sendOptions(BaseClientProxy* client) const;
// process options from configuration
void processOptions();
// event handlers
void handleShapeChanged(const CEvent&, void*);
void handleClipboardGrabbed(const CEvent&, void*);
void handleClipboardChanged(const CEvent&, void*);
void handleKeyDownEvent(const CEvent&, void*);
void handleKeyUpEvent(const CEvent&, void*);
void handleKeyRepeatEvent(const CEvent&, void*);
void handleButtonDownEvent(const CEvent&, void*);
void handleButtonUpEvent(const CEvent&, void*);
void handleMotionPrimaryEvent(const CEvent&, void*);
void handleMotionSecondaryEvent(const CEvent&, void*);
void handleWheelEvent(const CEvent&, void*);
void handleScreensaverActivatedEvent(const CEvent&, void*);
void handleScreensaverDeactivatedEvent(const CEvent&, void*);
void handleSwitchWaitTimeout(const CEvent&, void*);
void handleClientDisconnected(const CEvent&, void*);
void handleClientCloseTimeout(const CEvent&, void*);
void handleSwitchToScreenEvent(const CEvent&, void*);
void handleSwitchInDirectionEvent(const CEvent&, void*);
void handleKeyboardBroadcastEvent(const CEvent&,void*);
void handleLockCursorToScreenEvent(const CEvent&, void*);
void handleFakeInputBeginEvent(const CEvent&, void*);
void handleFakeInputEndEvent(const CEvent&, void*);
void handleFileChunkSendingEvent(const CEvent&, void*);
void handleFileRecieveCompletedEvent(const CEvent&, void*);
void handleShapeChanged(const Event&, void*);
void handleClipboardGrabbed(const Event&, void*);
void handleClipboardChanged(const Event&, void*);
void handleKeyDownEvent(const Event&, void*);
void handleKeyUpEvent(const Event&, void*);
void handleKeyRepeatEvent(const Event&, void*);
void handleButtonDownEvent(const Event&, void*);
void handleButtonUpEvent(const Event&, void*);
void handleMotionPrimaryEvent(const Event&, void*);
void handleMotionSecondaryEvent(const Event&, void*);
void handleWheelEvent(const Event&, void*);
void handleScreensaverActivatedEvent(const Event&, void*);
void handleScreensaverDeactivatedEvent(const Event&, void*);
void handleSwitchWaitTimeout(const Event&, void*);
void handleClientDisconnected(const Event&, void*);
void handleClientCloseTimeout(const Event&, void*);
void handleSwitchToScreenEvent(const Event&, void*);
void handleSwitchInDirectionEvent(const Event&, void*);
void handleKeyboardBroadcastEvent(const Event&,void*);
void handleLockCursorToScreenEvent(const Event&, void*);
void handleFakeInputBeginEvent(const Event&, void*);
void handleFakeInputEndEvent(const Event&, void*);
void handleFileChunkSendingEvent(const Event&, void*);
void handleFileRecieveCompletedEvent(const Event&, void*);
// event processing
void onClipboardChanged(CBaseClientProxy* sender,
void onClipboardChanged(BaseClientProxy* sender,
ClipboardID id, UInt32 seqNum);
void onScreensaver(bool activated);
void onKeyDown(KeyID, KeyModifierMask, KeyButton,
@ -331,27 +331,27 @@ private:
void onFileRecieveCompleted();
// add client to list and attach event handlers for client
bool addClient(CBaseClientProxy*);
bool addClient(BaseClientProxy*);
// remove client from list and detach event handlers for client
bool removeClient(CBaseClientProxy*);
bool removeClient(BaseClientProxy*);
// close a client
void closeClient(CBaseClientProxy*, const char* msg);
void closeClient(BaseClientProxy*, const char* msg);
// close clients not in \p config
void closeClients(const CConfig& config);
void closeClients(const Config& config);
// close all clients whether they've completed the handshake or not,
// except the primary client
void closeAllClients();
// remove clients from internal state
void removeActiveClient(CBaseClientProxy*);
void removeOldClient(CBaseClientProxy*);
void removeActiveClient(BaseClientProxy*);
void removeOldClient(BaseClientProxy*);
// force the cursor off of \p client
void forceLeaveClient(CBaseClientProxy* client);
void forceLeaveClient(BaseClientProxy* client);
// thread funciton for sending file
void sendFileThread(void*);
@ -363,38 +363,38 @@ private:
void getDragInfoThread(void*);
// send drag info to new client screen
void sendDragInfo(CBaseClientProxy* newScreen);
void sendDragInfo(BaseClientProxy* newScreen);
public:
bool m_mock;
private:
class CClipboardInfo {
class ClipboardInfo {
public:
CClipboardInfo();
ClipboardInfo();
public:
CClipboard m_clipboard;
CString m_clipboardData;
CString m_clipboardOwner;
Clipboard m_clipboard;
String m_clipboardData;
String m_clipboardOwner;
UInt32 m_clipboardSeqNum;
};
// the primary screen client
CPrimaryClient* m_primaryClient;
PrimaryClient* m_primaryClient;
// all clients (including the primary client) indexed by name
typedef std::map<CString, CBaseClientProxy*> CClientList;
typedef std::set<CBaseClientProxy*> CClientSet;
CClientList m_clients;
CClientSet m_clientSet;
typedef std::map<String, BaseClientProxy*> ClientList;
typedef std::set<BaseClientProxy*> ClientSet;
ClientList m_clients;
ClientSet m_clientSet;
// all old connections that we're waiting to hangup
typedef std::map<CBaseClientProxy*, CEventQueueTimer*> COldClients;
COldClients m_oldClients;
typedef std::map<BaseClientProxy*, EventQueueTimer*> OldClients;
OldClients m_oldClients;
// the client with focus
CBaseClientProxy* m_active;
BaseClientProxy* m_active;
// the sequence number of enter messages
UInt32 m_seqNum;
@ -411,31 +411,31 @@ private:
SInt32 m_xDelta2, m_yDelta2;
// current configuration
CConfig* m_config;
Config* m_config;
// input filter (from m_config);
CInputFilter* m_inputFilter;
InputFilter* m_inputFilter;
// clipboard cache
CClipboardInfo m_clipboards[kClipboardEnd];
ClipboardInfo m_clipboards[kClipboardEnd];
// state saved when screen saver activates
CBaseClientProxy* m_activeSaver;
BaseClientProxy* m_activeSaver;
SInt32 m_xSaver, m_ySaver;
// common state for screen switch tests. all tests are always
// trying to reach the same screen in the same direction.
EDirection m_switchDir;
CBaseClientProxy* m_switchScreen;
BaseClientProxy* m_switchScreen;
// state for delayed screen switching
double m_switchWaitDelay;
CEventQueueTimer* m_switchWaitTimer;
EventQueueTimer* m_switchWaitTimer;
SInt32 m_switchWaitX, m_switchWaitY;
// state for double-tap screen switching
double m_switchTwoTapDelay;
CStopwatch m_switchTwoTapTimer;
Stopwatch m_switchTwoTapTimer;
bool m_switchTwoTapEngaged;
bool m_switchTwoTapArmed;
SInt32 m_switchTwoTapZone;
@ -451,26 +451,26 @@ private:
// flag whether or not we have broadcasting enabled and the screens to
// which we should send broadcasted keys.
bool m_keyboardBroadcasting;
CString m_keyboardBroadcastingScreens;
String m_keyboardBroadcastingScreens;
// screen locking (former scroll lock)
bool m_lockedToScreen;
// server screen
CScreen* m_screen;
Screen* m_screen;
IEventQueue* m_events;
// file transfer
size_t m_expectedFileSize;
CString m_receivedFileData;
CDragFileList m_dragFileList;
CThread* m_sendFileThread;
CThread* m_writeToDropDirThread;
CString m_dragFileExt;
String m_receivedFileData;
DragFileList m_dragFileList;
Thread* m_sendFileThread;
Thread* m_writeToDropDirThread;
String m_dragFileExt;
bool m_ignoreFileTransfer;
bool m_enableDragDrop;
CThread* m_getDragInfoThread;
Thread* m_getDragInfoThread;
bool m_waitDragInfoThread;
};