Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
ClientProxy.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
4 * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
5 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
6 */
7
8#pragma once
9
10#include "base/Event.h"
11#include "base/EventTypes.h"
13
14namespace deskflow {
15class IStream;
16}
17
20{
21public:
25 ClientProxy(const std::string &name, deskflow::IStream *adoptedStream);
26 ClientProxy(ClientProxy const &) = delete;
28 ~ClientProxy() override;
29
30 ClientProxy &operator=(ClientProxy const &) = delete;
32
34
35
37
40 void close(const char *msg) const;
41
43
45
47
50 deskflow::IStream *getStream() const override;
51
53
54 // IScreen
55 void *getEventTarget() const override;
56 bool getClipboard(ClipboardID id, IClipboard *) const override = 0;
57 void getShape(int32_t &x, int32_t &y, int32_t &width, int32_t &height) const override = 0;
58 void getCursorPos(int32_t &x, int32_t &y) const override = 0;
59
60 // IClient overrides
61 void enter(int32_t xAbs, int32_t yAbs, uint32_t seqNum, KeyModifierMask mask, bool forScreensaver) override = 0;
62 bool leave() override = 0;
63 void setClipboard(ClipboardID, const IClipboard *) override = 0;
64 void grabClipboard(ClipboardID) override = 0;
65 void setClipboardDirty(ClipboardID, bool) override = 0;
66 void keyDown(KeyID, KeyModifierMask, KeyButton, const std::string &) override = 0;
67 void keyRepeat(KeyID, KeyModifierMask, int32_t count, KeyButton, const std::string &lang) override = 0;
68 void keyUp(KeyID, KeyModifierMask, KeyButton) override = 0;
69 void mouseDown(ButtonID) override = 0;
70 void mouseUp(ButtonID) override = 0;
71 void mouseMove(int32_t xAbs, int32_t yAbs) override = 0;
72 void mouseRelativeMove(int32_t xRel, int32_t yRel) override = 0;
73 void mouseWheel(int32_t xDelta, int32_t yDelta) override = 0;
74 void screensaver(bool activate) override = 0;
75 void resetOptions() override = 0;
76 void setOptions(const OptionsList &options) override = 0;
77 void sendDragInfo(uint32_t fileCount, const char *info, size_t size) override = 0;
78 void fileChunkSending(uint8_t mark, char *data, size_t dataSize) override = 0;
79 void secureInputNotification(const std::string &app) const override = 0;
80
81private:
82 deskflow::IStream *m_stream;
83};
static const struct sockaddr FAR * name
Definition ArchNetworkWinsock.cpp:27
static int void FAR * data
Definition ArchNetworkWinsock.cpp:34
uint8_t ClipboardID
Clipboard ID.
Definition ClipboardTypes.h:16
uint32_t KeyID
Key ID.
Definition KeyTypes.h:22
uint16_t KeyButton
Key Code.
Definition KeyTypes.h:35
uint32_t KeyModifierMask
Modifier key mask.
Definition KeyTypes.h:45
uint8_t ButtonID
Mouse button ID.
Definition MouseTypes.h:16
std::vector< uint32_t > OptionsList
Definition OptionTypes.h:27
int y
Definition ServerConfig.cpp:27
int x
Definition ServerConfig.cpp:26
BaseClientProxy(const std::string &name)
Definition BaseClientProxy.cpp:14
ClientProxy & operator=(ClientProxy const &)=delete
void grabClipboard(ClipboardID) override=0
Grab clipboard.
void close(const char *msg) const
Disconnect.
Definition ClientProxy.cpp:29
void mouseUp(ButtonID) override=0
Notify of mouse release.
void setClipboardDirty(ClipboardID, bool) override=0
Mark clipboard dirty.
ClientProxy(ClientProxy &&)=delete
void keyRepeat(KeyID, KeyModifierMask, int32_t count, KeyButton, const std::string &lang) override=0
Notify of key repeat.
void mouseMove(int32_t xAbs, int32_t yAbs) override=0
Notify of mouse motion.
ClientProxy & operator=(ClientProxy &&)=delete
void getCursorPos(int32_t &x, int32_t &y) const override=0
Get cursor position.
void setClipboard(ClipboardID, const IClipboard *) override=0
Set clipboard.
ClientProxy(const std::string &name, deskflow::IStream *adoptedStream)
Definition ClientProxy.cpp:19
void getShape(int32_t &x, int32_t &y, int32_t &width, int32_t &height) const override=0
Get screen shape.
void fileChunkSending(uint8_t mark, char *data, size_t dataSize) override=0
void enter(int32_t xAbs, int32_t yAbs, uint32_t seqNum, KeyModifierMask mask, bool forScreensaver) override=0
Enter screen.
void screensaver(bool activate) override=0
Notify of screen saver change.
void mouseWheel(int32_t xDelta, int32_t yDelta) override=0
Notify of mouse wheel motion.
bool getClipboard(ClipboardID id, IClipboard *) const override=0
Get clipboard.
void secureInputNotification(const std::string &app) const override=0
void keyUp(KeyID, KeyModifierMask, KeyButton) override=0
Notify of key release.
~ClientProxy() override
Definition ClientProxy.cpp:24
void sendDragInfo(uint32_t fileCount, const char *info, size_t size) override=0
void setOptions(const OptionsList &options) override=0
Notify of options changes.
void resetOptions() override=0
Notify of options changes.
void mouseRelativeMove(int32_t xRel, int32_t yRel) override=0
Notify of mouse motion.
void keyDown(KeyID, KeyModifierMask, KeyButton, const std::string &) override=0
Notify of key press.
deskflow::IStream * getStream() const override
Get stream.
Definition ClientProxy.cpp:38
void mouseDown(ButtonID) override=0
Notify of mouse press.
void * getEventTarget() const override
Get event target.
Definition ClientProxy.cpp:43
ClientProxy(ClientProxy const &)=delete
bool leave() override=0
Leave screen.
Clipboard interface.
Definition IClipboard.h:20
Bidirectional stream interface.
Definition IStream.h:24
Definition EventTypes.h:11