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
|
||||
|
||||
SUBDIRS = base \
|
||||
configfilecomponent \
|
||||
configrpccomponent \
|
||||
icinga \
|
||||
jsonrpc \
|
||||
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
|
||||
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
|
||||
|
|
|
@ -20,5 +20,3 @@ libjsonrpc_a_SOURCES = \
|
|||
netstring.h
|
||||
|
||||
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
|
||||
{
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -13,19 +13,19 @@
|
|||
<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">
|
||||
|
@ -39,13 +39,13 @@
|
|||
<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>
|
||||
|
|
Loading…
Reference in New Issue