From 4eec183598cc13fc5aac674dd65edaca10c3aa1f Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Sun, 17 Aug 2025 12:28:39 -0400 Subject: [PATCH] refactor: remove IInterface class, that only adds a virtual construcor --- src/lib/arch/ArchString.h | 5 ++--- src/lib/arch/IArchDaemon.h | 6 ++++-- src/lib/arch/IArchLog.h | 6 ++++-- src/lib/arch/IArchMultithread.h | 7 +++++-- src/lib/arch/IArchNetwork.h | 6 ++++-- src/lib/base/IEventJob.h | 6 ++++-- src/lib/base/IEventQueue.h | 6 ++++-- src/lib/base/IEventQueueBuffer.h | 5 +++-- src/lib/base/IJob.h | 6 ++++-- src/lib/base/ILogOutputter.h | 7 +++++-- src/lib/common/CMakeLists.txt | 1 - src/lib/common/IInterface.h | 22 -------------------- src/lib/deskflow/IApp.h | 6 ++++-- src/lib/deskflow/IAppUtil.h | 6 ++++-- src/lib/deskflow/IClipboard.h | 6 ++++-- src/lib/deskflow/IKeyState.h | 6 ++++-- src/lib/deskflow/INode.h | 7 +++++-- src/lib/deskflow/IPrimaryScreen.h | 6 ++++-- src/lib/deskflow/IScreen.h | 6 ++++-- src/lib/deskflow/IScreenSaver.h | 6 ++++-- src/lib/deskflow/ISecondaryScreen.h | 6 ++++-- src/lib/io/IStream.h | 7 ++++--- src/lib/net/ISocket.h | 6 ++++-- src/lib/net/ISocketFactory.h | 5 +++-- src/lib/net/ISocketMultiplexerJob.h | 6 ++++-- src/lib/platform/IMSWindowsClipboardFacade.h | 5 +++-- src/lib/platform/IOSXKeyResource.h | 4 +++- src/lib/platform/MSWindowsClipboard.h | 4 +++- src/lib/platform/OSXClipboard.h | 4 +++- src/lib/platform/XWindowsClipboard.h | 4 +++- 30 files changed, 106 insertions(+), 77 deletions(-) delete mode 100644 src/lib/common/IInterface.h diff --git a/src/lib/arch/ArchString.h b/src/lib/arch/ArchString.h index 574be7dbc..4e312b14d 100644 --- a/src/lib/arch/ArchString.h +++ b/src/lib/arch/ArchString.h @@ -9,7 +9,6 @@ #pragma once #include "common/Common.h" -#include "common/IInterface.h" #include @@ -18,13 +17,13 @@ This interface defines the string operations required by deskflow. Each architecture must implement this interface. */ -class ArchString : public IInterface +class ArchString { public: ArchString() = default; ArchString(const ArchString &) = delete; ArchString(ArchString &&) = delete; - ~ArchString() override = default; + virtual ~ArchString() = default; ArchString &operator=(const ArchString &) = delete; ArchString &operator=(ArchString &&) = delete; diff --git a/src/lib/arch/IArchDaemon.h b/src/lib/arch/IArchDaemon.h index a4c9cedfa..be210b613 100644 --- a/src/lib/arch/IArchDaemon.h +++ b/src/lib/arch/IArchDaemon.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -7,7 +8,7 @@ #pragma once -#include "common/IInterface.h" +#include "common/Common.h" #include #include @@ -18,11 +19,12 @@ This interface defines the operations required by deskflow for installing uninstalling daeamons and daemonizing a process. Each architecture must implement this interface. */ -class IArchDaemon : public IInterface +class IArchDaemon { public: using DaemonFunc = std::function; + virtual ~IArchDaemon() = default; //! @name manipulators //@{ diff --git a/src/lib/arch/IArchLog.h b/src/lib/arch/IArchLog.h index 4605b65b0..3476383bb 100644 --- a/src/lib/arch/IArchLog.h +++ b/src/lib/arch/IArchLog.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -8,16 +9,17 @@ #pragma once #include "base/LogLevel.h" -#include "common/IInterface.h" +#include "common/Common.h" //! Interface for architecture dependent logging /*! This interface defines the logging operations required by deskflow. Each architecture must implement this interface. */ -class IArchLog : public IInterface +class IArchLog { public: + virtual ~IArchLog() = default; //! @name manipulators //@{ diff --git a/src/lib/arch/IArchMultithread.h b/src/lib/arch/IArchMultithread.h index 9756db96d..24ec2f3cf 100644 --- a/src/lib/arch/IArchMultithread.h +++ b/src/lib/arch/IArchMultithread.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -7,7 +8,7 @@ #pragma once -#include "common/IInterface.h" +#include "common/Common.h" /*! \class ArchCondImpl @@ -57,13 +58,15 @@ using ArchThread = ArchThreadImpl *; This interface defines the multithreading operations required by deskflow. Each architecture must implement this interface. */ -class IArchMultithread : public IInterface +class IArchMultithread { public: //! Type of thread entry point using ThreadFunc = void *(*)(void *); //! Type of thread identifier using ThreadID = unsigned int; + + virtual ~IArchMultithread() = default; //! Types of signals /*! Not all platforms support all signals. Unsupported signals are diff --git a/src/lib/arch/IArchNetwork.h b/src/lib/arch/IArchNetwork.h index 265463a22..1f856cfa3 100644 --- a/src/lib/arch/IArchNetwork.h +++ b/src/lib/arch/IArchNetwork.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -7,7 +8,7 @@ #pragma once -#include "common/IInterface.h" +#include "common/Common.h" #include #include @@ -49,9 +50,10 @@ using ArchNetAddress = ArchNetAddressImpl *; This interface defines the networking operations required by deskflow. Each architecture must implement this interface. */ -class IArchNetwork : public IInterface +class IArchNetwork { public: + virtual ~IArchNetwork() = default; //! Supported address families enum class AddressFamily : uint8_t { diff --git a/src/lib/base/IEventJob.h b/src/lib/base/IEventJob.h index 3c8072fcc..d710c00f5 100644 --- a/src/lib/base/IEventJob.h +++ b/src/lib/base/IEventJob.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -7,7 +8,7 @@ #pragma once -#include "common/IInterface.h" +#include "common/Common.h" class Event; @@ -15,9 +16,10 @@ class Event; /*! An event job is an interface for executing a event handler. */ -class IEventJob : public IInterface +class IEventJob { public: + virtual ~IEventJob() = default; //! Run the job virtual void run(const Event &) = 0; }; diff --git a/src/lib/base/IEventQueue.h b/src/lib/base/IEventQueue.h index 584e3c680..48957efa6 100644 --- a/src/lib/base/IEventQueue.h +++ b/src/lib/base/IEventQueue.h @@ -10,7 +10,7 @@ #include "base/Event.h" #include "base/EventTypes.h" -#include "common/IInterface.h" +#include "common/Common.h" #include #include @@ -28,10 +28,12 @@ on any event becoming available at the head of the queue and can place new events at the end of the queue. Clients can also add and remove timers which generate events periodically. */ -class IEventQueue : public IInterface +class IEventQueue { public: using EventHandler = std::function; + + virtual ~IEventQueue() = default; class TimerEvent { public: diff --git a/src/lib/base/IEventQueueBuffer.h b/src/lib/base/IEventQueueBuffer.h index f69a7e33b..2e4ca99d7 100644 --- a/src/lib/base/IEventQueueBuffer.h +++ b/src/lib/base/IEventQueueBuffer.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -8,7 +9,6 @@ #pragma once #include "common/Common.h" -#include "common/IInterface.h" class Event; class EventQueueTimer; @@ -17,9 +17,10 @@ class EventQueueTimer; /*! An event queue buffer provides a queue of events for an IEventQueue. */ -class IEventQueueBuffer : public IInterface +class IEventQueueBuffer { public: + virtual ~IEventQueueBuffer() = default; enum class Type : uint8_t { Unknown, //!< No event is available diff --git a/src/lib/base/IJob.h b/src/lib/base/IJob.h index 2c70f0b93..d128e5c46 100644 --- a/src/lib/base/IJob.h +++ b/src/lib/base/IJob.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -7,15 +8,16 @@ #pragma once -#include "common/IInterface.h" +#include "common/Common.h" //! Job interface /*! A job is an interface for executing some function. */ -class IJob : public IInterface +class IJob { public: + virtual ~IJob() = default; //! Run the job virtual void run() = 0; }; diff --git a/src/lib/base/ILogOutputter.h b/src/lib/base/ILogOutputter.h index 8d74f98e1..4e4a57978 100644 --- a/src/lib/base/ILogOutputter.h +++ b/src/lib/base/ILogOutputter.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -9,7 +10,7 @@ #include "base/Log.h" #include "base/LogLevel.h" -#include "common/IInterface.h" +#include "common/Common.h" //! Outputter interface /*! @@ -17,9 +18,11 @@ Type of outputter interface. The logger performs all output through outputters. ILogOutputter overrides must not call any log functions directly or indirectly. */ -class ILogOutputter : public IInterface +class ILogOutputter { public: + virtual ~ILogOutputter() = default; + //! @name manipulators //@{ diff --git a/src/lib/common/CMakeLists.txt b/src/lib/common/CMakeLists.txt index 4df712eef..6c32cfc96 100644 --- a/src/lib/common/CMakeLists.txt +++ b/src/lib/common/CMakeLists.txt @@ -5,7 +5,6 @@ configure_file(Constants.h.in Constants.h @ONLY) add_library(common STATIC Common.h - IInterface.h Settings.h Settings.cpp QSettingsProxy.cpp diff --git a/src/lib/common/IInterface.h b/src/lib/common/IInterface.h deleted file mode 100644 index c2df3add4..000000000 --- a/src/lib/common/IInterface.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Deskflow -- mouse and keyboard sharing utility - * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. - * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman - * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception - */ - -#pragma once - -#include "Common.h" - -//! Base class of interfaces -/*! -This is the base class of all interface classes. An interface class has -only pure virtual methods. -*/ -class IInterface -{ -public: - //! Interface destructor does nothing - virtual ~IInterface() = default; -}; diff --git a/src/lib/deskflow/IApp.h b/src/lib/deskflow/IApp.h index 45e18ad19..33dde6848 100644 --- a/src/lib/deskflow/IApp.h +++ b/src/lib/deskflow/IApp.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2012 Nick Bolton * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -7,7 +8,7 @@ #pragma once -#include "common/IInterface.h" +#include "common/Common.h" using StartupFunc = int (*)(int, char **); @@ -18,9 +19,10 @@ class Screen; class IEventQueue; -class IApp : public IInterface +class IApp { public: + virtual ~IApp() = default; virtual void setByeFunc(void (*bye)(int)) = 0; virtual deskflow::ArgsBase &argsBase() const = 0; virtual int standardStartup(int argc, char **argv) = 0; diff --git a/src/lib/deskflow/IAppUtil.h b/src/lib/deskflow/IAppUtil.h index a3d8ccdf0..2fefb8ccd 100644 --- a/src/lib/deskflow/IAppUtil.h +++ b/src/lib/deskflow/IAppUtil.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -7,15 +8,16 @@ #pragma once -#include "common/IInterface.h" +#include "common/Common.h" #include "deskflow/IApp.h" #include #include -class IAppUtil : public IInterface +class IAppUtil { public: + virtual ~IAppUtil() = default; virtual void adoptApp(IApp *app) = 0; virtual IApp &app() const = 0; virtual int run(int argc, char **argv) = 0; diff --git a/src/lib/deskflow/IClipboard.h b/src/lib/deskflow/IClipboard.h index 05ebe1a37..389fd4f39 100644 --- a/src/lib/deskflow/IClipboard.h +++ b/src/lib/deskflow/IClipboard.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -8,7 +9,7 @@ #pragma once #include "base/EventTypes.h" -#include "common/IInterface.h" +#include "common/Common.h" #include @@ -16,9 +17,10 @@ /*! This interface defines the methods common to all clipboards. */ -class IClipboard : public IInterface +class IClipboard { public: + virtual ~IClipboard() = default; //! Timestamp type /*! Timestamp type. Timestamps are in milliseconds from some diff --git a/src/lib/deskflow/IKeyState.h b/src/lib/deskflow/IKeyState.h index 71720eab6..279ade7a2 100644 --- a/src/lib/deskflow/IKeyState.h +++ b/src/lib/deskflow/IKeyState.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2003 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -10,7 +11,7 @@ #include "base/Event.h" #include "base/EventTypes.h" #include "base/IEventQueue.h" -#include "common/IInterface.h" +#include "common/Common.h" #include "deskflow/KeyTypes.h" #include @@ -20,10 +21,11 @@ This interface provides access to set and query the keyboard state and to synthesize key events. */ -class IKeyState : public IInterface +class IKeyState { public: explicit IKeyState(const IEventQueue *events); + virtual ~IKeyState() = default; inline static const auto s_numButtons = 0x200; //! Key event data diff --git a/src/lib/deskflow/INode.h b/src/lib/deskflow/INode.h index 81867711f..916b24131 100644 --- a/src/lib/deskflow/INode.h +++ b/src/lib/deskflow/INode.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -7,8 +8,10 @@ #pragma once -#include "common/IInterface.h" +#include "common/Common.h" -class INode : public IInterface +class INode { +public: + virtual ~INode() = default; }; diff --git a/src/lib/deskflow/IPrimaryScreen.h b/src/lib/deskflow/IPrimaryScreen.h index 75ce70e77..cf6c00577 100644 --- a/src/lib/deskflow/IPrimaryScreen.h +++ b/src/lib/deskflow/IPrimaryScreen.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2003 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -9,7 +10,7 @@ #include "base/Event.h" #include "base/EventTypes.h" -#include "common/IInterface.h" +#include "common/Common.h" #include "deskflow/KeyTypes.h" #include "deskflow/MouseTypes.h" @@ -18,9 +19,10 @@ This interface defines the methods common to all platform dependent primary screen implementations. */ -class IPrimaryScreen : public IInterface +class IPrimaryScreen { public: + virtual ~IPrimaryScreen() = default; //! Button event data class ButtonInfo { diff --git a/src/lib/deskflow/IScreen.h b/src/lib/deskflow/IScreen.h index b661b372b..b498c101c 100644 --- a/src/lib/deskflow/IScreen.h +++ b/src/lib/deskflow/IScreen.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2003 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -9,7 +10,7 @@ #include "base/Event.h" #include "base/EventTypes.h" -#include "common/IInterface.h" +#include "common/Common.h" #include "deskflow/ClipboardTypes.h" class IClipboard; @@ -18,9 +19,10 @@ class IClipboard; /*! This interface defines the methods common to all screens. */ -class IScreen : public IInterface +class IScreen { public: + virtual ~IScreen() = default; struct ClipboardInfo { public: diff --git a/src/lib/deskflow/IScreenSaver.h b/src/lib/deskflow/IScreenSaver.h index 5f8124b22..57f728aa7 100644 --- a/src/lib/deskflow/IScreenSaver.h +++ b/src/lib/deskflow/IScreenSaver.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -8,15 +9,16 @@ #pragma once #include "base/Event.h" -#include "common/IInterface.h" +#include "common/Common.h" //! Screen saver interface /*! This interface defines the methods common to all screen savers. */ -class IScreenSaver : public IInterface +class IScreenSaver { public: + virtual ~IScreenSaver() = default; // note -- the c'tor/d'tor must *not* enable/disable the screen saver //! @name manipulators diff --git a/src/lib/deskflow/ISecondaryScreen.h b/src/lib/deskflow/ISecondaryScreen.h index a65acec59..8dba51c51 100644 --- a/src/lib/deskflow/ISecondaryScreen.h +++ b/src/lib/deskflow/ISecondaryScreen.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2003 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -9,7 +10,7 @@ #include "base/Event.h" #include "base/EventTypes.h" -#include "common/IInterface.h" +#include "common/Common.h" #include "deskflow/MouseTypes.h" //! Secondary screen interface @@ -17,9 +18,10 @@ This interface defines the methods common to all platform dependent secondary screen implementations. */ -class ISecondaryScreen : public IInterface +class ISecondaryScreen { public: + virtual ~ISecondaryScreen() = default; //! @name accessors //@{ diff --git a/src/lib/io/IStream.h b/src/lib/io/IStream.h index 6fe1859f1..57a3d4e3f 100644 --- a/src/lib/io/IStream.h +++ b/src/lib/io/IStream.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -10,7 +11,7 @@ #include "base/Event.h" #include "base/EventTypes.h" #include "base/IEventQueue.h" -#include "common/IInterface.h" +#include "common/Common.h" class IEventQueue; @@ -20,11 +21,11 @@ namespace deskflow { /*! Defines the interface for all streams. */ -class IStream : public IInterface +class IStream { public: IStream() = default; - + virtual ~IStream() = default; //! @name manipulators //@{ diff --git a/src/lib/net/ISocket.h b/src/lib/net/ISocket.h index 7e8a21c36..aa229dd99 100644 --- a/src/lib/net/ISocket.h +++ b/src/lib/net/ISocket.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -9,7 +10,7 @@ #include "base/Event.h" #include "base/EventTypes.h" -#include "common/IInterface.h" +#include "common/Common.h" class NetworkAddress; @@ -18,9 +19,10 @@ class NetworkAddress; This interface defines the methods common to all network sockets. Generated events use \c this as the target. */ -class ISocket : public IInterface +class ISocket { public: + virtual ~ISocket() = default; //! @name manipulators //@{ diff --git a/src/lib/net/ISocketFactory.h b/src/lib/net/ISocketFactory.h index 13cdaab3e..ca13181f7 100644 --- a/src/lib/net/ISocketFactory.h +++ b/src/lib/net/ISocketFactory.h @@ -9,7 +9,7 @@ #pragma once #include "arch/IArchNetwork.h" -#include "common/IInterface.h" +#include "common/Common.h" #include "net/SecurityLevel.h" class IDataSocket; @@ -20,9 +20,10 @@ class IListenSocket; This interface defines the methods common to all factories used to create sockets. */ -class ISocketFactory : public IInterface +class ISocketFactory { public: + virtual ~ISocketFactory() = default; //! @name accessors //@{ diff --git a/src/lib/net/ISocketMultiplexerJob.h b/src/lib/net/ISocketMultiplexerJob.h index bff5c1acf..0c243d35d 100644 --- a/src/lib/net/ISocketMultiplexerJob.h +++ b/src/lib/net/ISocketMultiplexerJob.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -8,15 +9,16 @@ #pragma once #include "arch/IArchNetwork.h" -#include "common/IInterface.h" +#include "common/Common.h" //! Socket multiplexer job /*! A socket multiplexer job handles events on a socket. */ -class ISocketMultiplexerJob : public IInterface +class ISocketMultiplexerJob { public: + virtual ~ISocketMultiplexerJob() = default; //! @name manipulators //@{ diff --git a/src/lib/platform/IMSWindowsClipboardFacade.h b/src/lib/platform/IMSWindowsClipboardFacade.h index 24281f6a6..af65e6dd3 100644 --- a/src/lib/platform/IMSWindowsClipboardFacade.h +++ b/src/lib/platform/IMSWindowsClipboardFacade.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -7,14 +8,14 @@ #pragma once -#include "common/IInterface.h" +#include "common/Common.h" #define WIN32_LEAN_AND_MEAN #include class IMSWindowsClipboardConverter; -class IMSWindowsClipboardFacade : public IInterface +class IMSWindowsClipboardFacade { public: virtual void write(HANDLE win32Data, UINT win32Format) = 0; diff --git a/src/lib/platform/IOSXKeyResource.h b/src/lib/platform/IOSXKeyResource.h index dc386f03f..7175bbc52 100644 --- a/src/lib/platform/IOSXKeyResource.h +++ b/src/lib/platform/IOSXKeyResource.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2016 Symless Ltd. * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception */ @@ -8,9 +9,10 @@ #include "deskflow/KeyState.h" -class IOSXKeyResource : public IInterface +class IOSXKeyResource { public: + virtual ~IOSXKeyResource() = default; virtual bool isValid() const = 0; virtual uint32_t getNumModifierCombinations() const = 0; virtual uint32_t getNumTables() const = 0; diff --git a/src/lib/platform/MSWindowsClipboard.h b/src/lib/platform/MSWindowsClipboard.h index 6ebcbd0e7..a49e3b6b2 100644 --- a/src/lib/platform/MSWindowsClipboard.h +++ b/src/lib/platform/MSWindowsClipboard.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -80,9 +81,10 @@ private: This interface defines the methods common to all win32 clipboard format converters. */ -class IMSWindowsClipboardConverter : public IInterface +class IMSWindowsClipboardConverter { public: + virtual ~IMSWindowsClipboardConverter() = default; // accessors // return the clipboard format this object converts from/to diff --git a/src/lib/platform/OSXClipboard.h b/src/lib/platform/OSXClipboard.h index 6aced42d7..d31ab2b9c 100644 --- a/src/lib/platform/OSXClipboard.h +++ b/src/lib/platform/OSXClipboard.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -50,9 +51,10 @@ private: /*! This interface defines the methods common to all Scrap book format */ -class IOSXClipboardConverter : public IInterface +class IOSXClipboardConverter { public: + virtual ~IOSXClipboardConverter() = default; //! @name accessors //@{ diff --git a/src/lib/platform/XWindowsClipboard.h b/src/lib/platform/XWindowsClipboard.h index c74d40de8..d9636beb5 100644 --- a/src/lib/platform/XWindowsClipboard.h +++ b/src/lib/platform/XWindowsClipboard.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -326,9 +327,10 @@ private: This interface defines the methods common to all X11 clipboard format converters. */ -class IXWindowsClipboardConverter : public IInterface +class IXWindowsClipboardConverter { public: + virtual ~IXWindowsClipboardConverter() = default; //! @name accessors //@{