mirror of https://github.com/Icinga/icinga2.git
Updated project files.
This commit is contained in:
parent
a49876a1ae
commit
4b093d9872
|
@ -2,6 +2,9 @@
|
||||||
## Created by Anjuta
|
## Created by Anjuta
|
||||||
|
|
||||||
SUBDIRS = base \
|
SUBDIRS = base \
|
||||||
|
configfilecomponent \
|
||||||
|
configrpccomponent \
|
||||||
|
icinga \
|
||||||
jsonrpc \
|
jsonrpc \
|
||||||
miniapp
|
miniapp
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -28,8 +28,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "icinga", "icinga\icinga.vcx
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "configfilecomponent", "configfilecomponent\configfilecomponent.vcxproj", "{E58F1DA7-B723-412B-B2B7-7FF58E2A944E}"
|
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
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "configrpccomponent", "configrpccomponent\configrpccomponent.vcxproj", "{697C6D7E-3109-484C-A7AF-384D28711610}"
|
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
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
|
|
@ -20,5 +20,3 @@ libjsonrpc_a_SOURCES = \
|
||||||
netstring.h
|
netstring.h
|
||||||
|
|
||||||
libjsonrpc_a_CXXFLAGS = -I${top_srcdir}/base
|
libjsonrpc_a_CXXFLAGS = -I${top_srcdir}/base
|
||||||
|
|
||||||
libjsonrpc_a_LIBADD = $(top_builddir)/base/libbase.a
|
|
||||||
|
|
|
@ -13,20 +13,38 @@ namespace icinga
|
||||||
|
|
||||||
class MyApplication : public Application
|
class MyApplication : public Application
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
|
ConfigHive::RefType m_Hive;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef shared_ptr<MyApplication> RefType;
|
typedef shared_ptr<MyApplication> RefType;
|
||||||
typedef weak_ptr<MyApplication> WeakRefType;
|
typedef weak_ptr<MyApplication> WeakRefType;
|
||||||
|
|
||||||
int Main(const vector<string>& args)
|
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>();
|
JsonRpcServer::RefType ts = new_object<JsonRpcServer>();
|
||||||
ts->MakeSocket();
|
ts->MakeSocket();
|
||||||
ts->Bind(7777);
|
ts->Bind(netconfig->GetPropertyInteger("port", 7777));
|
||||||
ts->Listen();
|
ts->Listen();
|
||||||
|
|
||||||
ConnectionManager::RefType cm = new_object<ConnectionManager>();
|
ConnectionManager::RefType cm = new_object<ConnectionManager>();
|
||||||
cm->RegisterMethod("HelloWorld", bind_weak(&MyApplication::HelloWorld, shared_from_this()));
|
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();
|
RunEventLoop();
|
||||||
|
|
||||||
|
@ -44,7 +62,12 @@ public:
|
||||||
cJSON *result = response->GetResult();
|
cJSON *result = response->GetResult();
|
||||||
cJSON_AddStringToObject(result, "greeting", "Hello World!");
|
cJSON_AddStringToObject(result, "greeting", "Hello World!");
|
||||||
client->SendMessage(response);
|
client->SendMessage(response);
|
||||||
|
|
||||||
|
ConfigObject::RefType co = new_object<ConfigObject>();
|
||||||
|
co->SetName("foo");
|
||||||
|
co->SetType("moo");
|
||||||
|
m_Hive->AddObject(co);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,19 +13,19 @@
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectGuid>{7CEA8AB1-3327-4644-9D38-B639A8F3341E}</ProjectGuid>
|
<ProjectGuid>{7CEA8AB1-3327-4644-9D38-B639A8F3341E}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>i2miniapp</RootNamespace>
|
<RootNamespace>icinga</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
@ -39,13 +39,13 @@
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<LibraryPath>..\Debug;$(LibraryPath)</LibraryPath>
|
<LibraryPath>$(OutDir);$(LibraryPath)</LibraryPath>
|
||||||
<IncludePath>$(MSBuildProjectDirectory)\..\base;$(MSBuildProjectDirectory)\..\jsonrpc;$(IncludePath)</IncludePath>
|
<IncludePath>$(ProjectDir)\..\base;$(ProjectDir)\..\jsonrpc;$(ProjectDir)\..\config;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<LibraryPath>..\Release;$(LibraryPath)</LibraryPath>
|
<LibraryPath>$(OutDir);$(LibraryPath)</LibraryPath>
|
||||||
<IncludePath>$(MSBuildProjectDirectory)\..\base;$(MSBuildProjectDirectory)\..\jsonrpc;$(IncludePath)</IncludePath>
|
<IncludePath>$(ProjectDir)\..\base;$(ProjectDir)\..\jsonrpc;$(ProjectDir)\..\config;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
|
|
Loading…
Reference in New Issue