From 15a5c3d233f96f88547a1cd5b756769e4aa063b5 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 1 Apr 2012 19:32:18 +0200 Subject: [PATCH] Removed miniapp demo application --- Makefile.am | 3 +- configure.ac | 3 +- miniapp/Makefile.am | 14 ------- miniapp/miniapp.cpp | 77 ----------------------------------- miniapp/miniapp.vcxproj | 89 ----------------------------------------- 5 files changed, 2 insertions(+), 184 deletions(-) delete mode 100644 miniapp/Makefile.am delete mode 100644 miniapp/miniapp.cpp delete mode 100644 miniapp/miniapp.vcxproj diff --git a/Makefile.am b/Makefile.am index dd469cf65..15fa61a18 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,8 +6,7 @@ SUBDIRS = ltdl \ jsonrpc \ configfilecomponent \ configrpccomponent \ - icinga \ - miniapp + icinga icinga2docdir = ${prefix}/doc/icinga2 icinga2doc_DATA = \ diff --git a/configure.ac b/configure.ac index af7ade1b3..06238a114 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. dnl Created by Anjuta application wizard. -AC_INIT(icinga2, 0.1) +AC_INIT(icinga, 2.0) AC_CONFIG_HEADERS([config.h]) @@ -31,6 +31,5 @@ configfilecomponent/Makefile configrpccomponent/Makefile icinga/Makefile jsonrpc/Makefile -miniapp/Makefile ]) diff --git a/miniapp/Makefile.am b/miniapp/Makefile.am deleted file mode 100644 index 1ff548177..000000000 --- a/miniapp/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -## Process this file with automake to produce Makefile.in - - -bin_PROGRAMS = \ - miniapp - -miniapp_SOURCES = \ - miniapp.cpp - -miniapp_CXXFLAGS = -I${top_srcdir}/base \ - -I${top_srcdir}/jsonrpc - -miniapp_LDFLAGS = $(top_builddir)/base/libbase.a \ - $(top_builddir)/jsonrpc/libjsonrpc.a -lltdl diff --git a/miniapp/miniapp.cpp b/miniapp/miniapp.cpp deleted file mode 100644 index ebf364d53..000000000 --- a/miniapp/miniapp.cpp +++ /dev/null @@ -1,77 +0,0 @@ -#include -#include -#include -#include - -using namespace icinga; - -using std::cout; -using std::endl; - -namespace icinga -{ - -class MyApplication : public Application -{ -private: - ConfigHive::RefType m_Hive; - -public: - typedef shared_ptr RefType; - typedef weak_ptr WeakRefType; - - int Main(const vector& args) - { - LoadComponent("configcomponent"); - - m_Hive = new_object(); - - /*ConfigFileSerializer::RefType cfs = new_object(); - cfs->SetFilename("test.conf"); - cfs->Deserialize(m_Hive); - - ConfigObject::RefType netconfig = m_Hive->GetObject("netconfig"); - - JsonRpcServer::RefType ts = new_object(); - ts->MakeSocket(); - ts->Bind(netconfig->GetPropertyInteger("port", 7777)); - ts->Listen(); - - ConnectionManager::RefType cm = new_object(); - cm->RegisterMethod("HelloWorld", bind_weak(&MyApplication::HelloWorld, shared_from_this())); - cm->RegisterServer(ts); - - ConfigRpcServiceModule::RefType rsm = new_object(); - rsm->SetHive(m_Hive); - rsm->SetConfigSource(true); - cm->RegisterServiceModule(rsm);*/ - - RunEventLoop(); - - return 0; - } - - int HelloWorld(NewMessageEventArgs::RefType nea) - { - JsonRpcClient::RefType client = static_pointer_cast(nea->Source); - JsonRpcMessage::RefType msg = nea->Message; - - JsonRpcMessage::RefType response = new_object(); - response->SetVersion("2.0"); - response->SetID(msg->GetID()); - cJSON *result = response->GetResult(); - cJSON_AddStringToObject(result, "greeting", "Hello World!"); - client->SendMessage(response); - - ConfigObject::RefType co = new_object(); - co->SetName("foo"); - co->SetType("moo"); - m_Hive->AddObject(co); - - return 0; - } -}; - -} - -SET_START_CLASS(icinga::MyApplication); diff --git a/miniapp/miniapp.vcxproj b/miniapp/miniapp.vcxproj deleted file mode 100644 index ea4d97fe0..000000000 --- a/miniapp/miniapp.vcxproj +++ /dev/null @@ -1,89 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {7CEA8AB1-3327-4644-9D38-B639A8F3341E} - Win32Proj - icinga - - - - Application - true - MultiByte - - - Application - false - true - MultiByte - - - - - - - - - - - - - true - $(OutDir);$(LibraryPath) - $(ProjectDir)\..\base;$(ProjectDir)\..\jsonrpc;$(ProjectDir)\..\config;$(IncludePath) - - - false - $(OutDir);$(LibraryPath) - $(ProjectDir)\..\base;$(ProjectDir)\..\jsonrpc;$(ProjectDir)\..\config;$(IncludePath) - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - - - Console - true - base.lib;jsonrpc.lib;%(AdditionalDependencies) - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - - - Console - true - true - true - base.lib;jsonrpc.lib;%(AdditionalDependencies) - - - - - - - - - \ No newline at end of file -- 2.40.0