Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
XDeskflow.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/XBase.h"
11
15class XDeskflow : public XBase
16{
17 using XBase::XBase;
18};
19
23class XBadClient : public XDeskflow
24{
25 using XDeskflow::XDeskflow;
26
27protected:
28 std::string getWhat() const throw() override;
29};
30
35{
36 using XDeskflow::XDeskflow;
37
38protected:
39 std::string getWhat() const throw() override;
40};
41
43
47{
48public:
49 XIncompatibleClient(int major, int minor);
50
52
53
55 int getMajor() const noexcept;
57 int getMinor() const noexcept;
58
60
61protected:
62 std::string getWhat() const throw() override;
63
64private:
65 int m_major;
66 int m_minor;
67};
68
70
75{
76public:
77 explicit XDuplicateClient(const std::string &name);
78 ~XDuplicateClient() throw() override = default;
79
81
82
84 virtual const std::string &getName() const noexcept;
85
87
88protected:
89 std::string getWhat() const throw() override;
90
91private:
92 std::string m_name;
93};
94
96
101{
102public:
103 explicit XUnknownClient(const std::string &name);
104 ~XUnknownClient() throw() override = default;
105
107
108
110 virtual const std::string &getName() const noexcept;
111
113
114protected:
115 std::string getWhat() const throw() override;
116
117private:
118 std::string m_name;
119};
120
122
127class XExitApp : public XDeskflow
128{
129public:
130 explicit XExitApp(int code);
131 ~XExitApp() throw() override = default;
132
134 int getCode() const noexcept;
135
136protected:
137 std::string getWhat() const throw() override;
138
139private:
140 int m_code;
141};
static const struct sockaddr FAR * name
Definition ArchNetworkWinsock.cpp:27
XBadClient - Thrown when the client fails to follow the protocol.
Definition XDeskflow.h:24
std::string getWhat() const override
Get a human readable string describing the exception.
Definition XDeskflow.cpp:15
XBase()
Use getWhat() as the result of what()
Definition XBase.cpp:17
The XDeskflow class Generic deskflow exception class.
Definition XDeskflow.h:16
virtual const std::string & getName() const noexcept
Get client's name.
Definition XDeskflow.cpp:65
std::string getWhat() const override
Get a human readable string describing the exception.
Definition XDeskflow.cpp:70
~XDuplicateClient() override=default
XDuplicateClient(const std::string &name)
Definition XDeskflow.cpp:60
int getCode() const noexcept
Get the exit code.
Definition XDeskflow.cpp:103
~XExitApp() override=default
std::string getWhat() const override
Get a human readable string describing the exception.
Definition XDeskflow.cpp:108
XExitApp(int code)
Definition XDeskflow.cpp:98
std::string getWhat() const override
Get a human readable string describing the exception.
Definition XDeskflow.cpp:48
XIncompatibleClient(int major, int minor)
Definition XDeskflow.cpp:33
int getMajor() const noexcept
Get client's major version number.
Definition XDeskflow.cpp:38
int getMinor() const noexcept
Get client's minor version number.
Definition XDeskflow.cpp:43
XInvalidProtocol - Thrown when the server protocol is unreconized.
Definition XDeskflow.h:35
std::string getWhat() const override
Get a human readable string describing the exception.
Definition XDeskflow.cpp:24
std::string getWhat() const override
Get a human readable string describing the exception.
Definition XDeskflow.cpp:89
XUnknownClient(const std::string &name)
Definition XDeskflow.cpp:79
virtual const std::string & getName() const noexcept
Get the client's name.
Definition XDeskflow.cpp:84
~XUnknownClient() override=default
Definition Config.h:29