code style fixes:

- reordered includes to prevent accidental dependencies.
- moved arch specific files into their own folder (easier to include with cmake).
- renamed non-class files to reflect new code style (lower case with underscores).
- using full relative paths for includes (easier for understanding dependencies).
- using #pragma once instead of classic-style header guards.
This commit is contained in:
Nick Bolton 2014-02-28 12:36:45 +00:00
parent 96d97ed467
commit 4675f29a4c
454 changed files with 2032 additions and 2504 deletions

View File

@ -19,9 +19,9 @@ set(sources
) )
if (WIN32) if (WIN32)
file(GLOB arch_headers "MSWindows*.h")
file(GLOB arch_sources "MSWindows*.cpp")
list(APPEND sources list(APPEND sources
CMSWindowsClientTaskBarReceiver.cpp
CMSWindowsClientTaskBarReceiver.h
resource.h resource.h
synergyc.ico synergyc.ico
synergyc.rc synergyc.rc
@ -31,24 +31,23 @@ if (WIN32)
tb_wait.ico tb_wait.ico
) )
elseif (APPLE) elseif (APPLE)
list(APPEND sources COSXClientTaskBarReceiver.cpp) file(GLOB arch_headers "OSX*.h")
file(GLOB arch_sources "OSX*.cpp")
elseif (UNIX) elseif (UNIX)
list(APPEND sources CXWindowsClientTaskBarReceiver.cpp) file(GLOB arch_headers "XWindows*.h")
file(GLOB arch_sources "XWindows*.cpp")
endif()
list(APPEND sources ${arch_sources})
list(APPEND headers ${arch_headers})
if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif() endif()
include_directories( include_directories(
../../lib/arch ../
../../lib/base ../../lib/
../../lib/client
../../lib/common
../../lib/io
../../lib/ipc
../../lib/mt
../../lib/net
../../lib/platform
../../lib/synergy
../../lib/synwinhk
../../lib/synwinxt
) )
if (UNIX) if (UNIX)

View File

@ -16,17 +16,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CMSWindowsClientTaskBarReceiver.h" #include "synergyc/MSWindowsClientTaskBarReceiver.h"
#include "CClient.h"
#include "CMSWindowsClipboard.h"
#include "LogOutputters.h"
#include "BasicTypes.h"
#include "CArch.h"
#include "CArchTaskBarWindows.h"
#include "CArchMiscWindows.h"
#include "resource.h" #include "resource.h"
#include "CMSWindowsScreen.h" #include "client/Client.h"
#include "CEventQueue.h" #include "platform/MSWindowsClipboard.h"
#include "platform/MSWindowsScreen.h"
#include "arch/win32/ArchTaskBarWindows.h"
#include "arch/win32/ArchMiscWindows.h"
#include "arch/Arch.h"
#include "base/EventQueue.h"
#include "base/log_outputters.h"
#include "base/EventTypes.h"
// //
// CMSWindowsClientTaskBarReceiver // CMSWindowsClientTaskBarReceiver

View File

@ -16,13 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CMSWINDOWSCLIENTTASKBARRECEIVER_H #pragma once
#define CMSWINDOWSCLIENTTASKBARRECEIVER_H
#include "synergy/ClientTaskBarReceiver.h"
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include "CClientTaskBarReceiver.h"
#include <windows.h>
class CBufferedLogOutputter; class CBufferedLogOutputter;
class IEventQueue; class IEventQueue;
@ -67,5 +66,3 @@ private:
static const UINT s_stateToIconID[]; static const UINT s_stateToIconID[];
}; };
#endif

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "COSXClientTaskBarReceiver.h" #include "synergyc/OSXClientTaskBarReceiver.h"
#include "CArch.h" #include "arch/Arch.h"
// //
// COSXClientTaskBarReceiver // COSXClientTaskBarReceiver

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef COSXCLIENTTASKBARRECEIVER_H #pragma once
#define COSXCLIENTTASKBARRECEIVER_H
#include "CClientTaskBarReceiver.h" #include "synergyc/ClientTaskBarReceiver.h"
class CBufferedLogOutputter; class CBufferedLogOutputter;
class IEventQueue; class IEventQueue;
@ -36,5 +35,3 @@ public:
virtual void primaryAction(); virtual void primaryAction();
virtual const Icon getIcon() const; virtual const Icon getIcon() const;
}; };
#endif

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CXWindowsClientTaskBarReceiver.h" #include "synergyc/XWindowsClientTaskBarReceiver.h"
#include "CArch.h" #include "arch/Arch.h"
// //
// CXWindowsClientTaskBarReceiver // CXWindowsClientTaskBarReceiver

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CXWINDOWSCLIENTTASKBARRECEIVER_H #pragma once
#define CXWINDOWSCLIENTTASKBARRECEIVER_H
#include "CClientTaskBarReceiver.h" #include "synergyc/ClientTaskBarReceiver.h"
class CBufferedLogOutputter; class CBufferedLogOutputter;
class IEventQueue; class IEventQueue;
@ -37,5 +36,3 @@ public:
virtual void primaryAction(); virtual void primaryAction();
virtual const Icon getIcon() const; virtual const Icon getIcon() const;
}; };
#endif

View File

@ -16,17 +16,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CClientApp.h" #include "synergy/ClientApp.h"
#include "CLog.h" #include "arch/Arch.h"
#include "CArch.h" #include "base/Log.h"
#include "CEventQueue.h" #include "base/EventQueue.h"
#if WINAPI_MSWINDOWS #if WINAPI_MSWINDOWS
#include "CMSWindowsClientTaskBarReceiver.h" #include "synergyc/MSWindowsClientTaskBarReceiver.h"
#elif WINAPI_XWINDOWS #elif WINAPI_XWINDOWS
#include "CXWindowsClientTaskBarReceiver.h" #include "synergyc/XWindowsClientTaskBarReceiver.h"
#elif WINAPI_CARBON #elif WINAPI_CARBON
#include "COSXClientTaskBarReceiver.h" #include "synergyc/OSXClientTaskBarReceiver.h"
#else #else
#error Platform not supported. #error Platform not supported.
#endif #endif

View File

@ -18,15 +18,8 @@ file(GLOB headers "*.h")
file(GLOB sources "*.cpp") file(GLOB sources "*.cpp")
include_directories( include_directories(
../../lib/arch ../
../../lib/base ../../lib/
../../lib/common
../../lib/io
../../lib/ipc
../../lib/mt
../../lib/net
../../lib/platform
../../lib/synergy
) )
if (UNIX) if (UNIX)

View File

@ -16,7 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CDaemonApp.h" #include "synergy/DaemonApp.h"
#include <iostream> #include <iostream>
#ifdef SYSAPI_UNIX #ifdef SYSAPI_UNIX

View File

@ -19,9 +19,9 @@ set(sources
) )
if (WIN32) if (WIN32)
file(GLOB arch_headers "MSWindows*.h")
file(GLOB arch_sources "MSWindows*.cpp")
list(APPEND sources list(APPEND sources
CMSWindowsPortableTaskBarReceiver.cpp
CMSWindowsPortableTaskBarReceiver.h
resource.h resource.h
synergyp.ico synergyp.ico
synergyp.rc synergyp.rc
@ -31,24 +31,23 @@ if (WIN32)
tb_wait.ico tb_wait.ico
) )
elseif (APPLE) elseif (APPLE)
list(APPEND sources COSXPortableTaskBarReceiver.cpp) file(GLOB arch_headers "OSX*.h")
file(GLOB arch_sources "OSX*.cpp")
elseif (UNIX) elseif (UNIX)
list(APPEND sources CXWindowsPortableTaskBarReceiver.cpp) file(GLOB arch_headers "XWindows*.h")
file(GLOB arch_sources "XWindows*.cpp")
endif()
list(APPEND sources ${arch_sources})
list(APPEND headers ${arch_headers})
if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif() endif()
include_directories( include_directories(
../../lib/arch ../
../../lib/base ../../lib/
../../lib/common
../../lib/io
../../lib/ipc
../../lib/mt
../../lib/net
../../lib/platform
../../lib/synergy
../../lib/server
../../lib/synwinhk
../../lib/synwinxt
) )
if (UNIX) if (UNIX)

View File

@ -16,17 +16,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CMSWindowsPortableTaskBarReceiver.h" #include "synergyp/MSWindowsPortableTaskBarReceiver.h"
#include "CMSWindowsClipboard.h"
#include "IEventQueue.h"
#include "LogOutputters.h"
#include "BasicTypes.h"
#include "CArch.h"
#include "CArchTaskBarWindows.h"
#include "resource.h" #include "resource.h"
#include "CArchMiscWindows.h" #include "platform/MSWindowsClipboard.h"
#include "CMSWindowsScreen.h" #include "platform/MSWindowsScreen.h"
#include "CEventQueue.h" #include "arch/win32/ArchTaskBarWindows.h"
#include "arch/win32/ArchMiscWindows.h"
#include "arch/Arch.h"
#include "base/EventQueue.h"
#include "base/IEventQueue.h"
#include "base/log_outputters.h"
#include "base/EventTypes.h"
// //
// CMSWindowsPortableTaskBarReceiver // CMSWindowsPortableTaskBarReceiver

View File

@ -18,10 +18,10 @@
#pragma once #pragma once
#define WIN32_LEAN_AND_MEAN #include "synergy/PortableTaskBarReceiver.h"
#include "CPortableTaskBarReceiver.h" #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <Windows.h>
class CBufferedLogOutputter; class CBufferedLogOutputter;
class IEventQueue; class IEventQueue;

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "COSXServerTaskBarReceiver.h" #include "synergys/OSXServerTaskBarReceiver.h"
#include "CArch.h" #include "arch/Arch.h"
// //
// COSXServerTaskBarReceiver // COSXServerTaskBarReceiver

View File

@ -18,7 +18,7 @@
#pragma once #pragma once
#include "CPortableTaskBarReceiver.h" #include "synergyp/PortableTaskBarReceiver.h"
class CBufferedLogOutputter; class CBufferedLogOutputter;

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CXWindowsServerTaskBarReceiver.h" #include "synergys/XWindowsServerTaskBarReceiver.h"
#include "CArch.h" #include "arch/Arch.h"
// //
// CXWindowsServerTaskBarReceiver // CXWindowsServerTaskBarReceiver

View File

@ -18,7 +18,7 @@
#pragma once #pragma once
#include "CPortableTaskBarReceiver.h" #include "synergyp/PortableTaskBarReceiver.h"
class CBufferedLogOutputter; class CBufferedLogOutputter;

View File

@ -15,25 +15,25 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#define WIN32_LEAN_AND_MEAN #include "synergy/ServerApp.h"
#include "synergy/ClientApp.h"
#include "Windows.h" #include "arch/Arch.h"
#include "CServerApp.h" #include "base/Log.h"
#include "CClientApp.h" #include "base/EventQueue.h"
#include "CLog.h"
#include "CArch.h"
#include "CEventQueue.h"
#if WINAPI_MSWINDOWS #if WINAPI_MSWINDOWS
#include "CMSWindowsPortableTaskBarReceiver.h" #include "MSWindowsPortableTaskBarReceiver.h"
#elif WINAPI_XWINDOWS #elif WINAPI_XWINDOWS
#include "CXWindowsPortableTaskBarReceiver.h" #include "XWindowsPortableTaskBarReceiver.h"
#elif WINAPI_CARBON #elif WINAPI_CARBON
#include "COSXPortableTaskBarReceiver.h" #include "OSXPortableTaskBarReceiver.h"
#else #else
#error Platform not supported. #error Platform not supported.
#endif #endif
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
INT WINAPI INT WINAPI
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine, INT nCmdShow) WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine, INT nCmdShow)
{ {

View File

@ -19,9 +19,9 @@ set(sources
) )
if (WIN32) if (WIN32)
file(GLOB arch_headers "MSWindows*.h")
file(GLOB arch_sources "MSWindows*.cpp")
list(APPEND sources list(APPEND sources
CMSWindowsServerTaskBarReceiver.cpp
CMSWindowsServerTaskBarReceiver.h
resource.h resource.h
synergys.ico synergys.ico
synergys.rc synergys.rc
@ -31,24 +31,23 @@ if (WIN32)
tb_wait.ico tb_wait.ico
) )
elseif (APPLE) elseif (APPLE)
list(APPEND sources COSXServerTaskBarReceiver.cpp) file(GLOB arch_headers "OSX*.h")
file(GLOB arch_sources "OSX*.cpp")
elseif (UNIX) elseif (UNIX)
list(APPEND sources CXWindowsServerTaskBarReceiver.cpp) file(GLOB arch_headers "XWindows*.h")
file(GLOB arch_sources "XWindows*.cpp")
endif()
list(APPEND sources ${arch_sources})
list(APPEND headers ${arch_headers})
if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif() endif()
include_directories( include_directories(
../../lib/arch ../
../../lib/base ../../lib/
../../lib/common
../../lib/io
../../lib/ipc
../../lib/mt
../../lib/net
../../lib/platform
../../lib/synergy
../../lib/server
../../lib/synwinhk
../../lib/synwinxt
) )
if (UNIX) if (UNIX)

View File

@ -16,18 +16,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CMSWindowsServerTaskBarReceiver.h" #include "synergys/MSWindowsServerTaskBarReceiver.h"
#include "CServer.h"
#include "CMSWindowsClipboard.h"
#include "IEventQueue.h"
#include "LogOutputters.h"
#include "BasicTypes.h"
#include "CArch.h"
#include "CArchTaskBarWindows.h"
#include "resource.h" #include "resource.h"
#include "CArchMiscWindows.h" #include "server/Server.h"
#include "CMSWindowsScreen.h" #include "platform/MSWindowsClipboard.h"
#include "CEventQueue.h" #include "platform/MSWindowsScreen.h"
#include "arch/win32/ArchTaskBarWindows.h"
#include "arch/win32/ArchMiscWindows.h"
#include "arch/Arch.h"
#include "base/EventQueue.h"
#include "base/IEventQueue.h"
#include "base/log_outputters.h"
#include "base/EventTypes.h"
// //
// CMSWindowsServerTaskBarReceiver // CMSWindowsServerTaskBarReceiver

View File

@ -16,13 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CMSWINDOWSSERVERTASKBARRECEIVER_H #pragma once
#define CMSWINDOWSSERVERTASKBARRECEIVER_H
#include "synergy/ServerTaskBarReceiver.h"
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include "CServerTaskBarReceiver.h"
#include <windows.h>
class CBufferedLogOutputter; class CBufferedLogOutputter;
class IEventQueue; class IEventQueue;
@ -68,5 +67,3 @@ private:
static const UINT s_stateToIconID[]; static const UINT s_stateToIconID[];
}; };
#endif

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "COSXServerTaskBarReceiver.h" #include "synergys/OSXServerTaskBarReceiver.h"
#include "CArch.h" #include "arch/Arch.h"
// //
// COSXServerTaskBarReceiver // COSXServerTaskBarReceiver

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef COSXSERVERTASKBARRECEIVER_H #pragma once
#define COSXSERVERTASKBARRECEIVER_H
#include "CServerTaskBarReceiver.h" #include "synergys/ServerTaskBarReceiver.h"
class CBufferedLogOutputter; class CBufferedLogOutputter;
@ -35,5 +34,3 @@ public:
virtual void primaryAction(); virtual void primaryAction();
virtual const Icon getIcon() const; virtual const Icon getIcon() const;
}; };
#endif

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CXWindowsServerTaskBarReceiver.h" #include "synergys/XWindowsServerTaskBarReceiver.h"
#include "CArch.h" #include "arch/Arch.h"
// //
// CXWindowsServerTaskBarReceiver // CXWindowsServerTaskBarReceiver

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CXWINDOWSSERVERTASKBARRECEIVER_H #pragma once
#define CXWINDOWSSERVERTASKBARRECEIVER_H
#include "CServerTaskBarReceiver.h" #include "synergys/ServerTaskBarReceiver.h"
class CBufferedLogOutputter; class CBufferedLogOutputter;
class IEventQueue; class IEventQueue;
@ -37,5 +36,3 @@ public:
virtual void primaryAction(); virtual void primaryAction();
virtual const Icon getIcon() const; virtual const Icon getIcon() const;
}; };
#endif

View File

@ -16,17 +16,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CServerApp.h" #include "synergy/ServerApp.h"
#include "CLog.h" #include "arch/Arch.h"
#include "CArch.h" #include "base/Log.h"
#include "CEventQueue.h" #include "base/EventQueue.h"
#if WINAPI_MSWINDOWS #if WINAPI_MSWINDOWS
#include "CMSWindowsServerTaskBarReceiver.h" #include "synergys/MSWindowsServerTaskBarReceiver.h"
#elif WINAPI_XWINDOWS #elif WINAPI_XWINDOWS
#include "CXWindowsServerTaskBarReceiver.h" #include "synergys/XWindowsServerTaskBarReceiver.h"
#elif WINAPI_CARBON #elif WINAPI_CARBON
#include "COSXServerTaskBarReceiver.h" #include "synergys/OSXServerTaskBarReceiver.h"
#else #else
#error Platform not supported. #error Platform not supported.
#endif #endif

View File

@ -17,17 +17,8 @@ file(GLOB headers "*.h")
file(GLOB sources "*.cpp") file(GLOB sources "*.cpp")
include_directories( include_directories(
../../lib/arch ../
../../lib/base ../../lib/
../../lib/common
../../lib/io
../../lib/ipc
../../lib/mt
../../lib/net
../../lib/platform
../../lib/synergy
../../lib/synwinhk
../../lib/synwinxt
) )
if (UNIX) if (UNIX)

View File

@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CToolApp.h" #include "synergy/ToolApp.h"
#include "CArch.h" #include "arch/Arch.h"
int int
main(int argc, char** argv) main(int argc, char** argv)

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArch.h" #include "arch/Arch.h"
// //
// CArch // CArch

View File

@ -33,42 +33,41 @@
// class lazy-loaded so that apps like the daemon don't load // class lazy-loaded so that apps like the daemon don't load
// stuff when they don't need it. // stuff when they don't need it.
#ifndef CARCH_H #pragma once
#define CARCH_H
#include "common.h" #include "common/common.h"
#if SYSAPI_WIN32 #if SYSAPI_WIN32
# include "CArchConsoleWindows.h" # include "arch/win32/ArchConsoleWindows.h"
# include "CArchDaemonWindows.h" # include "arch/win32/ArchDaemonWindows.h"
# include "CArchFileWindows.h" # include "arch/win32/ArchFileWindows.h"
# include "CArchLogWindows.h" # include "arch/win32/ArchLogWindows.h"
# include "CArchMiscWindows.h" # include "arch/win32/ArchMiscWindows.h"
# include "CArchMultithreadWindows.h" # include "arch/win32/ArchMultithreadWindows.h"
# include "CArchNetworkWinsock.h" # include "arch/win32/ArchNetworkWinsock.h"
# include "CArchSleepWindows.h" # include "arch/win32/ArchSleepWindows.h"
# include "CArchStringWindows.h" # include "arch/win32/ArchStringWindows.h"
# include "CArchSystemWindows.h" # include "arch/win32/ArchSystemWindows.h"
# include "CArchTaskBarWindows.h" # include "arch/win32/ArchTaskBarWindows.h"
# include "CArchTimeWindows.h" # include "arch/win32/ArchTimeWindows.h"
# include "CArchPluginWindows.h" # include "arch/win32/ArchPluginWindows.h"
# include "CArchInternetWindows.h" # include "arch/win32/ArchInternetWindows.h"
#elif SYSAPI_UNIX #elif SYSAPI_UNIX
# include "CArchConsoleUnix.h" # include "arch/unix/ArchConsoleUnix.h"
# include "CArchDaemonUnix.h" # include "arch/unix/ArchDaemonUnix.h"
# include "CArchFileUnix.h" # include "arch/unix/ArchFileUnix.h"
# include "CArchLogUnix.h" # include "arch/unix/ArchLogUnix.h"
# if HAVE_PTHREAD # if HAVE_PTHREAD
# include "CArchMultithreadPosix.h" # include "arch/unix/ArchMultithreadPosix.h"
# endif # endif
# include "CArchNetworkBSD.h" # include "arch/unix/ArchNetworkBSD.h"
# include "CArchSleepUnix.h" # include "arch/unix/ArchSleepUnix.h"
# include "CArchStringUnix.h" # include "arch/unix/ArchStringUnix.h"
# include "CArchSystemUnix.h" # include "arch/unix/ArchSystemUnix.h"
# include "CArchTaskBarXWindows.h" # include "arch/unix/ArchTaskBarXWindows.h"
# include "CArchTimeUnix.h" # include "arch/unix/ArchTimeUnix.h"
# include "CArchPluginUnix.h" # include "arch/unix/ArchPluginUnix.h"
# include "CArchInternetUnix.h" # include "arch/unix/ArchInternetUnix.h"
#endif #endif
/*! /*!
@ -144,5 +143,3 @@ public:
private: private:
CArchMutex m_mutex; CArchMutex m_mutex;
}; };
#endif

View File

@ -16,8 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchConsoleStd.h" #include "arch/ArchConsoleStd.h"
#include "CLog.h" #include "base/Log.h"
#include <iostream> #include <iostream>
void void

View File

@ -18,7 +18,7 @@
#pragma once #pragma once
#include "IArchConsole.h" #include "arch/IArchConsole.h"
//! Cross platform implementation of IArchConsole //! Cross platform implementation of IArchConsole
class CArchConsoleStd : public IArchConsole { class CArchConsoleStd : public IArchConsole {

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchDaemonNone.h" #include "arch/ArchDaemonNone.h"
// //
// CArchDaemonNone // CArchDaemonNone

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHDAEMONNONE_H #pragma once
#define CARCHDAEMONNONE_H
#include "IArchDaemon.h" #include "arch/IArchDaemon.h"
#define ARCH_DAEMON CArchDaemonNone #define ARCH_DAEMON CArchDaemonNone
@ -50,5 +49,3 @@ public:
virtual void uninstallDaemon(); virtual void uninstallDaemon();
virtual std::string commandLine() const; virtual std::string commandLine() const;
}; };
#endif

View File

@ -14,92 +14,36 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set(sources file(GLOB headers "*.h")
CArch.cpp file(GLOB sources "*.cpp")
IArchString.cpp
XArch.cpp
CArchConsoleStd.cpp
)
if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif()
# arch
if (WIN32) if (WIN32)
file(GLOB arch_headers "awin32/*.h")
set(headers file(GLOB arch_sources "win32/*.cpp")
CArch.h
CArchConsoleWindows.h
CArchDaemonWindows.h
CArchFileWindows.h
CArchLogWindows.h
CArchMiscWindows.h
CArchMultithreadWindows.h
CArchNetworkWinsock.h
CArchSleepWindows.h
CArchStringWindows.h
CArchSystemWindows.h
CArchTaskBarWindows.h
CArchTimeWindows.h
CArchConsoleStd.h
XArchWindows.h
CMultibyte.h
vsnprintf.h
XArch.h
IArchPlugin.h
CArchPluginWindows.h
CArchInternetWindows.h
)
list(APPEND sources
${headers}
CArchConsoleWindows.cpp
CArchDaemonWindows.cpp
CArchFileWindows.cpp
CArchLogWindows.cpp
CArchMiscWindows.cpp
CArchMultithreadWindows.cpp
CArchNetworkWinsock.cpp
CArchSleepWindows.cpp
CArchStringWindows.cpp
CArchSystemWindows.cpp
CArchTaskBarWindows.cpp
CArchTimeWindows.cpp
XArchWindows.cpp
CArchPluginWindows.cpp
CArchInternetWindows.cpp
)
elseif (UNIX) elseif (UNIX)
file(GLOB arch_headers "unix/*.h")
file(GLOB arch_sources "unix/*.cpp")
endif()
list(APPEND sources list(APPEND sources ${arch_sources})
CArchConsoleUnix.cpp list(APPEND headers ${arch_headers})
CArchDaemonUnix.cpp
CArchFileUnix.cpp
CArchLogUnix.cpp
CArchMultithreadPosix.cpp
CArchNetworkBSD.cpp
CArchSleepUnix.cpp
CArchStringUnix.cpp
CArchSystemUnix.cpp
CArchTaskBarXWindows.cpp
CArchTimeUnix.cpp
XArchUnix.cpp
CArchDaemonNone.cpp
CArchPluginUnix.cpp
CArchInternetUnix.cpp
)
if (SYNERGY_ADD_HEADERS)
list(APPEND sources ${headers})
endif() endif()
include_directories( include_directories(
../base ../
../common
../mt
../platform
../synergy
) )
if (UNIX) if (UNIX)
include_directories( include_directories(
../../.. ../../..
../arch
) )
endif() endif()

View File

@ -16,11 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IARCHCONSOLE_H #pragma once
#define IARCHCONSOLE_H
#include "IInterface.h" #include "common/IInterface.h"
#include "ELevel.h" #include "base/ELevel.h"
//! Interface for architecture dependent console output //! Interface for architecture dependent console output
/*! /*!
@ -65,5 +64,3 @@ public:
//@} //@}
}; };
#endif

View File

@ -16,11 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IARCHDAEMON_H #pragma once
#define IARCHDAEMON_H
#include "IInterface.h" #include "common/IInterface.h"
#include "CString.h" #include "base/String.h"
//! Interface for architecture dependent daemonizing //! Interface for architecture dependent daemonizing
/*! /*!
@ -128,5 +127,3 @@ public:
//@} //@}
}; };
#endif

View File

@ -16,11 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IARCHFILE_H #pragma once
#define IARCHFILE_H
#include "IInterface.h" #include "common/IInterface.h"
#include "stdstring.h" #include "common/stdstring.h"
//! Interface for architecture dependent file system operations //! Interface for architecture dependent file system operations
/*! /*!
@ -64,5 +63,3 @@ public:
//@} //@}
}; };
#endif

View File

@ -16,11 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IARCHLOG_H #pragma once
#define IARCHLOG_H
#include "IInterface.h" #include "common/IInterface.h"
#include "ELevel.h" #include "base/ELevel.h"
//! Interface for architecture dependent logging //! Interface for architecture dependent logging
/*! /*!
@ -62,5 +61,3 @@ public:
//@} //@}
}; };
#endif

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IARCHMULTITHREAD_H #pragma once
#define IARCHMULTITHREAD_H
#include "IInterface.h" #include "common/IInterface.h"
/*! /*!
\class CArchCondImpl \class CArchCondImpl
@ -272,5 +271,3 @@ public:
//@} //@}
}; };
#endif

View File

@ -16,11 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IARCHNETWORK_H #pragma once
#define IARCHNETWORK_H
#include "IInterface.h" #include "common/IInterface.h"
#include "stdstring.h" #include "common/stdstring.h"
class CArchThreadImpl; class CArchThreadImpl;
typedef CArchThreadImpl* CArchThread; typedef CArchThreadImpl* CArchThread;
@ -281,5 +280,3 @@ public:
virtual void init() = 0; virtual void init() = 0;
}; };
#endif

View File

@ -20,7 +20,7 @@
#define PLUGINS_DIR "plugins" #define PLUGINS_DIR "plugins"
#include "IInterface.h" #include "common/IInterface.h"
class IEventQueue; class IEventQueue;

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IARCHSLEEP_H #pragma once
#define IARCHSLEEP_H
#include "IInterface.h" #include "common/IInterface.h"
//! Interface for architecture dependent sleeping //! Interface for architecture dependent sleeping
/*! /*!
@ -43,5 +42,3 @@ public:
//@} //@}
}; };
#endif

View File

@ -16,9 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "IArchString.h" #include "arch/IArchString.h"
#include "common.h" #include "arch/Arch.h"
#include "CArch.h" #include "common/common.h"
#include <climits> #include <climits>
#include <cstring> #include <cstring>
#include <cstdlib> #include <cstdlib>

View File

@ -16,11 +16,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IARCHSTRING_H #pragma once
#define IARCHSTRING_H
#include "common/IInterface.h"
#include "common/basic_types.h"
#include "IInterface.h"
#include "BasicTypes.h"
#include <stdarg.h> #include <stdarg.h>
//! Interface for architecture dependent string operations //! Interface for architecture dependent string operations
@ -70,5 +70,3 @@ public:
//@} //@}
}; };
#endif

View File

@ -16,11 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IARCHSYSTEM_H #pragma once
#define IARCHSYSTEM_H
#include "IInterface.h" #include "common/IInterface.h"
#include "stdstring.h" #include "common/stdstring.h"
//! Interface for architecture dependent system queries //! Interface for architecture dependent system queries
/*! /*!
@ -58,5 +57,3 @@ public:
virtual void setting(const std::string& valueName, const std::string& valueString) const = 0; virtual void setting(const std::string& valueName, const std::string& valueString) const = 0;
//@} //@}
}; };
#endif

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IARCHTASKBAR_H #pragma once
#define IARCHTASKBAR_H
#include "IInterface.h" #include "common/IInterface.h"
class IArchTaskBarReceiver; class IArchTaskBarReceiver;
@ -62,5 +61,3 @@ public:
virtual void init() = 0; virtual void init() = 0;
}; };
#endif

View File

@ -16,11 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IARCHTASKBARRECEIVER_H #pragma once
#define IARCHTASKBARRECEIVER_H
#include "IInterface.h" #include "base/String.h"
#include "stdstring.h" #include "common/IInterface.h"
class IScreen; class IScreen;
class INode; class INode;
@ -97,5 +96,3 @@ public:
//@} //@}
}; };
#endif

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef IARCHTIME_H #pragma once
#define IARCHTIME_H
#include "IInterface.h" #include "common/IInterface.h"
//! Interface for architecture dependent time operations //! Interface for architecture dependent time operations
/*! /*!
@ -40,5 +39,3 @@ public:
//@} //@}
}; };
#endif

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "XArch.h" #include "arch/XArch.h"
// //
// XArch // XArch

View File

@ -16,11 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef XARCH_H #pragma once
#define XARCH_H
#include "common.h" #include "common/common.h"
#include "stdstring.h" #include "common/stdstring.h"
//! Generic thread exception //! Generic thread exception
/*! /*!
@ -169,6 +168,3 @@ XARCH_SUBCLASS(XArchDaemonUninstallFailed, XArchDaemon);
//! Attempted to uninstall a daemon that was not installed //! Attempted to uninstall a daemon that was not installed
XARCH_SUBCLASS(XArchDaemonUninstallNotInstalled, XArchDaemonUninstallFailed); XARCH_SUBCLASS(XArchDaemonUninstallNotInstalled, XArchDaemonUninstallFailed);
#endif

View File

@ -16,11 +16,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CMULTIBYTE_H #pragma once
#define CMULTIBYTE_H
#include "common/common.h"
#include "arch/Arch.h"
#include "common.h"
#include "CArch.h"
#include <climits> #include <climits>
#include <cstring> #include <cstring>
#include <cstdlib> #include <cstdlib>
@ -54,5 +54,3 @@ wctomb(char* dst, wchar_t src)
} }
#endif #endif
#endif

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchConsoleUnix.h" #include "arch/ArchConsoleUnix.h"
CArchConsoleUnix::CArchConsoleUnix() { } CArchConsoleUnix::CArchConsoleUnix() { }

View File

@ -18,7 +18,7 @@
#pragma once #pragma once
#include "CArchConsoleStd.h" #include "arch/ArchConsoleStd.h"
#define ARCH_CONSOLE CArchConsoleUnix #define ARCH_CONSOLE CArchConsoleUnix

View File

@ -16,15 +16,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchDaemonUnix.h" #include "arch/ArchDaemonUnix.h"
#include "XArchUnix.h" #include "arch/XArchUnix.h"
#include "base/Log.h"
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <errno.h> #include <errno.h>
#include <cstdlib> #include <cstdlib>
#include "CLog.h"
// //
// CArchDaemonUnix // CArchDaemonUnix

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHDAEMONUNIX_H #pragma once
#define CARCHDAEMONUNIX_H
#include "CArchDaemonNone.h" #include "arch/ArchDaemonNone.h"
#undef ARCH_DAEMON #undef ARCH_DAEMON
#define ARCH_DAEMON CArchDaemonUnix #define ARCH_DAEMON CArchDaemonUnix
@ -35,5 +34,3 @@ public:
}; };
#define CONFIG_FILE "/etc/synergy/synergyd.conf" #define CONFIG_FILE "/etc/synergy/synergyd.conf"
#endif

View File

@ -16,7 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchFileUnix.h" #include "arch/ArchFileUnix.h"
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <pwd.h> #include <pwd.h>

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHFILEUNIX_H #pragma once
#define CARCHFILEUNIX_H
#include "IArchFile.h" #include "arch/IArchFile.h"
#define ARCH_FILE CArchFileUnix #define ARCH_FILE CArchFileUnix
@ -36,5 +35,3 @@ public:
virtual std::string concatPath(const std::string& prefix, virtual std::string concatPath(const std::string& prefix,
const std::string& suffix); const std::string& suffix);
}; };
#endif

View File

@ -15,10 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchInternetUnix.h" #include "arch/ArchInternetUnix.h"
#include "Version.h" #include "arch/XArch.h"
#include "XArch.h" #include "common/Version.h"
#include "CLog.h" #include "base/Log.h"
#include <sstream> #include <sstream>
#include <curl/curl.h> #include <curl/curl.h>

View File

@ -19,7 +19,7 @@
#define ARCH_INTERNET CArchInternetUnix #define ARCH_INTERNET CArchInternetUnix
#include "CString.h" #include "base/String.h"
class CArchInternetUnix { class CArchInternetUnix {
public: public:

View File

@ -16,7 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchLogUnix.h" #include "arch/ArchLogUnix.h"
#include <syslog.h> #include <syslog.h>
// //

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHLOGUNIX_H #pragma once
#define CARCHLOGUNIX_H
#include "IArchLog.h" #include "arch/IArchLog.h"
#define ARCH_LOG CArchLogUnix #define ARCH_LOG CArchLogUnix

View File

@ -16,9 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchMultithreadPosix.h" #include "arch/ArchMultithreadPosix.h"
#include "CArch.h" #include "arch/Arch.h"
#include "XArch.h" #include "arch/XArch.h"
#include <signal.h> #include <signal.h>
#if TIME_WITH_SYS_TIME #if TIME_WITH_SYS_TIME
# include <sys/time.h> # include <sys/time.h>

View File

@ -16,11 +16,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHMULTITHREADPOSIX_H #pragma once
#define CARCHMULTITHREADPOSIX_H
#include "arch/IArchMultithread.h"
#include "common/stdlist.h"
#include "IArchMultithread.h"
#include "stdlist.h"
#include <pthread.h> #include <pthread.h>
#define ARCH_MULTITHREAD CArchMultithreadPosix #define ARCH_MULTITHREAD CArchMultithreadPosix
@ -113,5 +113,3 @@ private:
SignalFunc m_signalFunc[kNUM_SIGNALS]; SignalFunc m_signalFunc[kNUM_SIGNALS];
void* m_signalUserData[kNUM_SIGNALS]; void* m_signalUserData[kNUM_SIGNALS];
}; };
#endif

View File

@ -16,10 +16,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchNetworkBSD.h" #include "arch/ArchNetworkBSD.h"
#include "CArch.h" #include "arch/Arch.h"
#include "CArchMultithreadPosix.h" #include "arch/ArchMultithreadPosix.h"
#include "XArchUnix.h" #include "arch/XArchUnix.h"
#if HAVE_UNISTD_H #if HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#endif #endif

View File

@ -16,11 +16,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHNETWORKBSD_H #pragma once
#define CARCHNETWORKBSD_H
#include "arch/IArchNetwork.h"
#include "arch/IArchMultithread.h"
#include "IArchNetwork.h"
#include "IArchMultithread.h"
#if HAVE_SYS_TYPES_H #if HAVE_SYS_TYPES_H
# include <sys/types.h> # include <sys/types.h>
#endif #endif
@ -102,5 +102,3 @@ private:
private: private:
CArchMutex m_mutex; CArchMutex m_mutex;
}; };
#endif

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchPluginUnix.h" #include "arch/ArchPluginUnix.h"
CArchPluginUnix::CArchPluginUnix() CArchPluginUnix::CArchPluginUnix()
{ {

View File

@ -18,7 +18,7 @@
#pragma once #pragma once
#include "IArchPlugin.h" #include "arch/IArchPlugin.h"
#define ARCH_PLUGIN CArchPluginUnix #define ARCH_PLUGIN CArchPluginUnix

View File

@ -16,8 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchSleepUnix.h" #include "arch/ArchSleepUnix.h"
#include "CArch.h" #include "arch/Arch.h"
#if TIME_WITH_SYS_TIME #if TIME_WITH_SYS_TIME
# include <sys/time.h> # include <sys/time.h>
# include <time.h> # include <time.h>

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHSLEEPUNIX_H #pragma once
#define CARCHSLEEPUNIX_H
#include "IArchSleep.h" #include "arch/IArchSleep.h"
#define ARCH_SLEEP CArchSleepUnix #define ARCH_SLEEP CArchSleepUnix
@ -32,5 +31,3 @@ public:
// IArchSleep overrides // IArchSleep overrides
virtual void sleep(double timeout); virtual void sleep(double timeout);
}; };
#endif

View File

@ -16,15 +16,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchStringUnix.h" #include "arch/ArchStringUnix.h"
#include <stdio.h> #include <stdio.h>
// //
// CArchStringUnix // CArchStringUnix
// //
#include "CMultibyte.h" #include "arch/multibyte.h"
#include "vsnprintf.h" #include "arch/vsnprintf.h"
CArchStringUnix::CArchStringUnix() CArchStringUnix::CArchStringUnix()
{ {

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHSTRINGUNIX_H #pragma once
#define CARCHSTRINGUNIX_H
#include "IArchString.h" #include "arch/IArchString.h"
#define ARCH_STRING CArchStringUnix #define ARCH_STRING CArchStringUnix
@ -33,5 +32,3 @@ public:
virtual EWideCharEncoding virtual EWideCharEncoding
getWideCharEncoding(); getWideCharEncoding();
}; };
#endif

View File

@ -16,7 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchSystemUnix.h" #include "arch/ArchSystemUnix.h"
#include <sys/utsname.h> #include <sys/utsname.h>
// //

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHSYSTEMUNIX_H #pragma once
#define CARCHSYSTEMUNIX_H
#include "IArchSystem.h" #include "arch/IArchSystem.h"
#define ARCH_SYSTEM CArchSystemUnix #define ARCH_SYSTEM CArchSystemUnix
@ -35,5 +34,3 @@ public:
virtual std::string setting(const std::string&) const; virtual std::string setting(const std::string&) const;
virtual void setting(const std::string&, const std::string&) const; virtual void setting(const std::string&, const std::string&) const;
}; };
#endif

View File

@ -16,7 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchTimeUnix.h" #include "arch/ArchTimeUnix.h"
#if TIME_WITH_SYS_TIME #if TIME_WITH_SYS_TIME
# include <sys/time.h> # include <sys/time.h>
# include <time.h> # include <time.h>

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHTIMEUNIX_H #pragma once
#define CARCHTIMEUNIX_H
#include "IArchTime.h" #include "arch/IArchTime.h"
#define ARCH_TIME CArchTimeUnix #define ARCH_TIME CArchTimeUnix
@ -32,5 +31,3 @@ public:
// IArchTime overrides // IArchTime overrides
virtual double time(); virtual double time();
}; };
#endif

View File

@ -16,7 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "XArchUnix.h" #include "arch/XArchUnix.h"
#include <cstring> #include <cstring>
// //

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef XARCHUNIX_H #pragma once
#define XARCHUNIX_H
#include "XArch.h" #include "arch/XArch.h"
//! Lazy error message string evaluation for unix //! Lazy error message string evaluation for unix
class XArchEvalUnix : public XArchEval { class XArchEvalUnix : public XArchEval {
@ -34,5 +33,3 @@ public:
private: private:
int m_errno; int m_errno;
}; };
#endif

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "IArchString.h" #include "arch/IArchString.h"
#if HAVE_VSNPRINTF #if HAVE_VSNPRINTF

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchConsoleWindows.h" #include "arch/win32/ArchConsoleWindows.h"
CArchConsoleWindows::CArchConsoleWindows() { } CArchConsoleWindows::CArchConsoleWindows() { }

View File

@ -18,7 +18,7 @@
#pragma once #pragma once
#include "CArchConsoleStd.h" #include "arch/ArchConsoleStd.h"
#define ARCH_CONSOLE CArchConsoleWindows #define ARCH_CONSOLE CArchConsoleWindows

View File

@ -16,11 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchDaemonWindows.h" #include "arch/win32/ArchDaemonWindows.h"
#include "CArch.h" #include "arch/win32/ArchMiscWindows.h"
#include "CArchMiscWindows.h" #include "arch/win32/XArchWindows.h"
#include "XArchWindows.h" #include "arch/Arch.h"
#include "stdvector.h" #include "common/stdvector.h"
#include <sstream> #include <sstream>
// //

View File

@ -16,15 +16,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHDAEMONWINDOWS_H #pragma once
#define CARCHDAEMONWINDOWS_H
#include "arch/IArchDaemon.h"
#include "arch/IArchMultithread.h"
#include "common/stdstring.h"
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include "IArchDaemon.h"
#include "IArchMultithread.h"
#include "stdstring.h"
#include <windows.h>
#include <tchar.h> #include <tchar.h>
#define ARCH_DAEMON CArchDaemonWindows #define ARCH_DAEMON CArchDaemonWindows
@ -156,5 +155,3 @@ static const TCHAR* const g_daemonKeyPath[] = {
_T("Service"), _T("Service"),
NULL NULL
}; };
#endif

View File

@ -16,8 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchFileWindows.h" #include "arch/win32/ArchFileWindows.h"
#include <windows.h>
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <shlobj.h> #include <shlobj.h>
#include <tchar.h> #include <tchar.h>
#include <string.h> #include <string.h>

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHFILEWINDOWS_H #pragma once
#define CARCHFILEWINDOWS_H
#include "IArchFile.h" #include "arch/IArchFile.h"
#define ARCH_FILE CArchFileWindows #define ARCH_FILE CArchFileWindows
@ -36,5 +35,3 @@ public:
virtual std::string concatPath(const std::string& prefix, virtual std::string concatPath(const std::string& prefix,
const std::string& suffix); const std::string& suffix);
}; };
#endif

View File

@ -15,10 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchInternetWindows.h" #include "arch/win32/ArchInternetWindows.h"
#include "CArch.h" #include "arch/win32/XArchWindows.h"
#include "Version.h" #include "arch/Arch.h"
#include "XArchWindows.h" #include "common/Version.h"
#include <sstream> #include <sstream>
#include <Wininet.h> #include <Wininet.h>

View File

@ -19,7 +19,7 @@
#define ARCH_INTERNET CArchInternetWindows #define ARCH_INTERNET CArchInternetWindows
#include "CString.h" #include "base/String.h"
class CArchInternetWindows { class CArchInternetWindows {
public: public:

View File

@ -16,8 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchLogWindows.h" #include "arch/win32/ArchLogWindows.h"
#include "CArchMiscWindows.h" #include "arch/win32/ArchMiscWindows.h"
#include <string.h> #include <string.h>
// //

View File

@ -16,13 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHLOGWINDOWS_H #pragma once
#define CARCHLOGWINDOWS_H
#include "arch/IArchLog.h"
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include "IArchLog.h"
#include <windows.h>
#define ARCH_LOG CArchLogWindows #define ARCH_LOG CArchLogWindows
@ -41,5 +40,3 @@ public:
private: private:
HANDLE m_eventLog; HANDLE m_eventLog;
}; };
#endif

View File

@ -16,15 +16,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchMiscWindows.h" #include "arch/win32/ArchMiscWindows.h"
#include "CArchDaemonWindows.h" #include "arch/win32/ArchDaemonWindows.h"
#include "CLog.h" #include "base/Log.h"
#include "common/Version.h"
#include <Wtsapi32.h> #include <Wtsapi32.h>
#pragma warning(disable: 4099) #pragma warning(disable: 4099)
#include <Userenv.h> #include <Userenv.h>
#pragma warning(default: 4099) #pragma warning(default: 4099)
#include "Version.h"
// parent process name for services in Vista // parent process name for services in Vista
#define SERVICE_LAUNCHER "services.exe" #define SERVICE_LAUNCHER "services.exe"

View File

@ -16,17 +16,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHMISCWINDOWS_H #pragma once
#define CARCHMISCWINDOWS_H
#include "common/common.h"
#include "common/stdstring.h"
#include "common/stdset.h"
#include "base/String.h"
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include "common.h"
#include "stdstring.h"
#include "stdset.h"
#include <windows.h>
#include <Tlhelp32.h> #include <Tlhelp32.h>
#include "CString.h"
//! Miscellaneous win32 functions. //! Miscellaneous win32 functions.
class CArchMiscWindows { class CArchMiscWindows {
@ -214,5 +213,3 @@ private:
static HICON s_smallIcon; static HICON s_smallIcon;
static HINSTANCE s_instanceWin32; static HINSTANCE s_instanceWin32;
}; };
#endif

View File

@ -20,9 +20,10 @@
# error multithreading compile option is required # error multithreading compile option is required
#endif #endif
#include "CArchMultithreadWindows.h" #include "arch/win32/ArchMultithreadWindows.h"
#include "CArch.h" #include "arch/Arch.h"
#include "XArch.h" #include "arch/XArch.h"
#include <process.h> #include <process.h>
// //

View File

@ -16,14 +16,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHMULTITHREADWINDOWS_H #pragma once
#define CARCHMULTITHREADWINDOWS_H
#include "arch/IArchMultithread.h"
#include "common/stdlist.h"
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include "IArchMultithread.h"
#include "stdlist.h"
#include <windows.h>
#define ARCH_MULTITHREAD CArchMultithreadWindows #define ARCH_MULTITHREAD CArchMultithreadWindows
@ -115,5 +114,3 @@ private:
SignalFunc m_signalFunc[kNUM_SIGNALS]; SignalFunc m_signalFunc[kNUM_SIGNALS];
void* m_signalUserData[kNUM_SIGNALS]; void* m_signalUserData[kNUM_SIGNALS];
}; };
#endif

View File

@ -16,12 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "arch/win32/ArchNetworkWinsock.h"
#include "arch/win32/ArchMultithreadWindows.h"
#include "arch/win32/XArchWindows.h"
#include "arch/IArchMultithread.h"
#include "arch/Arch.h"
#include "CArchNetworkWinsock.h"
#include "CArch.h"
#include "CArchMultithreadWindows.h"
#include "IArchMultithread.h"
#include "XArchWindows.h"
#include <malloc.h> #include <malloc.h>
static const int s_family[] = { static const int s_family[] = {

View File

@ -16,18 +16,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHNETWORKWINSOCK_H #pragma once
#define CARCHNETWORKWINSOCK_H
#define WIN32_LEAN_AND_MEAN
// declare no functions in winsock2 // declare no functions in winsock2
#define INCL_WINSOCK_API_PROTOTYPES 0 #define INCL_WINSOCK_API_PROTOTYPES 0
#define INCL_WINSOCK_API_TYPEDEFS 0 #define INCL_WINSOCK_API_TYPEDEFS 0
#include "IArchNetwork.h" #include "arch/IArchNetwork.h"
#include "IArchMultithread.h" #include "arch/IArchMultithread.h"
#include <windows.h>
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <winsock2.h> #include <winsock2.h>
#include <list> #include <list>
@ -105,5 +104,3 @@ private:
CArchMutex m_mutex; CArchMutex m_mutex;
CEventList m_unblockEvents; CEventList m_unblockEvents;
}; };
#endif

View File

@ -16,12 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchPluginWindows.h" #include "arch/win32/ArchPluginWindows.h"
#include "XArchWindows.h" #include "arch/win32/XArchWindows.h"
#include "CLog.h" #include "base/Log.h"
#include "IEventQueue.h" #include "base/IEventQueue.h"
#include "CEvent.h" #include "base/Event.h"
#include "CScreen.h" #include "synergy/Screen.h"
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <Windows.h> #include <Windows.h>

View File

@ -18,8 +18,9 @@
#pragma once #pragma once
#include "IArchPlugin.h" #include "arch/IArchPlugin.h"
#include "CString.h" #include "base/String.h"
#include <vector> #include <vector>
#define ARCH_PLUGIN CArchPluginWindows #define ARCH_PLUGIN CArchPluginWindows

View File

@ -16,9 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "CArchSleepWindows.h" #include "arch/win32/ArchSleepWindows.h"
#include "CArch.h" #include "arch/Arch.h"
#include "CArchMultithreadWindows.h" #include "arch/win32/ArchMultithreadWindows.h"
// //
// CArchSleepWindows // CArchSleepWindows

View File

@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CARCHSLEEPWINDOWS_H #pragma once
#define CARCHSLEEPWINDOWS_H
#include "IArchSleep.h" #include "arch/IArchSleep.h"
#define ARCH_SLEEP CArchSleepWindows #define ARCH_SLEEP CArchSleepWindows
@ -32,5 +31,3 @@ public:
// IArchSleep overrides // IArchSleep overrides
virtual void sleep(double timeout); virtual void sleep(double timeout);
}; };
#endif

View File

@ -16,20 +16,20 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#define WIN32_LEAN_AND_MEAN #include "arch/win32/ArchStringWindows.h"
#include "CArchStringWindows.h" #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <Windows.h>
#include <stdio.h> #include <stdio.h>
// //
// CArchStringWindows // CArchStringWindows
// //
#include "CMultibyte.h" #include "arch/multibyte.h"
#define HAVE_VSNPRINTF 1 #define HAVE_VSNPRINTF 1
#define ARCH_VSNPRINTF _vsnprintf #define ARCH_VSNPRINTF _vsnprintf
#include "vsnprintf.h" #include "arch/vsnprintf.h"
CArchStringWindows::CArchStringWindows() CArchStringWindows::CArchStringWindows()
{ {

Some files were not shown because too many files have changed in this diff Show More