deskflow/src/lib/client/Client.h

246 lines
8.8 KiB
C
Raw Normal View History

2012-06-10 16:50:54 +00:00
/*
* synergy -- mouse and keyboard sharing utility
2016-09-07 14:24:00 +00:00
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
2012-06-10 16:50:54 +00:00
*
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
2012-06-10 16:50:54 +00:00
*
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
2012-06-10 16:50:54 +00:00
#include "synergy/IClient.h"
#include "synergy/Clipboard.h"
#include "synergy/DragInformation.h"
#include "synergy/INode.h"
#include "synergy/ClientArgs.h"
#include "net/NetworkAddress.h"
#include "base/EventTypes.h"
#include "mt/CondVar.h"
2012-06-10 16:50:54 +00:00
2014-11-11 13:51:47 +00:00
class EventQueueTimer;
namespace synergy { class Screen; }
2014-11-11 13:51:47 +00:00
class ServerProxy;
2012-06-10 16:50:54 +00:00
class IDataSocket;
class ISocketFactory;
namespace synergy { class IStream; }
2012-06-10 16:50:54 +00:00
class IEventQueue;
2014-11-11 13:51:47 +00:00
class Thread;
2015-01-26 13:23:11 +00:00
class TCPSocket;
2012-06-10 16:50:54 +00:00
//! Synergy client
/*!
This class implements the top-level client algorithms for synergy.
*/
2014-11-11 13:51:47 +00:00
class Client : public IClient, public INode {
2012-06-10 16:50:54 +00:00
public:
class FailInfo {
public:
FailInfo(const char* what) : m_retry(false), m_what(what) { }
bool m_retry;
String m_what;
};
2012-06-10 16:50:54 +00:00
public:
/*!
This client will attempt to connect to the server using \p name
as its name and \p address as the server's address and \p factory
to create the socket. \p screen is the local screen.
*/
Client(IEventQueue* events, const String& name,
const NetworkAddress& address, ISocketFactory* socketFactory,
synergy::Screen* screen, lib::synergy::ClientArgs const& args);
2020-11-03 10:52:56 +00:00
Client(Client const &) =delete;
Client(Client &&) =delete;
~Client();
2020-11-03 10:52:56 +00:00
Client& operator=(Client const &) =delete;
Client& operator=(Client &&) =delete;
//! @name manipulators
//@{
//! Connect to server
/*!
Starts an attempt to connect to the server. This is ignored if
the client is trying to connect or is already connected.
*/
SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 (#7008) * SYNERGY-970 Synergy1. User is not able to connect to server using ipv6 without wrapping IP in square quotes *Fix connection without brackets *Fix config screen bug * SYNERGY-970 Synergy1. User is not able to connect to server using ipv6 without wrapping IP in square quotes *Update changelog * SYNERGY-970 Mac client listens on ipv4 only but attempts to connect on ipv6 #6964 *Add logging in case of several IP of hostname * Synergy 970 synergy1. user is not able to connect to server using ipv6 without wrapping ip in square quotes *Update changelog * SYNERGY-885 Mac client listens on ipv4 only but attempts to connect on ipv6 *Fix Sonar warnings * SUNERGY-885-Mac client listens on ipv4 only but attempts to connect on ipv6 *Update Changelog * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix include * Sunergy-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix sonar warnings * SYNERGY-885 Mac client listens on ipv4 only but attempts to connect on ipv6 *Add loggic to connect to first from reachable server addresses * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix unix compilation * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix unix compilation * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix code smells * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix build * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix memory leak * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Added logic for temporary ipv6 filtering from connect * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Temporary disable ipv6 parsing and resolving tests Co-authored-by: Andrii Batyiev <andrii-external@symless.com>
2021-05-20 16:59:05 +00:00
void connect(size_t addressIndex = 0);
//! Disconnect
/*!
Disconnects from the server with an optional error message.
*/
void disconnect(const char* msg);
//! Refuse connection
/*!
Disconnects from the server with an optional error message.
Unlike disconnect this function doesn't try to use other ip addresses
*/
void refuseConnection(const char* msg);
//! Notify of handshake complete
/*!
Notifies the client that the connection handshake has completed.
*/
virtual void handshakeComplete();
//! Received drag information
void dragInfoReceived(UInt32 fileNum, String data);
//! Create a new thread and use it to send file to Server
void sendFileToServer(const char* filename);
//! Send dragging file information back to server
void sendDragInfo(UInt32 fileCount, String& info, size_t size);
//@}
//! @name accessors
//@{
//! Test if connected
/*!
Returns true iff the client is successfully connected to the server.
*/
bool isConnected() const;
//! Test if connecting
/*!
Returns true iff the client is currently attempting to connect to
the server.
*/
bool isConnecting() const;
//! Get address of server
/*!
Returns the address of the server the client is connected (or wants
to connect) to.
*/
NetworkAddress getServerAddress() const;
2020-11-03 10:52:56 +00:00
//! Return true if received file size is valid
bool isReceivedFileSizeValid();
//! Return expected file size
size_t& getExpectedFileSize() { return m_expectedFileSize; }
//! Return received file data
String& getReceivedFileData() { return m_receivedFileData; }
//! Return drag file list
DragFileList getDragFileList() { return m_dragFileList; }
SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 (#7008) * SYNERGY-970 Synergy1. User is not able to connect to server using ipv6 without wrapping IP in square quotes *Fix connection without brackets *Fix config screen bug * SYNERGY-970 Synergy1. User is not able to connect to server using ipv6 without wrapping IP in square quotes *Update changelog * SYNERGY-970 Mac client listens on ipv4 only but attempts to connect on ipv6 #6964 *Add logging in case of several IP of hostname * Synergy 970 synergy1. user is not able to connect to server using ipv6 without wrapping ip in square quotes *Update changelog * SYNERGY-885 Mac client listens on ipv4 only but attempts to connect on ipv6 *Fix Sonar warnings * SUNERGY-885-Mac client listens on ipv4 only but attempts to connect on ipv6 *Update Changelog * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix include * Sunergy-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix sonar warnings * SYNERGY-885 Mac client listens on ipv4 only but attempts to connect on ipv6 *Add loggic to connect to first from reachable server addresses * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix unix compilation * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix unix compilation * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix code smells * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix build * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix memory leak * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Added logic for temporary ipv6 filtering from connect * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Temporary disable ipv6 parsing and resolving tests Co-authored-by: Andrii Batyiev <andrii-external@symless.com>
2021-05-20 16:59:05 +00:00
//! Return last resolved adresses count
size_t getLastResolvedAddressesCount() const { return m_resolvedAddressesCount; }
//@}
// IScreen overrides
virtual void* getEventTarget() const;
virtual bool getClipboard(ClipboardID id, IClipboard*) const;
virtual void getShape(SInt32& x, SInt32& y,
SInt32& width, SInt32& height) const;
virtual void getCursorPos(SInt32& x, SInt32& y) const;
// IClient overrides
virtual void enter(SInt32 xAbs, SInt32 yAbs,
UInt32 seqNum, KeyModifierMask mask,
bool forScreensaver);
virtual bool leave();
virtual void setClipboard(ClipboardID, const IClipboard*);
virtual void grabClipboard(ClipboardID);
virtual void setClipboardDirty(ClipboardID, bool);
Synergy 907 client tray language switcher reverts to en (#7038) * SYNERGY-907 Client tray language switcher reverts to EN *Fix checkbox spelling * SYNERGY-907 Client tray language switcher reverts to EN *Update changelog * SYNERGY-907 Client tray language switcher reverts to EN *Temporary disable language sync logic * SYNERGY-907 client tray language switcher reverts to en *Update changelog * Synergy 907 client tray language switcher reverts to en *Fix sonar * Synergy 907 client tray language switcher reverts to en *Fix sonar * Synergy 907 client tray language switcher reverts to en *Fix chnagelog * SYNERGY-907 Client tray language switcher reverts to EN *Add prototype of keyboard layout names transfer(Windows part) * SYNERGY-907 Client tray language switcher reverts to EN *Add keyboard layout determination(Mac part) * SYNERGY-907 Client tray language switcher reverts to EN *Add language check on client side * SYNERGY-907 Client tray language switcher reverts to EN *Fix Windows build * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Add logs * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Add protocol update * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Add server side of language sync * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Remove unused variables * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *AFix mac language determination * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Clean up logs * SYNERGY-907 Client tray language switcher reverts to EN *Replace logs with messagebox on Windows * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Add mac messagebox, revert protocol changes * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Fix minor language bugs * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Update chagelog * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Minor fixes * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Fix Linux build * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Fix sonar code smells * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Fix Linux build * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Add Linux language determination * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Fix sonar codesmells * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Fix sonar codesmells * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Replace custom xml parser with tinyxml2 * SYNERGY-907 Client tray language switcher reverts to EN *Fix PR comments * SYNERGY-907 Client tray language switcher reverts to EN *Update changelog * SYNERGY-907 Client tray language switcher reverts to EN *Fix unix build * SYNERGY-907 Client tray language switcher reverts to EN *Fix unix build * SYNERGY-907 Client tray language switcher reverts to EN *Fix sonar code smells * SYNERGY-907 Client tray language switcher reverts to EN *Update changelog * SYNERGY-907 Client tray language switcher reverts to EN *Replace tinuxml with pugixml * SYNERGY-907 Client tray language switcher reverts to EN *Add pugixml as a git submodule * SYNERGY-907 Client tray language switcher reverts to EN *Add missed files * SYNERGY-907 Client tray language switcher reverts to EN *Fix sonar code smells * SYNERGY-907 Client tray language switcher reverts to EN *Fix comments from PR * SYNERGY-907 Client tray language switcher reverts to EN *Fix sonar code smell * SYNERGY-907 Client tray language switcher reverts to EN *add tests for x11 files parser * SYNERGY-907 Client tray language switcher reverts to EN *Fix include for unix build * SYNERGY-907 Client tray language switcher reverts to EN *Add test coverage for new logic * SYNERGY-907 Client tray language switcher reverts to EN *Add test coverage for new logic * SYNERGY-907 Client tray language switcher reverts to EN *Add code coverage *Fix code smells * SYNERGY-907 Client tray language switcher reverts to EN *Return missed file * SYNERGY-907 Client tray language switcher reverts to EN *Improve code coverage of x11Layouts parser * SYNERGY-907 Client tray language switcher reverts to EN *Add client args code coverage * SYNERGY-907 Client tray language switcher reverts to EN *Return runtime language sync * SYNERGY-907 Client tray language switcher reverts to EN *Return windows current keyboard layout determination * SYNERGY-907 Client tray language switcher reverts to EN *Return Linux language determination * SYNERGY-907 Client tray language switcher reverts to EN *Remove debug code * SYNERGY-907 Client tray language switcher reverts to EN *Move back Carbon current language determination * SYNERGY-907 Client tray language switcher reverts to EN *Fix language change for existed languages on iOS and Linux * SYNERGY-907 Client tray language switcher reverts to EN *Return protocol missed parameter * SYNERGY-907 Client tray language switcher reverts to EN *Fix macOS language change * SYNERGY-907 Client tray language switcher reverts to EN *Fix language sync (when it is disabled) * SYNERGY-907 Client tray language switcher reverts to EN *Add correct language choosing *Fix code coverage tests * SYNERGY-907 Client tray language switcher reverts to EN *Fix windows build and tests * SYNERGY-907 Client tray language switcher reverts to EN *Fix macOS build and tests * SYNERGY-907 Client tray language switcher reverts to EN *Fix language change for first letter in keystroke * SYNERGY-907 Client tray language switcher reverts to EN *Fix macOS build * SYNERGY-907 Client tray language switcher reverts to EN *Partially fix Sonar codesmells * SYNERGY-907 Client tray language switcher reverts to EN *Partially fix Sonar codesmells * SYNERGY-907 Client tray language switcher reverts to EN *Fix build * SYNERGY-907 Client tray language switcher reverts to EN *Added logging for language change process *Fixed language change process for Windows * SYNERGY-907 Client tray language switcher reverts to EN *Fix double layout change in key repeat event * SYNERGY-907 Client tray language switcher reverts to EN *Fix determination of current language on windows *Removed legacy code of restoring language when leaving screen *Fix double group change on Linux * SYNERGY-907 Client tray language switcher reverts to EN *Temp fix for language change on Linux * SYNERGY-907 Client tray language switcher reverts to EN *Add XSync to normalize Linux language polling and setting *Remove setxkbmap using * SYNERGY-907 Client tray language switcher reverts to EN *Add keyboard layout changing on Linux with DBus * SYNERGY-907 Client tray language switcher reverts to EN *Add comments to new language change function *Logical fix * SYNERGY-907 Client tray language switcher reverts to EN *Remove input attaching * SYNERGY-907 Client tray language switcher reverts to EN *Fix language change on macOS * SYNERGY-907 Fix review issues * SYNERGY-907 Fix review comment for Windows * SYNERGY-907 Removed debug trace Co-authored-by: Andrii Batyiev <andrii-external@symless.com> Co-authored-by: user <user@users-Mac-mini.local> Co-authored-by: Serhii Hadzhilov <serhii-external@symless.com>
2021-10-04 15:51:12 +00:00
virtual void keyDown(KeyID, KeyModifierMask, KeyButton, const String&);
virtual void keyRepeat(KeyID, KeyModifierMask,
Synergy 907 client tray language switcher reverts to en (#7038) * SYNERGY-907 Client tray language switcher reverts to EN *Fix checkbox spelling * SYNERGY-907 Client tray language switcher reverts to EN *Update changelog * SYNERGY-907 Client tray language switcher reverts to EN *Temporary disable language sync logic * SYNERGY-907 client tray language switcher reverts to en *Update changelog * Synergy 907 client tray language switcher reverts to en *Fix sonar * Synergy 907 client tray language switcher reverts to en *Fix sonar * Synergy 907 client tray language switcher reverts to en *Fix chnagelog * SYNERGY-907 Client tray language switcher reverts to EN *Add prototype of keyboard layout names transfer(Windows part) * SYNERGY-907 Client tray language switcher reverts to EN *Add keyboard layout determination(Mac part) * SYNERGY-907 Client tray language switcher reverts to EN *Add language check on client side * SYNERGY-907 Client tray language switcher reverts to EN *Fix Windows build * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Add logs * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Add protocol update * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Add server side of language sync * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Remove unused variables * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *AFix mac language determination * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Clean up logs * SYNERGY-907 Client tray language switcher reverts to EN *Replace logs with messagebox on Windows * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Add mac messagebox, revert protocol changes * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Fix minor language bugs * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Update chagelog * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Minor fixes * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Fix Linux build * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Fix sonar code smells * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Fix Linux build * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Add Linux language determination * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Fix sonar codesmells * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Fix sonar codesmells * SYNERGY-907-Client-tray-language-switcher-reverts-to-EN *Replace custom xml parser with tinyxml2 * SYNERGY-907 Client tray language switcher reverts to EN *Fix PR comments * SYNERGY-907 Client tray language switcher reverts to EN *Update changelog * SYNERGY-907 Client tray language switcher reverts to EN *Fix unix build * SYNERGY-907 Client tray language switcher reverts to EN *Fix unix build * SYNERGY-907 Client tray language switcher reverts to EN *Fix sonar code smells * SYNERGY-907 Client tray language switcher reverts to EN *Update changelog * SYNERGY-907 Client tray language switcher reverts to EN *Replace tinuxml with pugixml * SYNERGY-907 Client tray language switcher reverts to EN *Add pugixml as a git submodule * SYNERGY-907 Client tray language switcher reverts to EN *Add missed files * SYNERGY-907 Client tray language switcher reverts to EN *Fix sonar code smells * SYNERGY-907 Client tray language switcher reverts to EN *Fix comments from PR * SYNERGY-907 Client tray language switcher reverts to EN *Fix sonar code smell * SYNERGY-907 Client tray language switcher reverts to EN *add tests for x11 files parser * SYNERGY-907 Client tray language switcher reverts to EN *Fix include for unix build * SYNERGY-907 Client tray language switcher reverts to EN *Add test coverage for new logic * SYNERGY-907 Client tray language switcher reverts to EN *Add test coverage for new logic * SYNERGY-907 Client tray language switcher reverts to EN *Add code coverage *Fix code smells * SYNERGY-907 Client tray language switcher reverts to EN *Return missed file * SYNERGY-907 Client tray language switcher reverts to EN *Improve code coverage of x11Layouts parser * SYNERGY-907 Client tray language switcher reverts to EN *Add client args code coverage * SYNERGY-907 Client tray language switcher reverts to EN *Return runtime language sync * SYNERGY-907 Client tray language switcher reverts to EN *Return windows current keyboard layout determination * SYNERGY-907 Client tray language switcher reverts to EN *Return Linux language determination * SYNERGY-907 Client tray language switcher reverts to EN *Remove debug code * SYNERGY-907 Client tray language switcher reverts to EN *Move back Carbon current language determination * SYNERGY-907 Client tray language switcher reverts to EN *Fix language change for existed languages on iOS and Linux * SYNERGY-907 Client tray language switcher reverts to EN *Return protocol missed parameter * SYNERGY-907 Client tray language switcher reverts to EN *Fix macOS language change * SYNERGY-907 Client tray language switcher reverts to EN *Fix language sync (when it is disabled) * SYNERGY-907 Client tray language switcher reverts to EN *Add correct language choosing *Fix code coverage tests * SYNERGY-907 Client tray language switcher reverts to EN *Fix windows build and tests * SYNERGY-907 Client tray language switcher reverts to EN *Fix macOS build and tests * SYNERGY-907 Client tray language switcher reverts to EN *Fix language change for first letter in keystroke * SYNERGY-907 Client tray language switcher reverts to EN *Fix macOS build * SYNERGY-907 Client tray language switcher reverts to EN *Partially fix Sonar codesmells * SYNERGY-907 Client tray language switcher reverts to EN *Partially fix Sonar codesmells * SYNERGY-907 Client tray language switcher reverts to EN *Fix build * SYNERGY-907 Client tray language switcher reverts to EN *Added logging for language change process *Fixed language change process for Windows * SYNERGY-907 Client tray language switcher reverts to EN *Fix double layout change in key repeat event * SYNERGY-907 Client tray language switcher reverts to EN *Fix determination of current language on windows *Removed legacy code of restoring language when leaving screen *Fix double group change on Linux * SYNERGY-907 Client tray language switcher reverts to EN *Temp fix for language change on Linux * SYNERGY-907 Client tray language switcher reverts to EN *Add XSync to normalize Linux language polling and setting *Remove setxkbmap using * SYNERGY-907 Client tray language switcher reverts to EN *Add keyboard layout changing on Linux with DBus * SYNERGY-907 Client tray language switcher reverts to EN *Add comments to new language change function *Logical fix * SYNERGY-907 Client tray language switcher reverts to EN *Remove input attaching * SYNERGY-907 Client tray language switcher reverts to EN *Fix language change on macOS * SYNERGY-907 Fix review issues * SYNERGY-907 Fix review comment for Windows * SYNERGY-907 Removed debug trace Co-authored-by: Andrii Batyiev <andrii-external@symless.com> Co-authored-by: user <user@users-Mac-mini.local> Co-authored-by: Serhii Hadzhilov <serhii-external@symless.com>
2021-10-04 15:51:12 +00:00
SInt32 count, KeyButton, const String& lang);
virtual void keyUp(KeyID, KeyModifierMask, KeyButton);
virtual void mouseDown(ButtonID);
virtual void mouseUp(ButtonID);
virtual void mouseMove(SInt32 xAbs, SInt32 yAbs);
virtual void mouseRelativeMove(SInt32 xRel, SInt32 yRel);
virtual void mouseWheel(SInt32 xDelta, SInt32 yDelta);
virtual void screensaver(bool activate);
virtual void resetOptions();
virtual void setOptions(const OptionsList& options);
virtual String getName() const;
2012-06-10 16:50:54 +00:00
private:
void sendClipboard(ClipboardID);
void sendEvent(Event::Type, void*);
void sendConnectionFailedEvent(const char* msg);
void sendFileChunk(const void* data);
void sendFileThread(void*);
void writeToDropDirThread(void*);
void setupConnecting();
void setupConnection();
void setupScreen();
void setupTimer();
void cleanup();
void cleanupConnecting();
void cleanupConnection();
void cleanupScreen();
void cleanupTimer();
void cleanupStream();
void handleConnected(const Event&, void*);
void handleConnectionFailed(const Event&, void*);
void handleConnectTimeout(const Event&, void*);
void handleOutputError(const Event&, void*);
void handleDisconnected(const Event&, void*);
void handleShapeChanged(const Event&, void*);
void handleClipboardGrabbed(const Event&, void*);
bool isCompatible(int major, int minor) const;
void handleHello(const Event&, void*);
void handleSuspend(const Event& event, void*);
void handleResume(const Event& event, void*);
void handleFileChunkSending(const Event&, void*);
void handleFileRecieveCompleted(const Event&, void*);
void handleStopRetry(const Event&, void*);
void onFileRecieveCompleted();
void sendClipboardThread(void*);
public:
bool m_mock;
2012-06-10 16:50:54 +00:00
private:
String m_name;
NetworkAddress m_serverAddress;
ISocketFactory* m_socketFactory;
synergy::Screen* m_screen;
synergy::IStream* m_stream;
EventQueueTimer* m_timer;
ServerProxy* m_server;
bool m_ready;
bool m_active;
bool m_suspended;
bool m_connectOnResume;
bool m_ownClipboard[kClipboardEnd];
bool m_sentClipboard[kClipboardEnd];
IClipboard::Time m_timeClipboard[kClipboardEnd];
String m_dataClipboard[kClipboardEnd];
IEventQueue* m_events;
std::size_t m_expectedFileSize;
String m_receivedFileData;
DragFileList m_dragFileList;
String m_dragFileExt;
Thread* m_sendFileThread;
Thread* m_writeToDropDirThread;
TCPSocket* m_socket;
bool m_useSecureNetwork;
bool m_enableClipboard;
size_t m_maximumClipboardSize;
lib::synergy::ClientArgs m_args;
SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 (#7008) * SYNERGY-970 Synergy1. User is not able to connect to server using ipv6 without wrapping IP in square quotes *Fix connection without brackets *Fix config screen bug * SYNERGY-970 Synergy1. User is not able to connect to server using ipv6 without wrapping IP in square quotes *Update changelog * SYNERGY-970 Mac client listens on ipv4 only but attempts to connect on ipv6 #6964 *Add logging in case of several IP of hostname * Synergy 970 synergy1. user is not able to connect to server using ipv6 without wrapping ip in square quotes *Update changelog * SYNERGY-885 Mac client listens on ipv4 only but attempts to connect on ipv6 *Fix Sonar warnings * SUNERGY-885-Mac client listens on ipv4 only but attempts to connect on ipv6 *Update Changelog * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix include * Sunergy-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix sonar warnings * SYNERGY-885 Mac client listens on ipv4 only but attempts to connect on ipv6 *Add loggic to connect to first from reachable server addresses * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix unix compilation * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix unix compilation * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix code smells * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix build * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Fix memory leak * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Added logic for temporary ipv6 filtering from connect * SYNERGY-885 mac client listens on ipv4 only but attempts to connect on ipv6 *Temporary disable ipv6 parsing and resolving tests Co-authored-by: Andrii Batyiev <andrii-external@symless.com>
2021-05-20 16:59:05 +00:00
size_t m_resolvedAddressesCount = 0;
2012-06-10 16:50:54 +00:00
};