]> granicus.if.org Git - icinga2/commitdiff
Refactored the libraries.
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 10 Sep 2012 12:07:32 +0000 (14:07 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 10 Sep 2012 12:07:32 +0000 (14:07 +0200)
60 files changed:
components/checker/Makefile.am
components/checker/i2-checker.h
components/cibsync/Makefile.am
components/cibsync/i2-cibsync.h
components/compat/Makefile.am
components/compat/i2-compat.h
components/convenience/Makefile.am
components/convenience/i2-convenience.h
components/delegation/Makefile.am
components/delegation/i2-delegation.h
components/demo/Makefile.am
components/demo/i2-demo.h
configure.ac
icinga-app/Makefile.am
lib/Makefile.am
lib/cib/Makefile.am [deleted file]
lib/cib/cib.vcxproj [deleted file]
lib/cib/cib.vcxproj.filters [deleted file]
lib/cib/i2-cib.cpp [deleted file]
lib/cib/i2-cib.h [deleted file]
lib/icinga/Makefile.am
lib/icinga/cib.cpp [moved from lib/cib/cib.cpp with 98% similarity]
lib/icinga/cib.h [moved from lib/cib/cib.h with 98% similarity]
lib/icinga/host.cpp [moved from lib/cib/host.cpp with 99% similarity]
lib/icinga/host.h [moved from lib/cib/host.h with 97% similarity]
lib/icinga/hostgroup.cpp [moved from lib/cib/hostgroup.cpp with 98% similarity]
lib/icinga/hostgroup.h [moved from lib/cib/hostgroup.h with 97% similarity]
lib/icinga/i2-icinga.h
lib/icinga/icingaapplication.cpp
lib/icinga/macroprocessor.cpp [moved from lib/cib/macroprocessor.cpp with 99% similarity]
lib/icinga/macroprocessor.h [moved from lib/cib/macroprocessor.h with 97% similarity]
lib/icinga/nagioschecktask.cpp [moved from lib/cib/nagioschecktask.cpp with 99% similarity]
lib/icinga/nagioschecktask.h [moved from lib/cib/nagioschecktask.h with 98% similarity]
lib/icinga/nullchecktask.cpp [moved from lib/cib/nullchecktask.cpp with 98% similarity]
lib/icinga/nullchecktask.h [moved from lib/cib/nullchecktask.h with 98% similarity]
lib/icinga/service.cpp [moved from lib/cib/service.cpp with 99% similarity]
lib/icinga/service.h [moved from lib/cib/service.h with 98% similarity]
lib/icinga/servicegroup.cpp [moved from lib/cib/servicegroup.cpp with 98% similarity]
lib/icinga/servicegroup.h [moved from lib/cib/servicegroup.h with 97% similarity]
lib/icinga/servicestatechangemessage.cpp [moved from lib/cib/servicestatechangemessage.cpp with 98% similarity]
lib/icinga/servicestatechangemessage.h [moved from lib/cib/servicestatechangemessage.h with 96% similarity]
lib/remoting/Makefile.am [moved from lib/jsonrpc/Makefile.am with 50% similarity]
lib/remoting/endpoint.cpp [moved from lib/icinga/endpoint.cpp with 97% similarity]
lib/remoting/endpoint.h [moved from lib/icinga/endpoint.h with 98% similarity]
lib/remoting/endpointmanager.cpp [moved from lib/icinga/endpointmanager.cpp with 94% similarity]
lib/remoting/endpointmanager.h [moved from lib/icinga/endpointmanager.h with 96% similarity]
lib/remoting/i2-remoting.cpp [moved from lib/jsonrpc/i2-jsonrpc.cpp with 100% similarity]
lib/remoting/i2-remoting.h [moved from lib/jsonrpc/i2-jsonrpc.h with 83% similarity]
lib/remoting/jsonrpc.vcxproj [moved from lib/jsonrpc/jsonrpc.vcxproj with 100% similarity]
lib/remoting/jsonrpc.vcxproj.filters [moved from lib/jsonrpc/jsonrpc.vcxproj.filters with 100% similarity]
lib/remoting/jsonrpcclient.cpp [moved from lib/jsonrpc/jsonrpcclient.cpp with 99% similarity]
lib/remoting/jsonrpcclient.h [moved from lib/jsonrpc/jsonrpcclient.h with 96% similarity]
lib/remoting/jsonrpcserver.cpp [moved from lib/jsonrpc/jsonrpcserver.cpp with 98% similarity]
lib/remoting/jsonrpcserver.h [moved from lib/jsonrpc/jsonrpcserver.h with 95% similarity]
lib/remoting/messagepart.cpp [moved from lib/jsonrpc/messagepart.cpp with 99% similarity]
lib/remoting/messagepart.h [moved from lib/jsonrpc/messagepart.h with 98% similarity]
lib/remoting/requestmessage.cpp [moved from lib/jsonrpc/requestmessage.cpp with 98% similarity]
lib/remoting/requestmessage.h [moved from lib/jsonrpc/requestmessage.h with 97% similarity]
lib/remoting/responsemessage.cpp [moved from lib/jsonrpc/responsemessage.cpp with 98% similarity]
lib/remoting/responsemessage.h [moved from lib/jsonrpc/responsemessage.h with 97% similarity]

index 62b0013496ca5477453d4f0669fa55f1a07c0b76..3b8ff6c8536480de26a2d2ea597cdf3f1377b087 100644 (file)
@@ -12,9 +12,8 @@ checker_la_CPPFLAGS = \
        $(BOOST_CPPFLAGS) \
        -I${top_srcdir}/lib/base \
        -I${top_srcdir}/lib/config \
-       -I${top_srcdir}/lib/jsonrpc \
-       -I${top_srcdir}/lib/icinga \
-       -I${top_srcdir}/lib/cib
+       -I${top_srcdir}/lib/remoting \
+       -I${top_srcdir}/lib/icinga
 
 checker_la_LDFLAGS = \
        $(BOOST_LDFLAGS) \
@@ -28,6 +27,5 @@ checker_la_LIBADD = \
        $(BOOST_THREAD_LIB) \
        ${top_builddir}/lib/base/libbase.la \
        ${top_builddir}/lib/config/libconfig.la \
-       ${top_builddir}/lib/jsonrpc/libjsonrpc.la \
-       ${top_builddir}/lib/icinga/libicinga.la \
-       ${top_builddir}/lib/cib/libcib.la
+       ${top_builddir}/lib/remoting/libremoting.la \
+       ${top_builddir}/lib/icinga/libicinga.la
index 4cb465d99ebf918b11b0139465f99727c92d715e..9b7a7f49e4b579a2fee9f7cf04085e256c4af9da 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <i2-base.h>
 #include <i2-icinga.h>
-#include <i2-cib.h>
 
 #include <boost/multi_index_container.hpp>
 #include <boost/multi_index/ordered_index.hpp>
index f5b5feecb7777244d6ac99327d139842738f166e..d9bfb2b4c933b1346199880f4e94aed65ee79bf8 100644 (file)
@@ -12,9 +12,8 @@ cibsync_la_CPPFLAGS = \
        $(BOOST_CPPFLAGS) \
        -I${top_srcdir}/lib/base \
        -I${top_srcdir}/lib/config \
-       -I${top_srcdir}/lib/jsonrpc \
-       -I${top_srcdir}/lib/icinga \
-       -I${top_srcdir}/lib/cib
+       -I${top_srcdir}/lib/remoting \
+       -I${top_srcdir}/lib/icinga
 
 cibsync_la_LDFLAGS = \
        $(BOOST_LDFLAGS) \
@@ -28,6 +27,5 @@ cibsync_la_LIBADD = \
        $(BOOST_THREAD_LIB) \
        ${top_builddir}/lib/base/libbase.la \
        ${top_builddir}/lib/config/libconfig.la \
-       ${top_builddir}/lib/jsonrpc/libjsonrpc.la \
-       ${top_builddir}/lib/icinga/libicinga.la \
-       ${top_builddir}/lib/cib/libcib.la
+       ${top_builddir}/lib/remoting/libremoting.la \
+       ${top_builddir}/lib/icinga/libicinga.la
index 858444f98d1ecef7bc0392363d8a327b60ef2aee..937290f0b69893d3b7261d9d34b111277334dace 100644 (file)
@@ -27,9 +27,8 @@
  */
 
 #include <i2-base.h>
-#include <i2-jsonrpc.h>
+#include <i2-remoting.h>
 #include <i2-icinga.h>
-#include <i2-cib.h>
 
 #include "cibsynccomponent.h"
 
index 49de0d0f26c57dc7a8bf7b7ea615594b9abbef9e..830d100de32d2cf3e8d24528a60a2234f2564029 100644 (file)
@@ -12,9 +12,8 @@ compat_la_CPPFLAGS = \
        $(BOOST_CPPFLAGS) \
        -I${top_srcdir}/lib/base \
        -I${top_srcdir}/lib/config \
-       -I${top_srcdir}/lib/jsonrpc \
-       -I${top_srcdir}/lib/icinga \
-       -I${top_srcdir}/lib/cib
+       -I${top_srcdir}/lib/remoting \
+       -I${top_srcdir}/lib/icinga
 
 compat_la_LDFLAGS = \
        $(BOOST_LDFLAGS) \
@@ -28,6 +27,5 @@ compat_la_LIBADD = \
        $(BOOST_THREAD_LIB) \
        ${top_builddir}/lib/base/libbase.la \
        ${top_builddir}/lib/config/libconfig.la \
-       ${top_builddir}/lib/jsonrpc/libjsonrpc.la \
-       ${top_builddir}/lib/icinga/libicinga.la \
-       ${top_builddir}/lib/cib/libcib.la
+       ${top_builddir}/lib/remoting/libremoting.la \
+       ${top_builddir}/lib/icinga/libicinga.la
index aaae6b323c1c9f662658b0fecd534c874008fc4b..2b64313a1a678b8eb1b4104538bf2b64cf53792c 100644 (file)
@@ -27,9 +27,8 @@
  */
 
 #include <i2-base.h>
-#include <i2-jsonrpc.h>
+#include <i2-remoting.h>
 #include <i2-icinga.h>
-#include <i2-cib.h>
 
 #include <fstream>
 
index e615a641ca040499af8b30e81b8a2e1be5e97b2c..6d2f1260ba690919798765a20aeb60f0f8466513 100644 (file)
@@ -12,9 +12,8 @@ convenience_la_CPPFLAGS = \
        $(BOOST_CPPFLAGS) \
        -I${top_srcdir}/lib/base \
        -I${top_srcdir}/lib/config \
-       -I${top_srcdir}/lib/jsonrpc \
-       -I${top_srcdir}/lib/icinga \
-       -I${top_srcdir}/lib/cib
+       -I${top_srcdir}/lib/remoting \
+       -I${top_srcdir}/lib/icinga
 
 convenience_la_LDFLAGS = \
        $(BOOST_LDFLAGS) \
@@ -28,6 +27,5 @@ convenience_la_LIBADD = \
        $(BOOST_THREAD_LIB) \
        ${top_builddir}/lib/base/libbase.la \
        ${top_builddir}/lib/config/libconfig.la \
-       ${top_builddir}/lib/jsonrpc/libjsonrpc.la \
-       ${top_builddir}/lib/icinga/libicinga.la \
-       ${top_builddir}/lib/cib/libcib.la
+       ${top_builddir}/lib/remoting/libremoting.la \
+       ${top_builddir}/lib/icinga/libicinga.la
index 89930cfacc7ea1cbd6366d9f0ce7559e2f8e5eb1..a2a9ef47efe7759e27b453ac9bad842180aafbdb 100644 (file)
@@ -30,9 +30,8 @@
 
 #include <i2-base.h>
 #include <i2-config.h>
-#include <i2-jsonrpc.h>
+#include <i2-remoting.h>
 #include <i2-icinga.h>
-#include <i2-cib.h>
 
 #include "conveniencecomponent.h"
 
index 88fce279da85487876fad9a48438a95481038ecd..9411e0e93b75e8a9409c6a2a6d151464b6049453 100644 (file)
@@ -12,9 +12,8 @@ delegation_la_CPPFLAGS = \
        $(BOOST_CPPFLAGS) \
        -I${top_srcdir}/lib/base \
        -I${top_srcdir}/lib/config \
-       -I${top_srcdir}/lib/jsonrpc \
-       -I${top_srcdir}/lib/icinga \
-       -I${top_srcdir}/lib/cib
+       -I${top_srcdir}/lib/remoting \
+       -I${top_srcdir}/lib/icinga
 
 delegation_la_LDFLAGS = \
        $(BOOST_LDFLAGS) \
@@ -28,6 +27,5 @@ delegation_la_LIBADD = \
        $(BOOST_THREAD_LIB) \
        ${top_builddir}/lib/base/libbase.la \
        ${top_builddir}/lib/config/libconfig.la \
-       ${top_builddir}/lib/jsonrpc/libjsonrpc.la \
-       ${top_builddir}/lib/icinga/libicinga.la \
-       ${top_builddir}/lib/cib/libcib.la
+       ${top_builddir}/lib/remoting/libremoting.la \
+       ${top_builddir}/lib/icinga/libicinga.la
index 69382d4a7bbcd03eceb312ecf72dac672c7e0fcc..91e633ee55f6f01f2769324d94e8f04444e4fd15 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <i2-base.h>
 #include <i2-icinga.h>
-#include <i2-cib.h>
 
 #include "delegationcomponent.h"
 
index e74d877b5354fbdde456b3df73b69d5d5b3f3363..aaba36d16f2b741e6ecc4bee50e5f98cd839b058 100644 (file)
@@ -12,7 +12,7 @@ demo_la_CPPFLAGS = \
        $(BOOST_CPPFLAGS) \
        -I${top_srcdir}/lib/base \
        -I${top_srcdir}/lib/config \
-       -I${top_srcdir}/lib/jsonrpc \
+       -I${top_srcdir}/lib/remoting \
        -I${top_srcdir}/lib/icinga
 
 demo_la_LDFLAGS = \
@@ -27,5 +27,5 @@ demo_la_LIBADD = \
        $(BOOST_THREAD_LIB) \
        ${top_builddir}/lib/base/libbase.la \
        ${top_builddir}/lib/config/libconfig.la \
-       ${top_builddir}/lib/jsonrpc/libjsonrpc.la \
+       ${top_builddir}/lib/remoting/libremoting.la \
        ${top_builddir}/lib/icinga/libicinga.la
index 43a907db374253f53764a0acef99c5dcba1dd302..1daf3f1b5709636c58ec97cdd7b9053e189556be 100644 (file)
@@ -27,7 +27,7 @@
  */
 
 #include <i2-base.h>
-#include <i2-jsonrpc.h>
+#include <i2-remoting.h>
 #include <i2-icinga.h>
 
 #include "democomponent.h"
index 796ec265fb29b2562ea27e8dc777b50e54bd8add..266f1817206654c0f71a707c0549e78831dba97f 100644 (file)
@@ -78,10 +78,9 @@ docs/Doxyfile
 icinga-app/Makefile
 lib/Makefile
 lib/base/Makefile
-lib/cib/Makefile
 lib/config/Makefile
 lib/icinga/Makefile
-lib/jsonrpc/Makefile
+lib/remoting/Makefile
 test/Makefile
 third-party/Makefile
 third-party/cJSON/Makefile
index b5b97faaf478549e1ded9ba9d9bf2397d3ffa82d..2e148587a69a073d55834b2a4719bf24108273a0 100644 (file)
@@ -13,7 +13,7 @@ icinga_CPPFLAGS = \
        $(BOOST_CPPFLAGS) \
        -I${top_srcdir}/lib/base \
        -I${top_srcdir}/lib/config \
-       -I${top_srcdir}/lib/jsonrpc \
+       -I${top_srcdir}/lib/remoting \
        -I${top_srcdir}/lib/icinga \
        -I${top_srcdir}
 
@@ -27,6 +27,7 @@ icinga_LDADD = \
        $(BOOST_SYSTEM_LIB) \
        ${top_builddir}/lib/base/libbase.la \
        ${top_builddir}/lib/config/libconfig.la \
+       ${top_builddir}/lib/remoting/libremoting.la \
        ${top_builddir}/lib/icinga/libicinga.la \
        -dlopen ${top_builddir}/components/checker/checker.la \
        -dlopen ${top_builddir}/components/cibsync/cibsync.la \
index 8901ea0a1ef52c298ffba9f604b5702a4c02ed04..3e680a2eb34e9a40fe0f19c4e475a7baebc88146 100644 (file)
@@ -4,6 +4,5 @@
 SUBDIRS = \
        base \
        config \
-       jsonrpc \
-       icinga \
-       cib
+       remoting \
+       icinga
diff --git a/lib/cib/Makefile.am b/lib/cib/Makefile.am
deleted file mode 100644 (file)
index d8c7bd1..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-pkglib_LTLIBRARIES = \
-       libcib.la
-
-libcib_la_SOURCES = \
-       cib.cpp \
-       cib.h \
-       host.cpp \
-       host.h \
-       hostgroup.cpp \
-       hostgroup.h \
-       i2-cib.h \
-       macroprocessor.cpp \
-       macroprocessor.h \
-       nagioschecktask.cpp \
-       nagioschecktask.h \
-       nullchecktask.cpp \
-       nullchecktask.h \
-       service.cpp \
-       service.h \
-       servicegroup.cpp \
-       servicegroup.h \
-       servicestatechangemessage.cpp \
-       servicestatechangemessage.h
-
-libcib_la_CPPFLAGS = \
-       -DI2_CIB_BUILD \
-       $(BOOST_CPPFLAGS) \
-       -I${top_srcdir}/lib/base \
-       -I${top_srcdir}/lib/config \
-       -I${top_srcdir}/lib/jsonrpc \
-       -I${top_srcdir}/lib/icinga
-
-libcib_la_LDFLAGS = \
-       $(BOOST_LDFLAGS) \
-       -no-undefined \
-       @RELEASE_INFO@ \
-       @VERSION_INFO@
-
-libcib_la_LIBADD = \
-       $(BOOST_SIGNALS_LIB) \
-       $(BOOST_THREAD_LIB) \
-       ${top_builddir}/lib/base/libbase.la \
-       ${top_builddir}/lib/config/libconfig.la \
-       ${top_builddir}/lib/jsonrpc/libjsonrpc.la \
-       ${top_builddir}/lib/icinga/libicinga.la
diff --git a/lib/cib/cib.vcxproj b/lib/cib/cib.vcxproj
deleted file mode 100644 (file)
index fb5c7e1..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{538D7F53-A6A0-459A-AE4F-70DB135BC9AF}</ProjectGuid>
-    <Keyword>Win32Proj</Keyword>
-    <RootNamespace>cib</RootNamespace>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LinkIncremental>true</LinkIncremental>
-    <IncludePath>$(SolutionDir)\lib\base;$(SolutionDir)\lib\icinga;$(SolutionDir)\lib\jsonrpc;$(SolutionDir)\lib\config;$(IncludePath)</IncludePath>
-    <LibraryPath>$(OutDir);$(LibraryPath)</LibraryPath>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LinkIncremental>false</LinkIncremental>
-    <IncludePath>$(SolutionDir)\lib\base;$(SolutionDir)\lib\icinga;$(SolutionDir)\lib\jsonrpc;$(SolutionDir)\lib\config;$(IncludePath)</IncludePath>
-    <LibraryPath>$(OutDir);$(LibraryPath)</LibraryPath>
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <PrecompiledHeader>Use</PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_WINDLL;I2_CIB_BUILD;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <PrecompiledHeaderFile>i2-cib.h</PrecompiledHeaderFile>
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalDependencies>base.lib;icinga.lib;jsonrpc.lib;config.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>Use</PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>_WINDLL;I2_CIB_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <PrecompiledHeaderFile>i2-cib.h</PrecompiledHeaderFile>
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalDependencies>base.lib;icinga.lib;jsonrpc.lib;config.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <ClInclude Include="cib.h" />
-    <ClInclude Include="host.h" />
-    <ClInclude Include="hostgroup.h" />
-    <ClInclude Include="i2-cib.h" />
-    <ClInclude Include="macroprocessor.h" />
-    <ClInclude Include="nagioschecktask.h" />
-    <ClInclude Include="nullchecktask.h" />
-    <ClInclude Include="service.h" />
-    <ClInclude Include="servicegroup.h" />
-    <ClInclude Include="servicestatechangemessage.h" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="cib.cpp" />
-    <ClCompile Include="host.cpp" />
-    <ClCompile Include="hostgroup.cpp" />
-    <ClCompile Include="i2-cib.cpp">
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
-    </ClCompile>
-    <ClCompile Include="macroprocessor.cpp" />
-    <ClCompile Include="nagioschecktask.cpp" />
-    <ClCompile Include="nullchecktask.cpp" />
-    <ClCompile Include="service.cpp" />
-    <ClCompile Include="servicegroup.cpp" />
-    <ClCompile Include="servicestatechangemessage.cpp" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>
\ No newline at end of file
diff --git a/lib/cib/cib.vcxproj.filters b/lib/cib/cib.vcxproj.filters
deleted file mode 100644 (file)
index 009045a..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup>
-    <Filter Include="Quelldateien">
-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
-    </Filter>
-    <Filter Include="Headerdateien">
-      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
-      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
-    </Filter>
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="cib.h">
-      <Filter>Headerdateien</Filter>
-    </ClInclude>
-    <ClInclude Include="host.h">
-      <Filter>Headerdateien</Filter>
-    </ClInclude>
-    <ClInclude Include="hostgroup.h">
-      <Filter>Headerdateien</Filter>
-    </ClInclude>
-    <ClInclude Include="i2-cib.h">
-      <Filter>Headerdateien</Filter>
-    </ClInclude>
-    <ClInclude Include="macroprocessor.h">
-      <Filter>Headerdateien</Filter>
-    </ClInclude>
-    <ClInclude Include="nagioschecktask.h">
-      <Filter>Headerdateien</Filter>
-    </ClInclude>
-    <ClInclude Include="service.h">
-      <Filter>Headerdateien</Filter>
-    </ClInclude>
-    <ClInclude Include="servicegroup.h">
-      <Filter>Headerdateien</Filter>
-    </ClInclude>
-    <ClInclude Include="nullchecktask.h">
-      <Filter>Headerdateien</Filter>
-    </ClInclude>
-    <ClInclude Include="servicestatechangemessage.h">
-      <Filter>Headerdateien</Filter>
-    </ClInclude>
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="cib.cpp">
-      <Filter>Quelldateien</Filter>
-    </ClCompile>
-    <ClCompile Include="host.cpp">
-      <Filter>Quelldateien</Filter>
-    </ClCompile>
-    <ClCompile Include="hostgroup.cpp">
-      <Filter>Quelldateien</Filter>
-    </ClCompile>
-    <ClCompile Include="macroprocessor.cpp">
-      <Filter>Quelldateien</Filter>
-    </ClCompile>
-    <ClCompile Include="nagioschecktask.cpp">
-      <Filter>Quelldateien</Filter>
-    </ClCompile>
-    <ClCompile Include="service.cpp">
-      <Filter>Quelldateien</Filter>
-    </ClCompile>
-    <ClCompile Include="servicegroup.cpp">
-      <Filter>Quelldateien</Filter>
-    </ClCompile>
-    <ClCompile Include="i2-cib.cpp">
-      <Filter>Quelldateien</Filter>
-    </ClCompile>
-    <ClCompile Include="nullchecktask.cpp">
-      <Filter>Quelldateien</Filter>
-    </ClCompile>
-    <ClCompile Include="servicestatechangemessage.cpp">
-      <Filter>Quelldateien</Filter>
-    </ClCompile>
-  </ItemGroup>
-</Project>
\ No newline at end of file
diff --git a/lib/cib/i2-cib.cpp b/lib/cib/i2-cib.cpp
deleted file mode 100644 (file)
index b5aad24..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/******************************************************************************
- * Icinga 2                                                                   *
- * Copyright (C) 2012 Icinga Development Team (http://www.icinga.org/)        *
- *                                                                            *
- * This program is free software; you can redistribute it and/or              *
- * modify it under the terms of the GNU General Public License                *
- * as published by the Free Software Foundation; either version 2             *
- * of the License, or (at your option) any later version.                     *
- *                                                                            *
- * This program is distributed in the hope that it will be useful,            *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
- * GNU General Public License for more details.                               *
- *                                                                            *
- * You should have received a copy of the GNU General Public License          *
- * along with this program; if not, write to the Free Software Foundation     *
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
- ******************************************************************************/
-
-/* This file is used by MSVC to generate the pre-compiled hedader. */
-
-#include "i2-cib.h"
diff --git a/lib/cib/i2-cib.h b/lib/cib/i2-cib.h
deleted file mode 100644 (file)
index 0a6bf93..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/******************************************************************************
- * Icinga 2                                                                   *
- * Copyright (C) 2012 Icinga Development Team (http://www.icinga.org/)        *
- *                                                                            *
- * This program is free software; you can redistribute it and/or              *
- * modify it under the terms of the GNU General Public License                *
- * as published by the Free Software Foundation; either version 2             *
- * of the License, or (at your option) any later version.                     *
- *                                                                            *
- * This program is distributed in the hope that it will be useful,            *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
- * GNU General Public License for more details.                               *
- *                                                                            *
- * You should have received a copy of the GNU General Public License          *
- * along with this program; if not, write to the Free Software Foundation     *
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
- ******************************************************************************/
-
-#ifndef I2CIB_H
-#define I2CIB_H
-
-/**
- * @defgroup cib Common Information Base
- *
- * The CIB component implements functionality to gather status
- * updates from all the other Icinga components.
- */
-
-#include <i2-config.h>
-#include <i2-icinga.h>
-
-#ifdef I2_CIB_BUILD
-#      define I2_CIB_API I2_EXPORT
-#else /* I2_CIB_BUILD */
-#      define I2_CIB_API I2_IMPORT
-#endif /* I2_CIB_BUILD */
-
-#include "host.h"
-#include "hostgroup.h"
-#include "service.h"
-#include "servicegroup.h"
-
-#include "macroprocessor.h"
-#include "nagioschecktask.h"
-#include "nullchecktask.h"
-
-#include "servicestatechangemessage.h"
-
-#include "cib.h"
-
-#endif /* I2CIB_H */
index eee31a2eadc06a854852587dc11f61cf8e2868bb..dcaf2301edc56fd463cb14ab757b0c7cbd26e030 100644 (file)
@@ -5,20 +5,34 @@ pkglib_LTLIBRARIES =  \
        libicinga.la
 
 libicinga_la_SOURCES =  \
-       endpoint.cpp \
-       endpoint.h \
-       endpointmanager.cpp \
-       endpointmanager.h \
+       cib.cpp \
+       cib.h \
+       host.cpp \
+       hostgroup.cpp \
+       hostgroup.h \
+       host.h \
+       i2-icinga.h \
        icingaapplication.cpp \
        icingaapplication.h \
-       i2-icinga.h
+       macroprocessor.cpp \
+       macroprocessor.h \
+       nagioschecktask.cpp \
+       nagioschecktask.h \
+       nullchecktask.cpp \
+       nullchecktask.h \
+       service.cpp \
+       servicegroup.cpp \
+       servicegroup.h \
+       service.h \
+       servicestatechangemessage.cpp \
+       servicestatechangemessage.h
 
 libicinga_la_CPPFLAGS = \
        -DI2_ICINGA_BUILD \
        $(BOOST_CPPFLAGS) \
        -I${top_srcdir}/lib/base \
        -I${top_srcdir}/lib/config \
-       -I${top_srcdir}/lib/jsonrpc \
+       -I${top_srcdir}/lib/remoting \
        -I${top_srcdir}
 
 libicinga_la_LDFLAGS = \
@@ -31,4 +45,4 @@ libicinga_la_LIBADD = \
        $(BOOST_THREAD_LIB) \
        ${top_builddir}/lib/base/libbase.la \
        ${top_builddir}/lib/config/libconfig.la \
-       ${top_builddir}/lib/jsonrpc/libjsonrpc.la
+       ${top_builddir}/lib/remoting/libremoting.la
similarity index 98%
rename from lib/cib/cib.cpp
rename to lib/icinga/cib.cpp
index ef4c3bdcaf3c09f2cff1097f12b6fb8c30b36615..d9b7e935307fff7ebdabb259d68468b9984c407e 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-cib.h"
+#include "i2-icinga.h"
 
 using namespace icinga;
 
similarity index 98%
rename from lib/cib/cib.h
rename to lib/icinga/cib.h
index c64fb89a6c59f3ac135b22808f1a67c6012c6f37..f9353cda7309ffcef1d2452d17b215b2d677c23e 100644 (file)
@@ -23,7 +23,7 @@
 namespace icinga
 {
 
-class I2_CIB_API CIB
+class I2_ICINGA_API CIB
 {
 public:
        static void UpdateTaskStatistics(long tv, int num);
similarity index 99%
rename from lib/cib/host.cpp
rename to lib/icinga/host.cpp
index 6211520c5508a3b36b25dd53354562d3cf85830f..f4aff61f14acd57da21251a09f1d4a03f2d65f77 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-cib.h"
+#include "i2-icinga.h"
 
 using namespace icinga;
 
similarity index 97%
rename from lib/cib/host.h
rename to lib/icinga/host.h
index e9b1a9d22e0a49bd4564bc87a1f325d71e856af1..1c130befe9aa2cea7c9798b4a5f8c89708ce68c0 100644 (file)
@@ -23,7 +23,7 @@
 namespace icinga
 {
 
-class I2_CIB_API Host : public DynamicObject
+class I2_ICINGA_API Host : public DynamicObject
 {
 public:
        typedef shared_ptr<Host> Ptr;
similarity index 98%
rename from lib/cib/hostgroup.cpp
rename to lib/icinga/hostgroup.cpp
index 10a59124177708fd7cb565fb60914dc0103905c0..1d9cc7b04cf6f4cd1102e8e16c6cebc284e96a6b 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-cib.h"
+#include "i2-icinga.h"
 
 using namespace icinga;
 
similarity index 97%
rename from lib/cib/hostgroup.h
rename to lib/icinga/hostgroup.h
index c40ab0c14507fe2bcaf8a917840faae59e7fd3c2..29303da088d4024a13804b76502db455ca40b835 100644 (file)
@@ -23,7 +23,7 @@
 namespace icinga
 {
 
-class I2_CIB_API HostGroup : public DynamicObject
+class I2_ICINGA_API HostGroup : public DynamicObject
 {
 public:
        typedef shared_ptr<HostGroup> Ptr;
index 1b2a0856d880e94587e25e3c31bc9c301084154f..6e4ec6c81b635191b0d4416af799e91403e52b78 100644 (file)
@@ -29,8 +29,7 @@
 
 #include <i2-base.h>
 #include <i2-config.h>
-#include <i2-jsonrpc.h>
-#include <set>
+#include <i2-remoting.h>
 
 using boost::iterator_range;
 using boost::algorithm::is_any_of;
@@ -45,4 +44,17 @@ using boost::algorithm::is_any_of;
 #include "endpointmanager.h"
 #include "icingaapplication.h"
 
+#include "host.h"
+#include "hostgroup.h"
+#include "service.h"
+#include "servicegroup.h"
+
+#include "macroprocessor.h"
+#include "nagioschecktask.h"
+#include "nullchecktask.h"
+
+#include "servicestatechangemessage.h"
+
+#include "cib.h"
+
 #endif /* I2ICINGA_H */
index 9f65bd9c16fe05c9d4e47421ced480416f874f9c..9d7f9109604e98841ee0ae904b9bf4c160652e13 100644 (file)
@@ -134,6 +134,8 @@ int IcingaApplication::Main(const vector<String>& args)
                EndpointManager::GetInstance()->SetIdentity(identity);
 
                m_SSLContext = Utility::MakeSSLContext(GetCertificateFile(), GetCertificateFile(), GetCAFile());
+
+               EndpointManager::GetInstance()->SetSSLContext(m_SSLContext);
        }
 
        /* create the primary RPC listener */
similarity index 99%
rename from lib/cib/macroprocessor.cpp
rename to lib/icinga/macroprocessor.cpp
index 607cbb3e4452e6f07da2348439bbd0e0d1e8d2af..93365aaa960096830c3691660ded26e29378d619 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-cib.h"
+#include "i2-icinga.h"
 
 using namespace icinga;
 
similarity index 97%
rename from lib/cib/macroprocessor.h
rename to lib/icinga/macroprocessor.h
index f36c6fd808afdd5dd137c1d320558edb24688a5f..3f430f7ab4a51d382f4acdf40e1efbae39878119 100644 (file)
@@ -23,7 +23,7 @@
 namespace icinga
 {
 
-class I2_CIB_API MacroProcessor
+class I2_ICINGA_API MacroProcessor
 {
 public:
        static String ResolveMacros(const String& str, const vector<Dictionary::Ptr>& macroDicts);
similarity index 99%
rename from lib/cib/nagioschecktask.cpp
rename to lib/icinga/nagioschecktask.cpp
index e95f3dcc93c884b274cb7c10745d80adb0d7c70b..64c2cce9b6d56f1d8f1ff1851f3539aa76c89483 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-cib.h"
+#include "i2-icinga.h"
 
 using namespace icinga;
 
similarity index 98%
rename from lib/cib/nagioschecktask.h
rename to lib/icinga/nagioschecktask.h
index 94094a5d7e3617fba5da39eac409fabeb7d28667..ce6e575cf5eba331643f71c9cc79889f315a4851 100644 (file)
@@ -23,7 +23,7 @@
 namespace icinga
 {
 
-class I2_CIB_API NagiosCheckTask
+class I2_ICINGA_API NagiosCheckTask
 {
 public:
        static void Register(void);
similarity index 98%
rename from lib/cib/nullchecktask.cpp
rename to lib/icinga/nullchecktask.cpp
index a0f4c170d5a1cee4e07ffcd8eb93be84c7bdaa9a..3df02340e277c71cb949d186e0ef38e1a770c7fc 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-cib.h"
+#include "i2-icinga.h"
 
 using namespace icinga;
 
similarity index 98%
rename from lib/cib/nullchecktask.h
rename to lib/icinga/nullchecktask.h
index 255c6e9d7acbb06210f9d45ff357be36fe79ae65..d9a0a59adf245bbad725d2313b8fa9696f08f16d 100644 (file)
@@ -23,7 +23,7 @@
 namespace icinga
 {
 
-class I2_CIB_API NullCheckTask
+class I2_ICINGA_API NullCheckTask
 {
 public:
        static void Register(void);
similarity index 99%
rename from lib/cib/service.cpp
rename to lib/icinga/service.cpp
index 26bdcd1150b582617ab888f0795c8f20abf81e38..4b1b249847e97b0ae8d7e5e99e357a6457472b19 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-cib.h"
+#include "i2-icinga.h"
 
 using namespace icinga;
 
similarity index 98%
rename from lib/cib/service.h
rename to lib/icinga/service.h
index 406719b12c408c7e30222fc086594be5449922e8..92c22ea18d38973a8727a19fd8d310547410ecc1 100644 (file)
@@ -41,7 +41,7 @@ enum ServiceStateType
 class CheckResultMessage;
 class ServiceStatusMessage;
 
-class I2_CIB_API Service : public DynamicObject
+class I2_ICINGA_API Service : public DynamicObject
 {
 public:
        typedef shared_ptr<Service> Ptr;
similarity index 98%
rename from lib/cib/servicegroup.cpp
rename to lib/icinga/servicegroup.cpp
index c435d6bec1c74e632d07139dc950403c8481c98b..d5f5bc1b62cc2d8b1afe84a9bbbd109b52a1e1f6 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-cib.h"
+#include "i2-icinga.h"
 
 using namespace icinga;
 
similarity index 97%
rename from lib/cib/servicegroup.h
rename to lib/icinga/servicegroup.h
index 7fdd98f574df72d9afdaeb83e078bbcde76e9272..9552e29a2ded11cfe5b3d963e5ff72ba4d23253b 100644 (file)
@@ -23,7 +23,7 @@
 namespace icinga
 {
 
-class I2_CIB_API ServiceGroup : public DynamicObject
+class I2_ICINGA_API ServiceGroup : public DynamicObject
 {
 public:
        typedef shared_ptr<ServiceGroup> Ptr;
similarity index 98%
rename from lib/cib/servicestatechangemessage.cpp
rename to lib/icinga/servicestatechangemessage.cpp
index 030e893f863819f6f0b71657c7137bc0f12e1c03..df7a2ee835de7166cb18ce9ea04094badc1bfafc 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-cib.h"
+#include "i2-icinga.h"
 
 using namespace icinga;
 
similarity index 96%
rename from lib/cib/servicestatechangemessage.h
rename to lib/icinga/servicestatechangemessage.h
index bee5082ccdab8f5261247c4263149962c3945657..575855c2b9d3ae656da60c598228e8be59307c9e 100644 (file)
@@ -23,7 +23,7 @@
 namespace icinga
 {
 
-class I2_CIB_API ServiceStateChangeMessage : public MessagePart
+class I2_ICINGA_API ServiceStateChangeMessage : public MessagePart
 {
 public:
        ServiceStateChangeMessage(void) : MessagePart() { }
similarity index 50%
rename from lib/jsonrpc/Makefile.am
rename to lib/remoting/Makefile.am
index 6450c5d1dfd4fac385152a7c81650fbd88d64828..4f5417bb98d2c0d42649fc6806f77916aaac14db 100644 (file)
@@ -2,10 +2,14 @@
 
 
 pkglib_LTLIBRARIES = \
-       libjsonrpc.la
+       libremoting.la
 
-libjsonrpc_la_SOURCES = \
-       i2-jsonrpc.h \
+libremoting_la_SOURCES = \
+       endpoint.cpp \
+       endpoint.h \
+       endpointmanager.cpp \
+       endpointmanager.h \
+       i2-remoting.h \
        jsonrpcclient.cpp \
        jsonrpcclient.h \
        jsonrpcserver.cpp \
@@ -17,16 +21,18 @@ libjsonrpc_la_SOURCES = \
        responsemessage.cpp \
        responsemessage.h
 
-libjsonrpc_la_CPPFLAGS = \
-       -DI2_JSONRPC_BUILD \
+libremoting_la_CPPFLAGS = \
+       -DI2_REMOTING_BUILD \
        $(BOOST_CPPFLAGS) \
-       -I${top_srcdir}/lib/base
+       -I${top_srcdir}/lib/base \
+       -I${top_srcdir}/lib/config
 
-libjsonrpc_la_LDFLAGS = \
+libremoting_la_LDFLAGS = \
        $(BOOST_LDFLAGS) \
        -no-undefined \
        @RELEASE_INFO@ \
        @VERSION_INFO@
 
-libjsonrpc_la_LIBADD = \
-       ${top_builddir}/lib/base/libbase.la
+libremoting_la_LIBADD = \
+       ${top_builddir}/lib/base/libbase.la \
+       ${top_builddir}/lib/config/libconfig.la
similarity index 97%
rename from lib/icinga/endpoint.cpp
rename to lib/remoting/endpoint.cpp
index 9e0148dbd415a8399b3e00ac499690a8ca1d7744..0de95603d5a8e0b66cc4a33fc2f68c5a52aa0bea 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
+#include "i2-remoting.h"
 
 using namespace icinga;
 
@@ -234,7 +234,7 @@ void Endpoint::OnAttributeChanged(const String& name, const Value& oldValue)
                        String subscription;
                        BOOST_FOREACH(tie(tuples::ignore, subscription), oldSubscriptions) {
                                if (!newSubscriptions || !newSubscriptions->Contains(subscription)) {
-                                       Logger::Write(LogInformation, "icinga", "Removed subscription for '" + GetName() + "': " + subscription);
+                                       Logger::Write(LogInformation, "remoting", "Removed subscription for '" + GetName() + "': " + subscription);
                                        OnSubscriptionUnregistered(GetSelf(), subscription);
                                }
                        }
@@ -244,7 +244,7 @@ void Endpoint::OnAttributeChanged(const String& name, const Value& oldValue)
                        String subscription;
                        BOOST_FOREACH(tie(tuples::ignore, subscription), newSubscriptions) {
                                if (!oldSubscriptions || !oldSubscriptions->Contains(subscription)) {
-                                       Logger::Write(LogInformation, "icinga", "New subscription for '" + GetName() + "': " + subscription);
+                                       Logger::Write(LogInformation, "remoting", "New subscription for '" + GetName() + "': " + subscription);
                                        OnSubscriptionRegistered(GetSelf(), subscription);
                                }
                        }
similarity index 98%
rename from lib/icinga/endpoint.h
rename to lib/remoting/endpoint.h
index d2799e823e47764fdf78febabde8d69451b05cfc..b037782532f02ac4b890ef466516c17bb0484df2 100644 (file)
@@ -30,7 +30,7 @@ class EndpointManager;
  *
  * @ingroup icinga
  */
-class I2_ICINGA_API Endpoint : public DynamicObject
+class I2_REMOTING_API Endpoint : public DynamicObject
 {
 public:
        typedef shared_ptr<Endpoint> Ptr;
similarity index 94%
rename from lib/icinga/endpointmanager.cpp
rename to lib/remoting/endpointmanager.cpp
index 0703fc7554cce2ee951348d0750a295577f31c0e..674d413cdce49b40816a29289708bdcf912edee4 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-icinga.h"
+#include "i2-remoting.h"
 
 using namespace icinga;
 
@@ -43,6 +43,26 @@ EndpointManager::EndpointManager(void)
        m_ReconnectTimer->Start();
 }
 
+/**
+ * Sets the SSL context.
+ *
+ * @param sslContext The new SSL context.
+ */
+void EndpointManager::SetSSLContext(const shared_ptr<SSL_CTX>& sslContext)
+{
+       m_SSLContext = sslContext;
+}
+
+/**
+ * Retrieves the SSL context.
+ *
+ * @returns The SSL context.
+ */
+shared_ptr<SSL_CTX> EndpointManager::GetSSLContext(void) const
+{
+       return m_SSLContext;
+}
+
 /**
  * Sets the identity of the endpoint manager. This identity is used when
  * connecting to remote peers.
@@ -81,7 +101,7 @@ String EndpointManager::GetIdentity(void) const
  */
 void EndpointManager::AddListener(const String& service)
 {
-       shared_ptr<SSL_CTX> sslContext = IcingaApplication::GetInstance()->GetSSLContext();
+       shared_ptr<SSL_CTX> sslContext = GetSSLContext();
 
        if (!sslContext)
                throw_exception(logic_error("SSL context is required for AddListener()"));
@@ -108,8 +128,12 @@ void EndpointManager::AddListener(const String& service)
  * @param service The remote port.
  */
 void EndpointManager::AddConnection(const String& node, const String& service) {
-       JsonRpcClient::Ptr client = boost::make_shared<JsonRpcClient>(RoleOutbound,
-           IcingaApplication::GetInstance()->GetSSLContext());
+       shared_ptr<SSL_CTX> sslContext = GetSSLContext();
+
+       if (!sslContext)
+               throw_exception(logic_error("SSL context is required for AddConnection()"));
+
+       JsonRpcClient::Ptr client = boost::make_shared<JsonRpcClient>(RoleOutbound, sslContext);
        client->Connect(node, service);
        NewClientHandler(client);
 }
similarity index 96%
rename from lib/icinga/endpointmanager.h
rename to lib/remoting/endpointmanager.h
index fe57d74d5104ff27711a58ebab05241c6e9906f1..9796dd8e53c72b7f3918ab1b82db3718bce11f92 100644 (file)
@@ -28,14 +28,12 @@ namespace icinga
  *
  * @ingroup icinga
  */
-class I2_ICINGA_API EndpointManager : public Object
+class I2_REMOTING_API EndpointManager : public Object
 {
 public:
        typedef shared_ptr<EndpointManager> Ptr;
        typedef weak_ptr<EndpointManager> WeakPtr;
 
-//     typedef map<String, Endpoint::Ptr>::iterator Iterator;
-
        EndpointManager(void);
 
        static EndpointManager::Ptr GetInstance(void);
@@ -68,6 +66,8 @@ private:
        String m_Identity;
        Endpoint::Ptr m_Endpoint;
 
+       shared_ptr<SSL_CTX> m_SSLContext;
+
        Timer::Ptr m_SubscriptionTimer;
 
        Timer::Ptr m_ReconnectTimer;
@@ -80,7 +80,7 @@ private:
         *
         * @ingroup icinga
         */
-       struct I2_ICINGA_API PendingRequest
+       struct I2_REMOTING_API PendingRequest
        {
                double Timeout;
                RequestMessage Request;
similarity index 83%
rename from lib/jsonrpc/i2-jsonrpc.h
rename to lib/remoting/i2-remoting.h
index d4d6df787558152e01202616f55dbd86c3160a06..a54d94350f81f599409c6ba14a513c6ca7dcc612 100644 (file)
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#ifndef I2JSONRPC_H
-#define I2JSONRPC_H
+#ifndef I2REMOTING_H
+#define I2REMOTING_H
 
 /**
- * @defgroup jsonrpc JSON-RPC
+ * @defgroup remoting JSON-RPC library
  *
  * The JSON-RPC library implements server and client classes for the JSON-RPC
  * protocol.
  */
 
-#include <map>
 #include <i2-base.h>
+#include <i2-config.h>
 
-#ifdef I2_JSONRPC_BUILD
-#      define I2_JSONRPC_API I2_EXPORT
-#else /* I2_JSONRPC_BUILD */
-#      define I2_JSONRPC_API I2_IMPORT
-#endif /* I2_JSONRPC_BUILD */
+#ifdef I2_REMOTING_BUILD
+#      define I2_REMOTING_API I2_EXPORT
+#else /* I2_REMOTING_BUILD */
+#      define I2_REMOTING_API I2_IMPORT
+#endif /* I2_REMOTING_BUILD */
 
 #include "messagepart.h"
 #include "requestmessage.h"
 #include "responsemessage.h"
 #include "jsonrpcclient.h"
 #include "jsonrpcserver.h"
+#include "endpoint.h"
+#include "endpointmanager.h"
 
-#endif /* I2JSONRPC_H */
+#endif /* I2REMOTING_H */
similarity index 99%
rename from lib/jsonrpc/jsonrpcclient.cpp
rename to lib/remoting/jsonrpcclient.cpp
index 496c0f27304c71b41fc565b9503351182da1957b..5da414da31a64821ba47ce0824e4851a057d802a 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-jsonrpc.h"
+#include "i2-remoting.h"
 
 using namespace icinga;
 
similarity index 96%
rename from lib/jsonrpc/jsonrpcclient.h
rename to lib/remoting/jsonrpcclient.h
index 6df837d2f95ff4e8c65fb87c9fb336782555b37a..c1e719ab403b7dca9615d0eb91699c628071c993 100644 (file)
@@ -26,9 +26,9 @@ namespace icinga
 /**
  * A JSON-RPC client.
  *
- * @ingroup jsonrpc
+ * @ingroup remoting
  */
-class I2_JSONRPC_API JsonRpcClient : public TlsClient
+class I2_REMOTING_API JsonRpcClient : public TlsClient
 {
 public:
        typedef shared_ptr<JsonRpcClient> Ptr;
similarity index 98%
rename from lib/jsonrpc/jsonrpcserver.cpp
rename to lib/remoting/jsonrpcserver.cpp
index c5f7e504ea1fed18b463a064a4f30c1bceccbc9a..c645de63989fb1c8c6647d87d5d04134163ce5c6 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-jsonrpc.h"
+#include "i2-remoting.h"
 
 using namespace icinga;
 
similarity index 95%
rename from lib/jsonrpc/jsonrpcserver.h
rename to lib/remoting/jsonrpcserver.h
index 6128226f521c3a3ea60dc918d044a0d636c13c45..4cf9a5841c7f9a890f39c9c2898e81403e68e9c5 100644 (file)
@@ -26,9 +26,9 @@ namespace icinga
 /**
  * A JSON-RPC server.
  *
- * @ingroup jsonrpc
+ * @ingroup remoting
  */
-class I2_JSONRPC_API JsonRpcServer : public TcpServer
+class I2_REMOTING_API JsonRpcServer : public TcpServer
 {
 public:
        typedef shared_ptr<JsonRpcServer> Ptr;
similarity index 99%
rename from lib/jsonrpc/messagepart.cpp
rename to lib/remoting/messagepart.cpp
index fd42b91b653e4733dc6964855be17f0ab6c80896..7c04a951a8b9b13770b4af1ee26073eb272314ea 100644 (file)
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-jsonrpc.h"
+#include "i2-remoting.h"
 
 using namespace icinga;
 
similarity index 98%
rename from lib/jsonrpc/messagepart.h
rename to lib/remoting/messagepart.h
index 6caec2a6f5c51f8cf9947f2f91b21f0b5660dcfd..defff4357f516e57b93ec43f20c34b595548e14b 100644 (file)
@@ -30,9 +30,9 @@ typedef ::cJSON json_t;
 /**
  * A part of an RPC message.
  *
- * @ingroup jsonrpc
+ * @ingroup remoting
  */
-class I2_JSONRPC_API MessagePart
+class I2_REMOTING_API MessagePart
 {
 public:
        MessagePart(void);
similarity index 98%
rename from lib/jsonrpc/requestmessage.cpp
rename to lib/remoting/requestmessage.cpp
index c3d908ef6dacda07cab444d59ec60d1ded7fff2f..c18b8596ca0fb713aa67d72294217e867d17c096 100644 (file)
@@ -17,6 +17,6 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-jsonrpc.h"
+#include "i2-remoting.h"
 
 using namespace icinga;
similarity index 97%
rename from lib/jsonrpc/requestmessage.h
rename to lib/remoting/requestmessage.h
index 544524f65c46ef9215234bae094919e551132f28..5068856281c4cc50bb1145d5b4495850d8427abc 100644 (file)
@@ -26,9 +26,9 @@ namespace icinga
 /**
  * A JSON-RPC request message.
  *
- * @ingroup jsonrpc
+ * @ingroup remoting
  */
-class I2_JSONRPC_API RequestMessage : public MessagePart
+class I2_REMOTING_API RequestMessage : public MessagePart
 {
 public:
        /**
similarity index 98%
rename from lib/jsonrpc/responsemessage.cpp
rename to lib/remoting/responsemessage.cpp
index c3d908ef6dacda07cab444d59ec60d1ded7fff2f..c18b8596ca0fb713aa67d72294217e867d17c096 100644 (file)
@@ -17,6 +17,6 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
  ******************************************************************************/
 
-#include "i2-jsonrpc.h"
+#include "i2-remoting.h"
 
 using namespace icinga;
similarity index 97%
rename from lib/jsonrpc/responsemessage.h
rename to lib/remoting/responsemessage.h
index 7c631fb9c2a6029d2dccc96db389efa74c0033b6..d46ef18a2653536b40c3a529c8608cce22de371f 100644 (file)
@@ -26,9 +26,9 @@ namespace icinga
 /**
  * A JSON-RPC response message.
  *
- * @ingroup jsonrpc
+ * @ingroup remoting
  */
-class I2_JSONRPC_API ResponseMessage : public MessagePart
+class I2_REMOTING_API ResponseMessage : public MessagePart
 {
 public:
        /**