chore: remove unused archsystem classes
This commit is contained in:
parent
27451d3425
commit
73de5e964e
7 changed files with 0 additions and 214 deletions
|
|
@ -36,7 +36,6 @@
|
||||||
#include "arch/win32/ArchNetworkWinsock.h"
|
#include "arch/win32/ArchNetworkWinsock.h"
|
||||||
#include "arch/win32/ArchSleepWindows.h"
|
#include "arch/win32/ArchSleepWindows.h"
|
||||||
#include "arch/win32/ArchStringWindows.h"
|
#include "arch/win32/ArchStringWindows.h"
|
||||||
#include "arch/win32/ArchSystemWindows.h"
|
|
||||||
#include "arch/win32/ArchTimeWindows.h"
|
#include "arch/win32/ArchTimeWindows.h"
|
||||||
|
|
||||||
#elif SYSAPI_UNIX
|
#elif SYSAPI_UNIX
|
||||||
|
|
@ -48,7 +47,6 @@
|
||||||
#include "arch/unix/ArchNetworkBSD.h"
|
#include "arch/unix/ArchNetworkBSD.h"
|
||||||
#include "arch/unix/ArchSleepUnix.h"
|
#include "arch/unix/ArchSleepUnix.h"
|
||||||
#include "arch/unix/ArchStringUnix.h"
|
#include "arch/unix/ArchStringUnix.h"
|
||||||
#include "arch/unix/ArchSystemUnix.h"
|
|
||||||
#include "arch/unix/ArchTimeUnix.h"
|
#include "arch/unix/ArchTimeUnix.h"
|
||||||
|
|
||||||
#if HAVE_PTHREAD
|
#if HAVE_PTHREAD
|
||||||
|
|
@ -81,7 +79,6 @@ class Arch : public ARCH_CONSOLE,
|
||||||
public ARCH_NETWORK,
|
public ARCH_NETWORK,
|
||||||
public ARCH_SLEEP,
|
public ARCH_SLEEP,
|
||||||
public ARCH_STRING,
|
public ARCH_STRING,
|
||||||
public ARCH_SYSTEM,
|
|
||||||
public ARCH_TIME
|
public ARCH_TIME
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,6 @@ if(WIN32)
|
||||||
win32/ArchSleepWindows.h
|
win32/ArchSleepWindows.h
|
||||||
win32/ArchStringWindows.cpp
|
win32/ArchStringWindows.cpp
|
||||||
win32/ArchStringWindows.h
|
win32/ArchStringWindows.h
|
||||||
win32/ArchSystemWindows.cpp
|
|
||||||
win32/ArchSystemWindows.h
|
|
||||||
win32/ArchTimeWindows.cpp
|
win32/ArchTimeWindows.cpp
|
||||||
win32/ArchTimeWindows.h
|
win32/ArchTimeWindows.h
|
||||||
win32/XArchWindows.cpp
|
win32/XArchWindows.cpp
|
||||||
|
|
@ -50,8 +48,6 @@ elseif(UNIX)
|
||||||
unix/ArchSleepUnix.h
|
unix/ArchSleepUnix.h
|
||||||
unix/ArchStringUnix.cpp
|
unix/ArchStringUnix.cpp
|
||||||
unix/ArchStringUnix.h
|
unix/ArchStringUnix.h
|
||||||
unix/ArchSystemUnix.cpp
|
|
||||||
unix/ArchSystemUnix.h
|
|
||||||
unix/ArchTimeUnix.cpp
|
unix/ArchTimeUnix.cpp
|
||||||
unix/ArchTimeUnix.h
|
unix/ArchTimeUnix.h
|
||||||
unix/XArchUnix.cpp
|
unix/XArchUnix.cpp
|
||||||
|
|
@ -75,7 +71,6 @@ add_library(arch STATIC ${PLATFORM_CODE}
|
||||||
IArchSleep.h
|
IArchSleep.h
|
||||||
IArchString.cpp
|
IArchString.cpp
|
||||||
IArchString.h
|
IArchString.h
|
||||||
IArchSystem.h
|
|
||||||
IArchTime.h
|
IArchTime.h
|
||||||
multibyte.h
|
multibyte.h
|
||||||
XArch.h
|
XArch.h
|
||||||
|
|
@ -83,7 +78,4 @@ add_library(arch STATIC ${PLATFORM_CODE}
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
target_link_libraries(arch ${libs})
|
target_link_libraries(arch ${libs})
|
||||||
if(NOT APPLE)
|
|
||||||
target_link_libraries(arch Qt6::DBus)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
/*
|
|
||||||
* Deskflow -- mouse and keyboard sharing utility
|
|
||||||
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
|
|
||||||
* SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman
|
|
||||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "common/IInterface.h"
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
//! Interface for architecture dependent system queries
|
|
||||||
/*!
|
|
||||||
This interface defines operations for querying system info.
|
|
||||||
*/
|
|
||||||
class IArchSystem : public IInterface
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
//! @name accessors
|
|
||||||
//@{
|
|
||||||
|
|
||||||
//! Get a Deskflow setting
|
|
||||||
/*!
|
|
||||||
Reads a Deskflow setting from the system.
|
|
||||||
*/
|
|
||||||
virtual std::string setting(const std::string &valueName) const = 0;
|
|
||||||
//@}
|
|
||||||
|
|
||||||
//! Set a Deskflow setting
|
|
||||||
/*!
|
|
||||||
Writes a Deskflow setting from the system.
|
|
||||||
*/
|
|
||||||
virtual void setting(const std::string &valueName, const std::string &valueString) const = 0;
|
|
||||||
//@}
|
|
||||||
|
|
||||||
//! Delete settings
|
|
||||||
/*!
|
|
||||||
Deletes all Core settings from the system.
|
|
||||||
*/
|
|
||||||
virtual void clearSettings() const = 0;
|
|
||||||
//@}
|
|
||||||
};
|
|
||||||
|
|
@ -1,52 +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
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "arch/unix/ArchSystemUnix.h"
|
|
||||||
#include <array>
|
|
||||||
|
|
||||||
#include <common/constants.h>
|
|
||||||
#include <sys/utsname.h>
|
|
||||||
|
|
||||||
#ifndef __APPLE__
|
|
||||||
#include <QDBusConnection>
|
|
||||||
#include <QDBusError>
|
|
||||||
#include <QDBusInterface>
|
|
||||||
#include <QDBusReply>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
|
||||||
// ArchSystemUnix
|
|
||||||
//
|
|
||||||
|
|
||||||
ArchSystemUnix::ArchSystemUnix()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
ArchSystemUnix::~ArchSystemUnix()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string ArchSystemUnix::setting(const std::string &) const
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
void ArchSystemUnix::setting(const std::string &, const std::string &) const
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void ArchSystemUnix::clearSettings() const
|
|
||||||
{
|
|
||||||
// Not implemented
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string ArchSystemUnix::getLibsUsed(void) const
|
|
||||||
{
|
|
||||||
return "not implemented.\nuse lsof on shell";
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +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 "arch/IArchSystem.h"
|
|
||||||
|
|
||||||
#define ARCH_SYSTEM ArchSystemUnix
|
|
||||||
|
|
||||||
//! Unix implementation of IArchString
|
|
||||||
class ArchSystemUnix : public IArchSystem
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ArchSystemUnix();
|
|
||||||
virtual ~ArchSystemUnix();
|
|
||||||
|
|
||||||
// IArchSystem overrides
|
|
||||||
virtual std::string setting(const std::string &) const;
|
|
||||||
virtual void setting(const std::string &, const std::string &) const;
|
|
||||||
virtual std::string getLibsUsed(void) const;
|
|
||||||
virtual void clearSettings() const;
|
|
||||||
};
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
||||||
/*
|
|
||||||
* Deskflow -- mouse and keyboard sharing utility
|
|
||||||
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
|
|
||||||
* SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman
|
|
||||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "arch/win32/ArchSystemWindows.h"
|
|
||||||
#include "arch/win32/ArchMiscWindows.h"
|
|
||||||
|
|
||||||
#include "arch/XArch.h"
|
|
||||||
#include "base/Log.h"
|
|
||||||
#include "common/constants.h"
|
|
||||||
|
|
||||||
#include "tchar.h"
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include <psapi.h>
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
static const TCHAR *s_settingsKeyNames[] = {_T("SOFTWARE"), _T(kAppName), NULL};
|
|
||||||
|
|
||||||
//
|
|
||||||
// ArchSystemWindows
|
|
||||||
//
|
|
||||||
|
|
||||||
ArchSystemWindows::ArchSystemWindows()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
ArchSystemWindows::~ArchSystemWindows()
|
|
||||||
{
|
|
||||||
// do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string ArchSystemWindows::setting(const std::string &valueName) const
|
|
||||||
{
|
|
||||||
HKEY key = ArchMiscWindows::openKey(HKEY_LOCAL_MACHINE, s_settingsKeyNames);
|
|
||||||
if (key == NULL)
|
|
||||||
return "";
|
|
||||||
|
|
||||||
return ArchMiscWindows::readValueString(key, valueName.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
void ArchSystemWindows::setting(const std::string &valueName, const std::string &valueString) const
|
|
||||||
{
|
|
||||||
HKEY key = ArchMiscWindows::addKey(HKEY_LOCAL_MACHINE, s_settingsKeyNames);
|
|
||||||
if (key == NULL)
|
|
||||||
throw XArch(std::string("could not access registry key: ") + valueName);
|
|
||||||
ArchMiscWindows::setValue(key, valueName.c_str(), valueString.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
void ArchSystemWindows::clearSettings() const
|
|
||||||
{
|
|
||||||
ArchMiscWindows::deleteKeyTree(HKEY_LOCAL_MACHINE, kWindowsRegistryKey);
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
/*
|
|
||||||
* Deskflow -- mouse and keyboard sharing utility
|
|
||||||
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
|
|
||||||
* SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman
|
|
||||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "arch/IArchSystem.h"
|
|
||||||
|
|
||||||
#define ARCH_SYSTEM ArchSystemWindows
|
|
||||||
|
|
||||||
//! Win32 implementation of IArchString
|
|
||||||
class ArchSystemWindows : public IArchSystem
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
ArchSystemWindows();
|
|
||||||
virtual ~ArchSystemWindows();
|
|
||||||
|
|
||||||
// IArchSystem overrides
|
|
||||||
virtual std::string setting(const std::string &valueName) const;
|
|
||||||
virtual void setting(const std::string &valueName, const std::string &valueString) const;
|
|
||||||
virtual void clearSettings() const;
|
|
||||||
};
|
|
||||||
Loading…
Reference in a new issue