]> granicus.if.org Git - icinga2/commitdiff
Updated project files.
authorGunnar Beutner <gunnar.beutner@netways.de>
Sun, 1 Apr 2012 07:31:03 +0000 (09:31 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Sun, 1 Apr 2012 07:38:31 +0000 (09:38 +0200)
Makefile.am
configfilecomponent/Makefile.am [new file with mode: 0644]
configrpccomponent/Makefile.am [new file with mode: 0644]
icinga/Makefile.am [new file with mode: 0644]
icinga2.sln
jsonrpc/Makefile.am
miniapp/miniapp.cpp
miniapp/miniapp.vcxproj

index 3d1ced0839318f9c7a7b92e2f7fd6f682f623ba7..b9c1b3f55aecd12d3ce0524c97602c0101cdbc48 100644 (file)
@@ -2,6 +2,9 @@
 ## Created by Anjuta
 
 SUBDIRS = base \
+       configfilecomponent \
+       configrpccomponent \
+       icinga \
        jsonrpc \
        miniapp 
 
diff --git a/configfilecomponent/Makefile.am b/configfilecomponent/Makefile.am
new file mode 100644 (file)
index 0000000..332c0b1
--- /dev/null
@@ -0,0 +1,9 @@
+## Process this file with automake to produce Makefile.in
+
+
+libconfigfilecomponent_la_SOURCES =  \
+       configfilecomponent.cpp \
+       configfilecomponent.h \
+       i2-configfilecomponent.h
+
+libconfigfilecomponent_la_CXXFLAGS = -I${top_srcdir}/base 
diff --git a/configrpccomponent/Makefile.am b/configrpccomponent/Makefile.am
new file mode 100644 (file)
index 0000000..35340f2
--- /dev/null
@@ -0,0 +1,9 @@
+## Process this file with automake to produce Makefile.in
+
+
+libconfigrpccomponent_la_SOURCES =  \
+       configrpccomponent.cpp \
+       configrpccomponent.h \
+       i2-configrpccomponent.h
+
+libconfigrpccomponent_la_CXXFLAGS = -I${top_srcdir}/base 
diff --git a/icinga/Makefile.am b/icinga/Makefile.am
new file mode 100644 (file)
index 0000000..e4c1157
--- /dev/null
@@ -0,0 +1,15 @@
+## Process this file with automake to produce Makefile.in
+
+
+bin_PROGRAMS =  \
+       icinga
+
+miniapp_SOURCES =  \
+       icingaapplication.cpp \
+       icingaapplication.h
+
+miniapp_CXXFLAGS = -I${top_srcdir}/base \
+       -I${top_srcdir}/jsonrpc 
+
+miniapp_LDFLAGS = $(top_builddir)/base/libbase.a \
+       $(top_builddir)/jsonrpc/libjsonrpc.a 
index b44359255c00103d0d48e6409b2896d1258d7b24..d21756d1efcfdab1bf2a9250089c785cadc99609 100644 (file)
@@ -28,8 +28,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icinga", "icinga\icinga.vcx
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "configfilecomponent", "configfilecomponent\configfilecomponent.vcxproj", "{E58F1DA7-B723-412B-B2B7-7FF58E2A944E}"
+       ProjectSection(ProjectDependencies) = postProject
+               {9C92DA90-FD53-43A9-A244-90F2E8AF9677} = {9C92DA90-FD53-43A9-A244-90F2E8AF9677}
+               {8DD52FAC-ECEE-48C2-B266-E7C47ED485F8} = {8DD52FAC-ECEE-48C2-B266-E7C47ED485F8}
+       EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "configrpccomponent", "configrpccomponent\configrpccomponent.vcxproj", "{697C6D7E-3109-484C-A7AF-384D28711610}"
+       ProjectSection(ProjectDependencies) = postProject
+               {9C92DA90-FD53-43A9-A244-90F2E8AF9677} = {9C92DA90-FD53-43A9-A244-90F2E8AF9677}
+               {8DD52FAC-ECEE-48C2-B266-E7C47ED485F8} = {8DD52FAC-ECEE-48C2-B266-E7C47ED485F8}
+       EndProjectSection
 EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
index 64432a12a5d509dc9a44f7b3b0f7dc02951c8392..54a41784541c863af40a95b58b5ed195ca489dc2 100644 (file)
@@ -20,5 +20,3 @@ libjsonrpc_a_SOURCES =  \
        netstring.h
 
 libjsonrpc_a_CXXFLAGS = -I${top_srcdir}/base 
-
-libjsonrpc_a_LIBADD = $(top_builddir)/base/libbase.a 
index 43451c44594d1736c0e584fdc42cbcf4af6064ca..ebf364d5345391262087d9fc4807467a92f850d0 100644 (file)
@@ -13,20 +13,38 @@ namespace icinga
 
 class MyApplication : public Application
 {
+private:
+       ConfigHive::RefType m_Hive;
+
 public:
        typedef shared_ptr<MyApplication> RefType;
        typedef weak_ptr<MyApplication> WeakRefType;
 
        int Main(const vector<string>& args)
        {
+               LoadComponent("configcomponent");
+
+               m_Hive = new_object<ConfigHive>();
+               
+               /*ConfigFileSerializer::RefType cfs = new_object<ConfigFileSerializer>();
+               cfs->SetFilename("test.conf");
+               cfs->Deserialize(m_Hive);
+
+               ConfigObject::RefType netconfig = m_Hive->GetObject("netconfig");
+
                JsonRpcServer::RefType ts = new_object<JsonRpcServer>();
                ts->MakeSocket();
-               ts->Bind(7777);
+               ts->Bind(netconfig->GetPropertyInteger("port", 7777));
                ts->Listen();
 
                ConnectionManager::RefType cm = new_object<ConnectionManager>();
                cm->RegisterMethod("HelloWorld", bind_weak(&MyApplication::HelloWorld, shared_from_this()));
-               cm->BindServer(ts);
+               cm->RegisterServer(ts);
+
+               ConfigRpcServiceModule::RefType rsm = new_object<ConfigRpcServiceModule>();
+               rsm->SetHive(m_Hive);
+               rsm->SetConfigSource(true);
+               cm->RegisterServiceModule(rsm);*/
 
                RunEventLoop();
 
@@ -44,7 +62,12 @@ public:
                cJSON *result = response->GetResult();
                cJSON_AddStringToObject(result, "greeting", "Hello World!");
                client->SendMessage(response);
-               
+
+               ConfigObject::RefType co = new_object<ConfigObject>();
+               co->SetName("foo");
+               co->SetType("moo");
+               m_Hive->AddObject(co);
+
                return 0;
        }
 };
index 798c45e6078eb2a75241faa0c5b77fa100b21ca7..ea4d97fe06b1ea431c846b9fe8c55a0bf73b0eca 100644 (file)
   <PropertyGroup Label="Globals">
     <ProjectGuid>{7CEA8AB1-3327-4644-9D38-B639A8F3341E}</ProjectGuid>
     <Keyword>Win32Proj</Keyword>
-    <RootNamespace>i2miniapp</RootNamespace>
+    <RootNamespace>icinga</RootNamespace>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <CharacterSet>Unicode</CharacterSet>
+    <CharacterSet>MultiByte</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
     <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>Unicode</CharacterSet>
+    <CharacterSet>MultiByte</CharacterSet>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
   <PropertyGroup Label="UserMacros" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <LinkIncremental>true</LinkIncremental>
-    <LibraryPath>..\Debug;$(LibraryPath)</LibraryPath>
-    <IncludePath>$(MSBuildProjectDirectory)\..\base;$(MSBuildProjectDirectory)\..\jsonrpc;$(IncludePath)</IncludePath>
+    <LibraryPath>$(OutDir);$(LibraryPath)</LibraryPath>
+    <IncludePath>$(ProjectDir)\..\base;$(ProjectDir)\..\jsonrpc;$(ProjectDir)\..\config;$(IncludePath)</IncludePath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <LinkIncremental>false</LinkIncremental>
-    <LibraryPath>..\Release;$(LibraryPath)</LibraryPath>
-    <IncludePath>$(MSBuildProjectDirectory)\..\base;$(MSBuildProjectDirectory)\..\jsonrpc;$(IncludePath)</IncludePath>
+    <LibraryPath>$(OutDir);$(LibraryPath)</LibraryPath>
+    <IncludePath>$(ProjectDir)\..\base;$(ProjectDir)\..\jsonrpc;$(ProjectDir)\..\config;$(IncludePath)</IncludePath>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>