diff --git a/src/cmd/synergyc/CMakeLists.txt b/src/cmd/synergyc/CMakeLists.txt index d30be939..f2631173 100644 --- a/src/cmd/synergyc/CMakeLists.txt +++ b/src/cmd/synergyc/CMakeLists.txt @@ -19,9 +19,9 @@ set(sources ) if (WIN32) + file(GLOB arch_headers "MSWindows*.h") + file(GLOB arch_sources "MSWindows*.cpp") list(APPEND sources - CMSWindowsClientTaskBarReceiver.cpp - CMSWindowsClientTaskBarReceiver.h resource.h synergyc.ico synergyc.rc @@ -31,24 +31,23 @@ if (WIN32) tb_wait.ico ) elseif (APPLE) - list(APPEND sources COSXClientTaskBarReceiver.cpp) + file(GLOB arch_headers "OSX*.h") + file(GLOB arch_sources "OSX*.cpp") 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() include_directories( - ../../lib/arch - ../../lib/base - ../../lib/client - ../../lib/common - ../../lib/io - ../../lib/ipc - ../../lib/mt - ../../lib/net - ../../lib/platform - ../../lib/synergy - ../../lib/synwinhk - ../../lib/synwinxt + ../ + ../../lib/ ) if (UNIX) diff --git a/src/cmd/synergyc/MSWindowsClientTaskBarReceiver.cpp b/src/cmd/synergyc/MSWindowsClientTaskBarReceiver.cpp index e10f74ff..71554327 100644 --- a/src/cmd/synergyc/MSWindowsClientTaskBarReceiver.cpp +++ b/src/cmd/synergyc/MSWindowsClientTaskBarReceiver.cpp @@ -16,17 +16,18 @@ * along with this program. If not, see . */ -#include "CMSWindowsClientTaskBarReceiver.h" -#include "CClient.h" -#include "CMSWindowsClipboard.h" -#include "LogOutputters.h" -#include "BasicTypes.h" -#include "CArch.h" -#include "CArchTaskBarWindows.h" -#include "CArchMiscWindows.h" +#include "synergyc/MSWindowsClientTaskBarReceiver.h" + #include "resource.h" -#include "CMSWindowsScreen.h" -#include "CEventQueue.h" +#include "client/Client.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 diff --git a/src/cmd/synergyc/MSWindowsClientTaskBarReceiver.h b/src/cmd/synergyc/MSWindowsClientTaskBarReceiver.h index 92368477..dde942e1 100644 --- a/src/cmd/synergyc/MSWindowsClientTaskBarReceiver.h +++ b/src/cmd/synergyc/MSWindowsClientTaskBarReceiver.h @@ -16,13 +16,12 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSCLIENTTASKBARRECEIVER_H -#define CMSWINDOWSCLIENTTASKBARRECEIVER_H +#pragma once + +#include "synergy/ClientTaskBarReceiver.h" #define WIN32_LEAN_AND_MEAN - -#include "CClientTaskBarReceiver.h" -#include +#include class CBufferedLogOutputter; class IEventQueue; @@ -67,5 +66,3 @@ private: static const UINT s_stateToIconID[]; }; - -#endif diff --git a/src/cmd/synergyc/OSXClientTaskBarReceiver.cpp b/src/cmd/synergyc/OSXClientTaskBarReceiver.cpp index 388f2654..cb41d659 100644 --- a/src/cmd/synergyc/OSXClientTaskBarReceiver.cpp +++ b/src/cmd/synergyc/OSXClientTaskBarReceiver.cpp @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#include "COSXClientTaskBarReceiver.h" -#include "CArch.h" +#include "synergyc/OSXClientTaskBarReceiver.h" +#include "arch/Arch.h" // // COSXClientTaskBarReceiver diff --git a/src/cmd/synergyc/OSXClientTaskBarReceiver.h b/src/cmd/synergyc/OSXClientTaskBarReceiver.h index 6d309a5b..30e7f739 100644 --- a/src/cmd/synergyc/OSXClientTaskBarReceiver.h +++ b/src/cmd/synergyc/OSXClientTaskBarReceiver.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef COSXCLIENTTASKBARRECEIVER_H -#define COSXCLIENTTASKBARRECEIVER_H +#pragma once -#include "CClientTaskBarReceiver.h" +#include "synergyc/ClientTaskBarReceiver.h" class CBufferedLogOutputter; class IEventQueue; @@ -36,5 +35,3 @@ public: virtual void primaryAction(); virtual const Icon getIcon() const; }; - -#endif diff --git a/src/cmd/synergyc/XWindowsClientTaskBarReceiver.cpp b/src/cmd/synergyc/XWindowsClientTaskBarReceiver.cpp index 31c80b89..9d28fd34 100644 --- a/src/cmd/synergyc/XWindowsClientTaskBarReceiver.cpp +++ b/src/cmd/synergyc/XWindowsClientTaskBarReceiver.cpp @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#include "CXWindowsClientTaskBarReceiver.h" -#include "CArch.h" +#include "synergyc/XWindowsClientTaskBarReceiver.h" +#include "arch/Arch.h" // // CXWindowsClientTaskBarReceiver diff --git a/src/cmd/synergyc/XWindowsClientTaskBarReceiver.h b/src/cmd/synergyc/XWindowsClientTaskBarReceiver.h index 83576414..7467ae43 100644 --- a/src/cmd/synergyc/XWindowsClientTaskBarReceiver.h +++ b/src/cmd/synergyc/XWindowsClientTaskBarReceiver.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CXWINDOWSCLIENTTASKBARRECEIVER_H -#define CXWINDOWSCLIENTTASKBARRECEIVER_H +#pragma once -#include "CClientTaskBarReceiver.h" +#include "synergyc/ClientTaskBarReceiver.h" class CBufferedLogOutputter; class IEventQueue; @@ -37,5 +36,3 @@ public: virtual void primaryAction(); virtual const Icon getIcon() const; }; - -#endif diff --git a/src/cmd/synergyc/synergyc.cpp b/src/cmd/synergyc/synergyc.cpp index 0f9f2434..7b3786a4 100644 --- a/src/cmd/synergyc/synergyc.cpp +++ b/src/cmd/synergyc/synergyc.cpp @@ -16,17 +16,17 @@ * along with this program. If not, see . */ -#include "CClientApp.h" -#include "CLog.h" -#include "CArch.h" -#include "CEventQueue.h" +#include "synergy/ClientApp.h" +#include "arch/Arch.h" +#include "base/Log.h" +#include "base/EventQueue.h" #if WINAPI_MSWINDOWS -#include "CMSWindowsClientTaskBarReceiver.h" +#include "synergyc/MSWindowsClientTaskBarReceiver.h" #elif WINAPI_XWINDOWS -#include "CXWindowsClientTaskBarReceiver.h" +#include "synergyc/XWindowsClientTaskBarReceiver.h" #elif WINAPI_CARBON -#include "COSXClientTaskBarReceiver.h" +#include "synergyc/OSXClientTaskBarReceiver.h" #else #error Platform not supported. #endif diff --git a/src/cmd/synergyd/CMakeLists.txt b/src/cmd/synergyd/CMakeLists.txt index 267c34ca..6587a26a 100644 --- a/src/cmd/synergyd/CMakeLists.txt +++ b/src/cmd/synergyd/CMakeLists.txt @@ -18,15 +18,8 @@ file(GLOB headers "*.h") file(GLOB sources "*.cpp") include_directories( - ../../lib/arch - ../../lib/base - ../../lib/common - ../../lib/io - ../../lib/ipc - ../../lib/mt - ../../lib/net - ../../lib/platform - ../../lib/synergy + ../ + ../../lib/ ) if (UNIX) diff --git a/src/cmd/synergyd/synergyd.cpp b/src/cmd/synergyd/synergyd.cpp index d34929c3..5f17633f 100644 --- a/src/cmd/synergyd/synergyd.cpp +++ b/src/cmd/synergyd/synergyd.cpp @@ -16,7 +16,8 @@ * along with this program. If not, see . */ -#include "CDaemonApp.h" +#include "synergy/DaemonApp.h" + #include #ifdef SYSAPI_UNIX diff --git a/src/cmd/synergyp/CMakeLists.txt b/src/cmd/synergyp/CMakeLists.txt index 0c11461c..97062eb2 100644 --- a/src/cmd/synergyp/CMakeLists.txt +++ b/src/cmd/synergyp/CMakeLists.txt @@ -19,9 +19,9 @@ set(sources ) if (WIN32) + file(GLOB arch_headers "MSWindows*.h") + file(GLOB arch_sources "MSWindows*.cpp") list(APPEND sources - CMSWindowsPortableTaskBarReceiver.cpp - CMSWindowsPortableTaskBarReceiver.h resource.h synergyp.ico synergyp.rc @@ -31,24 +31,23 @@ if (WIN32) tb_wait.ico ) elseif (APPLE) - list(APPEND sources COSXPortableTaskBarReceiver.cpp) + file(GLOB arch_headers "OSX*.h") + file(GLOB arch_sources "OSX*.cpp") 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() include_directories( - ../../lib/arch - ../../lib/base - ../../lib/common - ../../lib/io - ../../lib/ipc - ../../lib/mt - ../../lib/net - ../../lib/platform - ../../lib/synergy - ../../lib/server - ../../lib/synwinhk - ../../lib/synwinxt + ../ + ../../lib/ ) if (UNIX) diff --git a/src/cmd/synergyp/MSWindowsPortableTaskBarReceiver.cpp b/src/cmd/synergyp/MSWindowsPortableTaskBarReceiver.cpp index 6f905720..66d564de 100644 --- a/src/cmd/synergyp/MSWindowsPortableTaskBarReceiver.cpp +++ b/src/cmd/synergyp/MSWindowsPortableTaskBarReceiver.cpp @@ -16,17 +16,18 @@ * along with this program. If not, see . */ -#include "CMSWindowsPortableTaskBarReceiver.h" -#include "CMSWindowsClipboard.h" -#include "IEventQueue.h" -#include "LogOutputters.h" -#include "BasicTypes.h" -#include "CArch.h" -#include "CArchTaskBarWindows.h" +#include "synergyp/MSWindowsPortableTaskBarReceiver.h" + #include "resource.h" -#include "CArchMiscWindows.h" -#include "CMSWindowsScreen.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/IEventQueue.h" +#include "base/log_outputters.h" +#include "base/EventTypes.h" // // CMSWindowsPortableTaskBarReceiver diff --git a/src/cmd/synergyp/MSWindowsPortableTaskBarReceiver.h b/src/cmd/synergyp/MSWindowsPortableTaskBarReceiver.h index cc46d7c5..df36d222 100644 --- a/src/cmd/synergyp/MSWindowsPortableTaskBarReceiver.h +++ b/src/cmd/synergyp/MSWindowsPortableTaskBarReceiver.h @@ -18,10 +18,10 @@ #pragma once -#define WIN32_LEAN_AND_MEAN +#include "synergy/PortableTaskBarReceiver.h" -#include "CPortableTaskBarReceiver.h" -#include +#define WIN32_LEAN_AND_MEAN +#include class CBufferedLogOutputter; class IEventQueue; diff --git a/src/cmd/synergyp/OSXPortableTaskBarReceiver.cpp b/src/cmd/synergyp/OSXPortableTaskBarReceiver.cpp index aae65393..6497e0a6 100644 --- a/src/cmd/synergyp/OSXPortableTaskBarReceiver.cpp +++ b/src/cmd/synergyp/OSXPortableTaskBarReceiver.cpp @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#include "COSXServerTaskBarReceiver.h" -#include "CArch.h" +#include "synergys/OSXServerTaskBarReceiver.h" +#include "arch/Arch.h" // // COSXServerTaskBarReceiver diff --git a/src/cmd/synergyp/OSXPortableTaskBarReceiver.h b/src/cmd/synergyp/OSXPortableTaskBarReceiver.h index 984f1f4d..ab213a32 100644 --- a/src/cmd/synergyp/OSXPortableTaskBarReceiver.h +++ b/src/cmd/synergyp/OSXPortableTaskBarReceiver.h @@ -18,7 +18,7 @@ #pragma once -#include "CPortableTaskBarReceiver.h" +#include "synergyp/PortableTaskBarReceiver.h" class CBufferedLogOutputter; diff --git a/src/cmd/synergyp/XWindowsPortableTaskBarReceiver.cpp b/src/cmd/synergyp/XWindowsPortableTaskBarReceiver.cpp index 598555b9..2d1bfc74 100644 --- a/src/cmd/synergyp/XWindowsPortableTaskBarReceiver.cpp +++ b/src/cmd/synergyp/XWindowsPortableTaskBarReceiver.cpp @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#include "CXWindowsServerTaskBarReceiver.h" -#include "CArch.h" +#include "synergys/XWindowsServerTaskBarReceiver.h" +#include "arch/Arch.h" // // CXWindowsServerTaskBarReceiver diff --git a/src/cmd/synergyp/XWindowsPortableTaskBarReceiver.h b/src/cmd/synergyp/XWindowsPortableTaskBarReceiver.h index f2ff51c7..6f32efd6 100644 --- a/src/cmd/synergyp/XWindowsPortableTaskBarReceiver.h +++ b/src/cmd/synergyp/XWindowsPortableTaskBarReceiver.h @@ -18,7 +18,7 @@ #pragma once -#include "CPortableTaskBarReceiver.h" +#include "synergyp/PortableTaskBarReceiver.h" class CBufferedLogOutputter; diff --git a/src/cmd/synergyp/synergyp.cpp b/src/cmd/synergyp/synergyp.cpp index a6f6b1db..ce2ec90d 100644 --- a/src/cmd/synergyp/synergyp.cpp +++ b/src/cmd/synergyp/synergyp.cpp @@ -15,25 +15,25 @@ * along with this program. If not, see . */ -#define WIN32_LEAN_AND_MEAN - -#include "Windows.h" -#include "CServerApp.h" -#include "CClientApp.h" -#include "CLog.h" -#include "CArch.h" -#include "CEventQueue.h" +#include "synergy/ServerApp.h" +#include "synergy/ClientApp.h" +#include "arch/Arch.h" +#include "base/Log.h" +#include "base/EventQueue.h" #if WINAPI_MSWINDOWS -#include "CMSWindowsPortableTaskBarReceiver.h" +#include "MSWindowsPortableTaskBarReceiver.h" #elif WINAPI_XWINDOWS -#include "CXWindowsPortableTaskBarReceiver.h" +#include "XWindowsPortableTaskBarReceiver.h" #elif WINAPI_CARBON -#include "COSXPortableTaskBarReceiver.h" +#include "OSXPortableTaskBarReceiver.h" #else #error Platform not supported. #endif +#define WIN32_LEAN_AND_MEAN +#include + INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine, INT nCmdShow) { diff --git a/src/cmd/synergys/CMakeLists.txt b/src/cmd/synergys/CMakeLists.txt index 33bb0c08..58fbc0c9 100644 --- a/src/cmd/synergys/CMakeLists.txt +++ b/src/cmd/synergys/CMakeLists.txt @@ -19,9 +19,9 @@ set(sources ) if (WIN32) + file(GLOB arch_headers "MSWindows*.h") + file(GLOB arch_sources "MSWindows*.cpp") list(APPEND sources - CMSWindowsServerTaskBarReceiver.cpp - CMSWindowsServerTaskBarReceiver.h resource.h synergys.ico synergys.rc @@ -31,24 +31,23 @@ if (WIN32) tb_wait.ico ) elseif (APPLE) - list(APPEND sources COSXServerTaskBarReceiver.cpp) + file(GLOB arch_headers "OSX*.h") + file(GLOB arch_sources "OSX*.cpp") 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() include_directories( - ../../lib/arch - ../../lib/base - ../../lib/common - ../../lib/io - ../../lib/ipc - ../../lib/mt - ../../lib/net - ../../lib/platform - ../../lib/synergy - ../../lib/server - ../../lib/synwinhk - ../../lib/synwinxt + ../ + ../../lib/ ) if (UNIX) diff --git a/src/cmd/synergys/MSWindowsServerTaskBarReceiver.cpp b/src/cmd/synergys/MSWindowsServerTaskBarReceiver.cpp index f8b5d855..284393b6 100644 --- a/src/cmd/synergys/MSWindowsServerTaskBarReceiver.cpp +++ b/src/cmd/synergys/MSWindowsServerTaskBarReceiver.cpp @@ -16,18 +16,19 @@ * along with this program. If not, see . */ -#include "CMSWindowsServerTaskBarReceiver.h" -#include "CServer.h" -#include "CMSWindowsClipboard.h" -#include "IEventQueue.h" -#include "LogOutputters.h" -#include "BasicTypes.h" -#include "CArch.h" -#include "CArchTaskBarWindows.h" +#include "synergys/MSWindowsServerTaskBarReceiver.h" + #include "resource.h" -#include "CArchMiscWindows.h" -#include "CMSWindowsScreen.h" -#include "CEventQueue.h" +#include "server/Server.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/IEventQueue.h" +#include "base/log_outputters.h" +#include "base/EventTypes.h" // // CMSWindowsServerTaskBarReceiver diff --git a/src/cmd/synergys/MSWindowsServerTaskBarReceiver.h b/src/cmd/synergys/MSWindowsServerTaskBarReceiver.h index 76c89522..2b4221eb 100644 --- a/src/cmd/synergys/MSWindowsServerTaskBarReceiver.h +++ b/src/cmd/synergys/MSWindowsServerTaskBarReceiver.h @@ -16,13 +16,12 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSSERVERTASKBARRECEIVER_H -#define CMSWINDOWSSERVERTASKBARRECEIVER_H +#pragma once + +#include "synergy/ServerTaskBarReceiver.h" #define WIN32_LEAN_AND_MEAN - -#include "CServerTaskBarReceiver.h" -#include +#include class CBufferedLogOutputter; class IEventQueue; @@ -68,5 +67,3 @@ private: static const UINT s_stateToIconID[]; }; - -#endif diff --git a/src/cmd/synergys/OSXServerTaskBarReceiver.cpp b/src/cmd/synergys/OSXServerTaskBarReceiver.cpp index 264e69a7..354c0dea 100644 --- a/src/cmd/synergys/OSXServerTaskBarReceiver.cpp +++ b/src/cmd/synergys/OSXServerTaskBarReceiver.cpp @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#include "COSXServerTaskBarReceiver.h" -#include "CArch.h" +#include "synergys/OSXServerTaskBarReceiver.h" +#include "arch/Arch.h" // // COSXServerTaskBarReceiver diff --git a/src/cmd/synergys/OSXServerTaskBarReceiver.h b/src/cmd/synergys/OSXServerTaskBarReceiver.h index cde33f05..fa362769 100644 --- a/src/cmd/synergys/OSXServerTaskBarReceiver.h +++ b/src/cmd/synergys/OSXServerTaskBarReceiver.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef COSXSERVERTASKBARRECEIVER_H -#define COSXSERVERTASKBARRECEIVER_H +#pragma once -#include "CServerTaskBarReceiver.h" +#include "synergys/ServerTaskBarReceiver.h" class CBufferedLogOutputter; @@ -35,5 +34,3 @@ public: virtual void primaryAction(); virtual const Icon getIcon() const; }; - -#endif diff --git a/src/cmd/synergys/XWindowsServerTaskBarReceiver.cpp b/src/cmd/synergys/XWindowsServerTaskBarReceiver.cpp index 032fe7b8..be4f1ce4 100644 --- a/src/cmd/synergys/XWindowsServerTaskBarReceiver.cpp +++ b/src/cmd/synergys/XWindowsServerTaskBarReceiver.cpp @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#include "CXWindowsServerTaskBarReceiver.h" -#include "CArch.h" +#include "synergys/XWindowsServerTaskBarReceiver.h" +#include "arch/Arch.h" // // CXWindowsServerTaskBarReceiver diff --git a/src/cmd/synergys/XWindowsServerTaskBarReceiver.h b/src/cmd/synergys/XWindowsServerTaskBarReceiver.h index 181e633a..f43d6c97 100644 --- a/src/cmd/synergys/XWindowsServerTaskBarReceiver.h +++ b/src/cmd/synergys/XWindowsServerTaskBarReceiver.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CXWINDOWSSERVERTASKBARRECEIVER_H -#define CXWINDOWSSERVERTASKBARRECEIVER_H +#pragma once -#include "CServerTaskBarReceiver.h" +#include "synergys/ServerTaskBarReceiver.h" class CBufferedLogOutputter; class IEventQueue; @@ -37,5 +36,3 @@ public: virtual void primaryAction(); virtual const Icon getIcon() const; }; - -#endif diff --git a/src/cmd/synergys/synergys.cpp b/src/cmd/synergys/synergys.cpp index d6e744df..45844ef5 100644 --- a/src/cmd/synergys/synergys.cpp +++ b/src/cmd/synergys/synergys.cpp @@ -16,17 +16,17 @@ * along with this program. If not, see . */ -#include "CServerApp.h" -#include "CLog.h" -#include "CArch.h" -#include "CEventQueue.h" +#include "synergy/ServerApp.h" +#include "arch/Arch.h" +#include "base/Log.h" +#include "base/EventQueue.h" #if WINAPI_MSWINDOWS -#include "CMSWindowsServerTaskBarReceiver.h" +#include "synergys/MSWindowsServerTaskBarReceiver.h" #elif WINAPI_XWINDOWS -#include "CXWindowsServerTaskBarReceiver.h" +#include "synergys/XWindowsServerTaskBarReceiver.h" #elif WINAPI_CARBON -#include "COSXServerTaskBarReceiver.h" +#include "synergys/OSXServerTaskBarReceiver.h" #else #error Platform not supported. #endif diff --git a/src/cmd/syntool/CMakeLists.txt b/src/cmd/syntool/CMakeLists.txt index f10ec80d..7b2048d5 100644 --- a/src/cmd/syntool/CMakeLists.txt +++ b/src/cmd/syntool/CMakeLists.txt @@ -17,17 +17,8 @@ file(GLOB headers "*.h") file(GLOB sources "*.cpp") include_directories( - ../../lib/arch - ../../lib/base - ../../lib/common - ../../lib/io - ../../lib/ipc - ../../lib/mt - ../../lib/net - ../../lib/platform - ../../lib/synergy - ../../lib/synwinhk - ../../lib/synwinxt + ../ + ../../lib/ ) if (UNIX) diff --git a/src/cmd/syntool/syntool.cpp b/src/cmd/syntool/syntool.cpp index 5e88b3c5..57bedd05 100644 --- a/src/cmd/syntool/syntool.cpp +++ b/src/cmd/syntool/syntool.cpp @@ -15,8 +15,8 @@ * along with this program. If not, see . */ -#include "CToolApp.h" -#include "CArch.h" +#include "synergy/ToolApp.h" +#include "arch/Arch.h" int main(int argc, char** argv) diff --git a/src/lib/arch/Arch.cpp b/src/lib/arch/Arch.cpp index 5e96fbe2..5e672747 100644 --- a/src/lib/arch/Arch.cpp +++ b/src/lib/arch/Arch.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CArch.h" +#include "arch/Arch.h" // // CArch diff --git a/src/lib/arch/Arch.h b/src/lib/arch/Arch.h index 557f5347..b43eff1d 100644 --- a/src/lib/arch/Arch.h +++ b/src/lib/arch/Arch.h @@ -33,42 +33,41 @@ // class lazy-loaded so that apps like the daemon don't load // stuff when they don't need it. -#ifndef CARCH_H -#define CARCH_H +#pragma once -#include "common.h" +#include "common/common.h" #if SYSAPI_WIN32 -# include "CArchConsoleWindows.h" -# include "CArchDaemonWindows.h" -# include "CArchFileWindows.h" -# include "CArchLogWindows.h" -# include "CArchMiscWindows.h" -# include "CArchMultithreadWindows.h" -# include "CArchNetworkWinsock.h" -# include "CArchSleepWindows.h" -# include "CArchStringWindows.h" -# include "CArchSystemWindows.h" -# include "CArchTaskBarWindows.h" -# include "CArchTimeWindows.h" -# include "CArchPluginWindows.h" -# include "CArchInternetWindows.h" +# include "arch/win32/ArchConsoleWindows.h" +# include "arch/win32/ArchDaemonWindows.h" +# include "arch/win32/ArchFileWindows.h" +# include "arch/win32/ArchLogWindows.h" +# include "arch/win32/ArchMiscWindows.h" +# include "arch/win32/ArchMultithreadWindows.h" +# include "arch/win32/ArchNetworkWinsock.h" +# include "arch/win32/ArchSleepWindows.h" +# include "arch/win32/ArchStringWindows.h" +# include "arch/win32/ArchSystemWindows.h" +# include "arch/win32/ArchTaskBarWindows.h" +# include "arch/win32/ArchTimeWindows.h" +# include "arch/win32/ArchPluginWindows.h" +# include "arch/win32/ArchInternetWindows.h" #elif SYSAPI_UNIX -# include "CArchConsoleUnix.h" -# include "CArchDaemonUnix.h" -# include "CArchFileUnix.h" -# include "CArchLogUnix.h" +# include "arch/unix/ArchConsoleUnix.h" +# include "arch/unix/ArchDaemonUnix.h" +# include "arch/unix/ArchFileUnix.h" +# include "arch/unix/ArchLogUnix.h" # if HAVE_PTHREAD -# include "CArchMultithreadPosix.h" +# include "arch/unix/ArchMultithreadPosix.h" # endif -# include "CArchNetworkBSD.h" -# include "CArchSleepUnix.h" -# include "CArchStringUnix.h" -# include "CArchSystemUnix.h" -# include "CArchTaskBarXWindows.h" -# include "CArchTimeUnix.h" -# include "CArchPluginUnix.h" -# include "CArchInternetUnix.h" +# include "arch/unix/ArchNetworkBSD.h" +# include "arch/unix/ArchSleepUnix.h" +# include "arch/unix/ArchStringUnix.h" +# include "arch/unix/ArchSystemUnix.h" +# include "arch/unix/ArchTaskBarXWindows.h" +# include "arch/unix/ArchTimeUnix.h" +# include "arch/unix/ArchPluginUnix.h" +# include "arch/unix/ArchInternetUnix.h" #endif /*! @@ -144,5 +143,3 @@ public: private: CArchMutex m_mutex; }; - -#endif diff --git a/src/lib/arch/ArchConsoleStd.cpp b/src/lib/arch/ArchConsoleStd.cpp index 91b4426f..4e88a117 100644 --- a/src/lib/arch/ArchConsoleStd.cpp +++ b/src/lib/arch/ArchConsoleStd.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "CArchConsoleStd.h" -#include "CLog.h" +#include "arch/ArchConsoleStd.h" +#include "base/Log.h" + #include void diff --git a/src/lib/arch/ArchConsoleStd.h b/src/lib/arch/ArchConsoleStd.h index e865115a..ac9e28b8 100644 --- a/src/lib/arch/ArchConsoleStd.h +++ b/src/lib/arch/ArchConsoleStd.h @@ -18,7 +18,7 @@ #pragma once -#include "IArchConsole.h" +#include "arch/IArchConsole.h" //! Cross platform implementation of IArchConsole class CArchConsoleStd : public IArchConsole { diff --git a/src/lib/arch/ArchDaemonNone.cpp b/src/lib/arch/ArchDaemonNone.cpp index ca6442ef..4493851c 100644 --- a/src/lib/arch/ArchDaemonNone.cpp +++ b/src/lib/arch/ArchDaemonNone.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CArchDaemonNone.h" +#include "arch/ArchDaemonNone.h" // // CArchDaemonNone diff --git a/src/lib/arch/ArchDaemonNone.h b/src/lib/arch/ArchDaemonNone.h index 6439c6a9..22b6c432 100644 --- a/src/lib/arch/ArchDaemonNone.h +++ b/src/lib/arch/ArchDaemonNone.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CARCHDAEMONNONE_H -#define CARCHDAEMONNONE_H +#pragma once -#include "IArchDaemon.h" +#include "arch/IArchDaemon.h" #define ARCH_DAEMON CArchDaemonNone @@ -50,5 +49,3 @@ public: virtual void uninstallDaemon(); virtual std::string commandLine() const; }; - -#endif diff --git a/src/lib/arch/CMakeLists.txt b/src/lib/arch/CMakeLists.txt index 97272ef0..eb651a19 100644 --- a/src/lib/arch/CMakeLists.txt +++ b/src/lib/arch/CMakeLists.txt @@ -14,92 +14,36 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -set(sources - CArch.cpp - IArchString.cpp - XArch.cpp - CArchConsoleStd.cpp -) +file(GLOB headers "*.h") +file(GLOB sources "*.cpp") +if (SYNERGY_ADD_HEADERS) + list(APPEND sources ${headers}) +endif() + +# arch if (WIN32) - - set(headers - 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 - ) - + file(GLOB arch_headers "awin32/*.h") + file(GLOB arch_sources "win32/*.cpp") elseif (UNIX) + file(GLOB arch_headers "unix/*.h") + file(GLOB arch_sources "unix/*.cpp") +endif() - list(APPEND sources - CArchConsoleUnix.cpp - 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 - ) - +list(APPEND sources ${arch_sources}) +list(APPEND headers ${arch_headers}) + +if (SYNERGY_ADD_HEADERS) + list(APPEND sources ${headers}) endif() include_directories( - ../base - ../common - ../mt - ../platform - ../synergy + ../ ) if (UNIX) include_directories( ../../.. - ../arch ) endif() diff --git a/src/lib/arch/IArchConsole.h b/src/lib/arch/IArchConsole.h index e99711c1..5d94be5f 100644 --- a/src/lib/arch/IArchConsole.h +++ b/src/lib/arch/IArchConsole.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef IARCHCONSOLE_H -#define IARCHCONSOLE_H +#pragma once -#include "IInterface.h" -#include "ELevel.h" +#include "common/IInterface.h" +#include "base/ELevel.h" //! Interface for architecture dependent console output /*! @@ -65,5 +64,3 @@ public: //@} }; - -#endif diff --git a/src/lib/arch/IArchDaemon.h b/src/lib/arch/IArchDaemon.h index 5070747b..6822fd9d 100644 --- a/src/lib/arch/IArchDaemon.h +++ b/src/lib/arch/IArchDaemon.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef IARCHDAEMON_H -#define IARCHDAEMON_H +#pragma once -#include "IInterface.h" -#include "CString.h" +#include "common/IInterface.h" +#include "base/String.h" //! Interface for architecture dependent daemonizing /*! @@ -128,5 +127,3 @@ public: //@} }; - -#endif diff --git a/src/lib/arch/IArchFile.h b/src/lib/arch/IArchFile.h index 4d5ec281..dc2d9c12 100644 --- a/src/lib/arch/IArchFile.h +++ b/src/lib/arch/IArchFile.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef IARCHFILE_H -#define IARCHFILE_H +#pragma once -#include "IInterface.h" -#include "stdstring.h" +#include "common/IInterface.h" +#include "common/stdstring.h" //! Interface for architecture dependent file system operations /*! @@ -64,5 +63,3 @@ public: //@} }; - -#endif diff --git a/src/lib/arch/IArchLog.h b/src/lib/arch/IArchLog.h index 2b66a82e..d07bcdf0 100644 --- a/src/lib/arch/IArchLog.h +++ b/src/lib/arch/IArchLog.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef IARCHLOG_H -#define IARCHLOG_H +#pragma once -#include "IInterface.h" -#include "ELevel.h" +#include "common/IInterface.h" +#include "base/ELevel.h" //! Interface for architecture dependent logging /*! @@ -62,5 +61,3 @@ public: //@} }; - -#endif diff --git a/src/lib/arch/IArchMultithread.h b/src/lib/arch/IArchMultithread.h index 3e5375f9..31c56179 100644 --- a/src/lib/arch/IArchMultithread.h +++ b/src/lib/arch/IArchMultithread.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef IARCHMULTITHREAD_H -#define IARCHMULTITHREAD_H +#pragma once -#include "IInterface.h" +#include "common/IInterface.h" /*! \class CArchCondImpl @@ -272,5 +271,3 @@ public: //@} }; - -#endif diff --git a/src/lib/arch/IArchNetwork.h b/src/lib/arch/IArchNetwork.h index 98d1dc55..98056fb4 100644 --- a/src/lib/arch/IArchNetwork.h +++ b/src/lib/arch/IArchNetwork.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef IARCHNETWORK_H -#define IARCHNETWORK_H +#pragma once -#include "IInterface.h" -#include "stdstring.h" +#include "common/IInterface.h" +#include "common/stdstring.h" class CArchThreadImpl; typedef CArchThreadImpl* CArchThread; @@ -281,5 +280,3 @@ public: virtual void init() = 0; }; - -#endif diff --git a/src/lib/arch/IArchPlugin.h b/src/lib/arch/IArchPlugin.h index cf23e16a..2d8667ef 100644 --- a/src/lib/arch/IArchPlugin.h +++ b/src/lib/arch/IArchPlugin.h @@ -20,7 +20,7 @@ #define PLUGINS_DIR "plugins" -#include "IInterface.h" +#include "common/IInterface.h" class IEventQueue; diff --git a/src/lib/arch/IArchSleep.h b/src/lib/arch/IArchSleep.h index 8d6536c6..6ce81ee6 100644 --- a/src/lib/arch/IArchSleep.h +++ b/src/lib/arch/IArchSleep.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef IARCHSLEEP_H -#define IARCHSLEEP_H +#pragma once -#include "IInterface.h" +#include "common/IInterface.h" //! Interface for architecture dependent sleeping /*! @@ -43,5 +42,3 @@ public: //@} }; - -#endif diff --git a/src/lib/arch/IArchString.cpp b/src/lib/arch/IArchString.cpp index fc063c9d..a31dad63 100644 --- a/src/lib/arch/IArchString.cpp +++ b/src/lib/arch/IArchString.cpp @@ -16,9 +16,10 @@ * along with this program. If not, see . */ -#include "IArchString.h" -#include "common.h" -#include "CArch.h" +#include "arch/IArchString.h" +#include "arch/Arch.h" +#include "common/common.h" + #include #include #include diff --git a/src/lib/arch/IArchString.h b/src/lib/arch/IArchString.h index a962df12..4d0b8f18 100644 --- a/src/lib/arch/IArchString.h +++ b/src/lib/arch/IArchString.h @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -#ifndef IARCHSTRING_H -#define IARCHSTRING_H +#pragma once + +#include "common/IInterface.h" +#include "common/basic_types.h" -#include "IInterface.h" -#include "BasicTypes.h" #include //! Interface for architecture dependent string operations @@ -70,5 +70,3 @@ public: //@} }; - -#endif diff --git a/src/lib/arch/IArchSystem.h b/src/lib/arch/IArchSystem.h index 74dff112..8f9bbf36 100644 --- a/src/lib/arch/IArchSystem.h +++ b/src/lib/arch/IArchSystem.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef IARCHSYSTEM_H -#define IARCHSYSTEM_H +#pragma once -#include "IInterface.h" -#include "stdstring.h" +#include "common/IInterface.h" +#include "common/stdstring.h" //! Interface for architecture dependent system queries /*! @@ -58,5 +57,3 @@ public: virtual void setting(const std::string& valueName, const std::string& valueString) const = 0; //@} }; - -#endif diff --git a/src/lib/arch/IArchTaskBar.h b/src/lib/arch/IArchTaskBar.h index 244ec30f..5df8e2ec 100644 --- a/src/lib/arch/IArchTaskBar.h +++ b/src/lib/arch/IArchTaskBar.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef IARCHTASKBAR_H -#define IARCHTASKBAR_H +#pragma once -#include "IInterface.h" +#include "common/IInterface.h" class IArchTaskBarReceiver; @@ -62,5 +61,3 @@ public: virtual void init() = 0; }; - -#endif diff --git a/src/lib/arch/IArchTaskBarReceiver.h b/src/lib/arch/IArchTaskBarReceiver.h index d5becd48..0ce1a946 100644 --- a/src/lib/arch/IArchTaskBarReceiver.h +++ b/src/lib/arch/IArchTaskBarReceiver.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef IARCHTASKBARRECEIVER_H -#define IARCHTASKBARRECEIVER_H +#pragma once -#include "IInterface.h" -#include "stdstring.h" +#include "base/String.h" +#include "common/IInterface.h" class IScreen; class INode; @@ -97,5 +96,3 @@ public: //@} }; - -#endif diff --git a/src/lib/arch/IArchTime.h b/src/lib/arch/IArchTime.h index f25c2be0..f54437f5 100644 --- a/src/lib/arch/IArchTime.h +++ b/src/lib/arch/IArchTime.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef IARCHTIME_H -#define IARCHTIME_H +#pragma once -#include "IInterface.h" +#include "common/IInterface.h" //! Interface for architecture dependent time operations /*! @@ -40,5 +39,3 @@ public: //@} }; - -#endif diff --git a/src/lib/arch/XArch.cpp b/src/lib/arch/XArch.cpp index 0cc2e577..f7446ce5 100644 --- a/src/lib/arch/XArch.cpp +++ b/src/lib/arch/XArch.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "XArch.h" +#include "arch/XArch.h" // // XArch diff --git a/src/lib/arch/XArch.h b/src/lib/arch/XArch.h index 2f87be1c..887f079c 100644 --- a/src/lib/arch/XArch.h +++ b/src/lib/arch/XArch.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef XARCH_H -#define XARCH_H +#pragma once -#include "common.h" -#include "stdstring.h" +#include "common/common.h" +#include "common/stdstring.h" //! Generic thread exception /*! @@ -169,6 +168,3 @@ XARCH_SUBCLASS(XArchDaemonUninstallFailed, XArchDaemon); //! Attempted to uninstall a daemon that was not installed XARCH_SUBCLASS(XArchDaemonUninstallNotInstalled, XArchDaemonUninstallFailed); - - -#endif diff --git a/src/lib/arch/Multibyte.h b/src/lib/arch/multibyte.h similarity index 93% rename from src/lib/arch/Multibyte.h rename to src/lib/arch/multibyte.h index 2d4e1555..3247bb14 100644 --- a/src/lib/arch/Multibyte.h +++ b/src/lib/arch/multibyte.h @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -#ifndef CMULTIBYTE_H -#define CMULTIBYTE_H +#pragma once + +#include "common/common.h" +#include "arch/Arch.h" -#include "common.h" -#include "CArch.h" #include #include #include @@ -54,5 +54,3 @@ wctomb(char* dst, wchar_t src) } #endif - -#endif diff --git a/src/lib/arch/ArchConsoleUnix.cpp b/src/lib/arch/unix/ArchConsoleUnix.cpp similarity index 96% rename from src/lib/arch/ArchConsoleUnix.cpp rename to src/lib/arch/unix/ArchConsoleUnix.cpp index b10e64b2..2dc30bbf 100644 --- a/src/lib/arch/ArchConsoleUnix.cpp +++ b/src/lib/arch/unix/ArchConsoleUnix.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CArchConsoleUnix.h" +#include "arch/ArchConsoleUnix.h" CArchConsoleUnix::CArchConsoleUnix() { } diff --git a/src/lib/arch/ArchConsoleUnix.h b/src/lib/arch/unix/ArchConsoleUnix.h similarity index 96% rename from src/lib/arch/ArchConsoleUnix.h rename to src/lib/arch/unix/ArchConsoleUnix.h index 8281c5fa..50470ae2 100644 --- a/src/lib/arch/ArchConsoleUnix.h +++ b/src/lib/arch/unix/ArchConsoleUnix.h @@ -18,7 +18,7 @@ #pragma once -#include "CArchConsoleStd.h" +#include "arch/ArchConsoleStd.h" #define ARCH_CONSOLE CArchConsoleUnix diff --git a/src/lib/arch/ArchDaemonUnix.cpp b/src/lib/arch/unix/ArchDaemonUnix.cpp similarity index 97% rename from src/lib/arch/ArchDaemonUnix.cpp rename to src/lib/arch/unix/ArchDaemonUnix.cpp index 18c0f4f5..e48528a6 100644 --- a/src/lib/arch/ArchDaemonUnix.cpp +++ b/src/lib/arch/unix/ArchDaemonUnix.cpp @@ -16,15 +16,16 @@ * along with this program. If not, see . */ -#include "CArchDaemonUnix.h" -#include "XArchUnix.h" +#include "arch/ArchDaemonUnix.h" +#include "arch/XArchUnix.h" +#include "base/Log.h" + #include #include #include #include #include #include -#include "CLog.h" // // CArchDaemonUnix diff --git a/src/lib/arch/ArchDaemonUnix.h b/src/lib/arch/unix/ArchDaemonUnix.h similarity index 92% rename from src/lib/arch/ArchDaemonUnix.h rename to src/lib/arch/unix/ArchDaemonUnix.h index 34ca552e..381b658e 100644 --- a/src/lib/arch/ArchDaemonUnix.h +++ b/src/lib/arch/unix/ArchDaemonUnix.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CARCHDAEMONUNIX_H -#define CARCHDAEMONUNIX_H +#pragma once -#include "CArchDaemonNone.h" +#include "arch/ArchDaemonNone.h" #undef ARCH_DAEMON #define ARCH_DAEMON CArchDaemonUnix @@ -35,5 +34,3 @@ public: }; #define CONFIG_FILE "/etc/synergy/synergyd.conf" - -#endif diff --git a/src/lib/arch/ArchFileUnix.cpp b/src/lib/arch/unix/ArchFileUnix.cpp similarity index 98% rename from src/lib/arch/ArchFileUnix.cpp rename to src/lib/arch/unix/ArchFileUnix.cpp index d71f416d..326866dc 100644 --- a/src/lib/arch/ArchFileUnix.cpp +++ b/src/lib/arch/unix/ArchFileUnix.cpp @@ -16,7 +16,8 @@ * along with this program. If not, see . */ -#include "CArchFileUnix.h" +#include "arch/ArchFileUnix.h" + #include #include #include diff --git a/src/lib/arch/ArchFileUnix.h b/src/lib/arch/unix/ArchFileUnix.h similarity index 93% rename from src/lib/arch/ArchFileUnix.h rename to src/lib/arch/unix/ArchFileUnix.h index 815387e7..0eaaca61 100644 --- a/src/lib/arch/ArchFileUnix.h +++ b/src/lib/arch/unix/ArchFileUnix.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CARCHFILEUNIX_H -#define CARCHFILEUNIX_H +#pragma once -#include "IArchFile.h" +#include "arch/IArchFile.h" #define ARCH_FILE CArchFileUnix @@ -36,5 +35,3 @@ public: virtual std::string concatPath(const std::string& prefix, const std::string& suffix); }; - -#endif diff --git a/src/lib/arch/ArchInternetUnix.cpp b/src/lib/arch/unix/ArchInternetUnix.cpp similarity index 94% rename from src/lib/arch/ArchInternetUnix.cpp rename to src/lib/arch/unix/ArchInternetUnix.cpp index 93a69c37..7db939d7 100644 --- a/src/lib/arch/ArchInternetUnix.cpp +++ b/src/lib/arch/unix/ArchInternetUnix.cpp @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -#include "CArchInternetUnix.h" -#include "Version.h" -#include "XArch.h" -#include "CLog.h" +#include "arch/ArchInternetUnix.h" +#include "arch/XArch.h" +#include "common/Version.h" +#include "base/Log.h" #include #include diff --git a/src/lib/arch/ArchInternetUnix.h b/src/lib/arch/unix/ArchInternetUnix.h similarity index 97% rename from src/lib/arch/ArchInternetUnix.h rename to src/lib/arch/unix/ArchInternetUnix.h index 2f2a64d5..e83069e9 100644 --- a/src/lib/arch/ArchInternetUnix.h +++ b/src/lib/arch/unix/ArchInternetUnix.h @@ -19,7 +19,7 @@ #define ARCH_INTERNET CArchInternetUnix -#include "CString.h" +#include "base/String.h" class CArchInternetUnix { public: diff --git a/src/lib/arch/ArchLogUnix.cpp b/src/lib/arch/unix/ArchLogUnix.cpp similarity index 97% rename from src/lib/arch/ArchLogUnix.cpp rename to src/lib/arch/unix/ArchLogUnix.cpp index 3421200c..fc59e67b 100644 --- a/src/lib/arch/ArchLogUnix.cpp +++ b/src/lib/arch/unix/ArchLogUnix.cpp @@ -16,7 +16,8 @@ * along with this program. If not, see . */ -#include "CArchLogUnix.h" +#include "arch/ArchLogUnix.h" + #include // diff --git a/src/lib/arch/ArchLogUnix.h b/src/lib/arch/unix/ArchLogUnix.h similarity index 94% rename from src/lib/arch/ArchLogUnix.h rename to src/lib/arch/unix/ArchLogUnix.h index 1203b218..5a77010a 100644 --- a/src/lib/arch/ArchLogUnix.h +++ b/src/lib/arch/unix/ArchLogUnix.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CARCHLOGUNIX_H -#define CARCHLOGUNIX_H +#pragma once -#include "IArchLog.h" +#include "arch/IArchLog.h" #define ARCH_LOG CArchLogUnix diff --git a/src/lib/arch/ArchMultithreadPosix.cpp b/src/lib/arch/unix/ArchMultithreadPosix.cpp similarity index 99% rename from src/lib/arch/ArchMultithreadPosix.cpp rename to src/lib/arch/unix/ArchMultithreadPosix.cpp index 8d2c788e..4f3150b9 100644 --- a/src/lib/arch/ArchMultithreadPosix.cpp +++ b/src/lib/arch/unix/ArchMultithreadPosix.cpp @@ -16,9 +16,10 @@ * along with this program. If not, see . */ -#include "CArchMultithreadPosix.h" -#include "CArch.h" -#include "XArch.h" +#include "arch/ArchMultithreadPosix.h" +#include "arch/Arch.h" +#include "arch/XArch.h" + #include #if TIME_WITH_SYS_TIME # include diff --git a/src/lib/arch/ArchMultithreadPosix.h b/src/lib/arch/unix/ArchMultithreadPosix.h similarity index 96% rename from src/lib/arch/ArchMultithreadPosix.h rename to src/lib/arch/unix/ArchMultithreadPosix.h index c5da4196..809a1016 100644 --- a/src/lib/arch/ArchMultithreadPosix.h +++ b/src/lib/arch/unix/ArchMultithreadPosix.h @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -#ifndef CARCHMULTITHREADPOSIX_H -#define CARCHMULTITHREADPOSIX_H +#pragma once + +#include "arch/IArchMultithread.h" +#include "common/stdlist.h" -#include "IArchMultithread.h" -#include "stdlist.h" #include #define ARCH_MULTITHREAD CArchMultithreadPosix @@ -113,5 +113,3 @@ private: SignalFunc m_signalFunc[kNUM_SIGNALS]; void* m_signalUserData[kNUM_SIGNALS]; }; - -#endif diff --git a/src/lib/arch/ArchNetworkBSD.cpp b/src/lib/arch/unix/ArchNetworkBSD.cpp similarity index 99% rename from src/lib/arch/ArchNetworkBSD.cpp rename to src/lib/arch/unix/ArchNetworkBSD.cpp index f0c74d68..084002db 100644 --- a/src/lib/arch/ArchNetworkBSD.cpp +++ b/src/lib/arch/unix/ArchNetworkBSD.cpp @@ -16,10 +16,11 @@ * along with this program. If not, see . */ -#include "CArchNetworkBSD.h" -#include "CArch.h" -#include "CArchMultithreadPosix.h" -#include "XArchUnix.h" +#include "arch/ArchNetworkBSD.h" +#include "arch/Arch.h" +#include "arch/ArchMultithreadPosix.h" +#include "arch/XArchUnix.h" + #if HAVE_UNISTD_H # include #endif diff --git a/src/lib/arch/ArchNetworkBSD.h b/src/lib/arch/unix/ArchNetworkBSD.h similarity index 96% rename from src/lib/arch/ArchNetworkBSD.h rename to src/lib/arch/unix/ArchNetworkBSD.h index f524915f..f9bbdfce 100644 --- a/src/lib/arch/ArchNetworkBSD.h +++ b/src/lib/arch/unix/ArchNetworkBSD.h @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -#ifndef CARCHNETWORKBSD_H -#define CARCHNETWORKBSD_H +#pragma once + +#include "arch/IArchNetwork.h" +#include "arch/IArchMultithread.h" -#include "IArchNetwork.h" -#include "IArchMultithread.h" #if HAVE_SYS_TYPES_H # include #endif @@ -102,5 +102,3 @@ private: private: CArchMutex m_mutex; }; - -#endif diff --git a/src/lib/arch/ArchPluginUnix.cpp b/src/lib/arch/unix/ArchPluginUnix.cpp similarity index 96% rename from src/lib/arch/ArchPluginUnix.cpp rename to src/lib/arch/unix/ArchPluginUnix.cpp index dad2d339..fd20b996 100644 --- a/src/lib/arch/ArchPluginUnix.cpp +++ b/src/lib/arch/unix/ArchPluginUnix.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CArchPluginUnix.h" +#include "arch/ArchPluginUnix.h" CArchPluginUnix::CArchPluginUnix() { diff --git a/src/lib/arch/ArchPluginUnix.h b/src/lib/arch/unix/ArchPluginUnix.h similarity index 97% rename from src/lib/arch/ArchPluginUnix.h rename to src/lib/arch/unix/ArchPluginUnix.h index dea0378a..cdaa5053 100644 --- a/src/lib/arch/ArchPluginUnix.h +++ b/src/lib/arch/unix/ArchPluginUnix.h @@ -18,7 +18,7 @@ #pragma once -#include "IArchPlugin.h" +#include "arch/IArchPlugin.h" #define ARCH_PLUGIN CArchPluginUnix diff --git a/src/lib/arch/ArchSleepUnix.cpp b/src/lib/arch/unix/ArchSleepUnix.cpp similarity index 97% rename from src/lib/arch/ArchSleepUnix.cpp rename to src/lib/arch/unix/ArchSleepUnix.cpp index 8a88fd5e..efafc60e 100644 --- a/src/lib/arch/ArchSleepUnix.cpp +++ b/src/lib/arch/unix/ArchSleepUnix.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "CArchSleepUnix.h" -#include "CArch.h" +#include "arch/ArchSleepUnix.h" +#include "arch/Arch.h" + #if TIME_WITH_SYS_TIME # include # include diff --git a/src/lib/arch/ArchSleepUnix.h b/src/lib/arch/unix/ArchSleepUnix.h similarity index 92% rename from src/lib/arch/ArchSleepUnix.h rename to src/lib/arch/unix/ArchSleepUnix.h index 4ca3e992..342cc2c8 100644 --- a/src/lib/arch/ArchSleepUnix.h +++ b/src/lib/arch/unix/ArchSleepUnix.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CARCHSLEEPUNIX_H -#define CARCHSLEEPUNIX_H +#pragma once -#include "IArchSleep.h" +#include "arch/IArchSleep.h" #define ARCH_SLEEP CArchSleepUnix @@ -32,5 +31,3 @@ public: // IArchSleep overrides virtual void sleep(double timeout); }; - -#endif diff --git a/src/lib/arch/ArchStringUnix.cpp b/src/lib/arch/unix/ArchStringUnix.cpp similarity index 91% rename from src/lib/arch/ArchStringUnix.cpp rename to src/lib/arch/unix/ArchStringUnix.cpp index c7d871e3..c7586e02 100644 --- a/src/lib/arch/ArchStringUnix.cpp +++ b/src/lib/arch/unix/ArchStringUnix.cpp @@ -16,15 +16,16 @@ * along with this program. If not, see . */ -#include "CArchStringUnix.h" +#include "arch/ArchStringUnix.h" + #include // // CArchStringUnix // -#include "CMultibyte.h" -#include "vsnprintf.h" +#include "arch/multibyte.h" +#include "arch/vsnprintf.h" CArchStringUnix::CArchStringUnix() { diff --git a/src/lib/arch/ArchStringUnix.h b/src/lib/arch/unix/ArchStringUnix.h similarity index 92% rename from src/lib/arch/ArchStringUnix.h rename to src/lib/arch/unix/ArchStringUnix.h index 6c58d87b..fd98a9f8 100644 --- a/src/lib/arch/ArchStringUnix.h +++ b/src/lib/arch/unix/ArchStringUnix.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CARCHSTRINGUNIX_H -#define CARCHSTRINGUNIX_H +#pragma once -#include "IArchString.h" +#include "arch/IArchString.h" #define ARCH_STRING CArchStringUnix @@ -33,5 +32,3 @@ public: virtual EWideCharEncoding getWideCharEncoding(); }; - -#endif diff --git a/src/lib/arch/ArchSystemUnix.cpp b/src/lib/arch/unix/ArchSystemUnix.cpp similarity index 97% rename from src/lib/arch/ArchSystemUnix.cpp rename to src/lib/arch/unix/ArchSystemUnix.cpp index 4d0aa2a5..849e7216 100644 --- a/src/lib/arch/ArchSystemUnix.cpp +++ b/src/lib/arch/unix/ArchSystemUnix.cpp @@ -16,7 +16,8 @@ * along with this program. If not, see . */ -#include "CArchSystemUnix.h" +#include "arch/ArchSystemUnix.h" + #include // diff --git a/src/lib/arch/ArchSystemUnix.h b/src/lib/arch/unix/ArchSystemUnix.h similarity index 93% rename from src/lib/arch/ArchSystemUnix.h rename to src/lib/arch/unix/ArchSystemUnix.h index e13400c4..d4ea1965 100644 --- a/src/lib/arch/ArchSystemUnix.h +++ b/src/lib/arch/unix/ArchSystemUnix.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CARCHSYSTEMUNIX_H -#define CARCHSYSTEMUNIX_H +#pragma once -#include "IArchSystem.h" +#include "arch/IArchSystem.h" #define ARCH_SYSTEM CArchSystemUnix @@ -35,5 +34,3 @@ public: virtual std::string setting(const std::string&) const; virtual void setting(const std::string&, const std::string&) const; }; - -#endif diff --git a/src/lib/arch/ArchTimeUnix.cpp b/src/lib/arch/unix/ArchTimeUnix.cpp similarity index 97% rename from src/lib/arch/ArchTimeUnix.cpp rename to src/lib/arch/unix/ArchTimeUnix.cpp index 0f249186..372ac628 100644 --- a/src/lib/arch/ArchTimeUnix.cpp +++ b/src/lib/arch/unix/ArchTimeUnix.cpp @@ -16,7 +16,8 @@ * along with this program. If not, see . */ -#include "CArchTimeUnix.h" +#include "arch/ArchTimeUnix.h" + #if TIME_WITH_SYS_TIME # include # include diff --git a/src/lib/arch/ArchTimeUnix.h b/src/lib/arch/unix/ArchTimeUnix.h similarity index 92% rename from src/lib/arch/ArchTimeUnix.h rename to src/lib/arch/unix/ArchTimeUnix.h index a1c8fa40..47f89b98 100644 --- a/src/lib/arch/ArchTimeUnix.h +++ b/src/lib/arch/unix/ArchTimeUnix.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CARCHTIMEUNIX_H -#define CARCHTIMEUNIX_H +#pragma once -#include "IArchTime.h" +#include "arch/IArchTime.h" #define ARCH_TIME CArchTimeUnix @@ -32,5 +31,3 @@ public: // IArchTime overrides virtual double time(); }; - -#endif diff --git a/src/lib/arch/XArchUnix.cpp b/src/lib/arch/unix/XArchUnix.cpp similarity index 97% rename from src/lib/arch/XArchUnix.cpp rename to src/lib/arch/unix/XArchUnix.cpp index b276fa1d..aa314115 100644 --- a/src/lib/arch/XArchUnix.cpp +++ b/src/lib/arch/unix/XArchUnix.cpp @@ -16,7 +16,8 @@ * along with this program. If not, see . */ -#include "XArchUnix.h" +#include "arch/XArchUnix.h" + #include // diff --git a/src/lib/arch/XArchUnix.h b/src/lib/arch/unix/XArchUnix.h similarity index 94% rename from src/lib/arch/XArchUnix.h rename to src/lib/arch/unix/XArchUnix.h index 5e3e73fd..f040a629 100644 --- a/src/lib/arch/XArchUnix.h +++ b/src/lib/arch/unix/XArchUnix.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef XARCHUNIX_H -#define XARCHUNIX_H +#pragma once -#include "XArch.h" +#include "arch/XArch.h" //! Lazy error message string evaluation for unix class XArchEvalUnix : public XArchEval { @@ -34,5 +33,3 @@ public: private: int m_errno; }; - -#endif diff --git a/src/lib/arch/vsnprintf.h b/src/lib/arch/vsnprintf.h index 4b848a55..00af88d2 100644 --- a/src/lib/arch/vsnprintf.h +++ b/src/lib/arch/vsnprintf.h @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "IArchString.h" +#include "arch/IArchString.h" #if HAVE_VSNPRINTF diff --git a/src/lib/arch/ArchConsoleWindows.cpp b/src/lib/arch/win32/ArchConsoleWindows.cpp similarity index 95% rename from src/lib/arch/ArchConsoleWindows.cpp rename to src/lib/arch/win32/ArchConsoleWindows.cpp index 0f422c85..d00ef4a4 100644 --- a/src/lib/arch/ArchConsoleWindows.cpp +++ b/src/lib/arch/win32/ArchConsoleWindows.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CArchConsoleWindows.h" +#include "arch/win32/ArchConsoleWindows.h" CArchConsoleWindows::CArchConsoleWindows() { } diff --git a/src/lib/arch/ArchConsoleWindows.h b/src/lib/arch/win32/ArchConsoleWindows.h similarity index 96% rename from src/lib/arch/ArchConsoleWindows.h rename to src/lib/arch/win32/ArchConsoleWindows.h index 8cdbe9f0..2db1ae8d 100644 --- a/src/lib/arch/ArchConsoleWindows.h +++ b/src/lib/arch/win32/ArchConsoleWindows.h @@ -18,7 +18,7 @@ #pragma once -#include "CArchConsoleStd.h" +#include "arch/ArchConsoleStd.h" #define ARCH_CONSOLE CArchConsoleWindows diff --git a/src/lib/arch/ArchDaemonWindows.cpp b/src/lib/arch/win32/ArchDaemonWindows.cpp similarity index 99% rename from src/lib/arch/ArchDaemonWindows.cpp rename to src/lib/arch/win32/ArchDaemonWindows.cpp index 7884b2e8..91a202ed 100644 --- a/src/lib/arch/ArchDaemonWindows.cpp +++ b/src/lib/arch/win32/ArchDaemonWindows.cpp @@ -16,11 +16,12 @@ * along with this program. If not, see . */ -#include "CArchDaemonWindows.h" -#include "CArch.h" -#include "CArchMiscWindows.h" -#include "XArchWindows.h" -#include "stdvector.h" +#include "arch/win32/ArchDaemonWindows.h" +#include "arch/win32/ArchMiscWindows.h" +#include "arch/win32/XArchWindows.h" +#include "arch/Arch.h" +#include "common/stdvector.h" + #include // diff --git a/src/lib/arch/ArchDaemonWindows.h b/src/lib/arch/win32/ArchDaemonWindows.h similarity index 96% rename from src/lib/arch/ArchDaemonWindows.h rename to src/lib/arch/win32/ArchDaemonWindows.h index 2cc8af8d..2af9785b 100644 --- a/src/lib/arch/ArchDaemonWindows.h +++ b/src/lib/arch/win32/ArchDaemonWindows.h @@ -16,15 +16,14 @@ * along with this program. If not, see . */ -#ifndef CARCHDAEMONWINDOWS_H -#define CARCHDAEMONWINDOWS_H +#pragma once + +#include "arch/IArchDaemon.h" +#include "arch/IArchMultithread.h" +#include "common/stdstring.h" #define WIN32_LEAN_AND_MEAN - -#include "IArchDaemon.h" -#include "IArchMultithread.h" -#include "stdstring.h" -#include +#include #include #define ARCH_DAEMON CArchDaemonWindows @@ -156,5 +155,3 @@ static const TCHAR* const g_daemonKeyPath[] = { _T("Service"), NULL }; - -#endif diff --git a/src/lib/arch/ArchFileWindows.cpp b/src/lib/arch/win32/ArchFileWindows.cpp similarity index 97% rename from src/lib/arch/ArchFileWindows.cpp rename to src/lib/arch/win32/ArchFileWindows.cpp index c7a506d7..d710ad82 100644 --- a/src/lib/arch/ArchFileWindows.cpp +++ b/src/lib/arch/win32/ArchFileWindows.cpp @@ -16,8 +16,10 @@ * along with this program. If not, see . */ -#include "CArchFileWindows.h" -#include +#include "arch/win32/ArchFileWindows.h" + +#define WIN32_LEAN_AND_MEAN +#include #include #include #include diff --git a/src/lib/arch/ArchFileWindows.h b/src/lib/arch/win32/ArchFileWindows.h similarity index 93% rename from src/lib/arch/ArchFileWindows.h rename to src/lib/arch/win32/ArchFileWindows.h index 0f476356..e4f7b326 100644 --- a/src/lib/arch/ArchFileWindows.h +++ b/src/lib/arch/win32/ArchFileWindows.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CARCHFILEWINDOWS_H -#define CARCHFILEWINDOWS_H +#pragma once -#include "IArchFile.h" +#include "arch/IArchFile.h" #define ARCH_FILE CArchFileWindows @@ -36,5 +35,3 @@ public: virtual std::string concatPath(const std::string& prefix, const std::string& suffix); }; - -#endif diff --git a/src/lib/arch/ArchInternetWindows.cpp b/src/lib/arch/win32/ArchInternetWindows.cpp similarity index 96% rename from src/lib/arch/ArchInternetWindows.cpp rename to src/lib/arch/win32/ArchInternetWindows.cpp index f716fd77..bf35ab2c 100644 --- a/src/lib/arch/ArchInternetWindows.cpp +++ b/src/lib/arch/win32/ArchInternetWindows.cpp @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -#include "CArchInternetWindows.h" -#include "CArch.h" -#include "Version.h" -#include "XArchWindows.h" +#include "arch/win32/ArchInternetWindows.h" +#include "arch/win32/XArchWindows.h" +#include "arch/Arch.h" +#include "common/Version.h" #include #include diff --git a/src/lib/arch/ArchInternetWindows.h b/src/lib/arch/win32/ArchInternetWindows.h similarity index 97% rename from src/lib/arch/ArchInternetWindows.h rename to src/lib/arch/win32/ArchInternetWindows.h index 1f9cfca6..01fc9cbd 100644 --- a/src/lib/arch/ArchInternetWindows.h +++ b/src/lib/arch/win32/ArchInternetWindows.h @@ -19,7 +19,7 @@ #define ARCH_INTERNET CArchInternetWindows -#include "CString.h" +#include "base/String.h" class CArchInternetWindows { public: diff --git a/src/lib/arch/ArchLogWindows.cpp b/src/lib/arch/win32/ArchLogWindows.cpp similarity index 96% rename from src/lib/arch/ArchLogWindows.cpp rename to src/lib/arch/win32/ArchLogWindows.cpp index 3f756fde..6919b779 100644 --- a/src/lib/arch/ArchLogWindows.cpp +++ b/src/lib/arch/win32/ArchLogWindows.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "CArchLogWindows.h" -#include "CArchMiscWindows.h" +#include "arch/win32/ArchLogWindows.h" +#include "arch/win32/ArchMiscWindows.h" + #include // diff --git a/src/lib/arch/ArchLogWindows.h b/src/lib/arch/win32/ArchLogWindows.h similarity index 91% rename from src/lib/arch/ArchLogWindows.h rename to src/lib/arch/win32/ArchLogWindows.h index b3f490a8..8fe362c8 100644 --- a/src/lib/arch/ArchLogWindows.h +++ b/src/lib/arch/win32/ArchLogWindows.h @@ -16,13 +16,12 @@ * along with this program. If not, see . */ -#ifndef CARCHLOGWINDOWS_H -#define CARCHLOGWINDOWS_H +#pragma once + +#include "arch/IArchLog.h" #define WIN32_LEAN_AND_MEAN - -#include "IArchLog.h" -#include +#include #define ARCH_LOG CArchLogWindows @@ -41,5 +40,3 @@ public: private: HANDLE m_eventLog; }; - -#endif diff --git a/src/lib/arch/ArchMiscWindows.cpp b/src/lib/arch/win32/ArchMiscWindows.cpp similarity index 98% rename from src/lib/arch/ArchMiscWindows.cpp rename to src/lib/arch/win32/ArchMiscWindows.cpp index 3e61d75b..307f6a90 100644 --- a/src/lib/arch/ArchMiscWindows.cpp +++ b/src/lib/arch/win32/ArchMiscWindows.cpp @@ -16,15 +16,15 @@ * along with this program. If not, see . */ -#include "CArchMiscWindows.h" -#include "CArchDaemonWindows.h" -#include "CLog.h" +#include "arch/win32/ArchMiscWindows.h" +#include "arch/win32/ArchDaemonWindows.h" +#include "base/Log.h" +#include "common/Version.h" #include #pragma warning(disable: 4099) #include #pragma warning(default: 4099) -#include "Version.h" // parent process name for services in Vista #define SERVICE_LAUNCHER "services.exe" diff --git a/src/lib/arch/ArchMiscWindows.h b/src/lib/arch/win32/ArchMiscWindows.h similarity index 97% rename from src/lib/arch/ArchMiscWindows.h rename to src/lib/arch/win32/ArchMiscWindows.h index 8d31cd98..3b97a271 100644 --- a/src/lib/arch/ArchMiscWindows.h +++ b/src/lib/arch/win32/ArchMiscWindows.h @@ -16,17 +16,16 @@ * along with this program. If not, see . */ -#ifndef CARCHMISCWINDOWS_H -#define CARCHMISCWINDOWS_H +#pragma once + +#include "common/common.h" +#include "common/stdstring.h" +#include "common/stdset.h" +#include "base/String.h" #define WIN32_LEAN_AND_MEAN - -#include "common.h" -#include "stdstring.h" -#include "stdset.h" -#include +#include #include -#include "CString.h" //! Miscellaneous win32 functions. class CArchMiscWindows { @@ -214,5 +213,3 @@ private: static HICON s_smallIcon; static HINSTANCE s_instanceWin32; }; - -#endif diff --git a/src/lib/arch/ArchMultithreadWindows.cpp b/src/lib/arch/win32/ArchMultithreadWindows.cpp similarity index 99% rename from src/lib/arch/ArchMultithreadWindows.cpp rename to src/lib/arch/win32/ArchMultithreadWindows.cpp index 23006edf..de374b61 100644 --- a/src/lib/arch/ArchMultithreadWindows.cpp +++ b/src/lib/arch/win32/ArchMultithreadWindows.cpp @@ -20,9 +20,10 @@ # error multithreading compile option is required #endif -#include "CArchMultithreadWindows.h" -#include "CArch.h" -#include "XArch.h" +#include "arch/win32/ArchMultithreadWindows.h" +#include "arch/Arch.h" +#include "arch/XArch.h" + #include // diff --git a/src/lib/arch/ArchMultithreadWindows.h b/src/lib/arch/win32/ArchMultithreadWindows.h similarity index 95% rename from src/lib/arch/ArchMultithreadWindows.h rename to src/lib/arch/win32/ArchMultithreadWindows.h index b7980c76..35bf7458 100644 --- a/src/lib/arch/ArchMultithreadWindows.h +++ b/src/lib/arch/win32/ArchMultithreadWindows.h @@ -16,14 +16,13 @@ * along with this program. If not, see . */ -#ifndef CARCHMULTITHREADWINDOWS_H -#define CARCHMULTITHREADWINDOWS_H +#pragma once + +#include "arch/IArchMultithread.h" +#include "common/stdlist.h" #define WIN32_LEAN_AND_MEAN - -#include "IArchMultithread.h" -#include "stdlist.h" -#include +#include #define ARCH_MULTITHREAD CArchMultithreadWindows @@ -115,5 +114,3 @@ private: SignalFunc m_signalFunc[kNUM_SIGNALS]; void* m_signalUserData[kNUM_SIGNALS]; }; - -#endif diff --git a/src/lib/arch/ArchNetworkWinsock.cpp b/src/lib/arch/win32/ArchNetworkWinsock.cpp similarity index 99% rename from src/lib/arch/ArchNetworkWinsock.cpp rename to src/lib/arch/win32/ArchNetworkWinsock.cpp index ee23219a..0cdca1e9 100644 --- a/src/lib/arch/ArchNetworkWinsock.cpp +++ b/src/lib/arch/win32/ArchNetworkWinsock.cpp @@ -16,12 +16,12 @@ * along with this program. If not, see . */ +#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 static const int s_family[] = { diff --git a/src/lib/arch/ArchNetworkWinsock.h b/src/lib/arch/win32/ArchNetworkWinsock.h similarity index 95% rename from src/lib/arch/ArchNetworkWinsock.h rename to src/lib/arch/win32/ArchNetworkWinsock.h index e0066363..8866304b 100644 --- a/src/lib/arch/ArchNetworkWinsock.h +++ b/src/lib/arch/win32/ArchNetworkWinsock.h @@ -16,18 +16,17 @@ * along with this program. If not, see . */ -#ifndef CARCHNETWORKWINSOCK_H -#define CARCHNETWORKWINSOCK_H - -#define WIN32_LEAN_AND_MEAN +#pragma once // declare no functions in winsock2 #define INCL_WINSOCK_API_PROTOTYPES 0 #define INCL_WINSOCK_API_TYPEDEFS 0 -#include "IArchNetwork.h" -#include "IArchMultithread.h" -#include +#include "arch/IArchNetwork.h" +#include "arch/IArchMultithread.h" + +#define WIN32_LEAN_AND_MEAN +#include #include #include @@ -105,5 +104,3 @@ private: CArchMutex m_mutex; CEventList m_unblockEvents; }; - -#endif diff --git a/src/lib/arch/ArchPluginWindows.cpp b/src/lib/arch/win32/ArchPluginWindows.cpp similarity index 94% rename from src/lib/arch/ArchPluginWindows.cpp rename to src/lib/arch/win32/ArchPluginWindows.cpp index a691e5e9..b4dd7b5c 100644 --- a/src/lib/arch/ArchPluginWindows.cpp +++ b/src/lib/arch/win32/ArchPluginWindows.cpp @@ -16,12 +16,12 @@ * along with this program. If not, see . */ -#include "CArchPluginWindows.h" -#include "XArchWindows.h" -#include "CLog.h" -#include "IEventQueue.h" -#include "CEvent.h" -#include "CScreen.h" +#include "arch/win32/ArchPluginWindows.h" +#include "arch/win32/XArchWindows.h" +#include "base/Log.h" +#include "base/IEventQueue.h" +#include "base/Event.h" +#include "synergy/Screen.h" #define WIN32_LEAN_AND_MEAN #include diff --git a/src/lib/arch/ArchPluginWindows.h b/src/lib/arch/win32/ArchPluginWindows.h similarity index 96% rename from src/lib/arch/ArchPluginWindows.h rename to src/lib/arch/win32/ArchPluginWindows.h index 13169cd5..dace6b36 100644 --- a/src/lib/arch/ArchPluginWindows.h +++ b/src/lib/arch/win32/ArchPluginWindows.h @@ -18,8 +18,9 @@ #pragma once -#include "IArchPlugin.h" -#include "CString.h" +#include "arch/IArchPlugin.h" +#include "base/String.h" + #include #define ARCH_PLUGIN CArchPluginWindows diff --git a/src/lib/arch/ArchSleepWindows.cpp b/src/lib/arch/win32/ArchSleepWindows.cpp similarity index 93% rename from src/lib/arch/ArchSleepWindows.cpp rename to src/lib/arch/win32/ArchSleepWindows.cpp index dce14e72..d299cf15 100644 --- a/src/lib/arch/ArchSleepWindows.cpp +++ b/src/lib/arch/win32/ArchSleepWindows.cpp @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -#include "CArchSleepWindows.h" -#include "CArch.h" -#include "CArchMultithreadWindows.h" +#include "arch/win32/ArchSleepWindows.h" +#include "arch/Arch.h" +#include "arch/win32/ArchMultithreadWindows.h" // // CArchSleepWindows diff --git a/src/lib/arch/ArchSleepWindows.h b/src/lib/arch/win32/ArchSleepWindows.h similarity index 91% rename from src/lib/arch/ArchSleepWindows.h rename to src/lib/arch/win32/ArchSleepWindows.h index 4c68f29c..f4004947 100644 --- a/src/lib/arch/ArchSleepWindows.h +++ b/src/lib/arch/win32/ArchSleepWindows.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CARCHSLEEPWINDOWS_H -#define CARCHSLEEPWINDOWS_H +#pragma once -#include "IArchSleep.h" +#include "arch/IArchSleep.h" #define ARCH_SLEEP CArchSleepWindows @@ -32,5 +31,3 @@ public: // IArchSleep overrides virtual void sleep(double timeout); }; - -#endif diff --git a/src/lib/arch/ArchStringWindows.cpp b/src/lib/arch/win32/ArchStringWindows.cpp similarity index 89% rename from src/lib/arch/ArchStringWindows.cpp rename to src/lib/arch/win32/ArchStringWindows.cpp index 981c0126..e8bd168d 100644 --- a/src/lib/arch/ArchStringWindows.cpp +++ b/src/lib/arch/win32/ArchStringWindows.cpp @@ -16,20 +16,20 @@ * along with this program. If not, see . */ -#define WIN32_LEAN_AND_MEAN +#include "arch/win32/ArchStringWindows.h" -#include "CArchStringWindows.h" -#include +#define WIN32_LEAN_AND_MEAN +#include #include // // CArchStringWindows // -#include "CMultibyte.h" +#include "arch/multibyte.h" #define HAVE_VSNPRINTF 1 #define ARCH_VSNPRINTF _vsnprintf -#include "vsnprintf.h" +#include "arch/vsnprintf.h" CArchStringWindows::CArchStringWindows() { diff --git a/src/lib/arch/ArchStringWindows.h b/src/lib/arch/win32/ArchStringWindows.h similarity index 91% rename from src/lib/arch/ArchStringWindows.h rename to src/lib/arch/win32/ArchStringWindows.h index 6d068691..13c11539 100644 --- a/src/lib/arch/ArchStringWindows.h +++ b/src/lib/arch/win32/ArchStringWindows.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CARCHSTRINGWINDOWS_H -#define CARCHSTRINGWINDOWS_H +#pragma once -#include "IArchString.h" +#include "arch/IArchString.h" #define ARCH_STRING CArchStringWindows @@ -33,5 +32,3 @@ public: virtual EWideCharEncoding getWideCharEncoding(); }; - -#endif diff --git a/src/lib/arch/ArchSystemWindows.cpp b/src/lib/arch/win32/ArchSystemWindows.cpp similarity index 97% rename from src/lib/arch/ArchSystemWindows.cpp rename to src/lib/arch/win32/ArchSystemWindows.cpp index c7771719..0f739b86 100644 --- a/src/lib/arch/ArchSystemWindows.cpp +++ b/src/lib/arch/win32/ArchSystemWindows.cpp @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -#include "CArchSystemWindows.h" -#include "CArchMiscWindows.h" -#include "XArchWindows.h" +#include "arch/win32/ArchSystemWindows.h" +#include "arch/win32/ArchMiscWindows.h" +#include "arch/win32/XArchWindows.h" #include "tchar.h" #include diff --git a/src/lib/arch/ArchSystemWindows.h b/src/lib/arch/win32/ArchSystemWindows.h similarity index 93% rename from src/lib/arch/ArchSystemWindows.h rename to src/lib/arch/win32/ArchSystemWindows.h index 7bd0a0a1..324165a5 100644 --- a/src/lib/arch/ArchSystemWindows.h +++ b/src/lib/arch/win32/ArchSystemWindows.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CARCHSYSTEMWINDOWS_H -#define CARCHSYSTEMWINDOWS_H +#pragma once -#include "IArchSystem.h" +#include "arch/IArchSystem.h" #define ARCH_SYSTEM CArchSystemWindows @@ -37,5 +36,3 @@ public: bool isWOW64() const; }; - -#endif diff --git a/src/lib/arch/ArchTaskBarWindows.cpp b/src/lib/arch/win32/ArchTaskBarWindows.cpp similarity index 98% rename from src/lib/arch/ArchTaskBarWindows.cpp rename to src/lib/arch/win32/ArchTaskBarWindows.cpp index 2ff67ad8..9c44d985 100644 --- a/src/lib/arch/ArchTaskBarWindows.cpp +++ b/src/lib/arch/win32/ArchTaskBarWindows.cpp @@ -16,14 +16,15 @@ * along with this program. If not, see . */ -#include "CArchTaskBarWindows.h" -#include "CArchMiscWindows.h" -#include "IArchTaskBarReceiver.h" -#include "CArch.h" -#include "XArch.h" +#include "arch/win32/ArchTaskBarWindows.h" +#include "arch/win32/ArchMiscWindows.h" +#include "arch/IArchTaskBarReceiver.h" +#include "arch/Arch.h" +#include "arch/XArch.h" +#include "synergy/win32/AppUtilWindows.h" + #include #include -#include "CAppUtilWindows.h" static const UINT kAddReceiver = WM_USER + 10; static const UINT kRemoveReceiver = WM_USER + 11; diff --git a/src/lib/arch/ArchTaskBarWindows.h b/src/lib/arch/win32/ArchTaskBarWindows.h similarity index 93% rename from src/lib/arch/ArchTaskBarWindows.h rename to src/lib/arch/win32/ArchTaskBarWindows.h index 2b21c84a..8fa9e406 100644 --- a/src/lib/arch/ArchTaskBarWindows.h +++ b/src/lib/arch/win32/ArchTaskBarWindows.h @@ -16,16 +16,15 @@ * along with this program. If not, see . */ -#ifndef CARCHTASKBARWINDOWS_H -#define CARCHTASKBARWINDOWS_H +#pragma once + +#include "arch/IArchTaskBar.h" +#include "arch/IArchMultithread.h" +#include "common/stdmap.h" +#include "common/stdvector.h" #define WIN32_LEAN_AND_MEAN - -#include "IArchTaskBar.h" -#include "IArchMultithread.h" -#include "stdmap.h" -#include "stdvector.h" -#include +#include #define ARCH_TASKBAR CArchTaskBarWindows @@ -113,5 +112,3 @@ private: CDialogs m_dialogs; CDialogs m_addedDialogs; }; - -#endif diff --git a/src/lib/arch/ArchTaskBarXWindows.cpp b/src/lib/arch/win32/ArchTaskBarXWindows.cpp similarity index 96% rename from src/lib/arch/ArchTaskBarXWindows.cpp rename to src/lib/arch/win32/ArchTaskBarXWindows.cpp index bba1f835..523bfbb8 100644 --- a/src/lib/arch/ArchTaskBarXWindows.cpp +++ b/src/lib/arch/win32/ArchTaskBarXWindows.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CArchTaskBarXWindows.h" +#include "arch/win32/ArchTaskBarXWindows.h" // // CArchTaskBarXWindows diff --git a/src/lib/arch/ArchTaskBarXWindows.h b/src/lib/arch/win32/ArchTaskBarXWindows.h similarity index 92% rename from src/lib/arch/ArchTaskBarXWindows.h rename to src/lib/arch/win32/ArchTaskBarXWindows.h index d80e1fe1..e593c110 100644 --- a/src/lib/arch/ArchTaskBarXWindows.h +++ b/src/lib/arch/win32/ArchTaskBarXWindows.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CARCHTASKBARXWINDOWS_H -#define CARCHTASKBARXWINDOWS_H +#pragma once -#include "IArchTaskBar.h" +#include "arch/IArchTaskBar.h" #define ARCH_TASKBAR CArchTaskBarXWindows @@ -34,5 +33,3 @@ public: virtual void removeReceiver(IArchTaskBarReceiver*); virtual void updateReceiver(IArchTaskBarReceiver*); }; - -#endif diff --git a/src/lib/arch/ArchTimeWindows.cpp b/src/lib/arch/win32/ArchTimeWindows.cpp similarity index 75% rename from src/lib/arch/ArchTimeWindows.cpp rename to src/lib/arch/win32/ArchTimeWindows.cpp index 9899d2a4..3fe6f9d5 100644 --- a/src/lib/arch/ArchTimeWindows.cpp +++ b/src/lib/arch/win32/ArchTimeWindows.cpp @@ -16,23 +16,22 @@ * along with this program. If not, see . */ -// avoid getting a lot a crap from mmsystem.h that we don't need -#define MMNODRV // Installable driver support -#define MMNOSOUND // Sound support -#define MMNOWAVE // Waveform support -#define MMNOMIDI // MIDI support -#define MMNOAUX // Auxiliary audio support -#define MMNOMIXER // Mixer support -#define MMNOJOY // Joystick support -#define MMNOMCI // MCI support -#define MMNOMMIO // Multimedia file I/O support -#define MMNOMMSYSTEM // General MMSYSTEM functions +#include "arch/win32/ArchTimeWindows.h" #define WIN32_LEAN_AND_MEAN +#include -#include "CArchTimeWindows.h" -#include -#include +#define MMNODRV // Disable: Installable driver support +#define MMNOSOUND // Disable: Sound support +#define MMNOWAVE // Disable: Waveform support +#define MMNOMIDI // Disable: MIDI support +#define MMNOAUX // Disable: Auxiliary audio support +#define MMNOMIXER // Disable: Mixer support +#define MMNOJOY // Disable: Joystick support +#define MMNOMCI // Disable: MCI support +#define MMNOMMIO // Disable: Multimedia file I/O support +#define MMNOMMSYSTEM // Disable: General MMSYSTEM functions +#include typedef WINMMAPI DWORD (WINAPI *PTimeGetTime)(void); diff --git a/src/lib/arch/ArchTimeWindows.h b/src/lib/arch/win32/ArchTimeWindows.h similarity index 91% rename from src/lib/arch/ArchTimeWindows.h rename to src/lib/arch/win32/ArchTimeWindows.h index defcba2d..2b98d237 100644 --- a/src/lib/arch/ArchTimeWindows.h +++ b/src/lib/arch/win32/ArchTimeWindows.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CARCHTIMEWINDOWS_H -#define CARCHTIMEWINDOWS_H +#pragma once -#include "IArchTime.h" +#include "arch/IArchTime.h" #define ARCH_TIME CArchTimeWindows @@ -32,5 +31,3 @@ public: // IArchTime overrides virtual double time(); }; - -#endif diff --git a/src/lib/arch/XArchWindows.cpp b/src/lib/arch/win32/XArchWindows.cpp similarity index 98% rename from src/lib/arch/XArchWindows.cpp rename to src/lib/arch/win32/XArchWindows.cpp index 2d6c5885..e37e1a5a 100644 --- a/src/lib/arch/XArchWindows.cpp +++ b/src/lib/arch/win32/XArchWindows.cpp @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#include "XArchWindows.h" -#include "CArchNetworkWinsock.h" +#include "arch/win32/XArchWindows.h" +#include "arch/win32/ArchNetworkWinsock.h" // // XArchEvalWindows diff --git a/src/lib/arch/XArchWindows.h b/src/lib/arch/win32/XArchWindows.h similarity index 93% rename from src/lib/arch/XArchWindows.h rename to src/lib/arch/win32/XArchWindows.h index c85765ea..ca92c15b 100644 --- a/src/lib/arch/XArchWindows.h +++ b/src/lib/arch/win32/XArchWindows.h @@ -16,13 +16,12 @@ * along with this program. If not, see . */ -#ifndef XARCHWINDOWS_H -#define XARCHWINDOWS_H +#pragma once + +#include "arch/XArch.h" #define WIN32_LEAN_AND_MEAN - -#include "XArch.h" -#include +#include //! Lazy error message string evaluation for windows class XArchEvalWindows : public XArchEval { @@ -52,5 +51,3 @@ public: private: int m_errno; }; - -#endif diff --git a/src/lib/base/CMakeLists.txt b/src/lib/base/CMakeLists.txt index ba708664..210c5dde 100644 --- a/src/lib/base/CMakeLists.txt +++ b/src/lib/base/CMakeLists.txt @@ -22,16 +22,12 @@ if (SYNERGY_ADD_HEADERS) endif() include_directories( - ../arch - ../common - ../mt - ../synergy + ../ ) if (UNIX) include_directories( ../../.. - ../base ) endif() diff --git a/src/lib/base/ELevel.h b/src/lib/base/ELevel.h index 49ec9638..de311312 100644 --- a/src/lib/base/ELevel.h +++ b/src/lib/base/ELevel.h @@ -16,8 +16,7 @@ * along with this program. If not, see . */ -#ifndef ELEVEL_H -#define ELEVEL_H +#pragma once //! Log levels /*! @@ -37,5 +36,3 @@ enum ELevel { kDEBUG4, //!< For verbosity +4 debugging messages kDEBUG5 //!< For verbosity +5 debugging messages }; - -#endif diff --git a/src/lib/base/Event.cpp b/src/lib/base/Event.cpp index ec2df657..7e659b65 100644 --- a/src/lib/base/Event.cpp +++ b/src/lib/base/Event.cpp @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#include "CEvent.h" -#include "CEventQueue.h" +#include "base/Event.h" +#include "base/EventQueue.h" // // CEvent diff --git a/src/lib/base/Event.h b/src/lib/base/Event.h index e539330c..fd9c48c9 100644 --- a/src/lib/base/Event.h +++ b/src/lib/base/Event.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef CEVENT_H -#define CEVENT_H +#pragma once -#include "BasicTypes.h" -#include "stdmap.h" +#include "common/basic_types.h" +#include "common/stdmap.h" class CEventData { public: @@ -125,5 +124,3 @@ private: Flags m_flags; CEventData* m_dataObject; }; - -#endif diff --git a/src/lib/base/EventQueue.cpp b/src/lib/base/EventQueue.cpp index cb2a50c0..2afa2fb0 100644 --- a/src/lib/base/EventQueue.cpp +++ b/src/lib/base/EventQueue.cpp @@ -16,13 +16,14 @@ * along with this program. If not, see . */ -#include "CEventQueue.h" -#include "CLog.h" -#include "CSimpleEventQueueBuffer.h" -#include "CStopwatch.h" -#include "IEventJob.h" -#include "CArch.h" -#include "CEventTypes.h" +#include "base/EventQueue.h" + +#include "arch/Arch.h" +#include "base/Log.h" +#include "base/SimpleEventQueueBuffer.h" +#include "base/Stopwatch.h" +#include "base/IEventJob.h" +#include "base/EventTypes.h" EVENT_TYPE_ACCESSOR(CClient) EVENT_TYPE_ACCESSOR(IStream) diff --git a/src/lib/base/EventQueue.h b/src/lib/base/EventQueue.h index fbe5a74c..3509d9d0 100644 --- a/src/lib/base/EventQueue.h +++ b/src/lib/base/EventQueue.h @@ -16,16 +16,15 @@ * along with this program. If not, see . */ -#ifndef CEVENTQUEUE_H -#define CEVENTQUEUE_H +#pragma once -#include "IEventQueue.h" -#include "CEvent.h" -#include "CPriorityQueue.h" -#include "CStopwatch.h" -#include "IArchMultithread.h" -#include "stdmap.h" -#include "stdset.h" +#include "base/IEventQueue.h" +#include "base/Event.h" +#include "base/PriorityQueue.h" +#include "base/Stopwatch.h" +#include "arch/IArchMultithread.h" +#include "common/stdmap.h" +#include "common/stdset.h" //! Event queue /*! @@ -182,5 +181,3 @@ CEventQueue::for##type_() { \ } \ return *m_typesFor##type_; \ } - -#endif diff --git a/src/lib/base/EventTypes.cpp b/src/lib/base/EventTypes.cpp index 1e72b2ab..312b3f9c 100644 --- a/src/lib/base/EventTypes.cpp +++ b/src/lib/base/EventTypes.cpp @@ -15,8 +15,9 @@ * along with this program. If not, see . */ -#include "CEventTypes.h" -#include "IEventQueue.h" +#include "base/EventTypes.h" +#include "base/IEventQueue.h" + #include #include diff --git a/src/lib/base/EventTypes.h b/src/lib/base/EventTypes.h index a8748508..5c4d73bc 100644 --- a/src/lib/base/EventTypes.h +++ b/src/lib/base/EventTypes.h @@ -17,7 +17,7 @@ #pragma once -#include "CEvent.h" +#include "base/Event.h" class IEventQueue; diff --git a/src/lib/base/FunctionEventJob.cpp b/src/lib/base/FunctionEventJob.cpp index 21f0e308..923990a4 100644 --- a/src/lib/base/FunctionEventJob.cpp +++ b/src/lib/base/FunctionEventJob.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CFunctionEventJob.h" +#include "base/FunctionEventJob.h" // // CFunctionEventJob diff --git a/src/lib/base/FunctionEventJob.h b/src/lib/base/FunctionEventJob.h index 2c3f9a6e..4612bf05 100644 --- a/src/lib/base/FunctionEventJob.h +++ b/src/lib/base/FunctionEventJob.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CFUNCTIONEVENTJOB_H -#define CFUNCTIONEVENTJOB_H +#pragma once -#include "IEventJob.h" +#include "base/IEventJob.h" //! Use a function as an event job /*! @@ -38,5 +37,3 @@ private: void (*m_func)(const CEvent&, void*); void* m_arg; }; - -#endif diff --git a/src/lib/base/FunctionJob.cpp b/src/lib/base/FunctionJob.cpp index 1296133b..7190c2e5 100644 --- a/src/lib/base/FunctionJob.cpp +++ b/src/lib/base/FunctionJob.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CFunctionJob.h" +#include "base/FunctionJob.h" // // CFunctionJob diff --git a/src/lib/base/FunctionJob.h b/src/lib/base/FunctionJob.h index dcdbf5b0..3fa1bf38 100644 --- a/src/lib/base/FunctionJob.h +++ b/src/lib/base/FunctionJob.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CFUNCTIONJOB_H -#define CFUNCTIONJOB_H +#pragma once -#include "IJob.h" +#include "base/IJob.h" //! Use a function as a job /*! @@ -38,5 +37,3 @@ private: void (*m_func)(void*); void* m_arg; }; - -#endif diff --git a/src/lib/base/IEventJob.h b/src/lib/base/IEventJob.h index 6dafbb1a..0a3adaf4 100644 --- a/src/lib/base/IEventJob.h +++ b/src/lib/base/IEventJob.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef IEVENTJOB_H -#define IEVENTJOB_H +#pragma once -#include "IInterface.h" +#include "common/IInterface.h" class CEvent; @@ -32,5 +31,3 @@ public: //! Run the job virtual void run(const CEvent&) = 0; }; - -#endif diff --git a/src/lib/base/IEventQueue.h b/src/lib/base/IEventQueue.h index dfdd7eb9..41d870ff 100644 --- a/src/lib/base/IEventQueue.h +++ b/src/lib/base/IEventQueue.h @@ -16,12 +16,11 @@ * along with this program. If not, see . */ -#ifndef IEVENTQUEUE_H -#define IEVENTQUEUE_H +#pragma once -#include "IInterface.h" -#include "CEvent.h" -#include "CString.h" +#include "common/IInterface.h" +#include "base/Event.h" +#include "base/String.h" class IEventJob; class IEventQueueBuffer; @@ -239,5 +238,3 @@ public: virtual IPrimaryScreenEvents& forIPrimaryScreen() = 0; virtual IScreenEvents& forIScreen() = 0; }; - -#endif diff --git a/src/lib/base/IEventQueueBuffer.h b/src/lib/base/IEventQueueBuffer.h index 8e3c5224..d67c8bce 100644 --- a/src/lib/base/IEventQueueBuffer.h +++ b/src/lib/base/IEventQueueBuffer.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef IEVENTQUEUEBUFFER_H -#define IEVENTQUEUEBUFFER_H +#pragma once -#include "IInterface.h" -#include "BasicTypes.h" +#include "common/IInterface.h" +#include "common/basic_types.h" class CEvent; class CEventQueueTimer; @@ -100,5 +99,3 @@ public: //@} }; - -#endif diff --git a/src/lib/base/IJob.h b/src/lib/base/IJob.h index c77397bd..917b9e7a 100644 --- a/src/lib/base/IJob.h +++ b/src/lib/base/IJob.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef IJOB_H -#define IJOB_H +#pragma once -#include "IInterface.h" +#include "common/IInterface.h" //! Job interface /*! @@ -30,5 +29,3 @@ public: //! Run the job virtual void run() = 0; }; - -#endif diff --git a/src/lib/base/ILogOutputter.h b/src/lib/base/ILogOutputter.h index a5590e7f..f6adbd99 100644 --- a/src/lib/base/ILogOutputter.h +++ b/src/lib/base/ILogOutputter.h @@ -16,12 +16,11 @@ * along with this program. If not, see . */ -#ifndef ILOGOUTPUTTER_H -#define ILOGOUTPUTTER_H +#pragma once -#include "IInterface.h" -#include "CLog.h" -#include "ELevel.h" +#include "base/Log.h" +#include "base/ELevel.h" +#include "common/IInterface.h" //! Outputter interface /*! @@ -68,5 +67,3 @@ public: //@} }; - -#endif diff --git a/src/lib/base/Log.cpp b/src/lib/base/Log.cpp index e2974ea5..c666e516 100644 --- a/src/lib/base/Log.cpp +++ b/src/lib/base/Log.cpp @@ -16,13 +16,14 @@ * along with this program. If not, see . */ -#include "CLog.h" -#include "CString.h" -#include "CStringUtil.h" -#include "LogOutputters.h" -#include "CArch.h" -#include "Version.h" -#include "XArch.h" +#include "arch/Arch.h" +#include "arch/XArch.h" +#include "base/Log.h" +#include "base/String.h" +#include "base/StringUtil.h" +#include "base/log_outputters.h" +#include "common/Version.h" + #include #include #include diff --git a/src/lib/base/Log.h b/src/lib/base/Log.h index 1eb8c82b..bbcc742e 100644 --- a/src/lib/base/Log.h +++ b/src/lib/base/Log.h @@ -16,14 +16,14 @@ * along with this program. If not, see . */ -#ifndef CLOG_H -#define CLOG_H +#pragma once + +#include "arch/IArchMultithread.h" +#include "arch/Arch.h" +#include "common/common.h" +#include "common/stdlist.h" -#include "common.h" -#include "IArchMultithread.h" -#include "stdlist.h" #include -#include "CArch.h" #define CLOG (CLog::getInstance()) @@ -209,5 +209,3 @@ otherwise it expands to a call that doesn't. #define CLOG_DEBUG3 CLOG_TRACE "%z\070" #define CLOG_DEBUG4 CLOG_TRACE "%z\071" // char is '9' #define CLOG_DEBUG5 CLOG_TRACE "%z\072" // char is ':' - -#endif diff --git a/src/lib/base/PriorityQueue.h b/src/lib/base/PriorityQueue.h index 23f1c59a..9cefd49a 100644 --- a/src/lib/base/PriorityQueue.h +++ b/src/lib/base/PriorityQueue.h @@ -16,10 +16,10 @@ * along with this program. If not, see . */ -#ifndef CPRIORITYQUEUE_H -#define CPRIORITYQUEUE_H +#pragma once + +#include "common/stdvector.h" -#include "stdvector.h" #include #include @@ -136,5 +136,3 @@ private: Container c; Compare comp; }; - -#endif diff --git a/src/lib/base/SimpleEventQueueBuffer.cpp b/src/lib/base/SimpleEventQueueBuffer.cpp index 5560ef99..407f8c68 100644 --- a/src/lib/base/SimpleEventQueueBuffer.cpp +++ b/src/lib/base/SimpleEventQueueBuffer.cpp @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -#include "CSimpleEventQueueBuffer.h" -#include "CStopwatch.h" -#include "CArch.h" +#include "base/SimpleEventQueueBuffer.h" +#include "base/Stopwatch.h" +#include "arch/Arch.h" // // CSimpleEventQueueBuffer diff --git a/src/lib/base/SimpleEventQueueBuffer.h b/src/lib/base/SimpleEventQueueBuffer.h index a5aa9ff8..5b28db9f 100644 --- a/src/lib/base/SimpleEventQueueBuffer.h +++ b/src/lib/base/SimpleEventQueueBuffer.h @@ -16,12 +16,11 @@ * along with this program. If not, see . */ -#ifndef CSIMPLEEVENTQUEUEBUFFER_H -#define CSIMPLEEVENTQUEUEBUFFER_H +#pragma once -#include "IEventQueueBuffer.h" -#include "IArchMultithread.h" -#include "stddeque.h" +#include "base/IEventQueueBuffer.h" +#include "arch/IArchMultithread.h" +#include "common/stddeque.h" //! In-memory event queue buffer /*! @@ -57,5 +56,3 @@ public: CEventQueueTimer() { } virtual ~CEventQueueTimer() { } }; - -#endif diff --git a/src/lib/base/Stopwatch.cpp b/src/lib/base/Stopwatch.cpp index f76f8088..43462a57 100644 --- a/src/lib/base/Stopwatch.cpp +++ b/src/lib/base/Stopwatch.cpp @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#include "CStopwatch.h" -#include "CArch.h" +#include "base/Stopwatch.h" +#include "arch/Arch.h" // // CStopwatch diff --git a/src/lib/base/Stopwatch.h b/src/lib/base/Stopwatch.h index c993e215..fa165630 100644 --- a/src/lib/base/Stopwatch.h +++ b/src/lib/base/Stopwatch.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CSTOPWATCH_H -#define CSTOPWATCH_H +#pragma once -#include "common.h" +#include "common/common.h" //! A timer class /*! @@ -108,5 +107,3 @@ private: bool m_triggered; bool m_stopped; }; - -#endif diff --git a/src/lib/base/String.h b/src/lib/base/String.h index f27db1e2..eae7c2fc 100644 --- a/src/lib/base/String.h +++ b/src/lib/base/String.h @@ -16,14 +16,10 @@ * along with this program. If not, see . */ -#ifndef CSTRING_H -#define CSTRING_H +#pragma once -#include "common.h" -#include "stdstring.h" +#include "common/common.h" +#include "common/stdstring.h" // use standard C++ string class for our string class typedef std::string CString; - -#endif - diff --git a/src/lib/base/StringUtil.cpp b/src/lib/base/StringUtil.cpp index 3119dd26..56868da8 100644 --- a/src/lib/base/StringUtil.cpp +++ b/src/lib/base/StringUtil.cpp @@ -16,10 +16,11 @@ * along with this program. If not, see . */ -#include "CStringUtil.h" -#include "CArch.h" -#include "common.h" -#include "stdvector.h" +#include "base/StringUtil.h" +#include "arch/Arch.h" +#include "common/common.h" +#include "common/stdvector.h" + #include #include #include diff --git a/src/lib/base/StringUtil.h b/src/lib/base/StringUtil.h index d724d7b2..cf1213a8 100644 --- a/src/lib/base/StringUtil.h +++ b/src/lib/base/StringUtil.h @@ -16,10 +16,10 @@ * along with this program. If not, see . */ -#ifndef CSTRINGUTIL_H -#define CSTRINGUTIL_H +#pragma once + +#include "base/String.h" -#include "CString.h" #include //! String utilities @@ -76,6 +76,3 @@ public: const CString::value_type& b); }; }; - -#endif - diff --git a/src/lib/base/TMethodEventJob.h b/src/lib/base/TMethodEventJob.h index 0780c36c..83238f1d 100644 --- a/src/lib/base/TMethodEventJob.h +++ b/src/lib/base/TMethodEventJob.h @@ -16,8 +16,7 @@ * along with this program. If not, see . */ -#ifndef CMETHODEVENTJOB_H -#define CMETHODEVENTJOB_H +#pragma once #include "IEventJob.h" @@ -70,5 +69,3 @@ TMethodEventJob::run(const CEvent& event) (m_object->*m_method)(event, m_arg); } } - -#endif diff --git a/src/lib/base/TMethodJob.h b/src/lib/base/TMethodJob.h index 55f5b999..8c8bad30 100644 --- a/src/lib/base/TMethodJob.h +++ b/src/lib/base/TMethodJob.h @@ -16,8 +16,7 @@ * along with this program. If not, see . */ -#ifndef CMETHODJOB_H -#define CMETHODJOB_H +#pragma once #include "IJob.h" @@ -67,5 +66,3 @@ TMethodJob::run() (m_object->*m_method)(m_arg); } } - -#endif diff --git a/src/lib/base/Unicode.cpp b/src/lib/base/Unicode.cpp index 123b8d66..dabf3adb 100644 --- a/src/lib/base/Unicode.cpp +++ b/src/lib/base/Unicode.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "CUnicode.h" -#include "CArch.h" +#include "arch/Arch.h" +#include "base/Unicode.h" + #include // diff --git a/src/lib/base/Unicode.h b/src/lib/base/Unicode.h index a5efa584..83ef1a98 100644 --- a/src/lib/base/Unicode.h +++ b/src/lib/base/Unicode.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef CUNICODE_H -#define CUNICODE_H +#pragma once -#include "CString.h" -#include "BasicTypes.h" +#include "base/String.h" +#include "common/basic_types.h" //! Unicode utility functions /*! @@ -143,5 +142,3 @@ private: static UInt32 s_invalid; static UInt32 s_replacement; }; - -#endif diff --git a/src/lib/base/XBase.cpp b/src/lib/base/XBase.cpp index ac54b61a..e873d56e 100644 --- a/src/lib/base/XBase.cpp +++ b/src/lib/base/XBase.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "XBase.h" -#include "CStringUtil.h" +#include "base/XBase.h" +#include "base/StringUtil.h" + #include #include diff --git a/src/lib/base/XBase.h b/src/lib/base/XBase.h index 490ada79..b6b5f23f 100644 --- a/src/lib/base/XBase.h +++ b/src/lib/base/XBase.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef XBASE_H -#define XBASE_H +#pragma once -#include "CString.h" +#include "base/String.h" //! Exception base class /*! @@ -121,5 +120,3 @@ private: \ mutable EState m_state; \ mutable std::string m_formatted; \ } - -#endif diff --git a/src/lib/base/LogOutputters.cpp b/src/lib/base/log_outputters.cpp similarity index 98% rename from src/lib/base/LogOutputters.cpp rename to src/lib/base/log_outputters.cpp index 7b658d9c..ee46ab74 100644 --- a/src/lib/base/LogOutputters.cpp +++ b/src/lib/base/log_outputters.cpp @@ -16,11 +16,12 @@ * along with this program. If not, see . */ -#include "LogOutputters.h" -#include "CArch.h" -#include "TMethodJob.h" +#include "base/log_outputters.h" +#include "base/TMethodJob.h" +#include "arch/Arch.h" #include + // // CStopLogOutputter // diff --git a/src/lib/base/LogOutputters.h b/src/lib/base/log_outputters.h similarity index 96% rename from src/lib/base/LogOutputters.h rename to src/lib/base/log_outputters.h index d7a08189..57b927b1 100644 --- a/src/lib/base/LogOutputters.h +++ b/src/lib/base/log_outputters.h @@ -16,14 +16,13 @@ * along with this program. If not, see . */ -#ifndef LOGOUTPUTTERS_H -#define LOGOUTPUTTERS_H +#pragma once -#include "BasicTypes.h" -#include "ILogOutputter.h" -#include "CString.h" -#include "stddeque.h" -#include "CThread.h" +#include "mt/Thread.h" +#include "base/ILogOutputter.h" +#include "base/String.h" +#include "common/basic_types.h" +#include "common/stddeque.h" #include #include @@ -168,5 +167,3 @@ public: virtual void show(bool showIfEmpty); virtual bool write(ELevel level, const char* message); }; - -#endif diff --git a/src/lib/client/CMakeLists.txt b/src/lib/client/CMakeLists.txt index 1ea66b1e..1dd47d6c 100644 --- a/src/lib/client/CMakeLists.txt +++ b/src/lib/client/CMakeLists.txt @@ -22,13 +22,7 @@ if (SYNERGY_ADD_HEADERS) endif() include_directories( - ../arch - ../base - ../common - ../io - ../mt - ../net - ../synergy + ../ ../../../ext ) diff --git a/src/lib/client/Client.cpp b/src/lib/client/Client.cpp index 72fcb5da..11c32562 100644 --- a/src/lib/client/Client.cpp +++ b/src/lib/client/Client.cpp @@ -16,26 +16,28 @@ * along with this program. If not, see . */ -#include "CClient.h" -#include "CServerProxy.h" -#include "CScreen.h" -#include "CClipboard.h" -#include "CPacketStreamFilter.h" -#include "CProtocolUtil.h" -#include "ProtocolTypes.h" -#include "XSynergy.h" -#include "IDataSocket.h" -#include "ISocketFactory.h" -#include "IStreamFilterFactory.h" -#include "CLog.h" -#include "IEventQueue.h" -#include "TMethodEventJob.h" -#include "CArch.h" -#include "IPlatformScreen.h" -#include "CCryptoStream.h" -#include "CThread.h" -#include "TMethodJob.h" -#include "CFileChunker.h" +#include "client/Client.h" + +#include "client/ServerProxy.h" +#include "synergy/Screen.h" +#include "synergy/Clipboard.h" +#include "synergy/PacketStreamFilter.h" +#include "synergy/ProtocolUtil.h" +#include "synergy/protocol_types.h" +#include "synergy/XSynergy.h" +#include "synergy/FileChunker.h" +#include "synergy/IPlatformScreen.h" +#include "mt/Thread.h" +#include "io/IStreamFilterFactory.h" +#include "io/CryptoStream.h" +#include "net/IDataSocket.h" +#include "net/ISocketFactory.h" +#include "arch/Arch.h" +#include "base/Log.h" +#include "base/IEventQueue.h" +#include "base/TMethodEventJob.h" +#include "base/TMethodJob.h" + #include #include #include diff --git a/src/lib/client/Client.h b/src/lib/client/Client.h index 50bfcd16..817387cf 100644 --- a/src/lib/client/Client.h +++ b/src/lib/client/Client.h @@ -16,16 +16,16 @@ * along with this program. If not, see . */ -#ifndef CCLIENT_H -#define CCLIENT_H +#pragma once -#include "IClient.h" -#include "IClipboard.h" -#include "CNetworkAddress.h" -#include "INode.h" -#include "CCryptoOptions.h" -#include "CEventTypes.h" -#include "CDragInformation.h" +#include "synergy/IClient.h" + +#include "synergy/IClipboard.h" +#include "synergy/DragInformation.h" +#include "synergy/INode.h" +#include "net/NetworkAddress.h" +#include "io/CryptoOptions.h" +#include "base/EventTypes.h" class CEventQueueTimer; class CScreen; @@ -239,5 +239,3 @@ private: CThread* m_writeToDropDirThread; bool m_enableDragDrop; }; - -#endif diff --git a/src/lib/client/ServerProxy.cpp b/src/lib/client/ServerProxy.cpp index c5ed93df..fe6c0c87 100644 --- a/src/lib/client/ServerProxy.cpp +++ b/src/lib/client/ServerProxy.cpp @@ -16,19 +16,21 @@ * along with this program. If not, see . */ -#include "CServerProxy.h" -#include "CClient.h" -#include "CClipboard.h" -#include "CProtocolUtil.h" -#include "OptionTypes.h" -#include "ProtocolTypes.h" -#include "IStream.h" -#include "CLog.h" -#include "IEventQueue.h" -#include "TMethodEventJob.h" -#include "XBase.h" +#include "client/ServerProxy.h" + +#include "client/Client.h" +#include "synergy/Clipboard.h" +#include "synergy/ProtocolUtil.h" +#include "synergy/option_types.h" +#include "synergy/protocol_types.h" +#include "io/IStream.h" +#include "io/CryptoStream.h" +#include "base/Log.h" +#include "base/IEventQueue.h" +#include "base/TMethodEventJob.h" +#include "base/XBase.h" + #include -#include "CCryptoStream.h" // // CServerProxy diff --git a/src/lib/client/ServerProxy.h b/src/lib/client/ServerProxy.h index fe23aa1a..d03bae73 100644 --- a/src/lib/client/ServerProxy.h +++ b/src/lib/client/ServerProxy.h @@ -16,14 +16,13 @@ * along with this program. If not, see . */ -#ifndef CSERVERPROXY_H -#define CSERVERPROXY_H +#pragma once -#include "ClipboardTypes.h" -#include "KeyTypes.h" -#include "CEvent.h" -#include "CStopwatch.h" -#include "CString.h" +#include "synergy/clipboard_types.h" +#include "synergy/key_types.h" +#include "base/Event.h" +#include "base/Stopwatch.h" +#include "base/String.h" class CClient; class CClientInfo; @@ -137,5 +136,3 @@ private: size_t m_receivedDataSize; static const UInt16 m_intervalThreshold; }; - -#endif diff --git a/src/lib/common/CMakeLists.txt b/src/lib/common/CMakeLists.txt index 23de44e1..4ca16291 100644 --- a/src/lib/common/CMakeLists.txt +++ b/src/lib/common/CMakeLists.txt @@ -21,6 +21,10 @@ if (SYNERGY_ADD_HEADERS) list(APPEND sources ${headers}) endif() +include_directories( + ../ +) + if (UNIX) include_directories( ../../.. diff --git a/src/lib/common/IInterface.h b/src/lib/common/IInterface.h index 7c5934ea..9e246677 100644 --- a/src/lib/common/IInterface.h +++ b/src/lib/common/IInterface.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef IINTERFACE_H -#define IINTERFACE_H +#pragma once -#include "common.h" +#include "common/common.h" //! Base class of interfaces /*! @@ -31,5 +30,3 @@ public: //! Interface destructor does nothing virtual ~IInterface() { } }; - -#endif diff --git a/src/lib/common/MacOSXPrecomp.h b/src/lib/common/MacOSXPrecomp.h index dbf12d5a..c4989a6c 100644 --- a/src/lib/common/MacOSXPrecomp.h +++ b/src/lib/common/MacOSXPrecomp.h @@ -22,5 +22,4 @@ #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_2 - #include diff --git a/src/lib/common/Version.cpp b/src/lib/common/Version.cpp index 1fef24c0..78f23b3c 100644 --- a/src/lib/common/Version.cpp +++ b/src/lib/common/Version.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "Version.h" +#include "common/Version.h" const char* kApplication = "Synergy"; const char* kCopyright = "Copyright (C) 2012-2014 Bolton Software Ltd.\n" diff --git a/src/lib/common/Version.h b/src/lib/common/Version.h index 8a0eff0f..46925100 100644 --- a/src/lib/common/Version.h +++ b/src/lib/common/Version.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef VERSION_H -#define VERSION_H +#pragma once -#include "common.h" +#include "common/common.h" // set version macro if not set yet #if !defined(VERSION) @@ -38,5 +37,3 @@ extern const char* kVersion; // application version extern const char* kAppVersion; - -#endif diff --git a/src/lib/common/BasicTypes.h b/src/lib/common/basic_types.h similarity index 96% rename from src/lib/common/BasicTypes.h rename to src/lib/common/basic_types.h index d5163902..7f20cb5a 100644 --- a/src/lib/common/BasicTypes.h +++ b/src/lib/common/basic_types.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef BASICTYPES_H -#define BASICTYPES_H +#pragma once -#include "common.h" +#include "common/common.h" // // pick types of particular sizes @@ -87,5 +86,3 @@ typedef unsigned TYPE_OF_SIZE_4 UInt32; #undef TYPE_OF_SIZE_1 #undef TYPE_OF_SIZE_2 #undef TYPE_OF_SIZE_4 - -#endif diff --git a/src/lib/common/common.h b/src/lib/common/common.h index 2ee5a253..4b9da839 100644 --- a/src/lib/common/common.h +++ b/src/lib/common/common.h @@ -16,8 +16,7 @@ * along with this program. If not, see . */ -#ifndef COMMON_H -#define COMMON_H +#pragma once // this file should be included, directly or indirectly by every other. @@ -154,5 +153,3 @@ enum { kExitArgs = 3, // bad arguments kExitConfig = 4 // cannot read configuration }; - -#endif diff --git a/src/lib/common/stdbitset.h b/src/lib/common/stdbitset.h index 59fb7138..64dad68b 100644 --- a/src/lib/common/stdbitset.h +++ b/src/lib/common/stdbitset.h @@ -16,6 +16,6 @@ * along with this program. If not, see . */ -#include "stdpre.h" +#include "common/stdpre.h" #include -#include "stdpost.h" +#include "common/stdpost.h" diff --git a/src/lib/common/stddeque.h b/src/lib/common/stddeque.h index c33b4e90..8b5d08b1 100644 --- a/src/lib/common/stddeque.h +++ b/src/lib/common/stddeque.h @@ -16,6 +16,6 @@ * along with this program. If not, see . */ -#include "stdpre.h" +#include "common/stdpre.h" #include -#include "stdpost.h" +#include "common/stdpost.h" diff --git a/src/lib/common/stdfstream.h b/src/lib/common/stdfstream.h index 22459ebe..4353f05d 100644 --- a/src/lib/common/stdfstream.h +++ b/src/lib/common/stdfstream.h @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "stdpre.h" +#include "common/stdpre.h" #include -#include "stdpost.h" -#include "stdistream.h" +#include "common/stdpost.h" +#include "common/stdistream.h" diff --git a/src/lib/common/stdistream.h b/src/lib/common/stdistream.h index a6528f3b..d08ecbce 100644 --- a/src/lib/common/stdistream.h +++ b/src/lib/common/stdistream.h @@ -16,13 +16,13 @@ * along with this program. If not, see . */ -#include "stdpre.h" +#include "common/stdpre.h" #if HAVE_ISTREAM #include #else #include #endif -#include "stdpost.h" +#include "common/stdpost.h" #if defined(_MSC_VER) && _MSC_VER <= 1200 // VC++6 istream has no overloads for __int* types, .NET does diff --git a/src/lib/common/stdlist.h b/src/lib/common/stdlist.h index bd5e28a7..caaca6ff 100644 --- a/src/lib/common/stdlist.h +++ b/src/lib/common/stdlist.h @@ -16,6 +16,6 @@ * along with this program. If not, see . */ -#include "stdpre.h" +#include "common/stdpre.h" #include -#include "stdpost.h" +#include "common/stdpost.h" diff --git a/src/lib/common/stdmap.h b/src/lib/common/stdmap.h index b4b0b988..cb755103 100644 --- a/src/lib/common/stdmap.h +++ b/src/lib/common/stdmap.h @@ -16,6 +16,6 @@ * along with this program. If not, see . */ -#include "stdpre.h" +#include "common/stdpre.h" #include -#include "stdpost.h" +#include "common/stdpost.h" diff --git a/src/lib/common/stdostream.h b/src/lib/common/stdostream.h index 70a2695c..c344c16c 100644 --- a/src/lib/common/stdostream.h +++ b/src/lib/common/stdostream.h @@ -16,10 +16,10 @@ * along with this program. If not, see . */ -#include "stdpre.h" +#include "common/stdpre.h" #if HAVE_OSTREAM #include #else #include #endif -#include "stdpost.h" +#include "common/stdpost.h" diff --git a/src/lib/common/stdset.h b/src/lib/common/stdset.h index 99fe9ab4..862418c9 100644 --- a/src/lib/common/stdset.h +++ b/src/lib/common/stdset.h @@ -16,6 +16,6 @@ * along with this program. If not, see . */ -#include "stdpre.h" +#include "common/stdpre.h" #include -#include "stdpost.h" +#include "common/stdpost.h" diff --git a/src/lib/common/stdsstream.h b/src/lib/common/stdsstream.h index d94bce76..6283efd7 100644 --- a/src/lib/common/stdsstream.h +++ b/src/lib/common/stdsstream.h @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "stdpre.h" +#include "common/stdpre.h" #if HAVE_SSTREAM || !defined(__GNUC__) || (__GNUC__ >= 3) @@ -372,5 +372,5 @@ namespace std #endif /* not g++ 2.95 and no */ -#include "stdpost.h" -#include "stdistream.h" +#include "common/stdpost.h" +#include "common/stdistream.h" diff --git a/src/lib/common/stdstring.h b/src/lib/common/stdstring.h index ce5713e2..14adc3ce 100644 --- a/src/lib/common/stdstring.h +++ b/src/lib/common/stdstring.h @@ -16,6 +16,6 @@ * along with this program. If not, see . */ -#include "stdpre.h" +#include "common/stdpre.h" #include -#include "stdpost.h" +#include "common/stdpost.h" diff --git a/src/lib/common/stdvector.h b/src/lib/common/stdvector.h index 772149a5..9378eb72 100644 --- a/src/lib/common/stdvector.h +++ b/src/lib/common/stdvector.h @@ -16,6 +16,6 @@ * along with this program. If not, see . */ -#include "stdpre.h" +#include "common/stdpre.h" #include -#include "stdpost.h" +#include "common/stdpost.h" diff --git a/src/lib/io/CMakeLists.txt b/src/lib/io/CMakeLists.txt index 654ca590..71ce1a84 100644 --- a/src/lib/io/CMakeLists.txt +++ b/src/lib/io/CMakeLists.txt @@ -22,10 +22,7 @@ if (SYNERGY_ADD_HEADERS) endif() include_directories( - ../arch - ../base - ../common - ../.. + ../ ../../../ext ) diff --git a/src/lib/io/CryptoMode.cpp b/src/lib/io/CryptoMode.cpp index 624489ef..a9eebaa5 100644 --- a/src/lib/io/CryptoMode.cpp +++ b/src/lib/io/CryptoMode.cpp @@ -15,8 +15,9 @@ * along with this program. If not, see . */ -#include "CCryptoMode.h" -#include "XIO.h" +#include "io/CryptoMode.h" + +#include "io/XIO.h" using namespace CryptoPP; diff --git a/src/lib/io/CryptoMode.h b/src/lib/io/CryptoMode.h index 15d2fbaf..4a5e7483 100644 --- a/src/lib/io/CryptoMode.h +++ b/src/lib/io/CryptoMode.h @@ -17,9 +17,10 @@ #pragma once -#include "ECryptoMode.h" -#include "CString.h" -#include "CCryptoMode_cryptopp.h" +#include "io/ECryptoMode.h" + +#include "io/CryptoMode_cryptopp.h" +#include "base/String.h" //! Encapsulation of modes /*! diff --git a/src/lib/io/CryptoMode_cryptopp.h b/src/lib/io/CryptoMode_cryptopp.h index 1202d796..c30ef8ce 100644 --- a/src/lib/io/CryptoMode_cryptopp.h +++ b/src/lib/io/CryptoMode_cryptopp.h @@ -20,7 +20,7 @@ // HACK: gcc on osx106 doesn't give you an easy way to hide warnings // from included headers, so use the system_header pragma. the downside // is that everything in the header file following this also has warnings -// ignored, so we need to put it in a separate header file. +// ignored, so we need to put it in a separate header file (this file). #if __APPLE__ # pragma GCC system_header #endif diff --git a/src/lib/io/CryptoOptions.cpp b/src/lib/io/CryptoOptions.cpp index 32d3ceb7..44bcaaf1 100644 --- a/src/lib/io/CryptoOptions.cpp +++ b/src/lib/io/CryptoOptions.cpp @@ -15,8 +15,8 @@ * along with this program. If not, see . */ -#include "CCryptoOptions.h" -#include "XIO.h" +#include "io/CryptoOptions.h" +#include "io/XIO.h" CCryptoOptions::CCryptoOptions( const CString& modeString, diff --git a/src/lib/io/CryptoOptions.h b/src/lib/io/CryptoOptions.h index ba9512ef..5de7fadb 100644 --- a/src/lib/io/CryptoOptions.h +++ b/src/lib/io/CryptoOptions.h @@ -17,8 +17,8 @@ #pragma once -#include "CString.h" -#include "ECryptoMode.h" +#include "base/String.h" +#include "io/ECryptoMode.h" //! Encapsulates basic crypto options class CCryptoOptions { diff --git a/src/lib/io/CryptoStream.cpp b/src/lib/io/CryptoStream.cpp index b9817663..681f8937 100644 --- a/src/lib/io/CryptoStream.cpp +++ b/src/lib/io/CryptoStream.cpp @@ -15,9 +15,11 @@ * along with this program. If not, see . */ -#include "CCryptoStream.h" -#include "CLog.h" -#include "CCryptoOptions.h" +#include "io/CryptoStream.h" + +#include "io/CryptoOptions.h" +#include "base/Log.h" + #include #include #include diff --git a/src/lib/io/CryptoStream.h b/src/lib/io/CryptoStream.h index 45bb1369..1701fa79 100644 --- a/src/lib/io/CryptoStream.h +++ b/src/lib/io/CryptoStream.h @@ -17,10 +17,10 @@ #pragma once -#include "BasicTypes.h" -#include "CStreamFilter.h" -#include "CCryptoMode.h" -#include "CCryptoStream_cryptopp.h" +#include "io/StreamFilter.h" +#include "io/CryptoMode.h" +#include "io/CryptoStream_cryptopp.h" +#include "base/EventTypes.h" class CCryptoOptions; diff --git a/src/lib/io/CryptoStream_cryptopp.h b/src/lib/io/CryptoStream_cryptopp.h index 71b1f09d..c230a64b 100644 --- a/src/lib/io/CryptoStream_cryptopp.h +++ b/src/lib/io/CryptoStream_cryptopp.h @@ -20,7 +20,7 @@ // HACK: gcc on osx106 doesn't give you an easy way to hide warnings // from included headers, so use the system_header pragma. the downside // is that everything in the header file following this also has warnings -// ignored, so we need to put it in a separate header file. +// ignored, so we need to put it in a separate header file (this file). #if __APPLE__ # pragma GCC system_header #endif diff --git a/src/lib/io/IStream.h b/src/lib/io/IStream.h index ca2fb6a0..509e68ae 100644 --- a/src/lib/io/IStream.h +++ b/src/lib/io/IStream.h @@ -16,13 +16,12 @@ * along with this program. If not, see . */ -#ifndef ISTREAM_H -#define ISTREAM_H +#pragma once -#include "IInterface.h" -#include "CEvent.h" -#include "IEventQueue.h" -#include "CEventTypes.h" +#include "common/IInterface.h" +#include "base/Event.h" +#include "base/IEventQueue.h" +#include "base/EventTypes.h" class IEventQueue; @@ -119,5 +118,3 @@ public: }; } - -#endif diff --git a/src/lib/io/IStreamFilterFactory.h b/src/lib/io/IStreamFilterFactory.h index c5af4dff..e290aaab 100644 --- a/src/lib/io/IStreamFilterFactory.h +++ b/src/lib/io/IStreamFilterFactory.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef ISTREAMFILTERFACTORY_H -#define ISTREAMFILTERFACTORY_H +#pragma once -#include "IInterface.h" +#include "common/IInterface.h" using namespace synergy; namespace synergy { class IStream; } @@ -37,5 +36,3 @@ public: */ virtual synergy::IStream* create(IStream* stream, bool adoptStream) = 0; }; - -#endif diff --git a/src/lib/io/StreamBuffer.cpp b/src/lib/io/StreamBuffer.cpp index 4ced37b6..bd32e6ad 100644 --- a/src/lib/io/StreamBuffer.cpp +++ b/src/lib/io/StreamBuffer.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CStreamBuffer.h" +#include "io/StreamBuffer.h" // // CStreamBuffer diff --git a/src/lib/io/StreamBuffer.h b/src/lib/io/StreamBuffer.h index 3a1fac3b..d8ae88b8 100644 --- a/src/lib/io/StreamBuffer.h +++ b/src/lib/io/StreamBuffer.h @@ -16,12 +16,11 @@ * along with this program. If not, see . */ -#ifndef CSTREAMBUFFER_H -#define CSTREAMBUFFER_H +#pragma once -#include "BasicTypes.h" -#include "stdlist.h" -#include "stdvector.h" +#include "base/EventTypes.h" +#include "common/stdlist.h" +#include "common/stdvector.h" //! FIFO of bytes /*! @@ -78,5 +77,3 @@ private: UInt32 m_size; UInt32 m_headUsed; }; - -#endif diff --git a/src/lib/io/StreamFilter.cpp b/src/lib/io/StreamFilter.cpp index 04777d9e..ac99f748 100644 --- a/src/lib/io/StreamFilter.cpp +++ b/src/lib/io/StreamFilter.cpp @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -#include "CStreamFilter.h" -#include "IEventQueue.h" -#include "TMethodEventJob.h" +#include "io/StreamFilter.h" +#include "base/IEventQueue.h" +#include "base/TMethodEventJob.h" // // CStreamFilter diff --git a/src/lib/io/StreamFilter.h b/src/lib/io/StreamFilter.h index e41b3b92..8f644a96 100644 --- a/src/lib/io/StreamFilter.h +++ b/src/lib/io/StreamFilter.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef CSTREAMFILTER_H -#define CSTREAMFILTER_H +#pragma once -#include "IStream.h" -#include "IEventQueue.h" +#include "io/IStream.h" +#include "base/IEventQueue.h" //! A stream filter /*! @@ -72,5 +71,3 @@ private: bool m_adopted; IEventQueue* m_events; }; - -#endif diff --git a/src/lib/io/XIO.cpp b/src/lib/io/XIO.cpp index 219ec25a..aa3a17ab 100644 --- a/src/lib/io/XIO.cpp +++ b/src/lib/io/XIO.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "XIO.h" +#include "io/XIO.h" // // XIOClosed diff --git a/src/lib/io/XIO.h b/src/lib/io/XIO.h index 6d02e3a8..953b7f7e 100644 --- a/src/lib/io/XIO.h +++ b/src/lib/io/XIO.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef XIO_H -#define XIO_H +#pragma once -#include "XBase.h" +#include "base/XBase.h" //! Generic I/O exception XBASE_SUBCLASS(XIO, XBase); @@ -54,5 +53,3 @@ XBASE_SUBCLASS_WHAT(XIOWouldBlock, XIO); Thrown when the user enters an invalid crypto mode. */ XBASE_SUBCLASS_WHAT(XIOBadCryptoMode, XIO); - -#endif diff --git a/src/lib/ipc/CMakeLists.txt b/src/lib/ipc/CMakeLists.txt index 14a0da47..635176bb 100644 --- a/src/lib/ipc/CMakeLists.txt +++ b/src/lib/ipc/CMakeLists.txt @@ -22,13 +22,7 @@ if (SYNERGY_ADD_HEADERS) endif() include_directories( - ../arch - ../base - ../common - ../io - ../mt - ../net - ../synergy + ../ ) if (UNIX) diff --git a/src/lib/ipc/Ipc.cpp b/src/lib/ipc/Ipc.cpp index 76d5a801..976417bc 100644 --- a/src/lib/ipc/Ipc.cpp +++ b/src/lib/ipc/Ipc.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "Ipc.h" +#include "ipc/Ipc.h" const char* kIpcMsgHello = "IHEL%1i"; const char* kIpcMsgLogLine = "ILOG%s"; diff --git a/src/lib/ipc/IpcClient.cpp b/src/lib/ipc/IpcClient.cpp index 415e8d20..879278fa 100644 --- a/src/lib/ipc/IpcClient.cpp +++ b/src/lib/ipc/IpcClient.cpp @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -#include "CIpcClient.h" -#include "Ipc.h" -#include "CIpcServerProxy.h" -#include "TMethodEventJob.h" -#include "CIpcMessage.h" +#include "ipc/IpcClient.h" +#include "ipc/Ipc.h" +#include "ipc/IpcServerProxy.h" +#include "ipc/IpcMessage.h" +#include "base/TMethodEventJob.h" // // CIpcClient diff --git a/src/lib/ipc/IpcClient.h b/src/lib/ipc/IpcClient.h index b486cce4..db7b9216 100644 --- a/src/lib/ipc/IpcClient.h +++ b/src/lib/ipc/IpcClient.h @@ -18,9 +18,9 @@ #pragma once -#include "CNetworkAddress.h" -#include "CTCPSocket.h" -#include "CEventTypes.h" +#include "net/NetworkAddress.h" +#include "net/TCPSocket.h" +#include "base/EventTypes.h" class CIpcServerProxy; class CIpcMessage; diff --git a/src/lib/ipc/IpcClientProxy.cpp b/src/lib/ipc/IpcClientProxy.cpp index 079396ca..fdc9bd4b 100644 --- a/src/lib/ipc/IpcClientProxy.cpp +++ b/src/lib/ipc/IpcClientProxy.cpp @@ -16,14 +16,15 @@ * along with this program. If not, see . */ -#include "CIpcClientProxy.h" -#include "IStream.h" -#include "TMethodEventJob.h" -#include "Ipc.h" -#include "CLog.h" -#include "CIpcMessage.h" -#include "CProtocolUtil.h" -#include "CArch.h" +#include "ipc/IpcClientProxy.h" + +#include "ipc/Ipc.h" +#include "ipc/IpcMessage.h" +#include "synergy/ProtocolUtil.h" +#include "io/IStream.h" +#include "arch/Arch.h" +#include "base/TMethodEventJob.h" +#include "base/Log.h" // // CIpcClientProxy diff --git a/src/lib/ipc/IpcClientProxy.h b/src/lib/ipc/IpcClientProxy.h index 6c3037a2..9127e530 100644 --- a/src/lib/ipc/IpcClientProxy.h +++ b/src/lib/ipc/IpcClientProxy.h @@ -18,10 +18,10 @@ #pragma once -#include "CEvent.h" -#include "Ipc.h" -#include "IArchMultithread.h" -#include "CEventTypes.h" +#include "ipc/Ipc.h" +#include "arch/IArchMultithread.h" +#include "base/EventTypes.h" +#include "base/Event.h" namespace synergy { class IStream; } class CIpcMessage; diff --git a/src/lib/ipc/IpcLogOutputter.cpp b/src/lib/ipc/IpcLogOutputter.cpp index 59e35e3e..f3924ae8 100644 --- a/src/lib/ipc/IpcLogOutputter.cpp +++ b/src/lib/ipc/IpcLogOutputter.cpp @@ -16,18 +16,19 @@ * along with this program. If not, see . */ -#include "CIpcLogOutputter.h" -#include "CIpcServer.h" -#include "CIpcMessage.h" -#include "Ipc.h" -#include "CEvent.h" -#include "CEventQueue.h" -#include "TMethodEventJob.h" -#include "CIpcClientProxy.h" -#include "CArch.h" -#include "CThread.h" -#include "TMethodJob.h" -#include "XArch.h" +#include "ipc/IpcLogOutputter.h" + +#include "ipc/IpcServer.h" +#include "ipc/IpcMessage.h" +#include "ipc/Ipc.h" +#include "ipc/IpcClientProxy.h" +#include "mt/Thread.h" +#include "arch/Arch.h" +#include "arch/XArch.h" +#include "base/Event.h" +#include "base/EventQueue.h" +#include "base/TMethodEventJob.h" +#include "base/TMethodJob.h" // limit number of log lines sent in one message. #define MAX_SEND 100 diff --git a/src/lib/ipc/IpcLogOutputter.h b/src/lib/ipc/IpcLogOutputter.h index e70dcf73..196db174 100644 --- a/src/lib/ipc/IpcLogOutputter.h +++ b/src/lib/ipc/IpcLogOutputter.h @@ -18,10 +18,11 @@ #pragma once -#include "ILogOutputter.h" -#include "CArch.h" +#include "arch/Arch.h" +#include "arch/IArchMultithread.h" +#include "base/ILogOutputter.h" + #include -#include "IArchMultithread.h" class CIpcServer; class CEvent; diff --git a/src/lib/ipc/IpcMessage.cpp b/src/lib/ipc/IpcMessage.cpp index f8913038..a5dadb1b 100644 --- a/src/lib/ipc/IpcMessage.cpp +++ b/src/lib/ipc/IpcMessage.cpp @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -#include "CIpcMessage.h" -#include "Ipc.h" +#include "ipc/IpcMessage.h" +#include "ipc/Ipc.h" CIpcMessage::CIpcMessage(UInt8 type) : -m_type(type) + m_type(type) { } @@ -29,8 +29,8 @@ CIpcMessage::~CIpcMessage() } CIpcHelloMessage::CIpcHelloMessage(EIpcClientType clientType) : -CIpcMessage(kIpcHello), -m_clientType(clientType) + CIpcMessage(kIpcHello), + m_clientType(clientType) { } diff --git a/src/lib/ipc/IpcMessage.h b/src/lib/ipc/IpcMessage.h index 2f4f234a..6bfbd026 100644 --- a/src/lib/ipc/IpcMessage.h +++ b/src/lib/ipc/IpcMessage.h @@ -18,10 +18,10 @@ #pragma once -#include "BasicTypes.h" -#include "CString.h" -#include "Ipc.h" -#include "CEvent.h" +#include "ipc/Ipc.h" +#include "base/EventTypes.h" +#include "base/String.h" +#include "base/Event.h" class CIpcMessage : public CEventData { public: diff --git a/src/lib/ipc/IpcServer.cpp b/src/lib/ipc/IpcServer.cpp index d529d3fd..1c430bdf 100644 --- a/src/lib/ipc/IpcServer.cpp +++ b/src/lib/ipc/IpcServer.cpp @@ -16,16 +16,17 @@ * along with this program. If not, see . */ -#include "CIpcServer.h" -#include "Ipc.h" -#include "IEventQueue.h" -#include "TMethodEventJob.h" -#include "CEvent.h" -#include "CLog.h" -#include "CIpcClientProxy.h" -#include "IStream.h" -#include "IDataSocket.h" -#include "CIpcMessage.h" +#include "ipc/IpcServer.h" + +#include "ipc/Ipc.h" +#include "ipc/IpcClientProxy.h" +#include "ipc/IpcMessage.h" +#include "net/IDataSocket.h" +#include "io/IStream.h" +#include "base/IEventQueue.h" +#include "base/TMethodEventJob.h" +#include "base/Event.h" +#include "base/Log.h" // // CIpcServer diff --git a/src/lib/ipc/IpcServer.h b/src/lib/ipc/IpcServer.h index a10c526c..dababa96 100644 --- a/src/lib/ipc/IpcServer.h +++ b/src/lib/ipc/IpcServer.h @@ -18,12 +18,13 @@ #pragma once -#include "CTCPListenSocket.h" -#include "CNetworkAddress.h" -#include "Ipc.h" +#include "ipc/Ipc.h" +#include "net/TCPListenSocket.h" +#include "net/NetworkAddress.h" +#include "arch/Arch.h" +#include "base/EventTypes.h" + #include -#include "CArch.h" -#include "CEventTypes.h" class CEvent; class CIpcClientProxy; diff --git a/src/lib/ipc/IpcServerProxy.cpp b/src/lib/ipc/IpcServerProxy.cpp index cd53e6b5..582759d8 100644 --- a/src/lib/ipc/IpcServerProxy.cpp +++ b/src/lib/ipc/IpcServerProxy.cpp @@ -16,13 +16,14 @@ * along with this program. If not, see . */ -#include "CIpcServerProxy.h" -#include "IStream.h" -#include "TMethodEventJob.h" -#include "CLog.h" -#include "CIpcMessage.h" -#include "Ipc.h" -#include "CProtocolUtil.h" +#include "ipc/IpcServerProxy.h" + +#include "ipc/IpcMessage.h" +#include "ipc/Ipc.h" +#include "synergy/ProtocolUtil.h" +#include "io/IStream.h" +#include "base/TMethodEventJob.h" +#include "base/Log.h" // // CIpcServerProxy diff --git a/src/lib/ipc/IpcServerProxy.h b/src/lib/ipc/IpcServerProxy.h index 0aedd262..74185a64 100644 --- a/src/lib/ipc/IpcServerProxy.h +++ b/src/lib/ipc/IpcServerProxy.h @@ -18,8 +18,8 @@ #pragma once -#include "CEvent.h" -#include "CEventTypes.h" +#include "base/Event.h" +#include "base/EventTypes.h" namespace synergy { class IStream; } class CIpcMessage; diff --git a/src/lib/mt/CMakeLists.txt b/src/lib/mt/CMakeLists.txt index 1242249a..92a8ab83 100644 --- a/src/lib/mt/CMakeLists.txt +++ b/src/lib/mt/CMakeLists.txt @@ -22,10 +22,7 @@ if (SYNERGY_ADD_HEADERS) endif() include_directories( - ../arch - ../base - ../common - ../synergy + ../ ) if (UNIX) diff --git a/src/lib/mt/CondVar.cpp b/src/lib/mt/CondVar.cpp index 65102feb..37c4ca63 100644 --- a/src/lib/mt/CondVar.cpp +++ b/src/lib/mt/CondVar.cpp @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -#include "CCondVar.h" -#include "CStopwatch.h" -#include "CArch.h" +#include "mt/CondVar.h" +#include "arch/Arch.h" +#include "base/Stopwatch.h" // // CCondVarBase diff --git a/src/lib/mt/CondVar.h b/src/lib/mt/CondVar.h index 2c8062e8..118f079d 100644 --- a/src/lib/mt/CondVar.h +++ b/src/lib/mt/CondVar.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef CCONDVAR_H -#define CCONDVAR_H +#pragma once -#include "CMutex.h" -#include "BasicTypes.h" +#include "mt/Mutex.h" +#include "common/basic_types.h" class CStopwatch; @@ -224,5 +223,3 @@ CCondVar::operator const volatile T&() const { return m_data; } - -#endif diff --git a/src/lib/mt/Lock.cpp b/src/lib/mt/Lock.cpp index bd5e0cee..669e922d 100644 --- a/src/lib/mt/Lock.cpp +++ b/src/lib/mt/Lock.cpp @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -#include "CLock.h" -#include "CCondVar.h" -#include "CMutex.h" +#include "mt/Lock.h" +#include "mt/CondVar.h" +#include "mt/Mutex.h" // // CLock diff --git a/src/lib/mt/Lock.h b/src/lib/mt/Lock.h index a96d59c4..7a1e45af 100644 --- a/src/lib/mt/Lock.h +++ b/src/lib/mt/Lock.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CLOCK_H -#define CLOCK_H +#pragma once -#include "common.h" +#include "common/common.h" class CMutex; class CCondVarBase; @@ -48,5 +47,3 @@ private: private: const CMutex* m_mutex; }; - -#endif diff --git a/src/lib/mt/Mutex.cpp b/src/lib/mt/Mutex.cpp index 3aeb07b7..2e9cf534 100644 --- a/src/lib/mt/Mutex.cpp +++ b/src/lib/mt/Mutex.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "CMutex.h" -#include "CArch.h" +#include "mt/Mutex.h" + +#include "arch/Arch.h" // // CMutex diff --git a/src/lib/mt/Mutex.h b/src/lib/mt/Mutex.h index 93e732a9..beb2b4d5 100644 --- a/src/lib/mt/Mutex.h +++ b/src/lib/mt/Mutex.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CMUTEX_H -#define CMUTEX_H +#pragma once -#include "IArchMultithread.h" +#include "arch/IArchMultithread.h" //! Mutual exclusion /*! @@ -78,5 +77,3 @@ private: friend class CCondVarBase; CArchMutex m_mutex; }; - -#endif diff --git a/src/lib/mt/Thread.cpp b/src/lib/mt/Thread.cpp index 9c22d5f2..efb05f52 100644 --- a/src/lib/mt/Thread.cpp +++ b/src/lib/mt/Thread.cpp @@ -16,12 +16,13 @@ * along with this program. If not, see . */ -#include "CThread.h" -#include "XMT.h" -#include "XThread.h" -#include "CLog.h" -#include "IJob.h" -#include "CArch.h" +#include "mt/Thread.h" + +#include "mt/XMT.h" +#include "mt/XThread.h" +#include "arch/Arch.h" +#include "base/Log.h" +#include "base/IJob.h" // // CThread diff --git a/src/lib/mt/Thread.h b/src/lib/mt/Thread.h index 28a01e01..8a74c671 100644 --- a/src/lib/mt/Thread.h +++ b/src/lib/mt/Thread.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CTHREAD_H -#define CTHREAD_H +#pragma once -#include "IArchMultithread.h" +#include "arch/IArchMultithread.h" class IJob; @@ -209,5 +208,3 @@ private: private: CArchThread m_thread; }; - -#endif diff --git a/src/lib/mt/XMT.h b/src/lib/mt/XMT.h index 375efeca..3914b8f5 100644 --- a/src/lib/mt/XMT.h +++ b/src/lib/mt/XMT.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef XMT_H -#define XMT_H +#pragma once -#include "XBase.h" +#include "base/XBase.h" //! Generic multithreading exception XBASE_SUBCLASS(XMT, XBase); @@ -29,5 +28,3 @@ XBASE_SUBCLASS(XMT, XBase); Thrown when a thread cannot be created. */ XBASE_SUBCLASS_WHAT(XMTThreadUnavailable, XMT); - -#endif diff --git a/src/lib/mt/XThread.h b/src/lib/mt/XThread.h index b5fb2a4b..64d8719e 100644 --- a/src/lib/mt/XThread.h +++ b/src/lib/mt/XThread.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef XTHREAD_H -#define XTHREAD_H +#pragma once -#include "XArch.h" +#include "arch/XArch.h" //! Thread exception to exit /*! @@ -36,5 +35,3 @@ public: public: void* m_result; }; - -#endif diff --git a/src/lib/net/CMakeLists.txt b/src/lib/net/CMakeLists.txt index 83838e63..1f63e365 100644 --- a/src/lib/net/CMakeLists.txt +++ b/src/lib/net/CMakeLists.txt @@ -22,12 +22,7 @@ if (SYNERGY_ADD_HEADERS) endif() include_directories( - ../arch - ../base - ../common - ../io - ../mt - ../synergy + ../ ) if (UNIX) diff --git a/src/lib/net/IDataSocket.cpp b/src/lib/net/IDataSocket.cpp index 89308043..b537a517 100644 --- a/src/lib/net/IDataSocket.cpp +++ b/src/lib/net/IDataSocket.cpp @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#include "IDataSocket.h" -#include "CEventQueue.h" +#include "net/IDataSocket.h" +#include "base/EventQueue.h" // // IDataSocket diff --git a/src/lib/net/IDataSocket.h b/src/lib/net/IDataSocket.h index b5b0fa36..7ecafead 100644 --- a/src/lib/net/IDataSocket.h +++ b/src/lib/net/IDataSocket.h @@ -16,13 +16,12 @@ * along with this program. If not, see . */ -#ifndef IDATASOCKET_H -#define IDATASOCKET_H +#pragma once -#include "ISocket.h" -#include "IStream.h" -#include "CString.h" -#include "CEventTypes.h" +#include "net/ISocket.h" +#include "io/IStream.h" +#include "base/String.h" +#include "base/EventTypes.h" //! Data stream socket interface /*! @@ -71,5 +70,3 @@ public: virtual bool isReady() const = 0; virtual UInt32 getSize() const = 0; }; - -#endif diff --git a/src/lib/net/IListenSocket.h b/src/lib/net/IListenSocket.h index 16b9c775..838dc6ee 100644 --- a/src/lib/net/IListenSocket.h +++ b/src/lib/net/IListenSocket.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef ILISTENSOCKET_H -#define ILISTENSOCKET_H +#pragma once -#include "ISocket.h" -#include "CEventTypes.h" +#include "net/ISocket.h" +#include "base/EventTypes.h" class IDataSocket; @@ -49,5 +48,3 @@ public: virtual void close() = 0; virtual void* getEventTarget() const = 0; }; - -#endif diff --git a/src/lib/net/ISocket.h b/src/lib/net/ISocket.h index 6625b301..d4220d21 100644 --- a/src/lib/net/ISocket.h +++ b/src/lib/net/ISocket.h @@ -16,12 +16,11 @@ * along with this program. If not, see . */ -#ifndef ISOCKET_H -#define ISOCKET_H +#pragma once -#include "IInterface.h" -#include "CEvent.h" -#include "CEventTypes.h" +#include "common/IInterface.h" +#include "base/Event.h" +#include "base/EventTypes.h" class CNetworkAddress; @@ -59,5 +58,3 @@ public: //@} }; - -#endif diff --git a/src/lib/net/ISocketFactory.h b/src/lib/net/ISocketFactory.h index ede3a175..4175cb5d 100644 --- a/src/lib/net/ISocketFactory.h +++ b/src/lib/net/ISocketFactory.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef ISOCKETFACTORY_H -#define ISOCKETFACTORY_H +#pragma once -#include "IInterface.h" +#include "common/IInterface.h" class IDataSocket; class IListenSocket; @@ -42,5 +41,3 @@ public: //@} }; - -#endif diff --git a/src/lib/net/ISocketMultiplexerJob.h b/src/lib/net/ISocketMultiplexerJob.h index cf0dfc72..61057dd2 100644 --- a/src/lib/net/ISocketMultiplexerJob.h +++ b/src/lib/net/ISocketMultiplexerJob.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef ISOCKETMULTIPLEXERJOB_H -#define ISOCKETMULTIPLEXERJOB_H +#pragma once -#include "IArchNetwork.h" -#include "IInterface.h" +#include "arch/IArchNetwork.h" +#include "common/IInterface.h" //! Socket multiplexer job /*! @@ -75,5 +74,3 @@ public: //@} }; - -#endif diff --git a/src/lib/net/NetworkAddress.cpp b/src/lib/net/NetworkAddress.cpp index 3e34fe0f..c7f93381 100644 --- a/src/lib/net/NetworkAddress.cpp +++ b/src/lib/net/NetworkAddress.cpp @@ -16,10 +16,12 @@ * along with this program. If not, see . */ -#include "CNetworkAddress.h" -#include "XSocket.h" -#include "CArch.h" -#include "XArch.h" +#include "net/NetworkAddress.h" + +#include "net/XSocket.h" +#include "arch/Arch.h" +#include "arch/XArch.h" + #include // diff --git a/src/lib/net/NetworkAddress.h b/src/lib/net/NetworkAddress.h index 2fa430a3..92e27e7d 100644 --- a/src/lib/net/NetworkAddress.h +++ b/src/lib/net/NetworkAddress.h @@ -16,12 +16,11 @@ * along with this program. If not, see . */ -#ifndef CNETWORKADDRESS_H -#define CNETWORKADDRESS_H +#pragma once -#include "CString.h" -#include "BasicTypes.h" -#include "IArchNetwork.h" +#include "base/String.h" +#include "base/EventTypes.h" +#include "arch/IArchNetwork.h" //! Network address type /*! @@ -122,5 +121,3 @@ private: CString m_hostname; int m_port; }; - -#endif diff --git a/src/lib/net/SocketMultiplexer.cpp b/src/lib/net/SocketMultiplexer.cpp index b57097df..2463eeed 100644 --- a/src/lib/net/SocketMultiplexer.cpp +++ b/src/lib/net/SocketMultiplexer.cpp @@ -16,17 +16,18 @@ * along with this program. If not, see . */ -#include "CSocketMultiplexer.h" -#include "ISocketMultiplexerJob.h" -#include "CCondVar.h" -#include "CLock.h" -#include "CMutex.h" -#include "CThread.h" -#include "CLog.h" -#include "TMethodJob.h" -#include "CArch.h" -#include "XArch.h" -#include "stdvector.h" +#include "net/SocketMultiplexer.h" + +#include "net/ISocketMultiplexerJob.h" +#include "mt/CondVar.h" +#include "mt/Lock.h" +#include "mt/Mutex.h" +#include "mt/Thread.h" +#include "arch/Arch.h" +#include "arch/XArch.h" +#include "base/Log.h" +#include "base/TMethodJob.h" +#include "common/stdvector.h" // // CSocketMultiplexer diff --git a/src/lib/net/SocketMultiplexer.h b/src/lib/net/SocketMultiplexer.h index 8e10a1a6..36a3f03c 100644 --- a/src/lib/net/SocketMultiplexer.h +++ b/src/lib/net/SocketMultiplexer.h @@ -16,12 +16,11 @@ * along with this program. If not, see . */ -#ifndef CSOCKETMULTIPLEXER_H -#define CSOCKETMULTIPLEXER_H +#pragma once -#include "IArchNetwork.h" -#include "stdlist.h" -#include "stdmap.h" +#include "arch/IArchNetwork.h" +#include "common/stdlist.h" +#include "common/stdmap.h" template class CCondVar; @@ -109,5 +108,3 @@ private: CSocketJobMap m_socketJobMap; ISocketMultiplexerJob* m_cursorMark; }; - -#endif diff --git a/src/lib/net/TCPListenSocket.cpp b/src/lib/net/TCPListenSocket.cpp index 5d3e1739..c8f7a69c 100644 --- a/src/lib/net/TCPListenSocket.cpp +++ b/src/lib/net/TCPListenSocket.cpp @@ -16,18 +16,19 @@ * along with this program. If not, see . */ -#include "CTCPListenSocket.h" -#include "CNetworkAddress.h" -#include "CSocketMultiplexer.h" -#include "CTCPSocket.h" -#include "TSocketMultiplexerMethodJob.h" -#include "XSocket.h" -#include "XIO.h" -#include "CLock.h" -#include "CMutex.h" -#include "IEventQueue.h" -#include "CArch.h" -#include "XArch.h" +#include "net/TCPListenSocket.h" + +#include "net/NetworkAddress.h" +#include "net/SocketMultiplexer.h" +#include "net/TCPSocket.h" +#include "net/TSocketMultiplexerMethodJob.h" +#include "net/XSocket.h" +#include "io/XIO.h" +#include "mt/Lock.h" +#include "mt/Mutex.h" +#include "arch/Arch.h" +#include "arch/XArch.h" +#include "base/IEventQueue.h" // // CTCPListenSocket diff --git a/src/lib/net/TCPListenSocket.h b/src/lib/net/TCPListenSocket.h index ceff60bd..ad03f0a9 100644 --- a/src/lib/net/TCPListenSocket.h +++ b/src/lib/net/TCPListenSocket.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef CTCPLISTENSOCKET_H -#define CTCPLISTENSOCKET_H +#pragma once -#include "IListenSocket.h" -#include "IArchNetwork.h" +#include "net/IListenSocket.h" +#include "arch/IArchNetwork.h" class CMutex; class ISocketMultiplexerJob; @@ -55,5 +54,3 @@ private: IEventQueue* m_events; CSocketMultiplexer* m_socketMultiplexer; }; - -#endif diff --git a/src/lib/net/TCPSocket.cpp b/src/lib/net/TCPSocket.cpp index 61bdb2b4..c47854a5 100644 --- a/src/lib/net/TCPSocket.cpp +++ b/src/lib/net/TCPSocket.cpp @@ -16,17 +16,19 @@ * along with this program. If not, see . */ -#include "CTCPSocket.h" -#include "CNetworkAddress.h" -#include "CSocketMultiplexer.h" -#include "TSocketMultiplexerMethodJob.h" -#include "XSocket.h" -#include "CLock.h" -#include "CLog.h" -#include "IEventQueue.h" -#include "IEventJob.h" -#include "CArch.h" -#include "XArch.h" +#include "net/TCPSocket.h" + +#include "net/NetworkAddress.h" +#include "net/SocketMultiplexer.h" +#include "net/TSocketMultiplexerMethodJob.h" +#include "net/XSocket.h" +#include "mt/Lock.h" +#include "arch/Arch.h" +#include "arch/XArch.h" +#include "base/Log.h" +#include "base/IEventQueue.h" +#include "base/IEventJob.h" + #include #include #include diff --git a/src/lib/net/TCPSocket.h b/src/lib/net/TCPSocket.h index e6da7e47..3169ba59 100644 --- a/src/lib/net/TCPSocket.h +++ b/src/lib/net/TCPSocket.h @@ -16,14 +16,13 @@ * along with this program. If not, see . */ -#ifndef CTCPSOCKET_H -#define CTCPSOCKET_H +#pragma once -#include "IDataSocket.h" -#include "CStreamBuffer.h" -#include "CCondVar.h" -#include "CMutex.h" -#include "IArchNetwork.h" +#include "net/IDataSocket.h" +#include "io/StreamBuffer.h" +#include "mt/CondVar.h" +#include "mt/Mutex.h" +#include "arch/IArchNetwork.h" class CMutex; class CThread; @@ -90,5 +89,3 @@ private: IEventQueue* m_events; CSocketMultiplexer* m_socketMultiplexer; }; - -#endif diff --git a/src/lib/net/TCPSocketFactory.cpp b/src/lib/net/TCPSocketFactory.cpp index cbe3ed0f..8365f3c3 100644 --- a/src/lib/net/TCPSocketFactory.cpp +++ b/src/lib/net/TCPSocketFactory.cpp @@ -16,9 +16,10 @@ * along with this program. If not, see . */ -#include "CTCPSocketFactory.h" -#include "CTCPSocket.h" -#include "CTCPListenSocket.h" +#include "net/TCPSocketFactory.h" + +#include "net/TCPSocket.h" +#include "net/TCPListenSocket.h" // // CTCPSocketFactory diff --git a/src/lib/net/TCPSocketFactory.h b/src/lib/net/TCPSocketFactory.h index 872bf2df..a3ad9729 100644 --- a/src/lib/net/TCPSocketFactory.h +++ b/src/lib/net/TCPSocketFactory.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CTCPSOCKETFACTORY_H -#define CTCPSOCKETFACTORY_H +#pragma once -#include "ISocketFactory.h" +#include "net/ISocketFactory.h" class IEventQueue; class CSocketMultiplexer; @@ -38,5 +37,3 @@ private: IEventQueue* m_events; CSocketMultiplexer* m_socketMultiplexer; }; - -#endif diff --git a/src/lib/net/TSocketMultiplexerMethodJob.h b/src/lib/net/TSocketMultiplexerMethodJob.h index b1c0e35e..1f109256 100644 --- a/src/lib/net/TSocketMultiplexerMethodJob.h +++ b/src/lib/net/TSocketMultiplexerMethodJob.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef TSOCKERMULTIPLEXERMETHODJOB_H -#define TSOCKERMULTIPLEXERMETHODJOB_H +#pragma once -#include "ISocketMultiplexerJob.h" -#include "CArch.h" +#include "net/ISocketMultiplexerJob.h" +#include "arch/Arch.h" //! Use a method as a socket multiplexer job /*! @@ -108,5 +107,3 @@ TSocketMultiplexerMethodJob::isWritable() const { return m_writable; } - -#endif diff --git a/src/lib/net/XSocket.cpp b/src/lib/net/XSocket.cpp index 1705b647..684946a7 100644 --- a/src/lib/net/XSocket.cpp +++ b/src/lib/net/XSocket.cpp @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#include "XSocket.h" -#include "CStringUtil.h" +#include "net/XSocket.h" +#include "base/StringUtil.h" // // XSocketAddress diff --git a/src/lib/net/XSocket.h b/src/lib/net/XSocket.h index fa32d263..ebd74e5f 100644 --- a/src/lib/net/XSocket.h +++ b/src/lib/net/XSocket.h @@ -16,13 +16,12 @@ * along with this program. If not, see . */ -#ifndef XSOCKET_H -#define XSOCKET_H +#pragma once -#include "XIO.h" -#include "XBase.h" -#include "CString.h" -#include "BasicTypes.h" +#include "io/XIO.h" +#include "base/XBase.h" +#include "base/String.h" +#include "common/basic_types.h" //! Generic socket exception XBASE_SUBCLASS(XSocket, XBase); @@ -96,5 +95,3 @@ XBASE_SUBCLASS_FORMAT(XSocketConnect, XSocket); Thrown when a socket cannot be created (by the operating system). */ XBASE_SUBCLASS_FORMAT(XSocketCreate, XSocket); - -#endif diff --git a/src/lib/platform/CMakeLists.txt b/src/lib/platform/CMakeLists.txt index eddf9952..29016dd8 100644 --- a/src/lib/platform/CMakeLists.txt +++ b/src/lib/platform/CMakeLists.txt @@ -15,14 +15,14 @@ # along with this program. If not, see . if (WIN32) - file(GLOB headers "CMSWindows*.h") - file(GLOB sources "CMSWindows*.cpp") + file(GLOB headers "MSWindows*.h") + file(GLOB sources "MSWindows*.cpp") elseif (APPLE) - file(GLOB headers "COSX*.h") - file(GLOB sources "COSX*.cpp") + file(GLOB headers "OSX*.h") + file(GLOB sources "OSX*.cpp") elseif (UNIX) - file(GLOB headers "CXWindows*.h") - file(GLOB sources "CXWindows*.cpp") + file(GLOB headers "XWindows*.h") + file(GLOB sources "XWindows*.cpp") endif() if (SYNERGY_ADD_HEADERS) @@ -30,18 +30,7 @@ if (SYNERGY_ADD_HEADERS) endif() include_directories( - ../arch - ../base - ../common - ../mt - ../synergy - ../ipc - ../net - ../io - ../server - ../client - ../synwinhk - ../synwinxt + ../ ) if (UNIX) diff --git a/src/lib/platform/IMSWindowsClipboardFacade.h b/src/lib/platform/IMSWindowsClipboardFacade.h index 1c260315..38a47967 100644 --- a/src/lib/platform/IMSWindowsClipboardFacade.h +++ b/src/lib/platform/IMSWindowsClipboardFacade.h @@ -19,9 +19,10 @@ #ifndef IMWINDOWSCLIPBOARDFACADE #define IMWINDOWSCLIPBOARDFACADE -#include "IInterface.h" +#include "common/IInterface.h" + #define WIN32_LEAN_AND_MEAN -#include +#include class IMSWindowsClipboardConverter; diff --git a/src/lib/platform/MSWindowsClipboard.cpp b/src/lib/platform/MSWindowsClipboard.cpp index dbbb0682..49f1dc8d 100644 --- a/src/lib/platform/MSWindowsClipboard.cpp +++ b/src/lib/platform/MSWindowsClipboard.cpp @@ -16,14 +16,15 @@ * along with this program. If not, see . */ -#include "CMSWindowsClipboard.h" -#include "CMSWindowsClipboardTextConverter.h" -#include "CMSWindowsClipboardUTF16Converter.h" -#include "CMSWindowsClipboardBitmapConverter.h" -#include "CMSWindowsClipboardHTMLConverter.h" -#include "CLog.h" -#include "CArchMiscWindows.h" -#include "CMSWindowsClipboardFacade.h" +#include "platform/MSWindowsClipboard.h" + +#include "platform/MSWindowsClipboardTextConverter.h" +#include "platform/MSWindowsClipboardUTF16Converter.h" +#include "platform/MSWindowsClipboardBitmapConverter.h" +#include "platform/MSWindowsClipboardHTMLConverter.h" +#include "platform/MSWindowsClipboardFacade.h" +#include "arch/win32/ArchMiscWindows.h" +#include "base/Log.h" // // CMSWindowsClipboard diff --git a/src/lib/platform/MSWindowsClipboard.h b/src/lib/platform/MSWindowsClipboard.h index ba23aea0..0df974f5 100644 --- a/src/lib/platform/MSWindowsClipboard.h +++ b/src/lib/platform/MSWindowsClipboard.h @@ -16,14 +16,14 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSCLIPBOARD_H -#define CMSWINDOWSCLIPBOARD_H +#pragma once + +#include "platform/MSWindowsClipboardFacade.h" +#include "synergy/IClipboard.h" +#include "common/stdvector.h" -#include "IClipboard.h" -#include "CMSWindowsClipboardFacade.h" -#include "stdvector.h" #define WIN32_LEAN_AND_MEAN -#include +#include class IMSWindowsClipboardConverter; class IMSWindowsClipboardFacade; @@ -111,5 +111,3 @@ public: // (i.e., the reverse of fromIClipboard()). virtual CString toIClipboard(HANDLE data) const = 0; }; - -#endif diff --git a/src/lib/platform/MSWindowsClipboardAnyTextConverter.cpp b/src/lib/platform/MSWindowsClipboardAnyTextConverter.cpp index a468887b..dfe00716 100644 --- a/src/lib/platform/MSWindowsClipboardAnyTextConverter.cpp +++ b/src/lib/platform/MSWindowsClipboardAnyTextConverter.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CMSWindowsClipboardAnyTextConverter.h" +#include "platform/MSWindowsClipboardAnyTextConverter.h" // // CMSWindowsClipboardAnyTextConverter diff --git a/src/lib/platform/MSWindowsClipboardAnyTextConverter.h b/src/lib/platform/MSWindowsClipboardAnyTextConverter.h index b5c66a4c..f2d2e21f 100644 --- a/src/lib/platform/MSWindowsClipboardAnyTextConverter.h +++ b/src/lib/platform/MSWindowsClipboardAnyTextConverter.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSCLIPBOARDANYTEXTCONVERTER_H -#define CMSWINDOWSCLIPBOARDANYTEXTCONVERTER_H +#pragma once -#include "CMSWindowsClipboard.h" +#include "platform/MSWindowsClipboard.h" //! Convert to/from some text encoding class CMSWindowsClipboardAnyTextConverter : @@ -56,5 +55,3 @@ private: CString convertLinefeedToWin32(const CString&) const; CString convertLinefeedToUnix(const CString&) const; }; - -#endif diff --git a/src/lib/platform/MSWindowsClipboardBitmapConverter.cpp b/src/lib/platform/MSWindowsClipboardBitmapConverter.cpp index c37672ee..1c9bd730 100644 --- a/src/lib/platform/MSWindowsClipboardBitmapConverter.cpp +++ b/src/lib/platform/MSWindowsClipboardBitmapConverter.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "CMSWindowsClipboardBitmapConverter.h" -#include "CLog.h" +#include "platform/MSWindowsClipboardBitmapConverter.h" + +#include "base/Log.h" // // CMSWindowsClipboardBitmapConverter diff --git a/src/lib/platform/MSWindowsClipboardBitmapConverter.h b/src/lib/platform/MSWindowsClipboardBitmapConverter.h index 93be140d..4493c7f2 100644 --- a/src/lib/platform/MSWindowsClipboardBitmapConverter.h +++ b/src/lib/platform/MSWindowsClipboardBitmapConverter.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSCLIPBOARDBITMAPCONVERTER_H -#define CMSWINDOWSCLIPBOARDBITMAPCONVERTER_H +#pragma once -#include "CMSWindowsClipboard.h" +#include "platform/MSWindowsClipboard.h" //! Convert to/from some text encoding class CMSWindowsClipboardBitmapConverter : @@ -35,5 +34,3 @@ public: virtual HANDLE fromIClipboard(const CString&) const; virtual CString toIClipboard(HANDLE) const; }; - -#endif diff --git a/src/lib/platform/MSWindowsClipboardFacade.cpp b/src/lib/platform/MSWindowsClipboardFacade.cpp index daa7437d..2985218e 100644 --- a/src/lib/platform/MSWindowsClipboardFacade.cpp +++ b/src/lib/platform/MSWindowsClipboardFacade.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "CMSWindowsClipboard.h" -#include "CMSWindowsClipboardFacade.h" +#include "platform/MSWindowsClipboardFacade.h" + +#include "platform/MSWindowsClipboard.h" void CMSWindowsClipboardFacade::write(HANDLE win32Data, UINT win32Format) { diff --git a/src/lib/platform/MSWindowsClipboardFacade.h b/src/lib/platform/MSWindowsClipboardFacade.h index 5ad95d12..a022c23b 100644 --- a/src/lib/platform/MSWindowsClipboardFacade.h +++ b/src/lib/platform/MSWindowsClipboardFacade.h @@ -16,16 +16,14 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSCLIPBOARDFACADE_H -#define CMSWINDOWSCLIPBOARDFACADE_H +#pragma once -#include "IMSWindowsClipboardFacade.h" -#include "IClipboard.h" +#include "platform/IMSWindowsClipboardFacade.h" + +#include "synergy/IClipboard.h" class CMSWindowsClipboardFacade : public IMSWindowsClipboardFacade { public: virtual void write(HANDLE win32Data, UINT win32Format); }; - -#endif \ No newline at end of file diff --git a/src/lib/platform/MSWindowsClipboardHTMLConverter.cpp b/src/lib/platform/MSWindowsClipboardHTMLConverter.cpp index 660a5361..376325b2 100644 --- a/src/lib/platform/MSWindowsClipboardHTMLConverter.cpp +++ b/src/lib/platform/MSWindowsClipboardHTMLConverter.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "CMSWindowsClipboardHTMLConverter.h" -#include "CStringUtil.h" +#include "platform/MSWindowsClipboardHTMLConverter.h" + +#include "base/StringUtil.h" // // CMSWindowsClipboardHTMLConverter diff --git a/src/lib/platform/MSWindowsClipboardHTMLConverter.h b/src/lib/platform/MSWindowsClipboardHTMLConverter.h index d5d7a53e..aca33245 100644 --- a/src/lib/platform/MSWindowsClipboardHTMLConverter.h +++ b/src/lib/platform/MSWindowsClipboardHTMLConverter.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSCLIPBOARDHTMLCONVERTER_H -#define CMSWINDOWSCLIPBOARDHTMLCONVERTER_H +#pragma once -#include "CMSWindowsClipboardAnyTextConverter.h" +#include "platform/MSWindowsClipboardAnyTextConverter.h" //! Convert to/from HTML encoding class CMSWindowsClipboardHTMLConverter : @@ -44,5 +43,3 @@ private: private: UINT m_format; }; - -#endif diff --git a/src/lib/platform/MSWindowsClipboardTextConverter.cpp b/src/lib/platform/MSWindowsClipboardTextConverter.cpp index 0e83bbee..ee980b5a 100644 --- a/src/lib/platform/MSWindowsClipboardTextConverter.cpp +++ b/src/lib/platform/MSWindowsClipboardTextConverter.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "CMSWindowsClipboardTextConverter.h" -#include "CUnicode.h" +#include "platform/MSWindowsClipboardTextConverter.h" + +#include "base/Unicode.h" // // CMSWindowsClipboardTextConverter diff --git a/src/lib/platform/MSWindowsClipboardTextConverter.h b/src/lib/platform/MSWindowsClipboardTextConverter.h index e4649aa4..ffcf0fad 100644 --- a/src/lib/platform/MSWindowsClipboardTextConverter.h +++ b/src/lib/platform/MSWindowsClipboardTextConverter.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSCLIPBOARDTEXTCONVERTER_H -#define CMSWINDOWSCLIPBOARDTEXTCONVERTER_H +#pragma once -#include "CMSWindowsClipboardAnyTextConverter.h" +#include "platform/MSWindowsClipboardAnyTextConverter.h" //! Convert to/from locale text encoding class CMSWindowsClipboardTextConverter : @@ -36,5 +35,3 @@ protected: virtual CString doFromIClipboard(const CString&) const; virtual CString doToIClipboard(const CString&) const; }; - -#endif diff --git a/src/lib/platform/MSWindowsClipboardUTF16Converter.cpp b/src/lib/platform/MSWindowsClipboardUTF16Converter.cpp index aee17775..b188ea3f 100644 --- a/src/lib/platform/MSWindowsClipboardUTF16Converter.cpp +++ b/src/lib/platform/MSWindowsClipboardUTF16Converter.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "CMSWindowsClipboardUTF16Converter.h" -#include "CUnicode.h" +#include "platform/MSWindowsClipboardUTF16Converter.h" + +#include "base/Unicode.h" // // CMSWindowsClipboardUTF16Converter diff --git a/src/lib/platform/MSWindowsClipboardUTF16Converter.h b/src/lib/platform/MSWindowsClipboardUTF16Converter.h index fbfa9906..e02eab62 100644 --- a/src/lib/platform/MSWindowsClipboardUTF16Converter.h +++ b/src/lib/platform/MSWindowsClipboardUTF16Converter.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSCLIPBOARDUTF16CONVERTER_H -#define CMSWINDOWSCLIPBOARDUTF16CONVERTER_H +#pragma once -#include "CMSWindowsClipboardAnyTextConverter.h" +#include "platform/MSWindowsClipboardAnyTextConverter.h" //! Convert to/from UTF-16 encoding class CMSWindowsClipboardUTF16Converter : @@ -36,5 +35,3 @@ protected: virtual CString doFromIClipboard(const CString&) const; virtual CString doToIClipboard(const CString&) const; }; - -#endif diff --git a/src/lib/platform/MSWindowsDebugOutputter.cpp b/src/lib/platform/MSWindowsDebugOutputter.cpp index 85921cae..9173b715 100644 --- a/src/lib/platform/MSWindowsDebugOutputter.cpp +++ b/src/lib/platform/MSWindowsDebugOutputter.cpp @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#include "CMSWindowsDebugOutputter.h" +#include "platform/MSWindowsDebugOutputter.h" #define WIN32_LEAN_AND_MEAN #include - #include CMSWindowsDebugOutputter::CMSWindowsDebugOutputter() diff --git a/src/lib/platform/MSWindowsDebugOutputter.h b/src/lib/platform/MSWindowsDebugOutputter.h index f89c470e..135cbd93 100644 --- a/src/lib/platform/MSWindowsDebugOutputter.h +++ b/src/lib/platform/MSWindowsDebugOutputter.h @@ -18,7 +18,7 @@ #pragma once -#include "ILogOutputter.h" +#include "base/ILogOutputter.h" //! Write log to debugger /*! diff --git a/src/lib/platform/MSWindowsDesks.cpp b/src/lib/platform/MSWindowsDesks.cpp index 120f2b6b..6d0e7f78 100644 --- a/src/lib/platform/MSWindowsDesks.cpp +++ b/src/lib/platform/MSWindowsDesks.cpp @@ -16,21 +16,23 @@ * along with this program. If not, see . */ -#include "CMSWindowsDesks.h" -#include "CMSWindowsScreen.h" -#include "synwinhk.h" -#include "IScreenSaver.h" -#include "XScreen.h" -#include "CLock.h" -#include "CThread.h" -#include "CLog.h" -#include "IEventQueue.h" -#include "IJob.h" -#include "TMethodEventJob.h" -#include "TMethodJob.h" -#include "CArchMiscWindows.h" +#include "platform/MSWindowsDesks.h" + +#include "synwinhk/synwinhk.h" +#include "platform/MSWindowsScreen.h" +#include "synergy/IScreenSaver.h" +#include "synergy/XScreen.h" +#include "mt/Lock.h" +#include "mt/Thread.h" +#include "arch/win32/ArchMiscWindows.h" +#include "base/Log.h" +#include "base/IEventQueue.h" +#include "base/IJob.h" +#include "base/TMethodEventJob.h" +#include "base/TMethodJob.h" +#include "base/IEventQueue.h" + #include -#include "IEventQueue.h" // these are only defined when WINVER >= 0x0500 #if !defined(SPI_GETMOUSESPEED) diff --git a/src/lib/platform/MSWindowsDesks.h b/src/lib/platform/MSWindowsDesks.h index bd10d444..ceedc70c 100644 --- a/src/lib/platform/MSWindowsDesks.h +++ b/src/lib/platform/MSWindowsDesks.h @@ -16,19 +16,19 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSDESKS_H -#define CMSWINDOWSDESKS_H +#pragma once + +#include "synwinhk/synwinhk.h" +#include "synergy/key_types.h" +#include "synergy/mouse_types.h" +#include "synergy/option_types.h" +#include "mt/CondVar.h" +#include "mt/Mutex.h" +#include "base/String.h" +#include "common/stdmap.h" -#include "synwinhk.h" -#include "KeyTypes.h" -#include "MouseTypes.h" -#include "OptionTypes.h" -#include "CCondVar.h" -#include "CMutex.h" -#include "CString.h" -#include "stdmap.h" #define WIN32_LEAN_AND_MEAN -#include +#include class CEvent; class CEventQueueTimer; @@ -309,5 +309,3 @@ private: // true if program should stop on desk switch. bool m_stopOnDeskSwitch; }; - -#endif diff --git a/src/lib/platform/MSWindowsEventQueueBuffer.cpp b/src/lib/platform/MSWindowsEventQueueBuffer.cpp index 991b63ac..92241ec4 100644 --- a/src/lib/platform/MSWindowsEventQueueBuffer.cpp +++ b/src/lib/platform/MSWindowsEventQueueBuffer.cpp @@ -16,10 +16,11 @@ * along with this program. If not, see . */ -#include "CMSWindowsEventQueueBuffer.h" -#include "CThread.h" -#include "IEventQueue.h" -#include "CArchMiscWindows.h" +#include "platform/MSWindowsEventQueueBuffer.h" + +#include "arch/win32/ArchMiscWindows.h" +#include "mt/Thread.h" +#include "base/IEventQueue.h" // // CEventQueueTimer diff --git a/src/lib/platform/MSWindowsEventQueueBuffer.h b/src/lib/platform/MSWindowsEventQueueBuffer.h index c63a62bf..4c916320 100644 --- a/src/lib/platform/MSWindowsEventQueueBuffer.h +++ b/src/lib/platform/MSWindowsEventQueueBuffer.h @@ -16,12 +16,12 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSEVENTQUEUEBUFFER_H -#define CMSWINDOWSEVENTQUEUEBUFFER_H +#pragma once + +#include "base/IEventQueueBuffer.h" -#include "IEventQueueBuffer.h" #define WIN32_LEAN_AND_MEAN -#include +#include class IEventQueue; @@ -48,5 +48,3 @@ private: UINT m_daemonQuit; IEventQueue* m_events; }; - -#endif diff --git a/src/lib/platform/MSWindowsHookLibraryLoader.cpp b/src/lib/platform/MSWindowsHookLibraryLoader.cpp index f12da420..c0caf72d 100644 --- a/src/lib/platform/MSWindowsHookLibraryLoader.cpp +++ b/src/lib/platform/MSWindowsHookLibraryLoader.cpp @@ -16,9 +16,10 @@ * along with this program. If not, see . */ -#include "CMSWindowsHookLibraryLoader.h" -#include "XScreen.h" -#include "CLog.h" +#include "platform/MSWindowsHookLibraryLoader.h" + +#include "synergy/XScreen.h" +#include "base/Log.h" CMSWindowsHookLibraryLoader::CMSWindowsHookLibraryLoader() : m_init(NULL), diff --git a/src/lib/platform/MSWindowsHookLibraryLoader.h b/src/lib/platform/MSWindowsHookLibraryLoader.h index ed374cae..f197911b 100644 --- a/src/lib/platform/MSWindowsHookLibraryLoader.h +++ b/src/lib/platform/MSWindowsHookLibraryLoader.h @@ -16,13 +16,13 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSHOOKLIBRARYLOADER_H -#define CMSWINDOWSHOOKLIBRARYLOADER_H +#pragma once + +#include "synwinhk/synwinhk.h" +#include "synwinxt/synwinxt.h" #define WIN32_LEAN_AND_MEAN #include -#include "synwinhk.h" -#include "synwinxt.h" //! Loads Windows hook DLLs. class CMSWindowsHookLibraryLoader @@ -43,5 +43,3 @@ public: GetDraggingFilename m_getDraggingFilename; }; - -#endif \ No newline at end of file diff --git a/src/lib/platform/MSWindowsKeyState.cpp b/src/lib/platform/MSWindowsKeyState.cpp index 9ec8ee0d..3bda48e5 100644 --- a/src/lib/platform/MSWindowsKeyState.cpp +++ b/src/lib/platform/MSWindowsKeyState.cpp @@ -16,15 +16,16 @@ * along with this program. If not, see . */ -#include "CMSWindowsKeyState.h" -#include "CMSWindowsDesks.h" -#include "CThread.h" -#include "CFunctionJob.h" -#include "CLog.h" -#include "CStringUtil.h" -#include "IEventQueue.h" -#include "TMethodEventJob.h" -#include "CArchMiscWindows.h" +#include "platform/MSWindowsKeyState.h" + +#include "platform/MSWindowsDesks.h" +#include "mt/Thread.h" +#include "arch/win32/ArchMiscWindows.h" +#include "base/FunctionJob.h" +#include "base/Log.h" +#include "base/StringUtil.h" +#include "base/IEventQueue.h" +#include "base/TMethodEventJob.h" // extended mouse buttons #if !defined(VK_XBUTTON1) diff --git a/src/lib/platform/MSWindowsKeyState.h b/src/lib/platform/MSWindowsKeyState.h index ac0fed99..d4d5c69c 100644 --- a/src/lib/platform/MSWindowsKeyState.h +++ b/src/lib/platform/MSWindowsKeyState.h @@ -16,14 +16,14 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSKEYSTATE_H -#define CMSWINDOWSKEYSTATE_H +#pragma once + +#include "synergy/KeyState.h" +#include "base/String.h" +#include "common/stdvector.h" -#include "CKeyState.h" -#include "CString.h" -#include "stdvector.h" #define WIN32_LEAN_AND_MEAN -#include +#include class CEvent; class CEventQueueTimer; @@ -227,5 +227,3 @@ private: static const KeyID s_virtualKey[]; }; - -#endif diff --git a/src/lib/platform/MSWindowsScreen.cpp b/src/lib/platform/MSWindowsScreen.cpp index 04c602eb..01111147 100644 --- a/src/lib/platform/MSWindowsScreen.cpp +++ b/src/lib/platform/MSWindowsScreen.cpp @@ -16,30 +16,32 @@ * along with this program. If not, see . */ -#include "CMSWindowsScreen.h" -#include "CMSWindowsClipboard.h" -#include "CMSWindowsDesks.h" -#include "CMSWindowsEventQueueBuffer.h" -#include "CMSWindowsKeyState.h" -#include "CMSWindowsScreenSaver.h" -#include "CClipboard.h" -#include "CKeyMap.h" -#include "XScreen.h" -#include "CLock.h" -#include "CThread.h" -#include "CFunctionJob.h" -#include "CLog.h" -#include "CString.h" -#include "CStringUtil.h" -#include "IEventQueue.h" -#include "TMethodEventJob.h" -#include "TMethodJob.h" -#include "CArch.h" -#include "CArchMiscWindows.h" -#include "CApp.h" -#include "CArgsBase.h" -#include "CClientApp.h" -#include "CClient.h" +#include "platform/MSWindowsScreen.h" + +#include "client/Client.h" +#include "platform/MSWindowsClipboard.h" +#include "platform/MSWindowsDesks.h" +#include "platform/MSWindowsEventQueueBuffer.h" +#include "platform/MSWindowsKeyState.h" +#include "platform/MSWindowsScreenSaver.h" +#include "synergy/Clipboard.h" +#include "synergy/KeyMap.h" +#include "synergy/XScreen.h" +#include "synergy/App.h" +#include "synergy/ArgsBase.h" +#include "synergy/ClientApp.h" +#include "mt/Lock.h" +#include "mt/Thread.h" +#include "arch/win32/ArchMiscWindows.h" +#include "arch/Arch.h" +#include "base/FunctionJob.h" +#include "base/Log.h" +#include "base/String.h" +#include "base/StringUtil.h" +#include "base/IEventQueue.h" +#include "base/TMethodEventJob.h" +#include "base/TMethodJob.h" + #include #include #include diff --git a/src/lib/platform/MSWindowsScreen.h b/src/lib/platform/MSWindowsScreen.h index 762f3ea6..e6bb6c46 100644 --- a/src/lib/platform/MSWindowsScreen.h +++ b/src/lib/platform/MSWindowsScreen.h @@ -16,18 +16,17 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSSCREEN_H -#define CMSWINDOWSSCREEN_H +#pragma once -#include "CPlatformScreen.h" -#include "synwinhk.h" -#include "CCondVar.h" -#include "CMutex.h" -#include "CString.h" -#include "CMSWindowsHookLibraryLoader.h" +#include "platform/MSWindowsHookLibraryLoader.h" +#include "synergy/PlatformScreen.h" +#include "synwinhk/synwinhk.h" +#include "mt/CondVar.h" +#include "mt/Mutex.h" +#include "base/String.h" #define WIN32_LEAN_AND_MEAN -#include +#include class CEventQueueTimer; class CMSWindowsDesks; @@ -333,5 +332,3 @@ private: CString m_desktopPath; }; - -#endif diff --git a/src/lib/platform/MSWindowsScreenSaver.cpp b/src/lib/platform/MSWindowsScreenSaver.cpp index 7086cafb..68ce3396 100644 --- a/src/lib/platform/MSWindowsScreenSaver.cpp +++ b/src/lib/platform/MSWindowsScreenSaver.cpp @@ -16,13 +16,15 @@ * along with this program. If not, see . */ -#include "CMSWindowsScreenSaver.h" -#include "CMSWindowsScreen.h" -#include "CThread.h" -#include "CLog.h" -#include "TMethodJob.h" -#include "CArch.h" -#include "CArchMiscWindows.h" +#include "platform/MSWindowsScreenSaver.h" + +#include "platform/MSWindowsScreen.h" +#include "mt/Thread.h" +#include "arch/Arch.h" +#include "arch/win32/ArchMiscWindows.h" +#include "base/Log.h" +#include "base/TMethodJob.h" + #include #include diff --git a/src/lib/platform/MSWindowsScreenSaver.h b/src/lib/platform/MSWindowsScreenSaver.h index 73074644..4e159bea 100644 --- a/src/lib/platform/MSWindowsScreenSaver.h +++ b/src/lib/platform/MSWindowsScreenSaver.h @@ -16,13 +16,13 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSSCREENSAVER_H -#define CMSWINDOWSSCREENSAVER_H +#pragma once + +#include "synergy/IScreenSaver.h" +#include "base/String.h" -#include "IScreenSaver.h" -#include "CString.h" #define WIN32_LEAN_AND_MEAN -#include +#include class CThread; @@ -92,5 +92,3 @@ private: // for deactivation (and is therefore active). bool m_active; }; - -#endif diff --git a/src/lib/platform/MSWindowsSession.cpp b/src/lib/platform/MSWindowsSession.cpp index 70db3390..0a7e63ac 100644 --- a/src/lib/platform/MSWindowsSession.cpp +++ b/src/lib/platform/MSWindowsSession.cpp @@ -15,12 +15,14 @@ * along with this program. If not, see . */ -#include "CMSWindowsSession.h" -#include "CLog.h" +#include "platform/MSWindowsSession.h" + +#include "arch/win32/XArchWindows.h" +#include "synergy/XSynergy.h" +#include "base/Log.h" + #include #include -#include "XSynergy.h" -#include "XArchWindows.h" CMSWindowsSession::CMSWindowsSession() : m_activeSessionId(-1) diff --git a/src/lib/platform/MSWindowsUtil.cpp b/src/lib/platform/MSWindowsUtil.cpp index 61876a27..270c6978 100644 --- a/src/lib/platform/MSWindowsUtil.cpp +++ b/src/lib/platform/MSWindowsUtil.cpp @@ -16,8 +16,10 @@ * along with this program. If not, see . */ -#include "CMSWindowsUtil.h" -#include "CStringUtil.h" +#include "platform/MSWindowsUtil.h" + +#include "base/StringUtil.h" + #include // diff --git a/src/lib/platform/MSWindowsUtil.h b/src/lib/platform/MSWindowsUtil.h index d233db6a..573d7c60 100644 --- a/src/lib/platform/MSWindowsUtil.h +++ b/src/lib/platform/MSWindowsUtil.h @@ -16,12 +16,12 @@ * along with this program. If not, see . */ -#ifndef CMSWINDOWSUTIL_H -#define CMSWINDOWSUTIL_H +#pragma once + +#include "base/String.h" -#include "CString.h" #define WINDOWS_LEAN_AND_MEAN -#include +#include class CMSWindowsUtil { public: @@ -38,5 +38,3 @@ public: */ static CString getErrorString(HINSTANCE, DWORD error, DWORD id); }; - -#endif diff --git a/src/lib/platform/MSWindowsWatchdog.cpp b/src/lib/platform/MSWindowsWatchdog.cpp index fa9c7cb1..fac956aa 100644 --- a/src/lib/platform/MSWindowsWatchdog.cpp +++ b/src/lib/platform/MSWindowsWatchdog.cpp @@ -16,23 +16,24 @@ * along with this program. If not, see . */ -#include "CMSWindowsWatchdog.h" -#include "CThread.h" -#include "TMethodJob.h" -#include "CLog.h" -#include "CArch.h" -#include "Version.h" -#include "CArchDaemonWindows.h" -#include "XArchWindows.h" -#include "CApp.h" -#include "CArgsBase.h" -#include "CIpcLogOutputter.h" -#include "CIpcServer.h" -#include "CIpcMessage.h" -#include "Ipc.h" +#include "platform/MSWindowsWatchdog.h" + +#include "ipc/IpcLogOutputter.h" +#include "ipc/IpcServer.h" +#include "ipc/IpcMessage.h" +#include "ipc/Ipc.h" +#include "synergy/App.h" +#include "synergy/ArgsBase.h" +#include "mt/Thread.h" +#include "arch/win32/ArchDaemonWindows.h" +#include "arch/win32/XArchWindows.h" +#include "arch/Arch.h" +#include "base/TMethodJob.h" +#include "base/Log.h" +#include "common/Version.h" -#include #include +#include #include enum { diff --git a/src/lib/platform/MSWindowsWatchdog.h b/src/lib/platform/MSWindowsWatchdog.h index 0fb6f750..67936011 100644 --- a/src/lib/platform/MSWindowsWatchdog.h +++ b/src/lib/platform/MSWindowsWatchdog.h @@ -18,12 +18,13 @@ #pragma once +#include "platform/MSWindowsSession.h" +#include "synergy/XSynergy.h" + #define WIN32_LEAN_AND_MEAN -#include "CMSWindowsSession.h" #include #include #include -#include "XSynergy.h" class CThread; class CIpcLogOutputter; diff --git a/src/lib/platform/OSXClipboard.cpp b/src/lib/platform/OSXClipboard.cpp index a8f4cac3..b36c4fc0 100644 --- a/src/lib/platform/OSXClipboard.cpp +++ b/src/lib/platform/OSXClipboard.cpp @@ -16,12 +16,13 @@ * along with this program. If not, see . */ -#include "COSXClipboard.h" -#include "CClipboard.h" -#include "COSXClipboardUTF16Converter.h" -#include "COSXClipboardTextConverter.h" -#include "CLog.h" -#include "XArch.h" +#include "platform/OSXClipboard.h" + +#include "synergy/Clipboard.h" +#include "platform/OSXClipboardUTF16Converter.h" +#include "platform/OSXClipboardTextConverter.h" +#include "base/Log.h" +#include "arch/XArch.h" // // COSXClipboard diff --git a/src/lib/platform/OSXClipboard.h b/src/lib/platform/OSXClipboard.h index 069b7c84..e76c13fb 100644 --- a/src/lib/platform/OSXClipboard.h +++ b/src/lib/platform/OSXClipboard.h @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -#ifndef COSXCLIPBOARD_H -#define COSXCLIPBOARD_H +#pragma once + +#include "synergy/IClipboard.h" #include -#include "IClipboard.h" #include class IOSXClipboardConverter; @@ -93,5 +93,3 @@ public: //@} }; - -#endif diff --git a/src/lib/platform/OSXClipboardAnyTextConverter.cpp b/src/lib/platform/OSXClipboardAnyTextConverter.cpp index 7c0fb5da..8dac60ce 100644 --- a/src/lib/platform/OSXClipboardAnyTextConverter.cpp +++ b/src/lib/platform/OSXClipboardAnyTextConverter.cpp @@ -16,7 +16,8 @@ * along with this program. If not, see . */ -#include "COSXClipboardAnyTextConverter.h" +#include "platform/OSXClipboardAnyTextConverter.h" + #include // diff --git a/src/lib/platform/OSXClipboardAnyTextConverter.h b/src/lib/platform/OSXClipboardAnyTextConverter.h index 35cdb1ae..d6231196 100644 --- a/src/lib/platform/OSXClipboardAnyTextConverter.h +++ b/src/lib/platform/OSXClipboardAnyTextConverter.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef COSXCLIPBOARDANYTEXTCONVERTER_H -#define COSXCLIPBOARDANYTEXTCONVERTER_H +#pragma once -#include "COSXClipboard.h" +#include "platform/OSXClipboard.h" //! Convert to/from some text encoding class COSXClipboardAnyTextConverter : public IOSXClipboardConverter { @@ -52,5 +51,3 @@ private: static CString convertLinefeedToMacOS(const CString&); static CString convertLinefeedToUnix(const CString&); }; - -#endif diff --git a/src/lib/platform/OSXClipboardTextConverter.cpp b/src/lib/platform/OSXClipboardTextConverter.cpp index ef60d3cd..b8be020d 100644 --- a/src/lib/platform/OSXClipboardTextConverter.cpp +++ b/src/lib/platform/OSXClipboardTextConverter.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "COSXClipboardTextConverter.h" -#include "CUnicode.h" +#include "platform/OSXClipboardTextConverter.h" + +#include "base/Unicode.h" // // COSXClipboardTextConverter diff --git a/src/lib/platform/OSXClipboardTextConverter.h b/src/lib/platform/OSXClipboardTextConverter.h index 68c3e534..ecb19276 100644 --- a/src/lib/platform/OSXClipboardTextConverter.h +++ b/src/lib/platform/OSXClipboardTextConverter.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef COSXCLIPBOARDTEXTCONVERTER_H -#define COSXCLIPBOARDTEXTCONVERTER_H +#pragma once -#include "COSXClipboardAnyTextConverter.h" +#include "platform/OSXClipboardAnyTextConverter.h" //! Convert to/from locale text encoding class COSXClipboardTextConverter : public COSXClipboardAnyTextConverter { @@ -41,5 +40,3 @@ protected: CFStringEncoding fromEncoding, CFStringEncoding toEncoding); }; - -#endif diff --git a/src/lib/platform/OSXClipboardUTF16Converter.cpp b/src/lib/platform/OSXClipboardUTF16Converter.cpp index f7a052ae..fe28ec6e 100644 --- a/src/lib/platform/OSXClipboardUTF16Converter.cpp +++ b/src/lib/platform/OSXClipboardUTF16Converter.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "COSXClipboardUTF16Converter.h" -#include "CUnicode.h" +#include "platform/OSXClipboardUTF16Converter.h" + +#include "base/Unicode.h" // // COSXClipboardUTF16Converter diff --git a/src/lib/platform/OSXClipboardUTF16Converter.h b/src/lib/platform/OSXClipboardUTF16Converter.h index 09b5f5c2..2ab4c64d 100644 --- a/src/lib/platform/OSXClipboardUTF16Converter.h +++ b/src/lib/platform/OSXClipboardUTF16Converter.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef COSXCLIPBOARDUTF16CONVERTER_H -#define COSXCLIPBOARDUTF16CONVERTER_H +#pragma once -#include "COSXClipboardAnyTextConverter.h" +#include "platform/OSXClipboardAnyTextConverter.h" //! Convert to/from UTF-16 encoding class COSXClipboardUTF16Converter : public COSXClipboardAnyTextConverter { @@ -36,5 +35,3 @@ protected: virtual CString doFromIClipboard(const CString&) const; virtual CString doToIClipboard(const CString&) const; }; - -#endif diff --git a/src/lib/platform/OSXDragSimulator.h b/src/lib/platform/OSXDragSimulator.h index b01255fa..571f7e5e 100644 --- a/src/lib/platform/OSXDragSimulator.h +++ b/src/lib/platform/OSXDragSimulator.h @@ -17,7 +17,8 @@ #pragma once -#include "common.h" +#include "common/common.h" + #import #if defined(__cplusplus) diff --git a/src/lib/platform/COSXDragSimulator.m b/src/lib/platform/OSXDragSimulator.m similarity index 97% rename from src/lib/platform/COSXDragSimulator.m rename to src/lib/platform/OSXDragSimulator.m index a0f44df3..a1436e9a 100644 --- a/src/lib/platform/COSXDragSimulator.m +++ b/src/lib/platform/OSXDragSimulator.m @@ -12,8 +12,10 @@ * GNU General Public License for more details. */ -#import "COSXDragSimulator.h" -#import "COSXDragView.h" +#import "platform/COSXDragSimulator.h" + +#import "platform/COSXDragView.h" + #import #import #import diff --git a/src/lib/platform/COSXDragView.m b/src/lib/platform/OSXDragView.m similarity index 98% rename from src/lib/platform/COSXDragView.m rename to src/lib/platform/OSXDragView.m index ae954272..26544187 100644 --- a/src/lib/platform/COSXDragView.m +++ b/src/lib/platform/OSXDragView.m @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -#import "COSXDragView.h" +#import "platform/COSXDragView.h" #ifdef MAC_OS_X_VERSION_10_7 diff --git a/src/lib/platform/OSXEventQueueBuffer.cpp b/src/lib/platform/OSXEventQueueBuffer.cpp index 90e96378..13f7ccc3 100644 --- a/src/lib/platform/OSXEventQueueBuffer.cpp +++ b/src/lib/platform/OSXEventQueueBuffer.cpp @@ -16,9 +16,10 @@ * along with this program. If not, see . */ -#include "COSXEventQueueBuffer.h" -#include "CEvent.h" -#include "IEventQueue.h" +#include "platform/OSXEventQueueBuffer.h" + +#include "base/Event.h" +#include "base/IEventQueue.h" // // CEventQueueTimer diff --git a/src/lib/platform/OSXEventQueueBuffer.h b/src/lib/platform/OSXEventQueueBuffer.h index f571beef..fc664d5a 100644 --- a/src/lib/platform/OSXEventQueueBuffer.h +++ b/src/lib/platform/OSXEventQueueBuffer.h @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -#ifndef COSXEVENTQUEUEBUFFER_H -#define COSXEVENTQUEUEBUFFER_H +#pragma once + +#include "IEventQueueBuffer.h" #include -#include "IEventQueueBuffer.h" class IEventQueue; @@ -45,5 +45,3 @@ private: IEventQueue* m_eventQueue; EventQueueRef m_carbonEventQueue; }; - -#endif diff --git a/src/lib/platform/OSXKeyState.cpp b/src/lib/platform/OSXKeyState.cpp index e265cf0d..270ed854 100644 --- a/src/lib/platform/OSXKeyState.cpp +++ b/src/lib/platform/OSXKeyState.cpp @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -#include "COSXKeyState.h" -#include "CLog.h" -#include "CArch.h" +#include "platform/OSXKeyState.h" +#include "arch/Arch.h" +#include "base/Log.h" #if defined(MAC_OS_X_VERSION_10_5) #include diff --git a/src/lib/platform/OSXKeyState.h b/src/lib/platform/OSXKeyState.h index a7f20f32..c10833fd 100644 --- a/src/lib/platform/OSXKeyState.h +++ b/src/lib/platform/OSXKeyState.h @@ -16,14 +16,14 @@ * along with this program. If not, see . */ -#ifndef COSXKEYSTATE_H -#define COSXKEYSTATE_H +#pragma once + +#include "synergy/KeyState.h" +#include "common/stdmap.h" +#include "common/stdset.h" +#include "common/stdvector.h" #include -#include "CKeyState.h" -#include "stdmap.h" -#include "stdset.h" -#include "stdvector.h" #if defined(MAC_OS_X_VERSION_10_5) typedef TISInputSourceRef KeyLayout; @@ -222,5 +222,3 @@ private: bool superPressed; bool capsPressed; }; - -#endif diff --git a/src/lib/platform/OSXPasteboardPeeker.h b/src/lib/platform/OSXPasteboardPeeker.h index 0ff35397..dd67056b 100644 --- a/src/lib/platform/OSXPasteboardPeeker.h +++ b/src/lib/platform/OSXPasteboardPeeker.h @@ -17,7 +17,8 @@ #pragma once -#include "common.h" +#include "common/common.h" + #import #if defined(__cplusplus) diff --git a/src/lib/platform/COSXPasteboardPeeker.m b/src/lib/platform/OSXPasteboardPeeker.m similarity index 96% rename from src/lib/platform/COSXPasteboardPeeker.m rename to src/lib/platform/OSXPasteboardPeeker.m index 90cd4190..e7c0a241 100644 --- a/src/lib/platform/COSXPasteboardPeeker.m +++ b/src/lib/platform/OSXPasteboardPeeker.m @@ -12,7 +12,8 @@ * GNU General Public License for more details. */ -#import "COSXPasteboardPeeker.h" +#import "platform/COSXPasteboardPeeker.h" + #import #import #import diff --git a/src/lib/platform/OSXScreen.cpp b/src/lib/platform/OSXScreen.cpp index 112f01e3..b134c93f 100644 --- a/src/lib/platform/OSXScreen.cpp +++ b/src/lib/platform/OSXScreen.cpp @@ -16,29 +16,29 @@ * along with this program. If not, see . */ -#include "COSXScreen.h" -#include "COSXClipboard.h" -#include "COSXEventQueueBuffer.h" -#include "COSXKeyState.h" -#include "COSXScreenSaver.h" -#include "CClipboard.h" -#include "CKeyMap.h" -#include "CCondVar.h" -#include "CLock.h" -#include "CMutex.h" -#include "CThread.h" -#include "CLog.h" -#include "IEventQueue.h" -#include "TMethodEventJob.h" -#include "TMethodJob.h" -#include "XArch.h" -#include "COSXDragSimulator.h" -#include "COSXPasteboardPeeker.h" -#include "CClientApp.h" -#include "CClient.h" +#include "platform/OSXScreen.h" + +#include "platform/OSXClipboard.h" +#include "platform/OSXEventQueueBuffer.h" +#include "platform/OSXKeyState.h" +#include "platform/OSXScreenSaver.h" +#include "platform/OSXDragSimulator.h" +#include "platform/OSXPasteboardPeeker.h" +#include "synergy/Clipboard.h" +#include "synergy/KeyMap.h" +#include "synergy/ClientApp.h" +#include "synergy/Client.h" +#include "mt/CondVar.h" +#include "mt/Lock.h" +#include "mt/Mutex.h" +#include "mt/Thread.h" +#include "arch/XArch.h" +#include "base/Log.h" +#include "base/IEventQueue.h" +#include "base/TMethodEventJob.h" +#include "base/TMethodJob.h" #include - #include #include #include diff --git a/src/lib/platform/OSXScreen.h b/src/lib/platform/OSXScreen.h index d7eee312..9ac6b21a 100644 --- a/src/lib/platform/OSXScreen.h +++ b/src/lib/platform/OSXScreen.h @@ -16,19 +16,16 @@ * along with this program. If not, see . */ -#ifndef COSXSCREEN_H -#define COSXSCREEN_H +#pragma once + +#include "platform/OSXClipboard.h" +#include "synergy/PlatformScreen.h" +#include "base/EventTypes.h" +#include "common/stdmap.h" +#include "common/stdvector.h" #include - -#include "stdmap.h" -#include "stdvector.h" - #include -#include "COSXClipboard.h" -#include "CPlatformScreen.h" -#include "CEventTypes.h" - #include #include #include @@ -348,5 +345,3 @@ private: CThread* m_getDropTargetThread; CString m_dropTarget; }; - -#endif diff --git a/src/lib/platform/OSXScreenSaver.cpp b/src/lib/platform/OSXScreenSaver.cpp index f9381f42..86469314 100644 --- a/src/lib/platform/OSXScreenSaver.cpp +++ b/src/lib/platform/OSXScreenSaver.cpp @@ -16,11 +16,13 @@ * along with this program. If not, see . */ -#import "COSXScreenSaver.h" -#import "COSXScreenSaverUtil.h" -#import "CLog.h" -#import "IEventQueue.h" -#import "IPrimaryScreen.h" +#import "platform/COSXScreenSaver.h" + +#import "platform/COSXScreenSaverUtil.h" +#import "synergy/IPrimaryScreen.h" +#import "base/Log.h" +#import "base/IEventQueue.h" + #import #import diff --git a/src/lib/platform/OSXScreenSaver.h b/src/lib/platform/OSXScreenSaver.h index f381483f..35d0b7bb 100644 --- a/src/lib/platform/OSXScreenSaver.h +++ b/src/lib/platform/OSXScreenSaver.h @@ -16,10 +16,10 @@ * along with this program. If not, see . */ -#ifndef COSXSCREENSAVER_H -#define COSXSCREENSAVER_H +#pragma once + +#include "platform/IScreenSaver.h" -#include "IScreenSaver.h" #include class IEventQueue; @@ -57,5 +57,3 @@ private: ProcessSerialNumber m_screenSaverPSN; IEventQueue* m_events; }; - -#endif diff --git a/src/lib/platform/OSXScreenSaverUtil.h b/src/lib/platform/OSXScreenSaverUtil.h index 0286ac55..cc8be7d9 100644 --- a/src/lib/platform/OSXScreenSaverUtil.h +++ b/src/lib/platform/OSXScreenSaverUtil.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef COSXSCREENSAVERUTIL_H -#define COSXSCREENSAVERUTIL_H +#pragma once -#include "common.h" +#include "common/common.h" #if defined(__cplusplus) extern "C" { @@ -39,5 +38,3 @@ int screenSaverUtilIsActive(void*); #if defined(__cplusplus) } #endif - -#endif diff --git a/src/lib/platform/COSXScreenSaverUtil.m b/src/lib/platform/OSXScreenSaverUtil.m similarity index 95% rename from src/lib/platform/COSXScreenSaverUtil.m rename to src/lib/platform/OSXScreenSaverUtil.m index edfc7b2e..5c255bfb 100644 --- a/src/lib/platform/COSXScreenSaverUtil.m +++ b/src/lib/platform/OSXScreenSaverUtil.m @@ -12,8 +12,10 @@ * GNU General Public License for more details. */ -#import "COSXScreenSaverUtil.h" -#import "OSXScreenSaverControl.h" +#import "platform/COSXScreenSaverUtil.h" + +#import "platform/OSXScreenSaverControl.h" + #import // diff --git a/src/lib/platform/XWindowsClipboard.cpp b/src/lib/platform/XWindowsClipboard.cpp index f62da932..d9c37685 100644 --- a/src/lib/platform/XWindowsClipboard.cpp +++ b/src/lib/platform/XWindowsClipboard.cpp @@ -16,18 +16,20 @@ * along with this program. If not, see . */ -#include "CXWindowsClipboard.h" -#include "CXWindowsClipboardTextConverter.h" -#include "CXWindowsClipboardUCS2Converter.h" -#include "CXWindowsClipboardUTF8Converter.h" -#include "CXWindowsClipboardHTMLConverter.h" -#include "CXWindowsClipboardBMPConverter.h" -#include "CXWindowsUtil.h" -#include "CThread.h" -#include "CLog.h" -#include "CStopwatch.h" -#include "CArch.h" -#include "stdvector.h" +#include "platform/XWindowsClipboard.h" + +#include "platform/XWindowsClipboardTextConverter.h" +#include "platform/XWindowsClipboardUCS2Converter.h" +#include "platform/XWindowsClipboardUTF8Converter.h" +#include "platform/XWindowsClipboardHTMLConverter.h" +#include "platform/XWindowsClipboardBMPConverter.h" +#include "platform/XWindowsUtil.h" +#include "mt/Thread.h" +#include "arch/Arch.h" +#include "base/Log.h" +#include "base/Stopwatch.h" +#include "common/stdvector.h" + #include #include diff --git a/src/lib/platform/XWindowsClipboard.h b/src/lib/platform/XWindowsClipboard.h index b8944d5d..cc524267 100644 --- a/src/lib/platform/XWindowsClipboard.h +++ b/src/lib/platform/XWindowsClipboard.h @@ -16,14 +16,14 @@ * along with this program. If not, see . */ -#ifndef CXWINDOWSCLIPBOARD_H -#define CXWINDOWSCLIPBOARD_H +#pragma once + +#include "synergy/IClipboard.h" +#include "synerty/ClipboardTypes.h" +#include "common/stdmap.h" +#include "common/stdlist.h" +#include "common/stdvector.h" -#include "IClipboard.h" -#include "ClipboardTypes.h" -#include "stdmap.h" -#include "stdlist.h" -#include "stdvector.h" #if X_DISPLAY_MISSING # error X11 is required to build synergy #else @@ -376,5 +376,3 @@ public: //@} }; - -#endif diff --git a/src/lib/platform/XWindowsClipboardAnyBitmapConverter.cpp b/src/lib/platform/XWindowsClipboardAnyBitmapConverter.cpp index 411ceb04..800e51dc 100644 --- a/src/lib/platform/XWindowsClipboardAnyBitmapConverter.cpp +++ b/src/lib/platform/XWindowsClipboardAnyBitmapConverter.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CXWindowsClipboardAnyBitmapConverter.h" +#include "platform/XWindowsClipboardAnyBitmapConverter.h" // BMP info header structure struct CBMPInfoHeader { diff --git a/src/lib/platform/XWindowsClipboardAnyBitmapConverter.h b/src/lib/platform/XWindowsClipboardAnyBitmapConverter.h index 1305b1d4..8e238f02 100644 --- a/src/lib/platform/XWindowsClipboardAnyBitmapConverter.h +++ b/src/lib/platform/XWindowsClipboardAnyBitmapConverter.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CXWINDOWSCLIPBOARDANYBITMAPCONVERTER_H -#define CXWINDOWSCLIPBOARDANYBITMAPCONVERTER_H +#pragma once -#include "CXWindowsClipboard.h" +#include "platform/XWindowsClipboard.h" //! Convert to/from some text encoding class CXWindowsClipboardAnyBitmapConverter : @@ -59,5 +58,3 @@ protected: virtual CString doToIClipboard(const CString&, UInt32& w, UInt32& h, UInt32& depth) const = 0; }; - -#endif diff --git a/src/lib/platform/XWindowsClipboardBMPConverter.cpp b/src/lib/platform/XWindowsClipboardBMPConverter.cpp index 26d00dba..25f56fa7 100644 --- a/src/lib/platform/XWindowsClipboardBMPConverter.cpp +++ b/src/lib/platform/XWindowsClipboardBMPConverter.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CXWindowsClipboardBMPConverter.h" +#include "platform/XWindowsClipboardBMPConverter.h" // BMP file header structure struct CBMPHeader { diff --git a/src/lib/platform/XWindowsClipboardBMPConverter.h b/src/lib/platform/XWindowsClipboardBMPConverter.h index 0c57bfff..b7726d07 100644 --- a/src/lib/platform/XWindowsClipboardBMPConverter.h +++ b/src/lib/platform/XWindowsClipboardBMPConverter.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CXWINDOWSCLIPBOARDBMPCONVERTER_H -#define CXWINDOWSCLIPBOARDBMPCONVERTER_H +#pragma once -#include "CXWindowsClipboard.h" +#include "platform/XWindowsClipboard.h" //! Convert to/from some text encoding class CXWindowsClipboardBMPConverter : @@ -39,5 +38,3 @@ public: private: Atom m_atom; }; - -#endif diff --git a/src/lib/platform/XWindowsClipboardHTMLConverter.cpp b/src/lib/platform/XWindowsClipboardHTMLConverter.cpp index 43d53a35..e07fec73 100644 --- a/src/lib/platform/XWindowsClipboardHTMLConverter.cpp +++ b/src/lib/platform/XWindowsClipboardHTMLConverter.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "CXWindowsClipboardHTMLConverter.h" -#include "CUnicode.h" +#include "platform/XWindowsClipboardHTMLConverter.h" + +#include "base/Unicode.h" // // CXWindowsClipboardHTMLConverter diff --git a/src/lib/platform/XWindowsClipboardHTMLConverter.h b/src/lib/platform/XWindowsClipboardHTMLConverter.h index c8179876..fe8344c2 100644 --- a/src/lib/platform/XWindowsClipboardHTMLConverter.h +++ b/src/lib/platform/XWindowsClipboardHTMLConverter.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CXWINDOWSCLIPBOARDHTMLCONVERTER_H -#define CXWINDOWSCLIPBOARDHTMLCONVERTER_H +#pragma once -#include "CXWindowsClipboard.h" +#include "platform/XWindowsClipboard.h" //! Convert to/from HTML encoding class CXWindowsClipboardHTMLConverter : public IXWindowsClipboardConverter { @@ -41,5 +40,3 @@ public: private: Atom m_atom; }; - -#endif diff --git a/src/lib/platform/XWindowsClipboardTextConverter.cpp b/src/lib/platform/XWindowsClipboardTextConverter.cpp index 8a9de008..35363e44 100644 --- a/src/lib/platform/XWindowsClipboardTextConverter.cpp +++ b/src/lib/platform/XWindowsClipboardTextConverter.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "CXWindowsClipboardTextConverter.h" -#include "CUnicode.h" +#include "platform/XWindowsClipboardTextConverter.h" + +#include "base/Unicode.h" // // CXWindowsClipboardTextConverter diff --git a/src/lib/platform/XWindowsClipboardTextConverter.h b/src/lib/platform/XWindowsClipboardTextConverter.h index 9a316868..a0ed52c4 100644 --- a/src/lib/platform/XWindowsClipboardTextConverter.h +++ b/src/lib/platform/XWindowsClipboardTextConverter.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CXWINDOWSCLIPBOARDTEXTCONVERTER_H -#define CXWINDOWSCLIPBOARDTEXTCONVERTER_H +#pragma once -#include "CXWindowsClipboard.h" +#include "platform/XWindowsClipboard.h" //! Convert to/from locale text encoding class CXWindowsClipboardTextConverter : public IXWindowsClipboardConverter { @@ -41,5 +40,3 @@ public: private: Atom m_atom; }; - -#endif diff --git a/src/lib/platform/XWindowsClipboardUCS2Converter.cpp b/src/lib/platform/XWindowsClipboardUCS2Converter.cpp index 8f5985de..ffd8be82 100644 --- a/src/lib/platform/XWindowsClipboardUCS2Converter.cpp +++ b/src/lib/platform/XWindowsClipboardUCS2Converter.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "CXWindowsClipboardUCS2Converter.h" -#include "CUnicode.h" +#include "platform/XWindowsClipboardUCS2Converter.h" + +#include "base/Unicode.h" // // CXWindowsClipboardUCS2Converter diff --git a/src/lib/platform/XWindowsClipboardUCS2Converter.h b/src/lib/platform/XWindowsClipboardUCS2Converter.h index 2ea4eab5..daefccea 100644 --- a/src/lib/platform/XWindowsClipboardUCS2Converter.h +++ b/src/lib/platform/XWindowsClipboardUCS2Converter.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CXWINDOWSCLIPBOARDUCS2CONVERTER_H -#define CXWINDOWSCLIPBOARDUCS2CONVERTER_H +#pragma once -#include "CXWindowsClipboard.h" +#include "platform/XWindowsClipboard.h" //! Convert to/from UCS-2 encoding class CXWindowsClipboardUCS2Converter : public IXWindowsClipboardConverter { @@ -41,5 +40,3 @@ public: private: Atom m_atom; }; - -#endif diff --git a/src/lib/platform/XWindowsClipboardUTF8Converter.cpp b/src/lib/platform/XWindowsClipboardUTF8Converter.cpp index 47f64698..050aaea3 100644 --- a/src/lib/platform/XWindowsClipboardUTF8Converter.cpp +++ b/src/lib/platform/XWindowsClipboardUTF8Converter.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CXWindowsClipboardUTF8Converter.h" +#include "platform/XWindowsClipboardUTF8Converter.h" // // CXWindowsClipboardUTF8Converter diff --git a/src/lib/platform/XWindowsClipboardUTF8Converter.h b/src/lib/platform/XWindowsClipboardUTF8Converter.h index b224c55f..0ad6c2dd 100644 --- a/src/lib/platform/XWindowsClipboardUTF8Converter.h +++ b/src/lib/platform/XWindowsClipboardUTF8Converter.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CXWINDOWSCLIPBOARDUTF8CONVERTER_H -#define CXWINDOWSCLIPBOARDUTF8CONVERTER_H +#pragma once -#include "CXWindowsClipboard.h" +#include "platform/XWindowsClipboard.h" //! Convert to/from UTF-8 encoding class CXWindowsClipboardUTF8Converter : public IXWindowsClipboardConverter { @@ -41,5 +40,3 @@ public: private: Atom m_atom; }; - -#endif diff --git a/src/lib/platform/XWindowsEventQueueBuffer.cpp b/src/lib/platform/XWindowsEventQueueBuffer.cpp index b71420d5..74c0c30f 100644 --- a/src/lib/platform/XWindowsEventQueueBuffer.cpp +++ b/src/lib/platform/XWindowsEventQueueBuffer.cpp @@ -16,11 +16,13 @@ * along with this program. If not, see . */ -#include "CXWindowsEventQueueBuffer.h" -#include "CLock.h" -#include "CThread.h" -#include "CEvent.h" -#include "IEventQueue.h" +#include "platform/XWindowsEventQueueBuffer.h" + +#include "mt/Lock.h" +#include "mt/Thread.h" +#include "base/Event.h" +#include "base/IEventQueue.h" + #include #if HAVE_UNISTD_H # include diff --git a/src/lib/platform/XWindowsEventQueueBuffer.h b/src/lib/platform/XWindowsEventQueueBuffer.h index b53ca23f..f18a0769 100644 --- a/src/lib/platform/XWindowsEventQueueBuffer.h +++ b/src/lib/platform/XWindowsEventQueueBuffer.h @@ -16,12 +16,12 @@ * along with this program. If not, see . */ -#ifndef CXWINDOWSEVENTQUEUEBUFFER_H -#define CXWINDOWSEVENTQUEUEBUFFER_H +#pragma once + +#include "mt/Mutex.h" +#include "base/IEventQueueBuffer.h" +#include "common/stdvector.h" -#include "IEventQueueBuffer.h" -#include "CMutex.h" -#include "stdvector.h" #if X_DISPLAY_MISSING # error X11 is required to build synergy #else @@ -62,5 +62,3 @@ private: int m_pipefd[2]; IEventQueue* m_events; }; - -#endif diff --git a/src/lib/platform/XWindowsKeyState.cpp b/src/lib/platform/XWindowsKeyState.cpp index c66cb280..2802775f 100644 --- a/src/lib/platform/XWindowsKeyState.cpp +++ b/src/lib/platform/XWindowsKeyState.cpp @@ -16,11 +16,13 @@ * along with this program. If not, see . */ -#include "CXWindowsKeyState.h" -#include "CXWindowsUtil.h" -#include "CLog.h" -#include "CStringUtil.h" -#include "stdmap.h" +#include "platform/XWindowsKeyState.h" + +#include "platform/XWindowsUtil.h" +#include "base/Log.h" +#include "base/StringUtil.h" +#include "common/stdmap.h" + #include #include #if X_DISPLAY_MISSING diff --git a/src/lib/platform/XWindowsKeyState.h b/src/lib/platform/XWindowsKeyState.h index d2aa7c2b..6cc035cf 100644 --- a/src/lib/platform/XWindowsKeyState.h +++ b/src/lib/platform/XWindowsKeyState.h @@ -16,12 +16,12 @@ * along with this program. If not, see . */ -#ifndef CXWINDOWSKEYSTATE_H -#define CXWINDOWSKEYSTATE_H +#pragma once + +#include "base/KeyState.h" +#include "common/stdmap.h" +#include "common/stdvector.h" -#include "CKeyState.h" -#include "stdmap.h" -#include "stdvector.h" #if X_DISPLAY_MISSING # error X11 is required to build synergy #else @@ -160,5 +160,3 @@ private: // autorepeat state XKeyboardState m_keyboardState; }; - -#endif diff --git a/src/lib/platform/XWindowsScreen.cpp b/src/lib/platform/XWindowsScreen.cpp index 1339cf7d..284a868e 100644 --- a/src/lib/platform/XWindowsScreen.cpp +++ b/src/lib/platform/XWindowsScreen.cpp @@ -16,21 +16,24 @@ * along with this program. If not, see . */ -#include "CXWindowsScreen.h" -#include "CXWindowsClipboard.h" -#include "CXWindowsEventQueueBuffer.h" -#include "CXWindowsKeyState.h" -#include "CXWindowsScreenSaver.h" -#include "CXWindowsUtil.h" -#include "CClipboard.h" -#include "CKeyMap.h" -#include "XScreen.h" -#include "XArch.h" -#include "CLog.h" -#include "CStopwatch.h" -#include "CStringUtil.h" -#include "IEventQueue.h" -#include "TMethodEventJob.h" +#include "platform/XWindowsScreen.h" + +#include "platform/XWindowsClipboard.h" +#include "platform/XWindowsEventQueueBuffer.h" +#include "platform/XWindowsKeyState.h" +#include "platform/XWindowsScreenSaver.h" +#include "platform/XWindowsUtil.h" +#include "synergy/Clipboard.h" +#include "synergy/KeyMap.h" +#include "synergy/XScreen.h" +#include "arch/XArch.h" +#include "arch/Arch.h" +#include "base/Log.h" +#include "base/Stopwatch.h" +#include "base/StringUtil.h" +#include "base/IEventQueue.h" +#include "base/TMethodEventJob.h" + #include #include #if X_DISPLAY_MISSING @@ -67,7 +70,6 @@ # include # endif #endif -#include "CArch.h" static int xi_opcode; diff --git a/src/lib/platform/XWindowsScreen.h b/src/lib/platform/XWindowsScreen.h index e0f677d8..294e6136 100644 --- a/src/lib/platform/XWindowsScreen.h +++ b/src/lib/platform/XWindowsScreen.h @@ -16,18 +16,18 @@ * along with this program. If not, see . */ -#ifndef CXWINDOWSSCREEN_H -#define CXWINDOWSSCREEN_H +#pragma once + +#include "synergy/PlatformScreen.h" +#include "synergy/KeyMap.h" +#include "common/stdset.h" +#include "common/stdvector.h" -#include "CPlatformScreen.h" -#include "stdset.h" -#include "stdvector.h" #if X_DISPLAY_MISSING # error X11 is required to build synergy #else # include #endif -#include "CKeyMap.h" class CXWindowsClipboard; class CXWindowsKeyState; @@ -250,5 +250,3 @@ private: // ioErrorHandler(). static CXWindowsScreen* s_screen; }; - -#endif diff --git a/src/lib/platform/XWindowsScreenSaver.cpp b/src/lib/platform/XWindowsScreenSaver.cpp index 6f74dcdf..140bee46 100644 --- a/src/lib/platform/XWindowsScreenSaver.cpp +++ b/src/lib/platform/XWindowsScreenSaver.cpp @@ -16,13 +16,15 @@ * along with this program. If not, see . */ -#include "CXWindowsScreenSaver.h" -#include "CXWindowsUtil.h" -#include "IPlatformScreen.h" -#include "CLog.h" -#include "CEvent.h" -#include "IEventQueue.h" -#include "TMethodEventJob.h" +#include "platform/XWindowsScreenSaver.h" + +#include "platform/XWindowsUtil.h" +#include "synergy/IPlatformScreen.h" +#include "base/Log.h" +#include "base/Event.h" +#include "base/IEventQueue.h" +#include "base/TMethodEventJob.h" + #include #if HAVE_X11_EXTENSIONS_XTEST_H # include diff --git a/src/lib/platform/XWindowsScreenSaver.h b/src/lib/platform/XWindowsScreenSaver.h index 87e81c33..3040f6ce 100644 --- a/src/lib/platform/XWindowsScreenSaver.h +++ b/src/lib/platform/XWindowsScreenSaver.h @@ -16,17 +16,17 @@ * along with this program. If not, see . */ -#ifndef CXWINDOWSSCREENSAVER_H -#define CXWINDOWSSCREENSAVER_H +#pragma once + +#include "synergy/IScreenSaver.h" +#include "base/IEventQueue.h" +#include "common/stdmap.h" -#include "IScreenSaver.h" -#include "stdmap.h" #if X_DISPLAY_MISSING # error X11 is required to build synergy #else # include #endif -#include "IEventQueue.h" class CEvent; class CEventQueueTimer; @@ -167,5 +167,3 @@ private: IEventQueue* m_events; }; - -#endif diff --git a/src/lib/platform/XWindowsUtil.cpp b/src/lib/platform/XWindowsUtil.cpp index ca0178f4..0cf72823 100644 --- a/src/lib/platform/XWindowsUtil.cpp +++ b/src/lib/platform/XWindowsUtil.cpp @@ -16,11 +16,13 @@ * along with this program. If not, see . */ -#include "CXWindowsUtil.h" -#include "KeyTypes.h" -#include "CThread.h" -#include "CLog.h" -#include "CStringUtil.h" +#include "platform/XWindowsUtil.h" + +#include "platform/KeyTypes.h" +#include "mt/Thread.h" +#include "base/Log.h" +#include "base/StringUtil.h" + #include #define XK_APL #define XK_ARABIC diff --git a/src/lib/platform/XWindowsUtil.h b/src/lib/platform/XWindowsUtil.h index c7ae9baf..17149266 100644 --- a/src/lib/platform/XWindowsUtil.h +++ b/src/lib/platform/XWindowsUtil.h @@ -16,13 +16,13 @@ * along with this program. If not, see . */ -#ifndef CXWINDOWSUTIL_H -#define CXWINDOWSUTIL_H +#pragma once + +#include "base/String.h" +#include "base/EventTypes.h" +#include "common/stdmap.h" +#include "common/stdvector.h" -#include "CString.h" -#include "BasicTypes.h" -#include "stdmap.h" -#include "stdvector.h" #if X_DISPLAY_MISSING # error X11 is required to build synergy #else @@ -185,5 +185,3 @@ private: static CKeySymMap s_keySymToUCS4; }; - -#endif diff --git a/src/lib/server/BaseClientProxy.cpp b/src/lib/server/BaseClientProxy.cpp index 0ab4e3ce..e76e74b0 100644 --- a/src/lib/server/BaseClientProxy.cpp +++ b/src/lib/server/BaseClientProxy.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CBaseClientProxy.h" +#include "server/BaseClientProxy.h" // // CBaseClientProxy diff --git a/src/lib/server/BaseClientProxy.h b/src/lib/server/BaseClientProxy.h index 985d7ba1..03ed2ce3 100644 --- a/src/lib/server/BaseClientProxy.h +++ b/src/lib/server/BaseClientProxy.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef CBASECLIENTPROXY_H -#define CBASECLIENTPROXY_H +#pragma once -#include "IClient.h" -#include "CString.h" +#include "synergy/IClient.h" +#include "base/String.h" //! Generic proxy for client or primary class CBaseClientProxy : public IClient { @@ -87,5 +86,3 @@ private: CString m_name; SInt32 m_x, m_y; }; - -#endif diff --git a/src/lib/server/CMakeLists.txt b/src/lib/server/CMakeLists.txt index 353cb05d..d99460de 100644 --- a/src/lib/server/CMakeLists.txt +++ b/src/lib/server/CMakeLists.txt @@ -22,13 +22,7 @@ if (SYNERGY_ADD_HEADERS) endif() include_directories( - ../arch - ../base - ../common - ../io - ../mt - ../net - ../synergy + ../ ../../../ext ) diff --git a/src/lib/server/ClientListener.cpp b/src/lib/server/ClientListener.cpp index b6131116..48f6ef3d 100644 --- a/src/lib/server/ClientListener.cpp +++ b/src/lib/server/ClientListener.cpp @@ -16,20 +16,21 @@ * along with this program. If not, see . */ -#include "CClientListener.h" -#include "CClientProxy.h" -#include "CClientProxyUnknown.h" -#include "CPacketStreamFilter.h" -#include "IStreamFilterFactory.h" -#include "IDataSocket.h" -#include "IListenSocket.h" -#include "ISocketFactory.h" -#include "XSocket.h" -#include "CLog.h" -#include "IEventQueue.h" -#include "TMethodEventJob.h" -#include "CCryptoStream.h" -#include "CCryptoOptions.h" +#include "server/ClientListener.h" + +#include "server/ClientProxy.h" +#include "server/ClientProxyUnknown.h" +#include "synergy/PacketStreamFilter.h" +#include "net/IDataSocket.h" +#include "net/IListenSocket.h" +#include "net/ISocketFactory.h" +#include "net/XSocket.h" +#include "io/CryptoStream.h" +#include "io/CryptoOptions.h" +#include "io/IStreamFilterFactory.h" +#include "base/Log.h" +#include "base/IEventQueue.h" +#include "base/TMethodEventJob.h" // // CClientListener diff --git a/src/lib/server/ClientListener.h b/src/lib/server/ClientListener.h index 9f72e172..41cb4419 100644 --- a/src/lib/server/ClientListener.h +++ b/src/lib/server/ClientListener.h @@ -16,15 +16,14 @@ * along with this program. If not, see . */ -#ifndef CCLIENTLISTENER_H -#define CCLIENTLISTENER_H +#pragma once -#include "CConfig.h" -#include "CEvent.h" -#include "stddeque.h" -#include "stdset.h" -#include "CCryptoOptions.h" -#include "CEventTypes.h" +#include "server/Config.h" +#include "io/CryptoOptions.h" +#include "base/EventTypes.h" +#include "base/Event.h" +#include "common/stddeque.h" +#include "common/stdset.h" class CClientProxy; class CClientProxyUnknown; @@ -87,5 +86,3 @@ private: CCryptoOptions m_crypto; IEventQueue* m_events; }; - -#endif diff --git a/src/lib/server/ClientProxy.cpp b/src/lib/server/ClientProxy.cpp index 91564c69..fb48cf61 100644 --- a/src/lib/server/ClientProxy.cpp +++ b/src/lib/server/ClientProxy.cpp @@ -16,11 +16,12 @@ * along with this program. If not, see . */ -#include "CClientProxy.h" -#include "CProtocolUtil.h" -#include "IStream.h" -#include "CLog.h" -#include "CEventQueue.h" +#include "server/ClientProxy.h" + +#include "synergy/ProtocolUtil.h" +#include "io/IStream.h" +#include "base/Log.h" +#include "base/EventQueue.h" // // CClientProxy diff --git a/src/lib/server/ClientProxy.h b/src/lib/server/ClientProxy.h index 61dd87b6..25fb540c 100644 --- a/src/lib/server/ClientProxy.h +++ b/src/lib/server/ClientProxy.h @@ -16,13 +16,12 @@ * along with this program. If not, see . */ -#ifndef CCLIENTPROXY_H -#define CCLIENTPROXY_H +#pragma once -#include "CBaseClientProxy.h" -#include "CEvent.h" -#include "CString.h" -#include "CEventTypes.h" +#include "server/BaseClientProxy.h" +#include "base/Event.h" +#include "base/String.h" +#include "base/EventTypes.h" namespace synergy { class IStream; } @@ -90,5 +89,3 @@ public: private: synergy::IStream* m_stream; }; - -#endif diff --git a/src/lib/server/ClientProxy1_0.cpp b/src/lib/server/ClientProxy1_0.cpp index b2bc417e..b53ceed9 100644 --- a/src/lib/server/ClientProxy1_0.cpp +++ b/src/lib/server/ClientProxy1_0.cpp @@ -16,13 +16,15 @@ * along with this program. If not, see . */ -#include "CClientProxy1_0.h" -#include "CProtocolUtil.h" -#include "XSynergy.h" -#include "IStream.h" -#include "CLog.h" -#include "IEventQueue.h" -#include "TMethodEventJob.h" +#include "server/ClientProxy1_0.h" + +#include "synergy/ProtocolUtil.h" +#include "synergy/XSynergy.h" +#include "io/IStream.h" +#include "base/Log.h" +#include "base/IEventQueue.h" +#include "base/TMethodEventJob.h" + #include // diff --git a/src/lib/server/ClientProxy1_0.h b/src/lib/server/ClientProxy1_0.h index 7cfb147f..a1f8fb38 100644 --- a/src/lib/server/ClientProxy1_0.h +++ b/src/lib/server/ClientProxy1_0.h @@ -16,12 +16,11 @@ * along with this program. If not, see . */ -#ifndef CCLIENTPROXY1_0_H -#define CCLIENTPROXY1_0_H +#pragma once -#include "CClientProxy.h" -#include "CClipboard.h" -#include "ProtocolTypes.h" +#include "server/ClientProxy.h" +#include "synergy/Clipboard.h" +#include "synergy/protocol_types.h" class CEvent; class CEventQueueTimer; @@ -104,5 +103,3 @@ private: MessageParser m_parser; IEventQueue* m_events; }; - -#endif diff --git a/src/lib/server/ClientProxy1_1.cpp b/src/lib/server/ClientProxy1_1.cpp index 6a4303cf..5b9bf7ef 100644 --- a/src/lib/server/ClientProxy1_1.cpp +++ b/src/lib/server/ClientProxy1_1.cpp @@ -16,9 +16,11 @@ * along with this program. If not, see . */ -#include "CClientProxy1_1.h" -#include "CProtocolUtil.h" -#include "CLog.h" +#include "server/ClientProxy1_1.h" + +#include "synergy/ProtocolUtil.h" +#include "base/Log.h" + #include // diff --git a/src/lib/server/ClientProxy1_1.h b/src/lib/server/ClientProxy1_1.h index 50e8e391..3c520291 100644 --- a/src/lib/server/ClientProxy1_1.h +++ b/src/lib/server/ClientProxy1_1.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CCLIENTPROXY1_1_H -#define CCLIENTPROXY1_1_H +#pragma once -#include "CClientProxy1_0.h" +#include "server/ClientProxy1_0.h" //! Proxy for client implementing protocol version 1.1 class CClientProxy1_1 : public CClientProxy1_0 { @@ -33,5 +32,3 @@ public: SInt32 count, KeyButton); virtual void keyUp(KeyID, KeyModifierMask, KeyButton); }; - -#endif diff --git a/src/lib/server/ClientProxy1_2.cpp b/src/lib/server/ClientProxy1_2.cpp index 25b138b7..3e8662b1 100644 --- a/src/lib/server/ClientProxy1_2.cpp +++ b/src/lib/server/ClientProxy1_2.cpp @@ -16,9 +16,10 @@ * along with this program. If not, see . */ -#include "CClientProxy1_2.h" -#include "CProtocolUtil.h" -#include "CLog.h" +#include "server/ClientProxy1_2.h" + +#include "synergy/ProtocolUtil.h" +#include "base/Log.h" // // CClientProxy1_1 diff --git a/src/lib/server/ClientProxy1_2.h b/src/lib/server/ClientProxy1_2.h index 70059147..47e67a7d 100644 --- a/src/lib/server/ClientProxy1_2.h +++ b/src/lib/server/ClientProxy1_2.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CCLIENTPROXY1_2_H -#define CCLIENTPROXY1_2_H +#pragma once -#include "CClientProxy1_1.h" +#include "server/ClientProxy1_1.h" class IEventQueue; @@ -32,5 +31,3 @@ public: // IClient overrides virtual void mouseRelativeMove(SInt32 xRel, SInt32 yRel); }; - -#endif diff --git a/src/lib/server/ClientProxy1_3.cpp b/src/lib/server/ClientProxy1_3.cpp index 7062c3d6..65b041a9 100644 --- a/src/lib/server/ClientProxy1_3.cpp +++ b/src/lib/server/ClientProxy1_3.cpp @@ -16,11 +16,13 @@ * along with this program. If not, see . */ -#include "CClientProxy1_3.h" -#include "CProtocolUtil.h" -#include "CLog.h" -#include "IEventQueue.h" -#include "TMethodEventJob.h" +#include "server/ClientProxy1_3.h" + +#include "synergy/ProtocolUtil.h" +#include "base/Log.h" +#include "base/IEventQueue.h" +#include "base/TMethodEventJob.h" + #include #include diff --git a/src/lib/server/ClientProxy1_3.h b/src/lib/server/ClientProxy1_3.h index 48ce6e08..a76a0669 100644 --- a/src/lib/server/ClientProxy1_3.h +++ b/src/lib/server/ClientProxy1_3.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CCLIENTPROXY1_3_H -#define CCLIENTPROXY1_3_H +#pragma once -#include "CClientProxy1_2.h" +#include "server/ClientProxy1_2.h" //! Proxy for client implementing protocol version 1.3 class CClientProxy1_3 : public CClientProxy1_2 { @@ -48,5 +47,3 @@ private: CEventQueueTimer* m_keepAliveTimer; IEventQueue* m_events; }; - -#endif diff --git a/src/lib/server/ClientProxy1_4.cpp b/src/lib/server/ClientProxy1_4.cpp index f74aaacd..e85a8a7f 100644 --- a/src/lib/server/ClientProxy1_4.cpp +++ b/src/lib/server/ClientProxy1_4.cpp @@ -16,15 +16,17 @@ * along with this program. If not, see . */ -#include "CClientProxy1_4.h" -#include "CProtocolUtil.h" -#include "CLog.h" -#include "IEventQueue.h" -#include "TMethodEventJob.h" +#include "server/ClientProxy1_4.h" + +#include "server/Server.h" +#include "synergy/ProtocolUtil.h" +#include "io/CryptoStream.h" +#include "base/Log.h" +#include "base/IEventQueue.h" +#include "base/TMethodEventJob.h" + #include #include -#include "CServer.h" -#include "CCryptoStream.h" // // CClientProxy1_4 diff --git a/src/lib/server/ClientProxy1_4.h b/src/lib/server/ClientProxy1_4.h index 7c042ec4..94ed647e 100644 --- a/src/lib/server/ClientProxy1_4.h +++ b/src/lib/server/ClientProxy1_4.h @@ -18,7 +18,7 @@ #pragma once -#include "CClientProxy1_3.h" +#include "server/ClientProxy1_3.h" class CServer; diff --git a/src/lib/server/ClientProxy1_5.cpp b/src/lib/server/ClientProxy1_5.cpp index 274f5a1c..a204a4b1 100644 --- a/src/lib/server/ClientProxy1_5.cpp +++ b/src/lib/server/ClientProxy1_5.cpp @@ -15,11 +15,12 @@ * along with this program. If not, see . */ -#include "CClientProxy1_5.h" -#include "CProtocolUtil.h" -#include "CLog.h" -#include "IStream.h" -#include "CServer.h" +#include "server/ClientProxy1_5.h" + +#include "server/Server.h" +#include "synergy/ProtocolUtil.h" +#include "io/IStream.h" +#include "base/Log.h" // // CClientProxy1_5 diff --git a/src/lib/server/ClientProxy1_5.h b/src/lib/server/ClientProxy1_5.h index efb33c20..f49272c5 100644 --- a/src/lib/server/ClientProxy1_5.h +++ b/src/lib/server/ClientProxy1_5.h @@ -17,8 +17,8 @@ #pragma once -#include "CClientProxy1_4.h" -#include "CStopwatch.h" +#include "server/ClientProxy1_4.h" +#include "base/Stopwatch.h" class CServer; class IEventQueue; diff --git a/src/lib/server/ClientProxyUnknown.cpp b/src/lib/server/ClientProxyUnknown.cpp index 65fda47e..dd152be6 100644 --- a/src/lib/server/ClientProxyUnknown.cpp +++ b/src/lib/server/ClientProxyUnknown.cpp @@ -16,23 +16,24 @@ * along with this program. If not, see . */ -#include "CClientProxyUnknown.h" -#include "CClientProxy1_0.h" -#include "CClientProxy1_1.h" -#include "CClientProxy1_2.h" -#include "CClientProxy1_3.h" -#include "CClientProxy1_4.h" -#include "CClientProxy1_5.h" -#include "ProtocolTypes.h" -#include "CProtocolUtil.h" -#include "XSynergy.h" -#include "IStream.h" -#include "XIO.h" -#include "CLog.h" -#include "CString.h" -#include "IEventQueue.h" -#include "TMethodEventJob.h" -#include "CServer.h" +#include "server/ClientProxyUnknown.h" + +#include "server/Server.h" +#include "server/ClientProxy1_0.h" +#include "server/ClientProxy1_1.h" +#include "server/ClientProxy1_2.h" +#include "server/ClientProxy1_3.h" +#include "server/ClientProxy1_4.h" +#include "server/ClientProxy1_5.h" +#include "synergy/protocol_types.h" +#include "synergy/ProtocolUtil.h" +#include "synergy/XSynergy.h" +#include "io/IStream.h" +#include "io/XIO.h" +#include "base/Log.h" +#include "base/String.h" +#include "base/IEventQueue.h" +#include "base/TMethodEventJob.h" // // CClientProxyUnknown diff --git a/src/lib/server/ClientProxyUnknown.h b/src/lib/server/ClientProxyUnknown.h index 4b7b0eb3..70e94766 100644 --- a/src/lib/server/ClientProxyUnknown.h +++ b/src/lib/server/ClientProxyUnknown.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef CCLIENTPROXYUNKNOWN_H -#define CCLIENTPROXYUNKNOWN_H +#pragma once -#include "CEvent.h" -#include "CEventTypes.h" +#include "base/Event.h" +#include "base/EventTypes.h" class CClientProxy; class CEventQueueTimer; @@ -67,5 +66,3 @@ private: CServer* m_server; IEventQueue* m_events; }; - -#endif diff --git a/src/lib/server/Config.cpp b/src/lib/server/Config.cpp index d4868165..333ed606 100644 --- a/src/lib/server/Config.cpp +++ b/src/lib/server/Config.cpp @@ -16,15 +16,17 @@ * along with this program. If not, see . */ -#include "CConfig.h" -#include "CServer.h" -#include "CKeyMap.h" -#include "KeyTypes.h" -#include "XSocket.h" -#include "stdistream.h" -#include "stdostream.h" +#include "server/Config.h" + +#include "server/Server.h" +#include "synergy/KeyMap.h" +#include "synergy/key_types.h" +#include "net/XSocket.h" +#include "base/IEventQueue.h" +#include "common/stdistream.h" +#include "common/stdostream.h" + #include -#include "IEventQueue.h" // // CConfig diff --git a/src/lib/server/Config.h b/src/lib/server/Config.h index 3abdb3f9..9f7f5d68 100644 --- a/src/lib/server/Config.h +++ b/src/lib/server/Config.h @@ -16,18 +16,18 @@ * along with this program. If not, see . */ -#ifndef CCONFIG_H -#define CCONFIG_H +#pragma once + +#include "server/InputFilter.h" +#include "synergy/option_types.h" +#include "synergy/protocol_types.h" +#include "synergy/IPlatformScreen.h" +#include "net/NetworkAddress.h" +#include "base/StringUtil.h" +#include "base/XBase.h" +#include "common/stdmap.h" +#include "common/stdset.h" -#include "OptionTypes.h" -#include "ProtocolTypes.h" -#include "CNetworkAddress.h" -#include "CStringUtil.h" -#include "CInputFilter.h" -#include "XBase.h" -#include "stdmap.h" -#include "stdset.h" -#include "IPlatformScreen.h" #include class CConfig; @@ -543,5 +543,3 @@ protected: private: CString m_error; }; - -#endif diff --git a/src/lib/server/InputFilter.cpp b/src/lib/server/InputFilter.cpp index 7de09347..e6c8acf8 100644 --- a/src/lib/server/InputFilter.cpp +++ b/src/lib/server/InputFilter.cpp @@ -16,13 +16,14 @@ * along with this program. If not, see . */ -#include "CInputFilter.h" -#include "CServer.h" -#include "CPrimaryClient.h" -#include "CKeyMap.h" -#include "CEventQueue.h" -#include "CLog.h" -#include "TMethodEventJob.h" +#include "server/InputFilter.h" +#include "server/Server.h" +#include "server/PrimaryClient.h" +#include "synergy/KeyMap.h" +#include "base/EventQueue.h" +#include "base/Log.h" +#include "base/TMethodEventJob.h" + #include #include diff --git a/src/lib/server/InputFilter.h b/src/lib/server/InputFilter.h index 4f9a781c..714b483c 100644 --- a/src/lib/server/InputFilter.h +++ b/src/lib/server/InputFilter.h @@ -16,16 +16,15 @@ * along with this program. If not, see . */ -#ifndef CINPUTFILTER_H -#define CINPUTFILTER_H +#pragma once -#include "KeyTypes.h" -#include "MouseTypes.h" -#include "ProtocolTypes.h" -#include "IPlatformScreen.h" -#include "CString.h" -#include "stdmap.h" -#include "stdset.h" +#include "synergy/key_types.h" +#include "synergy/mouse_types.h" +#include "synergy/protocol_types.h" +#include "synergy/IPlatformScreen.h" +#include "base/String.h" +#include "common/stdmap.h" +#include "common/stdset.h" class CPrimaryClient; class CEvent; @@ -360,5 +359,3 @@ private: CPrimaryClient* m_primaryClient; IEventQueue* m_events; }; - -#endif diff --git a/src/lib/server/PrimaryClient.cpp b/src/lib/server/PrimaryClient.cpp index d886455b..ecf7e61b 100644 --- a/src/lib/server/PrimaryClient.cpp +++ b/src/lib/server/PrimaryClient.cpp @@ -16,10 +16,11 @@ * along with this program. If not, see . */ -#include "CPrimaryClient.h" -#include "CScreen.h" -#include "CClipboard.h" -#include "CLog.h" +#include "server/PrimaryClient.h" + +#include "synergy/Screen.h" +#include "synergy/Clipboard.h" +#include "base/Log.h" // // CPrimaryClient diff --git a/src/lib/server/PrimaryClient.h b/src/lib/server/PrimaryClient.h index 88da582f..21a893b8 100644 --- a/src/lib/server/PrimaryClient.h +++ b/src/lib/server/PrimaryClient.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef CPRIMARYCLIENT_H -#define CPRIMARYCLIENT_H +#pragma once -#include "CBaseClientProxy.h" -#include "ProtocolTypes.h" +#include "server/BaseClientProxy.h" +#include "synergy/protocol_types.h" class CScreen; @@ -152,5 +151,3 @@ private: bool m_clipboardDirty[kClipboardEnd]; SInt32 m_fakeInputCount; }; - -#endif diff --git a/src/lib/server/Server.cpp b/src/lib/server/Server.cpp index 42d34f23..564f542c 100644 --- a/src/lib/server/Server.cpp +++ b/src/lib/server/Server.cpp @@ -16,27 +16,29 @@ * along with this program. If not, see . */ -#include "CServer.h" -#include "CClientProxy.h" -#include "CClientProxyUnknown.h" -#include "CPrimaryClient.h" -#include "IPlatformScreen.h" -#include "OptionTypes.h" -#include "ProtocolTypes.h" -#include "XScreen.h" -#include "XSynergy.h" -#include "IDataSocket.h" -#include "IListenSocket.h" -#include "XSocket.h" -#include "IEventQueue.h" -#include "CLog.h" -#include "TMethodEventJob.h" -#include "CArch.h" -#include "CKeyState.h" -#include "CScreen.h" -#include "CThread.h" -#include "TMethodJob.h" -#include "CFileChunker.h" +#include "server/Server.h" + +#include "server/ClientProxy.h" +#include "server/ClientProxyUnknown.h" +#include "server/PrimaryClient.h" +#include "synergy/IPlatformScreen.h" +#include "synergy/option_types.h" +#include "synergy/protocol_types.h" +#include "synergy/XScreen.h" +#include "synergy/XSynergy.h" +#include "synergy/FileChunker.h" +#include "synergy/KeyState.h" +#include "synergy/Screen.h" +#include "net/IDataSocket.h" +#include "net/IListenSocket.h" +#include "net/XSocket.h" +#include "mt/Thread.h" +#include "arch/Arch.h" +#include "base/TMethodJob.h" +#include "base/IEventQueue.h" +#include "base/Log.h" +#include "base/TMethodEventJob.h" + #include #include #include diff --git a/src/lib/server/Server.h b/src/lib/server/Server.h index c404e596..3b897634 100644 --- a/src/lib/server/Server.h +++ b/src/lib/server/Server.h @@ -16,22 +16,21 @@ * along with this program. If not, see . */ -#ifndef CSERVER_H -#define CSERVER_H +#pragma once -#include "CConfig.h" -#include "CClipboard.h" -#include "ClipboardTypes.h" -#include "KeyTypes.h" -#include "MouseTypes.h" -#include "CEvent.h" -#include "CStopwatch.h" -#include "stdmap.h" -#include "stdset.h" -#include "stdvector.h" -#include "INode.h" -#include "CEventTypes.h" -#include "CDragInformation.h" +#include "server/Config.h" +#include "synergy/clipboard_types.h" +#include "synergy/Clipboard.h" +#include "synergy/key_types.h" +#include "synergy/mouse_types.h" +#include "synergy/INode.h" +#include "synergy/DragInformation.h" +#include "base/Event.h" +#include "base/Stopwatch.h" +#include "base/EventTypes.h" +#include "common/stdmap.h" +#include "common/stdset.h" +#include "common/stdvector.h" class CBaseClientProxy; class CEventQueueTimer; @@ -474,5 +473,3 @@ private: bool m_ignoreFileTransfer; bool m_enableDragDrop; }; - -#endif diff --git a/src/lib/synergy/App.cpp b/src/lib/synergy/App.cpp index f85eda58..83065c07 100644 --- a/src/lib/synergy/App.cpp +++ b/src/lib/synergy/App.cpp @@ -16,26 +16,26 @@ * along with this program. If not, see . */ -#include "CApp.h" -#include "CLog.h" -#include "Version.h" -#include "ProtocolTypes.h" -#include "CArch.h" -#include "XBase.h" -#include "XArch.h" -#include "LogOutputters.h" -#include "XSynergy.h" -#include "CArgsBase.h" -#include "CIpcServerProxy.h" -#include "TMethodEventJob.h" -#include "CIpcMessage.h" -#include "Ipc.h" -#include "CEventQueue.h" +#include "synergy/App.h" +#include "base/Log.h" +#include "common/Version.h" +#include "synergy/protocol_types.h" +#include "arch/Arch.h" +#include "base/XBase.h" +#include "arch/XArch.h" +#include "base/log_outputters.h" +#include "synergy/XSynergy.h" +#include "synergy/ArgsBase.h" +#include "ipc/IpcServerProxy.h" +#include "base/TMethodEventJob.h" +#include "ipc/IpcMessage.h" +#include "ipc/Ipc.h" +#include "base/EventQueue.h" #if SYSAPI_WIN32 -#include "CArchMiscWindows.h" -#include "IEventQueue.h" -#include "TMethodJob.h" +#include "arch/win32/ArchMiscWindows.h" +#include "base/IEventQueue.h" +#include "base/TMethodJob.h" #endif #include @@ -46,7 +46,7 @@ #endif #if defined(__APPLE__) -#include "COSXDragSimulator.h" +#include "platform/OSXDragSimulator.h" #endif CApp* CApp::s_instance = nullptr; diff --git a/src/lib/synergy/App.h b/src/lib/synergy/App.h index 0a25f708..a3c328e3 100644 --- a/src/lib/synergy/App.h +++ b/src/lib/synergy/App.h @@ -18,15 +18,15 @@ #pragma once -#include "common.h" -#include "CString.h" -#include "IApp.h" -#include "CIpcClient.h" +#include "common/common.h" +#include "base/String.h" +#include "synergy/IApp.h" +#include "ipc/IpcClient.h" #if SYSAPI_WIN32 -#include "CAppUtilWindows.h" +#include "synergy/win32/AppUtilWindows.h" #elif SYSAPI_UNIX -#include "CAppUtilUnix.h" +#include "synergy/unix/AppUtilUnix.h" #endif class IArchTaskBarReceiver; diff --git a/src/lib/synergy/AppUtil.cpp b/src/lib/synergy/AppUtil.cpp index 3271abc5..c7e301d8 100644 --- a/src/lib/synergy/AppUtil.cpp +++ b/src/lib/synergy/AppUtil.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CAppUtil.h" +#include "synergy/AppUtil.h" CAppUtil* CAppUtil::s_instance = nullptr; diff --git a/src/lib/synergy/AppUtil.h b/src/lib/synergy/AppUtil.h index 566cfe78..70aca030 100644 --- a/src/lib/synergy/AppUtil.h +++ b/src/lib/synergy/AppUtil.h @@ -18,8 +18,8 @@ #pragma once -#include "IAppUtil.h" -#include "XSynergy.h" +#include "synergy/IAppUtil.h" +#include "synergy/XSynergy.h" class CAppUtil : public IAppUtil { public: diff --git a/src/lib/synergy/ArgsBase.cpp b/src/lib/synergy/ArgsBase.cpp index 2f8a1c87..77090fab 100644 --- a/src/lib/synergy/ArgsBase.cpp +++ b/src/lib/synergy/ArgsBase.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CArgsBase.h" +#include "synergy/ArgsBase.h" CArgsBase::CArgsBase() : #if SYSAPI_WIN32 diff --git a/src/lib/synergy/ArgsBase.h b/src/lib/synergy/ArgsBase.h index 99d4fb94..2bc744bc 100644 --- a/src/lib/synergy/ArgsBase.h +++ b/src/lib/synergy/ArgsBase.h @@ -18,8 +18,8 @@ #pragma once -#include "CString.h" -#include "CCryptoOptions.h" +#include "base/String.h" +#include "io/CryptoOptions.h" class CArgsBase { public: diff --git a/src/lib/synergy/CMakeLists.txt b/src/lib/synergy/CMakeLists.txt index ce21882f..9127e408 100644 --- a/src/lib/synergy/CMakeLists.txt +++ b/src/lib/synergy/CMakeLists.txt @@ -17,37 +17,24 @@ file(GLOB headers "*.h") file(GLOB sources "*.cpp") -# remove files which are not cross platform -list(REMOVE_ITEM headers "*Windows*") -list(REMOVE_ITEM headers "*Unix*") - # arch if (WIN32) - file(GLOB arch_sources "*Windows*.cpp") - file(GLOB arch_headers "*Windows*.h") + file(GLOB arch_headers "win32/*.h") + file(GLOB arch_sources "win32/*.cpp") elseif (UNIX) - file(GLOB arch_sources "*Unix*.cpp") - file(GLOB arch_headers "*Unix*.h") + file(GLOB arch_headers "unix/*.h") + file(GLOB arch_sources "unix/*.cpp") endif() list(APPEND sources ${arch_sources}) list(APPEND headers ${arch_headers}) +if (SYNERGY_ADD_HEADERS) + list(APPEND sources ${headers}) +endif() + include_directories( - ../arch - ../base - ../client - ../common - ../io - ../ipc - ../mt - ../net - ../platform - ../server - ../synergy - ../synwinhk - ../synwinxt - ../.. + ../ ../../../ext ) diff --git a/src/lib/synergy/ClientApp.cpp b/src/lib/synergy/ClientApp.cpp index e3c2e430..e925fd8d 100644 --- a/src/lib/synergy/ClientApp.cpp +++ b/src/lib/synergy/ClientApp.cpp @@ -16,42 +16,43 @@ * along with this program. If not, see . */ -#include "CClientApp.h" -#include "CLog.h" -#include "CArch.h" -#include "XSocket.h" -#include "Version.h" -#include "ProtocolTypes.h" -#include "CString.h" -#include "CScreen.h" -#include "CEvent.h" -#include "CClient.h" -#include "CNetworkAddress.h" -#include "IArchTaskBarReceiver.h" -#include "IEventQueue.h" -#include "TMethodEventJob.h" -#include "CTCPSocketFactory.h" -#include "XScreen.h" -#include "LogOutputters.h" -#include "CSocketMultiplexer.h" -#include "CEventQueue.h" -#include "CThread.h" -#include "TMethodJob.h" +#include "synergy/ClientApp.h" + +#include "client/Client.h" +#include "synergy/protocol_types.h" +#include "synergy/Screen.h" +#include "synergy/XScreen.h" +#include "net/NetworkAddress.h" +#include "net/TCPSocketFactory.h" +#include "net/SocketMultiplexer.h" +#include "net/XSocket.h" +#include "mt/Thread.h" +#include "arch/IArchTaskBarReceiver.h" +#include "arch/Arch.h" +#include "base/String.h" +#include "base/Event.h" +#include "base/IEventQueue.h" +#include "base/TMethodEventJob.h" +#include "base/log_outputters.h" +#include "base/EventQueue.h" +#include "base/TMethodJob.h" +#include "base/Log.h" +#include "common/Version.h" #if SYSAPI_WIN32 -#include "CArchMiscWindows.h" +#include "arch/win32/ArchMiscWindows.h" #endif #if WINAPI_MSWINDOWS -#include "CMSWindowsScreen.h" +#include "platform/MSWindowsScreen.h" #elif WINAPI_XWINDOWS -#include "CXWindowsScreen.h" +#include "platform/XWindowsScreen.h" #elif WINAPI_CARBON -#include "COSXScreen.h" +#include "platform/OSXScreen.h" #endif #if defined(__APPLE__) -#include "COSXDragSimulator.h" +#include "platform/OSXDragSimulator.h" #endif #include diff --git a/src/lib/synergy/ClientApp.h b/src/lib/synergy/ClientApp.h index 03cd9ce3..8b4e9ffd 100644 --- a/src/lib/synergy/ClientApp.h +++ b/src/lib/synergy/ClientApp.h @@ -18,8 +18,8 @@ #pragma once -#include "CApp.h" -#include "CArgsBase.h" +#include "synergy/App.h" +#include "synergy/ArgsBase.h" class CScreen; class CEvent; diff --git a/src/lib/synergy/ClientTaskBarReceiver.cpp b/src/lib/synergy/ClientTaskBarReceiver.cpp index 71ad18e7..e7b43b7d 100644 --- a/src/lib/synergy/ClientTaskBarReceiver.cpp +++ b/src/lib/synergy/ClientTaskBarReceiver.cpp @@ -16,13 +16,13 @@ * along with this program. If not, see . */ -#include "CClientTaskBarReceiver.h" -#include "CClient.h" -#include "CLock.h" -#include "CStringUtil.h" -#include "IEventQueue.h" -#include "CArch.h" -#include "Version.h" +#include "synergy/ClientTaskBarReceiver.h" +#include "client/Client.h" +#include "mt/Lock.h" +#include "base/StringUtil.h" +#include "base/IEventQueue.h" +#include "arch/Arch.h" +#include "common/Version.h" // // CClientTaskBarReceiver diff --git a/src/lib/synergy/ClientTaskBarReceiver.h b/src/lib/synergy/ClientTaskBarReceiver.h index ed842427..969451f9 100644 --- a/src/lib/synergy/ClientTaskBarReceiver.h +++ b/src/lib/synergy/ClientTaskBarReceiver.h @@ -19,10 +19,10 @@ #ifndef CCLIENTTASKBARRECEIVER_H #define CCLIENTTASKBARRECEIVER_H -#include "CString.h" -#include "IArchTaskBarReceiver.h" -#include "LogOutputters.h" -#include "CClient.h" +#include "base/String.h" +#include "arch/IArchTaskBarReceiver.h" +#include "base/log_outputters.h" +#include "client/Client.h" class IEventQueue; diff --git a/src/lib/synergy/Clipboard.cpp b/src/lib/synergy/Clipboard.cpp index 8ffe1d39..c0eded08 100644 --- a/src/lib/synergy/Clipboard.cpp +++ b/src/lib/synergy/Clipboard.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "CClipboard.h" +#include "synergy/Clipboard.h" // // CClipboard diff --git a/src/lib/synergy/Clipboard.h b/src/lib/synergy/Clipboard.h index de65a30e..3c2caf2b 100644 --- a/src/lib/synergy/Clipboard.h +++ b/src/lib/synergy/Clipboard.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CCLIPBOARD_H -#define CCLIPBOARD_H +#pragma once -#include "IClipboard.h" +#include "synergy/IClipboard.h" //! Memory buffer clipboard /*! @@ -70,5 +69,3 @@ private: bool m_added[kNumFormats]; CString m_data[kNumFormats]; }; - -#endif diff --git a/src/lib/synergy/DaemonApp.cpp b/src/lib/synergy/DaemonApp.cpp index 1cef384a..fd3bec92 100644 --- a/src/lib/synergy/DaemonApp.cpp +++ b/src/lib/synergy/DaemonApp.cpp @@ -19,39 +19,40 @@ // TODO: split this class into windows and unix to get rid // of all the #ifdefs! -#include "CDaemonApp.h" -#include "CEventQueue.h" -#include "LogOutputters.h" -#include "CLog.h" -#include "XArch.h" -#include "CApp.h" -#include "TMethodJob.h" -#include "TMethodEventJob.h" -#include "CIpcClientProxy.h" -#include "CIpcMessage.h" -#include "CSocketMultiplexer.h" -#include "CIpcLogOutputter.h" -#include "CLog.h" +#include "synergy/DaemonApp.h" -#include -#include -#include +#include "synergy/App.h" +#include "ipc/IpcClientProxy.h" +#include "ipc/IpcMessage.h" +#include "ipc/IpcLogOutputter.h" +#include "net/SocketMultiplexer.h" +#include "arch/XArch.h" +#include "base/Log.h" +#include "base/TMethodJob.h" +#include "base/TMethodEventJob.h" +#include "base/EventQueue.h" +#include "base/log_outputters.h" +#include "base/Log.h" #if SYSAPI_WIN32 -#include "CArchMiscWindows.h" -#include "XArchWindows.h" -#include "CScreen.h" -#include "CMSWindowsScreen.h" -#include "CMSWindowsDebugOutputter.h" -#include "CMSWindowsWatchdog.h" -#include "CMSWindowsEventQueueBuffer.h" +#include "arch/win32/ArchMiscWindows.h" +#include "arch/win32/XArchWindows.h" +#include "synergy/Screen.h" +#include "platform/MSWindowsScreen.h" +#include "platform/MSWindowsDebugOutputter.h" +#include "platform/MSWindowsWatchdog.h" +#include "platform/MSWindowsEventQueueBuffer.h" #define WIN32_LEAN_AND_MEAN #include #endif +#include +#include +#include + using namespace std; CDaemonApp* CDaemonApp::s_instance = NULL; diff --git a/src/lib/synergy/DaemonApp.h b/src/lib/synergy/DaemonApp.h index f9ec1387..47277c82 100644 --- a/src/lib/synergy/DaemonApp.h +++ b/src/lib/synergy/DaemonApp.h @@ -18,8 +18,8 @@ #pragma once -#include "CArch.h" -#include "CIpcServer.h" +#include "arch/Arch.h" +#include "ipc/IpcServer.h" #include diff --git a/src/lib/synergy/DragInformation.cpp b/src/lib/synergy/DragInformation.cpp index 048277f6..025b8df4 100644 --- a/src/lib/synergy/DragInformation.cpp +++ b/src/lib/synergy/DragInformation.cpp @@ -15,8 +15,8 @@ * along with this program. If not, see . */ -#include "CDragInformation.h" -#include "CLog.h" +#include "synergy/DragInformation.h" +#include "base/Log.h" using namespace std; diff --git a/src/lib/synergy/DragInformation.h b/src/lib/synergy/DragInformation.h index e8dd03fb..7922e118 100644 --- a/src/lib/synergy/DragInformation.h +++ b/src/lib/synergy/DragInformation.h @@ -17,9 +17,9 @@ #pragma once -#include "stdvector.h" -#include "CString.h" -#include "BasicTypes.h" +#include "common/stdvector.h" +#include "base/String.h" +#include "base/EventTypes.h" typedef std::vector CDragFileList; diff --git a/src/lib/synergy/FileChunker.cpp b/src/lib/synergy/FileChunker.cpp index 41d6ab53..6dbb7801 100644 --- a/src/lib/synergy/FileChunker.cpp +++ b/src/lib/synergy/FileChunker.cpp @@ -15,14 +15,16 @@ * along with this program. If not, see . */ -#include "CFileChunker.h" -#include "BasicTypes.h" -#include "ProtocolTypes.h" -#include "CEvent.h" -#include "IEventQueue.h" -#include "CEventTypes.h" -#include "CLog.h" -#include "CStopwatch.h" +#include "synergy/FileChunker.h" + +#include "synergy/protocol_types.h" +#include "base/EventTypes.h" +#include "base/Event.h" +#include "base/IEventQueue.h" +#include "base/EventTypes.h" +#include "base/Log.h" +#include "base/Stopwatch.h" + #include #include #include diff --git a/src/lib/synergy/FileChunker.h b/src/lib/synergy/FileChunker.h index 0e49c778..bafc95fa 100644 --- a/src/lib/synergy/FileChunker.h +++ b/src/lib/synergy/FileChunker.h @@ -17,7 +17,7 @@ #pragma once -#include "CString.h" +#include "base/String.h" class IEventQueue; diff --git a/src/lib/synergy/IApp.h b/src/lib/synergy/IApp.h index f438e4a2..c9bf853c 100644 --- a/src/lib/synergy/IApp.h +++ b/src/lib/synergy/IApp.h @@ -18,7 +18,7 @@ #pragma once -#include "IInterface.h" +#include "common/IInterface.h" typedef int (*StartupFunc)(int, char**); diff --git a/src/lib/synergy/IAppUtil.h b/src/lib/synergy/IAppUtil.h index 1533e4a5..3cb20aa5 100644 --- a/src/lib/synergy/IAppUtil.h +++ b/src/lib/synergy/IAppUtil.h @@ -18,8 +18,8 @@ #pragma once -#include "IInterface.h" -#include "IApp.h" +#include "common/IInterface.h" +#include "synergy/IApp.h" class IAppUtil : public IInterface { public: diff --git a/src/lib/synergy/IClient.h b/src/lib/synergy/IClient.h index da7da298..91319e9f 100644 --- a/src/lib/synergy/IClient.h +++ b/src/lib/synergy/IClient.h @@ -16,15 +16,14 @@ * along with this program. If not, see . */ -#ifndef ICLIENT_H -#define ICLIENT_H +#pragma once -#include "IScreen.h" -#include "ClipboardTypes.h" -#include "KeyTypes.h" -#include "MouseTypes.h" -#include "OptionTypes.h" -#include "CString.h" +#include "synergy/clipboard_types.h" +#include "synergy/IScreen.h" +#include "synergy/key_types.h" +#include "synergy/mouse_types.h" +#include "synergy/option_types.h" +#include "base/String.h" //! Client interface /*! @@ -175,5 +174,3 @@ public: SInt32& width, SInt32& height) const = 0; virtual void getCursorPos(SInt32& x, SInt32& y) const = 0; }; - -#endif diff --git a/src/lib/synergy/IClipboard.cpp b/src/lib/synergy/IClipboard.cpp index 97612bd8..a03f69ee 100644 --- a/src/lib/synergy/IClipboard.cpp +++ b/src/lib/synergy/IClipboard.cpp @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#include "IClipboard.h" -#include "stdvector.h" +#include "synergy/IClipboard.h" +#include "common/stdvector.h" // // IClipboard diff --git a/src/lib/synergy/IClipboard.h b/src/lib/synergy/IClipboard.h index 96f87612..71f2f290 100644 --- a/src/lib/synergy/IClipboard.h +++ b/src/lib/synergy/IClipboard.h @@ -16,12 +16,11 @@ * along with this program. If not, see . */ -#ifndef ICLIPBOARD_H -#define ICLIPBOARD_H +#pragma once -#include "IInterface.h" -#include "CString.h" -#include "BasicTypes.h" +#include "base/String.h" +#include "base/EventTypes.h" +#include "common/IInterface.h" //! Clipboard interface /*! @@ -168,5 +167,3 @@ private: static UInt32 readUInt32(const char*); static void writeUInt32(CString*, UInt32); }; - -#endif diff --git a/src/lib/synergy/IKeyState.cpp b/src/lib/synergy/IKeyState.cpp index ae686aa9..f79d0986 100644 --- a/src/lib/synergy/IKeyState.cpp +++ b/src/lib/synergy/IKeyState.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "IKeyState.h" -#include "CEventQueue.h" +#include "synergy/IKeyState.h" +#include "base/EventQueue.h" + #include #include diff --git a/src/lib/synergy/IKeyState.h b/src/lib/synergy/IKeyState.h index 34bca605..66bca97f 100644 --- a/src/lib/synergy/IKeyState.h +++ b/src/lib/synergy/IKeyState.h @@ -16,16 +16,15 @@ * along with this program. If not, see . */ -#ifndef IKEYSTATE_H -#define IKEYSTATE_H +#pragma once -#include "IInterface.h" -#include "KeyTypes.h" -#include "CEvent.h" -#include "CString.h" -#include "stdset.h" -#include "IEventQueue.h" -#include "CEventTypes.h" +#include "synergy/key_types.h" +#include "base/Event.h" +#include "base/String.h" +#include "base/IEventQueue.h" +#include "base/EventTypes.h" +#include "common/stdset.h" +#include "common/IInterface.h" //! Key state interface /*! @@ -166,5 +165,3 @@ public: //@} }; - -#endif diff --git a/src/lib/synergy/INode.h b/src/lib/synergy/INode.h index 53432740..4a2f909a 100644 --- a/src/lib/synergy/INode.h +++ b/src/lib/synergy/INode.h @@ -18,7 +18,7 @@ #pragma once -#include "IInterface.h" +#include "common/IInterface.h" class INode : IInterface { diff --git a/src/lib/synergy/IPlatformScreen.h b/src/lib/synergy/IPlatformScreen.h index 6166d260..8b45f44b 100644 --- a/src/lib/synergy/IPlatformScreen.h +++ b/src/lib/synergy/IPlatformScreen.h @@ -16,15 +16,14 @@ * along with this program. If not, see . */ -#ifndef IPLATFORMSCREEN_H -#define IPLATFORMSCREEN_H +#pragma once -#include "IScreen.h" -#include "IPrimaryScreen.h" -#include "ISecondaryScreen.h" -#include "IKeyState.h" -#include "ClipboardTypes.h" -#include "OptionTypes.h" +#include "synergy/clipboard_types.h" +#include "synergy/IScreen.h" +#include "synergy/IPrimaryScreen.h" +#include "synergy/ISecondaryScreen.h" +#include "synergy/IKeyState.h" +#include "synergy/option_types.h" class IClipboard; @@ -223,5 +222,3 @@ protected: */ virtual void handleSystemEvent(const CEvent& event, void*) = 0; }; - -#endif diff --git a/src/lib/synergy/IPrimaryScreen.cpp b/src/lib/synergy/IPrimaryScreen.cpp index 432f8f24..cff475ab 100644 --- a/src/lib/synergy/IPrimaryScreen.cpp +++ b/src/lib/synergy/IPrimaryScreen.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "IPrimaryScreen.h" -#include "CEventQueue.h" +#include "synergy/IPrimaryScreen.h" +#include "base/EventQueue.h" + #include // diff --git a/src/lib/synergy/IPrimaryScreen.h b/src/lib/synergy/IPrimaryScreen.h index c8fbfd74..f2342e7f 100644 --- a/src/lib/synergy/IPrimaryScreen.h +++ b/src/lib/synergy/IPrimaryScreen.h @@ -16,14 +16,13 @@ * along with this program. If not, see . */ -#ifndef IPRIMARYSCREEN_H -#define IPRIMARYSCREEN_H +#pragma once -#include "IInterface.h" -#include "KeyTypes.h" -#include "MouseTypes.h" -#include "CEvent.h" -#include "CEventTypes.h" +#include "synergy/key_types.h" +#include "synergy/mouse_types.h" +#include "base/Event.h" +#include "base/EventTypes.h" +#include "common/IInterface.h" //! Primary screen interface /*! @@ -164,5 +163,3 @@ public: //@} }; - -#endif diff --git a/src/lib/synergy/IScreen.h b/src/lib/synergy/IScreen.h index 30a4c3bb..3b75b5fb 100644 --- a/src/lib/synergy/IScreen.h +++ b/src/lib/synergy/IScreen.h @@ -16,13 +16,12 @@ * along with this program. If not, see . */ -#ifndef ISCREEN_H -#define ISCREEN_H +#pragma once -#include "IInterface.h" -#include "ClipboardTypes.h" -#include "CEvent.h" -#include "CEventTypes.h" +#include "synergy/clipboard_types.h" +#include "base/Event.h" +#include "base/EventTypes.h" +#include "common/IInterface.h" class IClipboard; @@ -70,5 +69,3 @@ public: //@} }; - -#endif diff --git a/src/lib/synergy/IScreenSaver.h b/src/lib/synergy/IScreenSaver.h index 53716fda..1ed696d8 100644 --- a/src/lib/synergy/IScreenSaver.h +++ b/src/lib/synergy/IScreenSaver.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef ISCREENSAVER_H -#define ISCREENSAVER_H +#pragma once -#include "IInterface.h" -#include "CEvent.h" +#include "base/Event.h" +#include "common/IInterface.h" //! Screen saver interface /*! @@ -74,5 +73,3 @@ public: //@} }; - -#endif diff --git a/src/lib/synergy/ISecondaryScreen.h b/src/lib/synergy/ISecondaryScreen.h index 28016de9..ade1ca5b 100644 --- a/src/lib/synergy/ISecondaryScreen.h +++ b/src/lib/synergy/ISecondaryScreen.h @@ -16,13 +16,12 @@ * along with this program. If not, see . */ -#ifndef ISECONDARYSCREEN_H -#define ISECONDARYSCREEN_H +#pragma once -#include "IInterface.h" -#include "MouseTypes.h" -#include "CEvent.h" -#include "CEventTypes.h" +#include "synergy/mouse_types.h" +#include "base/Event.h" +#include "base/EventTypes.h" +#include "common/IInterface.h" //! Secondary screen interface /*! @@ -60,5 +59,3 @@ public: //@} }; - -#endif diff --git a/src/lib/synergy/KeyMap.cpp b/src/lib/synergy/KeyMap.cpp index 6aca0fd4..6375f04c 100644 --- a/src/lib/synergy/KeyMap.cpp +++ b/src/lib/synergy/KeyMap.cpp @@ -16,9 +16,10 @@ * along with this program. If not, see . */ -#include "CKeyMap.h" -#include "KeyTypes.h" -#include "CLog.h" +#include "synergy/KeyMap.h" +#include "synergy/key_types.h" +#include "base/Log.h" + #include #include #include diff --git a/src/lib/synergy/KeyMap.h b/src/lib/synergy/KeyMap.h index 86705f4b..1bc8bdbf 100644 --- a/src/lib/synergy/KeyMap.h +++ b/src/lib/synergy/KeyMap.h @@ -16,15 +16,14 @@ * along with this program. If not, see . */ -#ifndef CKEYMAP_H -#define CKEYMAP_H +#pragma once -#include "KeyTypes.h" -#include "CString.h" -#include "CStringUtil.h" -#include "stdmap.h" -#include "stdset.h" -#include "stdvector.h" +#include "synergy/key_types.h" +#include "base/String.h" +#include "base/StringUtil.h" +#include "common/stdmap.h" +#include "common/stdset.h" +#include "common/stdvector.h" //! Key map /*! @@ -491,5 +490,3 @@ private: static CKeyToNameMap* s_keyToNameMap; static CModifierToNameMap* s_modifierToNameMap; }; - -#endif diff --git a/src/lib/synergy/KeyState.cpp b/src/lib/synergy/KeyState.cpp index a2b457d9..9b4ac8ff 100644 --- a/src/lib/synergy/KeyState.cpp +++ b/src/lib/synergy/KeyState.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include "CKeyState.h" -#include "CLog.h" +#include "synergy/KeyState.h" +#include "base/Log.h" + #include #include #include diff --git a/src/lib/synergy/KeyState.h b/src/lib/synergy/KeyState.h index 772338c5..7092bdb6 100644 --- a/src/lib/synergy/KeyState.h +++ b/src/lib/synergy/KeyState.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef CKEYSTATE_H -#define CKEYSTATE_H +#pragma once -#include "IKeyState.h" -#include "CKeyMap.h" +#include "synergy/IKeyState.h" +#include "synergy/KeyMap.h" //! Core key state /*! @@ -229,5 +228,3 @@ private: IEventQueue* m_events; }; - -#endif diff --git a/src/lib/synergy/PacketStreamFilter.cpp b/src/lib/synergy/PacketStreamFilter.cpp index d29eeaa0..cb7e4d6d 100644 --- a/src/lib/synergy/PacketStreamFilter.cpp +++ b/src/lib/synergy/PacketStreamFilter.cpp @@ -16,10 +16,11 @@ * along with this program. If not, see . */ -#include "CPacketStreamFilter.h" -#include "IEventQueue.h" -#include "CLock.h" -#include "TMethodEventJob.h" +#include "synergy/PacketStreamFilter.h" +#include "base/IEventQueue.h" +#include "mt/Lock.h" +#include "base/TMethodEventJob.h" + #include #include diff --git a/src/lib/synergy/PacketStreamFilter.h b/src/lib/synergy/PacketStreamFilter.h index 09d48a51..f27f1188 100644 --- a/src/lib/synergy/PacketStreamFilter.h +++ b/src/lib/synergy/PacketStreamFilter.h @@ -16,12 +16,11 @@ * along with this program. If not, see . */ -#ifndef CPACKETSTREAMFILTER_H -#define CPACKETSTREAMFILTER_H +#pragma once -#include "CStreamFilter.h" -#include "CStreamBuffer.h" -#include "CMutex.h" +#include "io/StreamFilter.h" +#include "io/StreamBuffer.h" +#include "mt/Mutex.h" class IEventQueue; @@ -58,5 +57,3 @@ private: bool m_inputShutdown; IEventQueue* m_events; }; - -#endif diff --git a/src/lib/synergy/PlatformScreen.cpp b/src/lib/synergy/PlatformScreen.cpp index 0ca207ee..9eccacbc 100644 --- a/src/lib/synergy/PlatformScreen.cpp +++ b/src/lib/synergy/PlatformScreen.cpp @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -#include "CPlatformScreen.h" -#include "CApp.h" -#include "CArgsBase.h" +#include "synergy/PlatformScreen.h" +#include "synergy/App.h" +#include "synergy/ArgsBase.h" CPlatformScreen::CPlatformScreen(IEventQueue* events) : IPlatformScreen(events), diff --git a/src/lib/synergy/PlatformScreen.h b/src/lib/synergy/PlatformScreen.h index 9f202620..24214924 100644 --- a/src/lib/synergy/PlatformScreen.h +++ b/src/lib/synergy/PlatformScreen.h @@ -16,10 +16,10 @@ * along with this program. If not, see . */ -#ifndef CPLATFORMSCREEN_H -#define CPLATFORMSCREEN_H +#pragma once + +#include "synergy/IPlatformScreen.h" -#include "IPlatformScreen.h" #include //! Base screen implementation @@ -124,5 +124,3 @@ protected: bool m_draggingStarted; bool m_fakeDraggingStarted; }; - -#endif diff --git a/src/lib/synergy/PortableTaskBarReceiver.cpp b/src/lib/synergy/PortableTaskBarReceiver.cpp index f784057f..3dbd8f3d 100644 --- a/src/lib/synergy/PortableTaskBarReceiver.cpp +++ b/src/lib/synergy/PortableTaskBarReceiver.cpp @@ -16,12 +16,12 @@ * along with this program. If not, see . */ -#include "CPortableTaskBarReceiver.h" -#include "CLock.h" -#include "CStringUtil.h" -#include "IEventQueue.h" -#include "CArch.h" -#include "Version.h" +#include "synergy/PortableTaskBarReceiver.h" +#include "mt/Lock.h" +#include "base/StringUtil.h" +#include "base/IEventQueue.h" +#include "arch/Arch.h" +#include "common/Version.h" // // CPortableTaskBarReceiver diff --git a/src/lib/synergy/PortableTaskBarReceiver.h b/src/lib/synergy/PortableTaskBarReceiver.h index 06e6819b..b40c22d3 100644 --- a/src/lib/synergy/PortableTaskBarReceiver.h +++ b/src/lib/synergy/PortableTaskBarReceiver.h @@ -18,13 +18,13 @@ #pragma once -#include "CString.h" -#include "IArchTaskBarReceiver.h" -#include "stdvector.h" -#include "CEvent.h" -#include "INode.h" -#include "LogOutputters.h" -#include "CEventTypes.h" +#include "synergy/INode.h" +#include "arch/IArchTaskBarReceiver.h" +#include "base/log_outputters.h" +#include "base/EventTypes.h" +#include "base/Event.h" +#include "base/String.h" +#include "common/stdvector.h" class IEventQueue; diff --git a/src/lib/synergy/ProtocolUtil.cpp b/src/lib/synergy/ProtocolUtil.cpp index dd171230..b4b84cac 100644 --- a/src/lib/synergy/ProtocolUtil.cpp +++ b/src/lib/synergy/ProtocolUtil.cpp @@ -16,10 +16,11 @@ * along with this program. If not, see . */ -#include "CProtocolUtil.h" -#include "IStream.h" -#include "CLog.h" -#include "stdvector.h" +#include "synergy/ProtocolUtil.h" +#include "io/IStream.h" +#include "base/Log.h" +#include "common/stdvector.h" + #include #include diff --git a/src/lib/synergy/ProtocolUtil.h b/src/lib/synergy/ProtocolUtil.h index 2ddc8e97..d991ae38 100644 --- a/src/lib/synergy/ProtocolUtil.h +++ b/src/lib/synergy/ProtocolUtil.h @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -#ifndef CPROTOCOLUTIL_H -#define CPROTOCOLUTIL_H +#pragma once + +#include "io/XIO.h" +#include "base/EventTypes.h" -#include "BasicTypes.h" -#include "XIO.h" #include namespace synergy { class IStream; } @@ -94,6 +94,3 @@ public: // XBase overrides virtual CString getWhat() const throw(); }; - -#endif - diff --git a/src/lib/synergy/Screen.cpp b/src/lib/synergy/Screen.cpp index 6ed134eb..7e13f61f 100644 --- a/src/lib/synergy/Screen.cpp +++ b/src/lib/synergy/Screen.cpp @@ -16,13 +16,13 @@ * along with this program. If not, see . */ -#include "CScreen.h" -#include "IPlatformScreen.h" -#include "ProtocolTypes.h" -#include "CLog.h" -#include "IEventQueue.h" -#include "CClientProxy.h" -#include "TMethodEventJob.h" +#include "synergy/Screen.h" +#include "synergy/IPlatformScreen.h" +#include "synergy/protocol_types.h" +#include "base/Log.h" +#include "base/IEventQueue.h" +#include "server/ClientProxy.h" +#include "base/TMethodEventJob.h" // // CScreen diff --git a/src/lib/synergy/Screen.h b/src/lib/synergy/Screen.h index 027bf75d..b062b52a 100644 --- a/src/lib/synergy/Screen.h +++ b/src/lib/synergy/Screen.h @@ -16,15 +16,14 @@ * along with this program. If not, see . */ -#ifndef CSCREEN_H -#define CSCREEN_H +#pragma once -#include "IScreen.h" -#include "ClipboardTypes.h" -#include "KeyTypes.h" -#include "MouseTypes.h" -#include "OptionTypes.h" -#include "CString.h" +#include "synergy/clipboard_types.h" +#include "synergy/IScreen.h" +#include "synergy/key_types.h" +#include "synergy/mouse_types.h" +#include "synergy/option_types.h" +#include "base/String.h" class IClipboard; class IPlatformScreen; @@ -338,5 +337,3 @@ private: bool m_mock; bool m_enableDragDrop; }; - -#endif diff --git a/src/lib/synergy/ServerApp.cpp b/src/lib/synergy/ServerApp.cpp index fcca0fbd..59bcb7ae 100644 --- a/src/lib/synergy/ServerApp.cpp +++ b/src/lib/synergy/ServerApp.cpp @@ -16,46 +16,47 @@ * along with this program. If not, see . */ -#include "CServerApp.h" -#include "CLog.h" -#include "CArch.h" -#include "XSocket.h" -#include "Version.h" -#include "IEventQueue.h" -#include "CServer.h" -#include "CClientListener.h" -#include "CClientProxy.h" -#include "TMethodEventJob.h" -#include "CServerTaskBarReceiver.h" -#include "CPrimaryClient.h" -#include "CScreen.h" -#include "CSocketMultiplexer.h" -#include "CEventQueue.h" -#include "LogOutputters.h" -#include "CFunctionEventJob.h" -#include "TMethodJob.h" +#include "synergy/ServerApp.h" + +#include "server/Server.h" +#include "server/ClientListener.h" +#include "server/ClientProxy.h" +#include "server/PrimaryClient.h" +#include "synergy/Screen.h" +#include "synergy/XScreen.h" +#include "synergy/ServerTaskBarReceiver.h" +#include "net/SocketMultiplexer.h" +#include "net/TCPSocketFactory.h" +#include "net/XSocket.h" +#include "arch/Arch.h" +#include "base/EventQueue.h" +#include "base/log_outputters.h" +#include "base/FunctionEventJob.h" +#include "base/TMethodJob.h" +#include "base/IEventQueue.h" +#include "base/Log.h" +#include "base/TMethodEventJob.h" +#include "common/Version.h" #if SYSAPI_WIN32 -#include "CArchMiscWindows.h" +#include "arch/win32/ArchMiscWindows.h" #endif #if WINAPI_MSWINDOWS -#include "CMSWindowsScreen.h" +#include "platform/MSWindowsScreen.h" #elif WINAPI_XWINDOWS -#include "CXWindowsScreen.h" +#include "platform/XWindowsScreen.h" #elif WINAPI_CARBON -#include "COSXScreen.h" +#include "platform/OSXScreen.h" #endif #if defined(__APPLE__) -#include "COSXDragSimulator.h" +#include "platform/OSXDragSimulator.h" #endif #include #include #include -#include "XScreen.h" -#include "CTCPSocketFactory.h" // // CServerApp diff --git a/src/lib/synergy/ServerApp.h b/src/lib/synergy/ServerApp.h index bc1b31dd..52e0d8ee 100644 --- a/src/lib/synergy/ServerApp.h +++ b/src/lib/synergy/ServerApp.h @@ -18,15 +18,16 @@ #pragma once -#include "CApp.h" -#include "CString.h" -#include "CConfig.h" -#include "CNetworkAddress.h" -#include "CArch.h" -#include "IArchMultithread.h" -#include "CArgsBase.h" +#include "synergy/App.h" +#include "base/String.h" +#include "server/Config.h" +#include "net/NetworkAddress.h" +#include "arch/Arch.h" +#include "arch/IArchMultithread.h" +#include "synergy/ArgsBase.h" +#include "base/EventTypes.h" + #include -#include "CEventTypes.h" enum EServerState { kUninitialized, diff --git a/src/lib/synergy/ServerTaskBarReceiver.cpp b/src/lib/synergy/ServerTaskBarReceiver.cpp index 69ce39ed..8f1be0c4 100644 --- a/src/lib/synergy/ServerTaskBarReceiver.cpp +++ b/src/lib/synergy/ServerTaskBarReceiver.cpp @@ -16,13 +16,13 @@ * along with this program. If not, see . */ -#include "CServerTaskBarReceiver.h" -#include "CServer.h" -#include "CLock.h" -#include "CStringUtil.h" -#include "IEventQueue.h" -#include "CArch.h" -#include "Version.h" +#include "synergy/ServerTaskBarReceiver.h" +#include "server/Server.h" +#include "mt/Lock.h" +#include "base/StringUtil.h" +#include "base/IEventQueue.h" +#include "arch/Arch.h" +#include "common/Version.h" // // CServerTaskBarReceiver diff --git a/src/lib/synergy/ServerTaskBarReceiver.h b/src/lib/synergy/ServerTaskBarReceiver.h index 46af7c12..d80c56d8 100644 --- a/src/lib/synergy/ServerTaskBarReceiver.h +++ b/src/lib/synergy/ServerTaskBarReceiver.h @@ -16,16 +16,15 @@ * along with this program. If not, see . */ -#ifndef CSERVERTASKBARRECEIVER_H -#define CSERVERTASKBARRECEIVER_H +#pragma once -#include "CString.h" -#include "IArchTaskBarReceiver.h" -#include "stdvector.h" -#include "CEvent.h" -#include "CServerApp.h" -#include "CServer.h" -#include "CEventTypes.h" +#include "server/Server.h" +#include "synergy/ServerApp.h" +#include "arch/IArchTaskBarReceiver.h" +#include "base/EventTypes.h" +#include "base/String.h" +#include "base/Event.h" +#include "common/stdvector.h" class IEventQueue; @@ -97,5 +96,3 @@ private: }; IArchTaskBarReceiver* createTaskBarReceiver(const CBufferedLogOutputter* logBuffer, IEventQueue* events); - -#endif diff --git a/src/lib/synergy/ToolApp.cpp b/src/lib/synergy/ToolApp.cpp index af6fd712..6ab2fb91 100644 --- a/src/lib/synergy/ToolApp.cpp +++ b/src/lib/synergy/ToolApp.cpp @@ -15,9 +15,9 @@ * along with this program. If not, see . */ -#include "CToolApp.h" -#include "CString.h" -#include "CArch.h" +#include "synergy/ToolApp.h" +#include "arch/Arch.h" +#include "base/String.h" #include #include diff --git a/src/lib/synergy/XScreen.cpp b/src/lib/synergy/XScreen.cpp index 3d71eb86..a4963fac 100644 --- a/src/lib/synergy/XScreen.cpp +++ b/src/lib/synergy/XScreen.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "XScreen.h" +#include "synergy/XScreen.h" // // XScreenOpenFailure diff --git a/src/lib/synergy/XScreen.h b/src/lib/synergy/XScreen.h index dadbb941..9ea55abe 100644 --- a/src/lib/synergy/XScreen.h +++ b/src/lib/synergy/XScreen.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef XSCREEN_H -#define XSCREEN_H +#pragma once -#include "XBase.h" +#include "base/XBase.h" //! Generic screen exception XBASE_SUBCLASS(XScreen, XBase); @@ -67,5 +66,3 @@ protected: private: double m_timeUntilRetry; }; - -#endif diff --git a/src/lib/synergy/XSynergy.cpp b/src/lib/synergy/XSynergy.cpp index e42cd43d..e7e06fb4 100644 --- a/src/lib/synergy/XSynergy.cpp +++ b/src/lib/synergy/XSynergy.cpp @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#include "XSynergy.h" -#include "CStringUtil.h" +#include "synergy/XSynergy.h" +#include "base/StringUtil.h" // // XBadClient diff --git a/src/lib/synergy/XSynergy.h b/src/lib/synergy/XSynergy.h index ca763475..4b2ccab3 100644 --- a/src/lib/synergy/XSynergy.h +++ b/src/lib/synergy/XSynergy.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef XSYNERGY_H -#define XSYNERGY_H +#pragma once -#include "XBase.h" +#include "base/XBase.h" //! Generic synergy exception XBASE_SUBCLASS(XSynergy, XBase); @@ -125,5 +124,3 @@ protected: private: int m_code; }; - -#endif diff --git a/src/lib/synergy/lipboardTypes.h b/src/lib/synergy/clipboard_types.h similarity index 94% rename from src/lib/synergy/lipboardTypes.h rename to src/lib/synergy/clipboard_types.h index a61b46c4..7bb83a2c 100644 --- a/src/lib/synergy/lipboardTypes.h +++ b/src/lib/synergy/clipboard_types.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef CLIPBOARDTYPES_H -#define CLIPBOARDTYPES_H +#pragma once -#include "BasicTypes.h" +#include "common/basic_types.h" //! Clipboard ID /*! @@ -41,5 +40,3 @@ static const ClipboardID kClipboardSelection = 1; // the number of clipboards (i.e. one greater than the last clipboard id) static const ClipboardID kClipboardEnd = 2; //@} - -#endif diff --git a/src/lib/synergy/KeyTypes.cpp b/src/lib/synergy/key_types.cpp similarity index 99% rename from src/lib/synergy/KeyTypes.cpp rename to src/lib/synergy/key_types.cpp index 6c65e0ce..9c87c9c2 100644 --- a/src/lib/synergy/KeyTypes.cpp +++ b/src/lib/synergy/key_types.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "KeyTypes.h" +#include "synergy/key_types.h" const KeyNameMapEntry kKeyNameMap[] = { { "AltGr", kKeyAltGr }, diff --git a/src/lib/synergy/KeyTypes.h b/src/lib/synergy/key_types.h similarity index 99% rename from src/lib/synergy/KeyTypes.h rename to src/lib/synergy/key_types.h index ac5b1abd..203375d3 100644 --- a/src/lib/synergy/KeyTypes.h +++ b/src/lib/synergy/key_types.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef KEYTYPES_H -#define KEYTYPES_H +#pragma once -#include "BasicTypes.h" +#include "base/EventTypes.h" //! Key ID /*! @@ -309,5 +308,3 @@ A table of modifier key names to the corresponding KeyModifierMask. The end of the table is the first pair with a NULL m_name. */ extern const KeyModifierNameMapEntry kModifierNameMap[]; - -#endif diff --git a/src/lib/synergy/MouseTypes.h b/src/lib/synergy/mouse_types.h similarity index 93% rename from src/lib/synergy/MouseTypes.h rename to src/lib/synergy/mouse_types.h index b62fee67..677aeeac 100644 --- a/src/lib/synergy/MouseTypes.h +++ b/src/lib/synergy/mouse_types.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef MOUSETYPES_H -#define MOUSETYPES_H +#pragma once -#include "BasicTypes.h" +#include "base/EventTypes.h" //! Mouse button ID /*! @@ -37,5 +36,3 @@ static const ButtonID kButtonExtra0 = 4; //@} static const UInt8 NumButtonIDs = 5; - -#endif diff --git a/src/lib/synergy/OptionTypes.h b/src/lib/synergy/option_types.h similarity index 97% rename from src/lib/synergy/OptionTypes.h rename to src/lib/synergy/option_types.h index 0a05edfd..c385e1eb 100644 --- a/src/lib/synergy/OptionTypes.h +++ b/src/lib/synergy/option_types.h @@ -16,11 +16,10 @@ * along with this program. If not, see . */ -#ifndef OPTIONTYPES_H -#define OPTIONTYPES_H +#pragma once -#include "BasicTypes.h" -#include "stdvector.h" +#include "base/EventTypes.h" +#include "common/stdvector.h" //! Option ID /*! @@ -97,5 +96,3 @@ enum EScreenSwitchCornerMasks { //@} #undef OPTION_CODE - -#endif diff --git a/src/lib/synergy/ProtocolTypes.cpp b/src/lib/synergy/protocol_types.cpp similarity index 98% rename from src/lib/synergy/ProtocolTypes.cpp rename to src/lib/synergy/protocol_types.cpp index 264959be..d8c514f0 100644 --- a/src/lib/synergy/ProtocolTypes.cpp +++ b/src/lib/synergy/protocol_types.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "ProtocolTypes.h" +#include "synergy/protocol_types.h" const char* kMsgHello = "Synergy%2i%2i"; const char* kMsgHelloBack = "Synergy%2i%2i%s"; diff --git a/src/lib/synergy/ProtocolTypes.h b/src/lib/synergy/protocol_types.h similarity index 99% rename from src/lib/synergy/ProtocolTypes.h rename to src/lib/synergy/protocol_types.h index fec3b65b..a2b30eba 100644 --- a/src/lib/synergy/ProtocolTypes.h +++ b/src/lib/synergy/protocol_types.h @@ -16,10 +16,9 @@ * along with this program. If not, see . */ -#ifndef PROTOCOLTYPES_H -#define PROTOCOLTYPES_H +#pragma once -#include "BasicTypes.h" +#include "base/EventTypes.h" // protocol version number // 1.0: initial protocol @@ -331,6 +330,3 @@ public: */ SInt32 m_mx, m_my; }; - -#endif - diff --git a/src/lib/synergy/AppUtilUnix.cpp b/src/lib/synergy/unix/AppUtilUnix.cpp similarity index 95% rename from src/lib/synergy/AppUtilUnix.cpp rename to src/lib/synergy/unix/AppUtilUnix.cpp index af2fa569..9445c5cc 100644 --- a/src/lib/synergy/AppUtilUnix.cpp +++ b/src/lib/synergy/unix/AppUtilUnix.cpp @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -#include "CAppUtilUnix.h" -#include "CArgsBase.h" +#include "synergy/unix/AppUtilUnix.h" +#include "synergy/ArgsBase.h" CAppUtilUnix::CAppUtilUnix(IEventQueue* events) { diff --git a/src/lib/synergy/AppUtilUnix.h b/src/lib/synergy/unix/AppUtilUnix.h similarity index 97% rename from src/lib/synergy/AppUtilUnix.h rename to src/lib/synergy/unix/AppUtilUnix.h index 34d70787..eb2bbd3a 100644 --- a/src/lib/synergy/AppUtilUnix.h +++ b/src/lib/synergy/unix/AppUtilUnix.h @@ -18,7 +18,7 @@ #pragma once -#include "CAppUtil.h" +#include "synergy/AppUtil.h" #define ARCH_APP_UTIL CAppUtilUnix diff --git a/src/lib/synergy/AppUtilWindows.cpp b/src/lib/synergy/win32/AppUtilWindows.cpp similarity index 90% rename from src/lib/synergy/AppUtilWindows.cpp rename to src/lib/synergy/win32/AppUtilWindows.cpp index 794e24c1..421bfe96 100644 --- a/src/lib/synergy/AppUtilWindows.cpp +++ b/src/lib/synergy/win32/AppUtilWindows.cpp @@ -16,21 +16,21 @@ * along with this program. If not, see . */ -#include "CAppUtilWindows.h" -#include "Version.h" -#include "CLog.h" -#include "XArchWindows.h" -#include "CArchMiscWindows.h" -#include "CApp.h" -#include "LogOutputters.h" -#include "CMSWindowsScreen.h" -#include "XSynergy.h" -#include "IArchTaskBarReceiver.h" -#include "CScreen.h" -#include "CArgsBase.h" -#include "IEventQueue.h" -#include "CEvent.h" -#include "CEventQueue.h" +#include "synergy/win32/AppUtilWindows.h" +#include "common/Version.h" +#include "base/Log.h" +#include "arch/win32/XArchWindows.h" +#include "arch/win32/ArchMiscWindows.h" +#include "synergy/App.h" +#include "base/log_outputters.h" +#include "platform/MSWindowsScreen.h" +#include "synergy/XSynergy.h" +#include "arch/IArchTaskBarReceiver.h" +#include "synergy/Screen.h" +#include "synergy/ArgsBase.h" +#include "base/IEventQueue.h" +#include "base/Event.h" +#include "base/EventQueue.h" #include #include diff --git a/src/lib/synergy/AppUtilWindows.h b/src/lib/synergy/win32/AppUtilWindows.h similarity index 96% rename from src/lib/synergy/AppUtilWindows.h rename to src/lib/synergy/win32/AppUtilWindows.h index 7b2b9901..10c8e7c5 100644 --- a/src/lib/synergy/AppUtilWindows.h +++ b/src/lib/synergy/win32/AppUtilWindows.h @@ -18,8 +18,8 @@ #pragma once -#include "CAppUtil.h" -#include "CString.h" +#include "synergy/AppUtil.h" +#include "base/String.h" #define WIN32_LEAN_AND_MEAN #include "Windows.h" diff --git a/src/lib/synwinhk/CMakeLists.txt b/src/lib/synwinhk/CMakeLists.txt index 314973fd..fa14354c 100644 --- a/src/lib/synwinhk/CMakeLists.txt +++ b/src/lib/synwinhk/CMakeLists.txt @@ -21,8 +21,7 @@ if (SYNERGY_ADD_HEADERS) endif() include_directories( - ../common - ../synergy + ../ ) add_library(synwinhk SHARED ${sources}) diff --git a/src/lib/synwinhk/synwinhk.cpp b/src/lib/synwinhk/synwinhk.cpp index 70313ea4..5eeeb6f5 100644 --- a/src/lib/synwinhk/synwinhk.cpp +++ b/src/lib/synwinhk/synwinhk.cpp @@ -16,8 +16,10 @@ * along with this program. If not, see . */ -#include "synwinhk.h" -#include "ProtocolTypes.h" +#include "synwinhk/synwinhk.h" + +#include "synergy/protocol_types.h" + #include #include diff --git a/src/lib/synwinhk/synwinhk.h b/src/lib/synwinhk/synwinhk.h index d980a738..e6b242f8 100644 --- a/src/lib/synwinhk/synwinhk.h +++ b/src/lib/synwinhk/synwinhk.h @@ -16,8 +16,7 @@ * along with this program. If not, see . */ -#ifndef CSYNERGYHOOK_H -#define CSYNERGYHOOK_H +#pragma once // hack: vs2005 doesn't declare _WIN32_WINNT, so we need to hard code it. // however, some say that this should be hard coded since it defines the @@ -27,9 +26,10 @@ #define _WIN32_WINNT 0x0400 #endif -#include "BasicTypes.h" +#include "base/EventTypes.h" + #define WIN32_LEAN_AND_MEAN -#include +#include #if defined(synwinhk_EXPORTS) #define CSYNERGYHOOK_API __declspec(dllexport) @@ -89,5 +89,3 @@ CSYNERGYHOOK_API void setZone(SInt32 x, SInt32 y, SInt32 w, SInt32 h, CSYNERGYHOOK_API void setMode(EHookMode mode); } - -#endif diff --git a/src/lib/synwinxt/CMakeLists.txt b/src/lib/synwinxt/CMakeLists.txt index f4c0f120..b94f28e1 100644 --- a/src/lib/synwinxt/CMakeLists.txt +++ b/src/lib/synwinxt/CMakeLists.txt @@ -21,9 +21,7 @@ if (SYNERGY_ADD_HEADERS) endif() include_directories( - ../arch - ../base - ../common + ../ ) add_library(synwinxt SHARED ${sources}) diff --git a/src/lib/synwinxt/ClassFactory.cpp b/src/lib/synwinxt/ClassFactory.cpp index 2e8fedb1..baa34f3a 100644 --- a/src/lib/synwinxt/ClassFactory.cpp +++ b/src/lib/synwinxt/ClassFactory.cpp @@ -15,8 +15,9 @@ * along with this program. If not, see . */ -#include "CClassFactory.h" -#include "CDataHandlerExtension.h" +#include "synwinxt/ClassFactory.h" +#include "synwinxt/DataHandlerExtension.h" + #include extern LONG g_refCount; diff --git a/src/lib/synwinxt/DataHandlerExtension.cpp b/src/lib/synwinxt/DataHandlerExtension.cpp index e26dcbf1..0c1e22a6 100644 --- a/src/lib/synwinxt/DataHandlerExtension.cpp +++ b/src/lib/synwinxt/DataHandlerExtension.cpp @@ -15,7 +15,8 @@ * along with this program. If not, see . */ -#include "CDataHandlerExtension.h" +#include "DataHandlerExtension.h" + #include #include #include diff --git a/src/lib/synwinxt/synwinxt.cpp b/src/lib/synwinxt/synwinxt.cpp index 87eb4a5a..b06738fc 100644 --- a/src/lib/synwinxt/synwinxt.cpp +++ b/src/lib/synwinxt/synwinxt.cpp @@ -15,11 +15,12 @@ * along with this program. If not, see . */ -#include "synwinxt.h" -#include "CClassFactory.h" -#include "CArchMiscWindows.h" -#include +#include "synwinxt/synwinxt.h" +#include "synwinxt/ClassFactory.h" +#include "arch/win32/ArchMiscWindows.h" + #include +#include #pragma comment(lib, "Shlwapi.lib") diff --git a/src/test/integtests/TestEventQueue.cpp b/src/test/global/TestEventQueue.cpp similarity index 90% rename from src/test/integtests/TestEventQueue.cpp rename to src/test/global/TestEventQueue.cpp index c92176cf..23000e87 100644 --- a/src/test/integtests/TestEventQueue.cpp +++ b/src/test/global/TestEventQueue.cpp @@ -15,10 +15,12 @@ * along with this program. If not, see . */ -#include "CTestEventQueue.h" -#include "CLog.h" -#include "TMethodEventJob.h" -#include "CSimpleEventQueueBuffer.h" +#include "test/global/TestEventQueue.h" + +#include "base/Log.h" +#include "base/TMethodEventJob.h" +#include "base/SimpleEventQueueBuffer.h" + #include void diff --git a/src/test/integtests/TestEventQueue.h b/src/test/global/TestEventQueue.h similarity index 97% rename from src/test/integtests/TestEventQueue.h rename to src/test/global/TestEventQueue.h index 82dd32d1..fffd55fb 100644 --- a/src/test/integtests/TestEventQueue.h +++ b/src/test/global/TestEventQueue.h @@ -17,7 +17,7 @@ #pragma once -#include "CEventQueue.h" +#include "base/EventQueue.h" class CEventQueueTimer; diff --git a/src/lib/synergy/Global.h b/src/test/global/access.h similarity index 90% rename from src/lib/synergy/Global.h rename to src/test/global/access.h index 288f247d..432df994 100644 --- a/src/lib/synergy/Global.h +++ b/src/test/global/access.h @@ -16,14 +16,10 @@ * along with this program. If not, see . */ -#ifndef GLOBAL_H -#define GLOBAL_H +#pragma once -// Makes everything public for unit tests +// make everything public for unit tests #ifdef TEST_ENV #define protected public #define private public #endif - -#endif - diff --git a/src/test/gtest.h b/src/test/global/gtest.h similarity index 100% rename from src/test/gtest.h rename to src/test/global/gtest.h diff --git a/src/test/guitests/src/VersionCheckerTests.h b/src/test/guitests/src/VersionCheckerTests.h index db6c899d..a0301163 100644 --- a/src/test/guitests/src/VersionCheckerTests.h +++ b/src/test/guitests/src/VersionCheckerTests.h @@ -16,6 +16,8 @@ * along with this program. If not, see . */ +#pragma once + #include "QObject.h" class VersionCheckerTests : public QObject diff --git a/src/test/integtests/CMakeLists.txt b/src/test/integtests/CMakeLists.txt index 3e4db263..cf2ad6bc 100644 --- a/src/test/integtests/CMakeLists.txt +++ b/src/test/integtests/CMakeLists.txt @@ -49,22 +49,10 @@ if (SYNERGY_ADD_HEADERS) endif() include_directories( - ../../lib/arch - ../../lib/base - ../../lib/client - ../../lib/common - ../../lib/io - ../../lib/ipc - ../../lib/mt - ../../lib/net - ../../lib/platform - ../../lib/server - ../../lib/synergy - ../../lib/synwinhk - ../../lib/synwinxt + ../../ + ../../lib/ ../../../ext/gtest-1.6.0/include ../../../ext/gmock-1.6.0/include - ../unittests ) if (UNIX) diff --git a/src/test/integtests/Main.cpp b/src/test/integtests/Main.cpp index 584e881b..854423aa 100644 --- a/src/test/integtests/Main.cpp +++ b/src/test/integtests/Main.cpp @@ -16,16 +16,17 @@ * along with this program. If not, see . */ -#include -#include -#include -#include "CArch.h" -#include "CLog.h" +#include "arch/Arch.h" +#include "base/Log.h" #if SYSAPI_WIN32 -#include "CArchMiscWindows.h" +#include "arch/win32/ArchMiscWindows.h" #endif +#include +#include +#include + #define LOCK_TIMEOUT 30 using namespace std; diff --git a/src/test/integtests/arch/ArchInternetUnixTests.cpp b/src/test/integtests/arch/ArchInternetUnixTests.cpp index d13a8398..da8d4cc1 100644 --- a/src/test/integtests/arch/ArchInternetUnixTests.cpp +++ b/src/test/integtests/arch/ArchInternetUnixTests.cpp @@ -15,8 +15,9 @@ * along with this program. If not, see . */ +#include "arch/ArchInternetUnix.h" + #include -#include "CArchInternetUnix.h" #define TEST_URL "https://synergy-foss.org/tests/?testString" //#define TEST_URL "http://localhost/synergy/tests/?testString" diff --git a/src/test/integtests/arch/ArchInternetWindowsTests.cpp b/src/test/integtests/arch/ArchInternetWindowsTests.cpp index f3b91ba6..5dffd594 100644 --- a/src/test/integtests/arch/ArchInternetWindowsTests.cpp +++ b/src/test/integtests/arch/ArchInternetWindowsTests.cpp @@ -15,8 +15,9 @@ * along with this program. If not, see . */ +#include "arch/ArchInternetWindows.h" + #include -#include "CArchInternetWindows.h" #define TEST_URL "https://synergy-foss.org/tests/?testString" //#define TEST_URL "http://localhost/synergy/tests/?testString" diff --git a/src/test/integtests/IpcTests.cpp b/src/test/integtests/ipc/IpcTests.cpp similarity index 93% rename from src/test/integtests/IpcTests.cpp rename to src/test/integtests/ipc/IpcTests.cpp index ec334b24..03231889 100644 --- a/src/test/integtests/IpcTests.cpp +++ b/src/test/integtests/ipc/IpcTests.cpp @@ -19,26 +19,26 @@ // TODO: fix, tests failing intermittently on mac. #ifndef WINAPI_CARBON -#include - #define TEST_ENV -#include "Global.h" -#include "CIpcServer.h" -#include "CIpcClient.h" -#include "CSocketMultiplexer.h" -#include "CEventQueue.h" -#include "TMethodEventJob.h" -#include "CThread.h" -#include "TMethodJob.h" -#include "CArch.h" -#include "CLog.h" -#include "CIpcClientProxy.h" -#include "Ipc.h" -#include "CString.h" -#include "CIpcServerProxy.h" -#include "CIpcMessage.h" -#include "CTestEventQueue.h" +#include "test/global/access.h" +#include "test/global/TestEventQueue.h" +#include "ipc/IpcServer.h" +#include "ipc/IpcClient.h" +#include "ipc/IpcServerProxy.h" +#include "ipc/IpcMessage.h" +#include "ipc/IpcClientProxy.h" +#include "ipc/Ipc.h" +#include "net/SocketMultiplexer.h" +#include "mt/Thread.h" +#include "arch/Arch.h" +#include "base/TMethodJob.h" +#include "base/String.h" +#include "base/Log.h" +#include "base/EventQueue.h" +#include "base/TMethodEventJob.h" + +#include #define TEST_IPC_PORT 24802 diff --git a/src/test/integtests/NetworkTests.cpp b/src/test/integtests/net/NetworkTests.cpp similarity index 96% rename from src/test/integtests/NetworkTests.cpp rename to src/test/integtests/net/NetworkTests.cpp index 9bc52d2a..352c763a 100644 --- a/src/test/integtests/NetworkTests.cpp +++ b/src/test/integtests/net/NetworkTests.cpp @@ -18,6 +18,26 @@ // TODO: fix, tests failing intermittently on mac. #ifndef WINAPI_CARBON +#define TEST_ENV + +#include "test/mock/server/MockConfig.h" +#include "test/mock/server/MockPrimaryClient.h" +#include "test/mock/synergy/MockScreen.h" +#include "test/mock/server/MockInputFilter.h" +#include "test/global/TestEventQueue.h" +#include "server/Server.h" +#include "server/ClientListener.h" +#include "client/Client.h" +#include "synergy/FileChunker.h" +#include "net/SocketMultiplexer.h" +#include "net/NetworkAddress.h" +#include "net/TCPSocketFactory.h" +#include "io/CryptoOptions.h" +#include "mt/Thread.h" +#include "base/TMethodEventJob.h" +#include "base/TMethodJob.h" +#include "base/Log.h" + #include #include #include @@ -25,26 +45,6 @@ #include #include -#define TEST_ENV - -#include "CLog.h" -#include "CServer.h" -#include "CClient.h" -#include "TMethodEventJob.h" -#include "server/CMockConfig.h" -#include "server/CMockPrimaryClient.h" -#include "synergy/CMockScreen.h" -#include "CClientListener.h" -#include "CNetworkAddress.h" -#include "CTCPSocketFactory.h" -#include "CCryptoOptions.h" -#include "CSocketMultiplexer.h" -#include "CTestEventQueue.h" -#include "server/CMockInputFilter.h" -#include "TMethodJob.h" -#include "CThread.h" -#include "CFileChunker.h" - using namespace std; using ::testing::_; using ::testing::NiceMock; diff --git a/src/test/integtests/platform/MSWindowsClipboardTests.cpp b/src/test/integtests/platform/MSWindowsClipboardTests.cpp index 8b1a2697..fc39a641 100644 --- a/src/test/integtests/platform/MSWindowsClipboardTests.cpp +++ b/src/test/integtests/platform/MSWindowsClipboardTests.cpp @@ -16,10 +16,11 @@ * along with this program. If not, see . */ -#include +#include "platform/MSWindowsClipboard.h" +#include "platform/IMSWindowsClipboardFacade.h" + #include -#include "CMSWindowsClipboard.h" -#include "IMSWindowsClipboardFacade.h" +#include class CMSWindowsClipboardTests : public ::testing::Test { diff --git a/src/test/integtests/platform/MSWindowsKeyStateTests.cpp b/src/test/integtests/platform/MSWindowsKeyStateTests.cpp index b0e508f7..7e36d609 100644 --- a/src/test/integtests/platform/MSWindowsKeyStateTests.cpp +++ b/src/test/integtests/platform/MSWindowsKeyStateTests.cpp @@ -16,19 +16,19 @@ * along with this program. If not, see . */ -#include -#include - #define TEST_ENV -#include "Global.h" -#include "CMSWindowsKeyState.h" -#include "CMSWindowsDesks.h" -#include "CMSWindowsScreen.h" -#include "CMSWindowsScreenSaver.h" -#include "TMethodJob.h" +#include "test/global/access.h" +#include "platform/MSWindowsKeyState.h" +#include "platform/MSWindowsDesks.h" +#include "platform/MSWindowsScreen.h" +#include "platform/MSWindowsScreenSaver.h" #include "synergy/CMockEventQueue.h" #include "synergy/CMockKeyMap.h" +#include "base/TMethodJob.h" + +#include +#include // wParam = flags, HIBYTE(lParam) = virtual key, LOBYTE(lParam) = scan code #define SYNERGY_MSG_FAKE_KEY SYNERGY_HOOK_LAST_MSG + 4 diff --git a/src/test/integtests/platform/OSXClipboardTests.cpp b/src/test/integtests/platform/OSXClipboardTests.cpp index 107e7926..b65769ea 100644 --- a/src/test/integtests/platform/OSXClipboardTests.cpp +++ b/src/test/integtests/platform/OSXClipboardTests.cpp @@ -16,9 +16,10 @@ * along with this program. If not, see . */ -#include +#include "platform/OSXClipboard.h" + #include -#include "COSXClipboard.h" +#include TEST(COSXClipboardTests, empty_openCalled_returnsTrue) { diff --git a/src/test/integtests/platform/OSXKeyStateTests.cpp b/src/test/integtests/platform/OSXKeyStateTests.cpp index 71f98589..29f60903 100644 --- a/src/test/integtests/platform/OSXKeyStateTests.cpp +++ b/src/test/integtests/platform/OSXKeyStateTests.cpp @@ -16,14 +16,13 @@ * along with this program. If not, see . */ -#include -#include - -#include "COSXKeyState.h" +#include "platform/OSXKeyState.h" #include "synergy/CMockKeyMap.h" #include "synergy/CMockEventQueue.h" +#include "base/Log.h" -#include "CLog.h" +#include +#include #define SHIFT_ID_L kKeyShift_L #define SHIFT_ID_R kKeyShift_R diff --git a/src/test/integtests/platform/OSXScreenTests.cpp b/src/test/integtests/platform/OSXScreenTests.cpp index 8c75d2e6..fc156097 100644 --- a/src/test/integtests/platform/OSXScreenTests.cpp +++ b/src/test/integtests/platform/OSXScreenTests.cpp @@ -15,12 +15,12 @@ * along with this program. If not, see . */ -#include +#include "test/global/access.h" +#include "platform/OSXScreen.h" +#include "arch/Arch.h" +#include "base/EventQueue.h" -#define private public -#include "COSXScreen.h" -#include "CEventQueue.h" -#include "CArch.h" +#include // disabling these tests - the return value of CGCursorIsVisible is unreliable. /* diff --git a/src/test/integtests/platform/XWindowsClipboardTests.cpp b/src/test/integtests/platform/XWindowsClipboardTests.cpp index 47b5d875..da11315e 100644 --- a/src/test/integtests/platform/XWindowsClipboardTests.cpp +++ b/src/test/integtests/platform/XWindowsClipboardTests.cpp @@ -16,9 +16,10 @@ * along with this program. If not, see . */ -#include +#include "platform/XWindowsClipboard.h" + #include -#include "CXWindowsClipboard.h" +#include class CXWindowsClipboardTests : public ::testing::Test { diff --git a/src/test/integtests/platform/XWindowsKeyStateTests.cpp b/src/test/integtests/platform/XWindowsKeyStateTests.cpp index 35c45b3c..92a033a4 100644 --- a/src/test/integtests/platform/XWindowsKeyStateTests.cpp +++ b/src/test/integtests/platform/XWindowsKeyStateTests.cpp @@ -16,26 +16,26 @@ * along with this program. If not, see . */ -#include -#include - #define TEST_ENV -#include "Global.h" -#include "synergy/CMockKeyMap.h" -#include "synergy/CMockEventQueue.h" -#include "CXWindowsKeyState.h" -#include "CLog.h" -#include +#include "test/global/access.h" +#include "test/mock/synergy/CMockKeyMap.h" +#include "test/mock/synergy/CMockEventQueue.h" +#include "platform/XWindowsKeyState.h" +#include "base/Log.h" #define XK_LATIN1 #define XK_MISCELLANY -#include "X11/keysymdef.h" +#include #if HAVE_XKB_EXTENSION # include #endif +#include +#include +#include + class CXWindowsKeyStateTests : public ::testing::Test { protected: diff --git a/src/test/integtests/platform/XWindowsScreenSaverTests.cpp b/src/test/integtests/platform/XWindowsScreenSaverTests.cpp index 8094bd3f..09189dcf 100644 --- a/src/test/integtests/platform/XWindowsScreenSaverTests.cpp +++ b/src/test/integtests/platform/XWindowsScreenSaverTests.cpp @@ -16,10 +16,13 @@ * along with this program. If not, see . */ +// TODO: fix tests #if 0 + +#include "test/mock/synergy/MockEventQueue.h" +#include "platform/XWindowsScreenSaver.h" + #include -#include "CXWindowsScreenSaver.h" -#include "CMockEventQueue.h" #include using ::testing::_; diff --git a/src/test/integtests/platform/XWindowsScreenTests.cpp b/src/test/integtests/platform/XWindowsScreenTests.cpp index e694b4c9..a3c18f90 100644 --- a/src/test/integtests/platform/XWindowsScreenTests.cpp +++ b/src/test/integtests/platform/XWindowsScreenTests.cpp @@ -16,10 +16,11 @@ * along with this program. If not, see . */ -#include -#include "CXWindowsScreen.h" +#include "platform/XWindowsScreen.h" #include "synergy/CMockEventQueue.h" +#include + using ::testing::_; TEST(CXWindowsScreenTests, fakeMouseMove_nonPrimary_getCursorPosValuesCorrect) diff --git a/src/test/unittests/client/MockClient.h b/src/test/mock/client/MockClient.h similarity index 97% rename from src/test/unittests/client/MockClient.h rename to src/test/mock/client/MockClient.h index 0c7a6c99..35de9856 100644 --- a/src/test/unittests/client/MockClient.h +++ b/src/test/mock/client/MockClient.h @@ -18,10 +18,11 @@ #pragma once -#include - #define TEST_ENV -#include "CClient.h" + +#include "client/Client.h" + +#include class IEventQueue; diff --git a/src/test/unittests/io/MockCryptoStream.h b/src/test/mock/io/MockCryptoStream.h similarity index 94% rename from src/test/unittests/io/MockCryptoStream.h rename to src/test/mock/io/MockCryptoStream.h index 161c61a8..d678cba8 100644 --- a/src/test/unittests/io/MockCryptoStream.h +++ b/src/test/mock/io/MockCryptoStream.h @@ -17,9 +17,10 @@ #pragma once +#include "io/CryptoStream.h" +#include "io/CryptoOptions.h" + #include -#include "CCryptoStream.h" -#include "CCryptoOptions.h" class CMockCryptoStream : public CCryptoStream { diff --git a/src/test/unittests/io/MockStream.h b/src/test/mock/io/MockStream.h similarity index 98% rename from src/test/unittests/io/MockStream.h rename to src/test/mock/io/MockStream.h index bf6986c9..441f672f 100644 --- a/src/test/unittests/io/MockStream.h +++ b/src/test/mock/io/MockStream.h @@ -18,8 +18,9 @@ #pragma once +#include "io/IStream.h" + #include -#include "IStream.h" class IEventQueue; diff --git a/src/test/unittests/server/MockConfig.h b/src/test/mock/server/MockConfig.h similarity index 97% rename from src/test/unittests/server/MockConfig.h rename to src/test/mock/server/MockConfig.h index 65bbcacd..b0987011 100644 --- a/src/test/unittests/server/MockConfig.h +++ b/src/test/mock/server/MockConfig.h @@ -17,10 +17,11 @@ #pragma once -#include - #define TEST_ENV -#include "CConfig.h" + +#include "server/Config.h" + +#include class CMockConfig : public CConfig { diff --git a/src/test/unittests/server/MockInputFilter.h b/src/test/mock/server/MockInputFilter.h similarity index 96% rename from src/test/unittests/server/MockInputFilter.h rename to src/test/mock/server/MockInputFilter.h index 65813c76..5736639d 100644 --- a/src/test/unittests/server/MockInputFilter.h +++ b/src/test/mock/server/MockInputFilter.h @@ -17,10 +17,11 @@ #pragma once -#include - #define TEST_ENV -#include "CInputFilter.h" + +#include "server/InputFilter.h" + +#include class CMockInputFilter : public CInputFilter { diff --git a/src/test/unittests/server/MockPrimaryClient.h b/src/test/mock/server/MockPrimaryClient.h similarity index 95% rename from src/test/unittests/server/MockPrimaryClient.h rename to src/test/mock/server/MockPrimaryClient.h index 88c9eeb3..08d03f32 100644 --- a/src/test/unittests/server/MockPrimaryClient.h +++ b/src/test/mock/server/MockPrimaryClient.h @@ -17,11 +17,12 @@ #pragma once -#include - #define TEST_ENV -#include "CPrimaryClient.h" -#include "CString.h" + +#include "synergy/PrimaryClient.h" +#include "base/String.h" + +#include class CMockPrimaryClient : public CPrimaryClient { diff --git a/src/test/unittests/server/MockServer.h b/src/test/mock/server/MockServer.h similarity index 96% rename from src/test/unittests/server/MockServer.h rename to src/test/mock/server/MockServer.h index ba8d5a6b..6f499ab6 100644 --- a/src/test/unittests/server/MockServer.h +++ b/src/test/mock/server/MockServer.h @@ -17,10 +17,11 @@ #pragma once -#include - #define TEST_ENV -#include "CServer.h" + +#include "server/Server.h" + +#include class IEventQueue; diff --git a/src/test/unittests/synergy/MockEventQueue.h b/src/test/mock/synergy/MockEventQueue.h similarity index 96% rename from src/test/unittests/synergy/MockEventQueue.h rename to src/test/mock/synergy/MockEventQueue.h index e7e8e87a..bee65198 100644 --- a/src/test/unittests/synergy/MockEventQueue.h +++ b/src/test/mock/synergy/MockEventQueue.h @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -#ifndef CMOCKEVENTQUEUE_H -#define CMOCKEVENTQUEUE_H +#pragma once + +#include "base/IEventQueue.h" #include -#include "IEventQueue.h" class CMockEventQueue : public IEventQueue { @@ -62,5 +62,3 @@ public: MOCK_METHOD0(forIPrimaryScreen, IPrimaryScreenEvents&()); MOCK_METHOD0(forIScreen, IScreenEvents&()); }; - -#endif diff --git a/src/test/unittests/synergy/MockKeyMap.h b/src/test/mock/synergy/MockKeyMap.h similarity index 94% rename from src/test/unittests/synergy/MockKeyMap.h rename to src/test/mock/synergy/MockKeyMap.h index ce7a0a38..a1c0b83e 100644 --- a/src/test/unittests/synergy/MockKeyMap.h +++ b/src/test/mock/synergy/MockKeyMap.h @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -#ifndef CMOCKKEYMAP_H -#define CMOCKKEYMAP_H +#pragma once + +#include "synergy/KeyMap.h" #include -#include "CKeyMap.h" class CMockKeyMap : public CKeyMap { @@ -34,5 +34,3 @@ public: Keystrokes&, KeyID, SInt32, ModifierToKeys&, KeyModifierMask&, KeyModifierMask, bool)); }; - -#endif diff --git a/src/test/unittests/synergy/MockScreen.h b/src/test/mock/synergy/MockScreen.h similarity index 97% rename from src/test/unittests/synergy/MockScreen.h rename to src/test/mock/synergy/MockScreen.h index 27f658b9..0782b597 100644 --- a/src/test/unittests/synergy/MockScreen.h +++ b/src/test/mock/synergy/MockScreen.h @@ -17,10 +17,11 @@ #pragma once -#include - #define TEST_ENV -#include "CScreen.h" + +#include "synergy/Screen.h" + +#include class CMockScreen : public CScreen { diff --git a/src/test/unittests/CMakeLists.txt b/src/test/unittests/CMakeLists.txt index b3eef25e..2c8e5028 100644 --- a/src/test/unittests/CMakeLists.txt +++ b/src/test/unittests/CMakeLists.txt @@ -18,21 +18,11 @@ file(GLOB_RECURSE headers "*.h") file(GLOB_RECURSE sources "*.cpp") include_directories( - ../../lib/arch - ../../lib/base - ../../lib/client - ../../lib/server - ../../lib/common - ../../lib/io - ../../lib/mt - ../../lib/net - ../../lib/platform - ../../lib/synergy + ../../ + ../../lib/ ../../../ext/gtest-1.6.0/include ../../../ext/gmock-1.6.0/include ../../../ext - io - synergy ) if (UNIX) diff --git a/src/test/unittests/Main.cpp b/src/test/unittests/Main.cpp index 2320acbf..7ec9c94c 100644 --- a/src/test/unittests/Main.cpp +++ b/src/test/unittests/Main.cpp @@ -16,14 +16,15 @@ * along with this program. If not, see . */ -#include -#include "CArch.h" -#include "CLog.h" +#include "arch/Arch.h" +#include "base/Log.h" #if SYSAPI_WIN32 -#include "CArchMiscWindows.h" +#include "arch/win32/ArchMiscWindows.h" #endif +#include + int main(int argc, char **argv) { diff --git a/src/test/unittests/client/ServerProxyTests.cpp b/src/test/unittests/client/ServerProxyTests.cpp index 8c985924..2c47b5c7 100644 --- a/src/test/unittests/client/ServerProxyTests.cpp +++ b/src/test/unittests/client/ServerProxyTests.cpp @@ -18,12 +18,13 @@ #define TEST_ENV +#include "test/mock/client/MockClient.h" +#include "test/mock/io/MockStream.h" +#include "test/mock/synergy/MockEventQueue.h" +#include "client/ServerProxy.h" +#include "synergy/protocol_types.h" + #include -#include "CServerProxy.h" -#include "CMockClient.h" -#include "CMockStream.h" -#include "CMockEventQueue.h" -#include "ProtocolTypes.h" using ::testing::_; using ::testing::Invoke; diff --git a/src/test/unittests/server/ClientProxyTests.cpp b/src/test/unittests/server/ClientProxyTests.cpp index 17b60dba..52076d06 100644 --- a/src/test/unittests/server/ClientProxyTests.cpp +++ b/src/test/unittests/server/ClientProxyTests.cpp @@ -15,12 +15,13 @@ * along with this program. If not, see . */ +#include "test/mock/server/MockServer.h" +#include "test/mock/io/MockStream.h" +#include "test/mock/io/MockCryptoStream.h" +#include "test/mock/synergy/MockEventQueue.h" +#include "server/ClientProxy1_4.h" + #include -#include "CClientProxy1_4.h" -#include "CMockServer.h" -#include "CMockStream.h" -#include "CMockCryptoStream.h" -#include "CMockEventQueue.h" using ::testing::_; using ::testing::NiceMock; diff --git a/src/test/unittests/synergy/ClipboardTests.cpp b/src/test/unittests/synergy/ClipboardTests.cpp index 97448c71..400dcdac 100644 --- a/src/test/unittests/synergy/ClipboardTests.cpp +++ b/src/test/unittests/synergy/ClipboardTests.cpp @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -#include <../../gtest.h> -#include "CClipboard.h" +#include "synergy/Clipboard.h" + +#include "test/global/gtest.h" TEST(CClipboardTests, empty_openCalled_returnsTrue) { diff --git a/src/test/unittests/synergy/CryptoStreamTests.cpp b/src/test/unittests/synergy/CryptoStreamTests.cpp index 348194b8..f7619340 100644 --- a/src/test/unittests/synergy/CryptoStreamTests.cpp +++ b/src/test/unittests/synergy/CryptoStreamTests.cpp @@ -15,12 +15,13 @@ * along with this program. If not, see . */ +#include "test/mock/io/MockStream.h" +#include "test/mock/synergy/MockEventQueue.h" +#include "synergy/PacketStreamFilter.h" +#include "io/CryptoStream.h" +#include "io/CryptoOptions.h" + #include -#include "CCryptoStream.h" -#include "CMockStream.h" -#include "CMockEventQueue.h" -#include "CPacketStreamFilter.h" -#include "CCryptoOptions.h" using ::testing::_; using ::testing::Invoke; diff --git a/src/test/unittests/synergy/KeyStateTests.cpp b/src/test/unittests/synergy/KeyStateTests.cpp index a1c0feda..862f5c52 100644 --- a/src/test/unittests/synergy/KeyStateTests.cpp +++ b/src/test/unittests/synergy/KeyStateTests.cpp @@ -16,11 +16,12 @@ * along with this program. If not, see . */ -#include <../../gtest.h> +#include "test/unittests/synergy/KeyStateTests.h" +#include "test/mock/synergy/MockEventQueue.h" +#include "test/mock/synergy/MockKeyMap.h" + #include -#include "CKeyStateTests.h" -#include "CMockEventQueue.h" -#include "CMockKeyMap.h" +#include "test/global/gtest.h" using ::testing::_; using ::testing::NiceMock; diff --git a/src/test/unittests/synergy/KeyStateTests.h b/src/test/unittests/synergy/KeyStateTests.h index 601df40e..92865a6b 100644 --- a/src/test/unittests/synergy/KeyStateTests.h +++ b/src/test/unittests/synergy/KeyStateTests.h @@ -16,10 +16,10 @@ * along with this program. If not, see . */ -#ifndef CKEYSTATETESTS_H -#define CKEYSTATETESTS_H +#pragma once + +#include "synergy/KeyState.h" -#include "CKeyState.h" #include "gmock/gmock.h" class CMockKeyMap; @@ -71,5 +71,3 @@ stubMapKey( CKeyMap::Keystroke s_stubKeystroke(1, false, false); CKeyMap::KeyItem s_stubKeyItem; - -#endif