Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
ArgsBase.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2012 Symless Ltd.
4 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
5 */
6
7#pragma once
8
9#include <string>
10
11namespace deskflow {
12
19{
20public:
21 ArgsBase() = default;
22 virtual ~ArgsBase() = default;
23
25 enum class ClassType
26 {
30 };
31
34
36 bool m_daemon = true;
37
39 bool m_restartable = true;
40
42 bool m_noHooks = false;
43
45 const char *m_pname = nullptr;
46
48 const char *m_logFilter = nullptr;
49
51 const char *m_logFile = nullptr;
52
54 const char *m_display = nullptr;
55
57 std::string m_name;
58
60 bool m_disableTray = false;
61
63 bool m_shouldExitOk = false;
64
66 bool m_shouldExitFail = false;
67
69 std::string m_deskflowAddress;
70
72 bool m_enableCrypto = false;
73
75 std::string m_tlsCertFile;
76
78 bool m_preventSleep = false;
79
80protected:
82 template <class T> static inline void destroy(T *&p)
83 {
84 delete p;
85 p = 0;
86 }
87};
88} // namespace deskflow
static void destroy(T *&p)
deletes pointers and sets the value to null
Definition ArgsBase.h:82
bool m_shouldExitOk
Will cause the application to exit with OK code when set to true.
Definition ArgsBase.h:63
bool m_shouldExitFail
Will cause the application to exit with fail code when set to true.
Definition ArgsBase.h:66
bool m_disableTray
Should the app add a tray icon.
Definition ArgsBase.h:60
std::string m_tlsCertFile
Contains the location of the TLS certificate file.
Definition ArgsBase.h:75
const char * m_display
Contains the X-Server display to use.
Definition ArgsBase.h:54
ClassType
This sets the type of the derived class.
Definition ArgsBase.h:26
@ Base
Definition ArgsBase.h:27
@ Client
Definition ArgsBase.h:29
@ Server
Definition ArgsBase.h:28
bool m_noHooks
Should the app use hooks.
Definition ArgsBase.h:42
bool m_enableCrypto
Should the connections be TLS encrypted.
Definition ArgsBase.h:72
const char * m_logFile
The full path to the logfile.
Definition ArgsBase.h:51
bool m_restartable
Should the app restart automatically.
Definition ArgsBase.h:39
std::string m_name
The name of the current computer.
Definition ArgsBase.h:57
const char * m_pname
The filename of the running process.
Definition ArgsBase.h:45
ClassType m_classType
Stores what type of object this is.
Definition ArgsBase.h:33
std::string m_deskflowAddress
Bind to this address.
Definition ArgsBase.h:69
bool m_daemon
Should run as a daemon.
Definition ArgsBase.h:36
const char * m_logFilter
The logging level of the application.
Definition ArgsBase.h:48
virtual ~ArgsBase()=default
bool m_preventSleep
Stop this computer from sleeping.
Definition ArgsBase.h:78
Definition EventTypes.h:11