]> granicus.if.org Git - icinga2/commitdiff
Removed I2_ prefix for header guard #defines.
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 2 Apr 2012 06:56:30 +0000 (08:56 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 2 Apr 2012 06:56:30 +0000 (08:56 +0200)
34 files changed:
base/application.h
base/component.h
base/condvar.h
base/confighive.h
base/configobject.h
base/delegate.h
base/event.h
base/fifo.h
base/i2-base.h
base/memory.h
base/mutex.h
base/object.h
base/socket.h
base/tcpclient.h
base/tcpserver.h
base/tcpsocket.h
base/thread.h
base/timer.h
base/unix.h
base/win32.h
configfilecomponent/configfilecomponent.cpp
configfilecomponent/configfilecomponent.h
configfilecomponent/i2-configfilecomponent.h
configrpccomponent/configrpccomponent.h
configrpccomponent/i2-configrpccomponent.h
icinga/i2-icinga.h
icinga/icingaapplication.cpp
icinga/icingaapplication.h
jsonrpc/connectionmanager.h
jsonrpc/i2-jsonrpc.h
jsonrpc/jsonrpcclient.h
jsonrpc/jsonrpcmessage.h
jsonrpc/jsonrpcserver.h
jsonrpc/netstring.h

index 07eee7941233f2492841edfe67c568ea2f517998..1e0a98906ce2dfa4ea4463c7878f910a6e806c02 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_APPLICATION_H
-#define I2_APPLICATION_H
+#ifndef APPLICATION_H
+#define APPLICATION_H
 
 #include <map>
 
@@ -42,7 +42,7 @@ public:
 };
 
 template<class T>
-int i2_main(int argc, char **argv)
+int application_main(int argc, char **argv)
 {
        int result;
 
@@ -64,9 +64,9 @@ int i2_main(int argc, char **argv)
 
 #define SET_START_CLASS(klass)                         \
        int main(int argc, char **argv) {               \
-               return i2_main<klass>(argc, argv);      \
+               return application_main<klass>(argc, argv);     \
        }
 
 }
 
-#endif /* I2_APPLICATION_H */
+#endif /* APPLICATION_H */
index d7d3c93b271819bbdf98ce4821d338352046d3bb..2fd12cbdc25a3a682dd6198166d1eadf3682cbbc 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_COMPONENT_H
-#define I2_COMPONENT_H
+#ifndef COMPONENT_H
+#define COMPONENT_H
 
 namespace icinga
 {
@@ -33,4 +33,4 @@ public:
 
 }
 
-#endif /* I2_COMPONENT_H */
+#endif /* COMPONENT_H */
index 6ce196e4d031c869eef93628a347599bc2190671..b34689be1f422c24bd948116d0b334a595437ddc 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_CONDVAR_H
-#define I2_CONDVAR_H
+#ifndef CONDVAR_H
+#define CONDVAR_H
 
 namespace icinga
 {
@@ -30,4 +30,4 @@ public:
 
 }
 
-#endif /* I2_CONDVAR_H */
\ No newline at end of file
+#endif /* CONDVAR_H */
index bd0c3523ec0d4c25c423a91025cb28569bc800de..8425bf31fa1f1d90c16757b5c22158d614adacf9 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_CONFIGHIVE_H
-#define I2_CONFIGHIVE_H
+#ifndef CONFIGHIVE_H
+#define CONFIGHIVE_H
 
 #include <map>
 
@@ -39,4 +39,4 @@ public:
 
 }
 
-#endif /* I2_CONFIGHIVE_H */
+#endif /* CONFIGHIVE_H */
index 2ee0f5a995bc5715a4621d11de5bca8dd4fd595e..150cafb34d3295008774871ee4c969d0b0b69bef 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_CONFIGOBJECT_H
-#define I2_CONFIGOBJECT_H
+#ifndef CONFIGOBJECT_H
+#define CONFIGOBJECT_H
 
 #include <map>
 
@@ -46,4 +46,4 @@ public:
 
 }
 
-#endif /* I2_CONFIGOBJECT_H */
+#endif /* CONFIGOBJECT_H */
index 232291abba02887c7dcd92aa4f218f53f49fafc5..8a6f455ce46efb3557421d730cfbc8c1f8d3e2c0 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_DELEGATE_H
-#define I2_DELEGATE_H
+#ifndef DELEGATE_H
+#define DELEGATE_H
 
 #include <list>
 
@@ -42,4 +42,4 @@ function<int (TArgs)> bind_weak(int (TObject::*function)(TArgs), shared_ptr<Obje
 
 }
 
-#endif /* I2_DELEGATE_H */
\ No newline at end of file
+#endif /* DELEGATE_H */
index 36e07e5fa4c73241cf114aee8e933237d09e4ec5..f4dba3343562cf38141b70f31c70b5a8e6b2a395 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_EVENT_H
-#define I2_EVENT_H
+#ifndef EVENT_H
+#define EVENT_H
 
 namespace icinga
 {
@@ -52,4 +52,4 @@ public:
 
 }
 
-#endif /* I2_EVENT_H */
+#endif /* EVENT_H */
index 4d7f159cb18775bcdbca8de747c7a3239b51abfa..48385cf099b5f81026062e6722f1a37981b830e2 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_FIFO_H
-#define I2_FIFO_H
+#ifndef FIFO_H
+#define FIFO_H
 
 namespace icinga
 {
@@ -35,4 +35,4 @@ public:
 
 }
 
-#endif /* I2_FIFO_H */
\ No newline at end of file
+#endif /* FIFO_H */
index e655fcdf54df9e2927bce519ab0218f11841c1dd..87757018a7dd9d5a881a188b34c5e4d383e5df43 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_BASE_H
-#define I2_BASE_H
+#ifndef I2BASE_H
+#define I2BASE_H
 
 #include <cstdlib>
 #include <cstdarg>
@@ -53,4 +53,4 @@
 #include "application.h"
 #include "component.h"
 
-#endif /* I2_BASE_H */
\ No newline at end of file
+#endif /* I2BASE_H */
index 6e7cc90bbbaee1364710a3d781cb4824c07bf760..e23530cc019b0a44298fcdb0450934be17f98f3b 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_MEMORY_H
-#define I2_MEMORY_H
+#ifndef MEMORY_H
+#define MEMORY_H
 
 namespace icinga
 {
@@ -21,4 +21,4 @@ public:
 
 }
 
-#endif /* I2_MEMORY_H */
\ No newline at end of file
+#endif /* MEMORY_H */
index 6d0edd10f960c3a448c6911ee7d9d12d90d18e01..2d8d317b4a1db31ff5898241332414a4b6f477a4 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_MUTEX_H
-#define I2_MUTEX_H
+#ifndef MUTEX_H
+#define MUTEX_H
 
 namespace icinga
 {
@@ -30,4 +30,4 @@ public:
 
 }
 
-#endif /* I2_MUTEX_H */
+#endif /* MUTEX_H */
index 1c5ad0e2e6a3367135167ecdf1ec06664fac3bf7..f62e60815f78656c90a01f9646fef6873515620b 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_OBJECT_H
-#define I2_OBJECT_H
+#ifndef OBJECT_H
+#define OBJECT_H
 
 namespace icinga
 {
@@ -60,4 +60,4 @@ Object::RefType factory(void)
 
 }
 
-#endif /* I2_OBJECT_H */
+#endif /* OBJECT_H */
index 375092282818398a4c6213c0971fff0141487e67..d1e86718970478a21cf5727e4553c63744cdabe8 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_SOCKET_H
-#define I2_SOCKET_H
+#ifndef SOCKET_H
+#define SOCKET_H
 
 namespace icinga {
 
@@ -43,4 +43,4 @@ public:
 
 }
 
-#endif /* I2_SOCKET_H */
+#endif /* SOCKET_H */
index 8751ba8221d52d858a4e04854cf25685795bf149..46b24084ea59d7f12f90bdc3eb603a0da61d559e 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_TCPCLIENT_H
-#define I2_TCPCLIENT_H
+#ifndef TCPCLIENT_H
+#define TCPCLIENT_H
 
 namespace icinga
 {
@@ -34,4 +34,4 @@ public:
 
 }
 
-#endif /* I2_TCPCLIENT_H */
+#endif /* TCPCLIENT_H */
index e97ad8d847184a58117986b27e50da3b8c38e9a0..a666b1eb1f10f61568a604ae293578eec830be49 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_TCPSERVER_H
-#define I2_TCPSERVER_H
+#ifndef TCPSERVER_H
+#define TCPSERVER_H
 
 namespace icinga
 {
@@ -39,4 +39,4 @@ public:
 
 }
 
-#endif /* I2_TCPSERVER_H */
+#endif /* TCPSERVER_H */
index 3538cfab750075423078cb61ff4adc9f33e4df2a..89d67be5b69535fd5551268dc46794d7259ec121 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_TCPSOCKET_H
-#define I2_TCPSOCKET_H
+#ifndef TCPSOCKET_H
+#define TCPSOCKET_H
 
 namespace icinga
 {
@@ -18,4 +18,4 @@ public:
 
 }
 
-#endif /* I2_TCPSOCKET_H */
\ No newline at end of file
+#endif /* TCPSOCKET_H */
index 8306942da18498054270f9fa476fcb63f52dd91a..a5b364fbd976843ae48984986efefb46f86e0eaa 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_THREAD_H
-#define I2_THREAD_H
+#ifndef THREAD_H
+#define THREAD_H
 
 namespace icinga
 {
@@ -24,4 +24,4 @@ public:
 
 }
 
-#endif /* I2_THREAD_H */
+#endif /* THREAD_H */
index 8f766af72855bd41eba5af6d3b185cc2299e47e7..1730068a0459f8c083c1148e94700bcfaae4f72a 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_TIMER_H
-#define I2_TIMER_H
+#ifndef TIMER_H
+#define TIMER_H
 
 #include <time.h>
 
@@ -54,4 +54,4 @@ public:
 
 }
 
-#endif /* I2_TIMER_H */
+#endif /* TIMER_H */
index 54d4abe97ce8974f65fc051e376104170feb7088..a2bda9804767c9359410901a5c3113cb220ca3be 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_UNIX_H
-#define I2_UNIX_H
+#ifndef UNIX_H
+#define UNIX_H
 
 #include <ltdl.h>
 #include <execinfo.h>
@@ -62,4 +62,4 @@ inline void *GetProcAddress(HMODULE module, const char *function)
        return lt_dlsym(module, function);
 }
 
-#endif /* I2_UNIX_H */
\ No newline at end of file
+#endif /* UNIX_H */
index a75c521a61e4869eb57bdb588fd4943221b31de6..44b9fc86fae201e113d36e35383985bc4b8c2c6d 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_WIN32_H
-#define I2_WIN32_H
+#ifndef WIN32_H
+#define WIN32_H
 
 #define NOGDI
 #include <windows.h>
@@ -10,4 +10,4 @@ typedef int socklen_t;
 #define I2_EXPORT __declspec(dllexport)
 #define I2_IMPORT __declspec(dllimport)
 
-#endif /* I2_WIN32_H */
\ No newline at end of file
+#endif /* WIN32_H */
index 34438e6fd09b6428904d0e6b8016e93396641861..b50eda4d924ffeef76a33b4ce457b63403f4faa1 100644 (file)
@@ -17,8 +17,8 @@ void ConfigFileComponent::Start(void)
        FIFO::RefType fifo = new_object<FIFO>();
 
        string filename;
-       if (!GetConfig()->GetProperty("filename", &filename))
-               throw exception(/*"Missing filename property"*/);
+       if (!GetConfig()->GetProperty("configFilename", &filename))
+               throw exception(/*"Missing configFilename property"*/);
 
        fp.open(filename.c_str(), ifstream::in);
        if (fp.fail())
index 0039d8fda4e7ae1a75cbcabe42c34e2444357202..58ddf4338a9ccd3c94354e846b00476467adb3e6 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_CONFIGFILECOMPONENT_H
-#define I2_CONFIGFILECOMPONENT_H
+#ifndef CONFIGFILECOMPONENT_H
+#define CONFIGFILECOMPONENT_H
 
 namespace icinga
 {
@@ -17,4 +17,4 @@ public:
 
 }
 
-#endif /* I2_CONFIGFILECOMPONENT_H */
\ No newline at end of file
+#endif /* CONFIGFILECOMPONENT_H */
index 64de4229483f7c2d1d11947de213765fbaf9a59c..c476c183539abb47971e898e5d53ac26b9e91f8a 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef I2_I2CONFIGFILECOMPONENT_H
-#define I2_I2CONFIGFILECOMPONENT_H
+#ifndef I2CONFIGFILECOMPONENT_H
+#define I2CONFIGFILECOMPONENT_H
 
 #include <i2-base.h>
 
 #include "configfilecomponent.h"
 
-#endif /* I2_I2CONFIGFILECOMPONENT_H */
+#endif /* I2CONFIGFILECOMPONENT_H */
index ee0905eb3233c1a22b7585d27ffd59b90471e335..c84fe56190565c401f35a9d01f0db2983d58db1f 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_CONFIGRPCCOMPONENT_H
-#define I2_CONFIGRPCCOMPONENT_H
+#ifndef CONFIGRPCCOMPONENT_H
+#define CONFIGRPCCOMPONENT_H
 
 namespace icinga
 {
@@ -29,4 +29,4 @@ public:
 
 }
 
-#endif /* I2_CONFIGRPCCOMPONENT_H */
+#endif /* CONFIGRPCCOMPONENT_H */
index 514ea315227aba00a571ba91b9a59542471df375..dd3d9c983cbc932cfb7452c0c26c65d65a1aec7d 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_I2CONFIGCOMPONENT_H
-#define I2_I2CONFIGCOMPONENT_H
+#ifndef I2CONFIGCOMPONENT_H
+#define I2CONFIGCOMPONENT_H
 
 #include <i2-base.h>
 #include <i2-jsonrpc.h>
@@ -7,4 +7,4 @@
 
 #include "configrpccomponent.h"
 
-#endif /* I2_I2CONFIGCOMPONENT_H */
+#endif /* I2CONFIGCOMPONENT_H */
index ca653f31a09183520b8bbdc64d16ded5acf86848..fd61e6fca58560b9d74b7ac15a73a3270fa951b8 100644 (file)
@@ -1,9 +1,9 @@
-#ifndef I2_ICINGA_H
-#define I2_ICINGA_H
+#ifndef I2ICINGA_H
+#define I2ICINGA_H
 
 #include <i2-base.h>
 #include <i2-jsonrpc.h>
 
 #include "icingaapplication.h"
 
-#endif /* I2_ICINGA_H */
+#endif /* I2ICINGA_H */
index f9a9ffac23256e37e0c6bf0a9f381a0d39cd5136..948953382ee1f817024b80093056fe18afec7505 100644 (file)
@@ -31,8 +31,7 @@ int IcingaApplication::Main(const vector<string>& args)
        ConfigObject::RefType fileComponentConfig = new_object<ConfigObject>();
        fileComponentConfig->SetName("configfilecomponent");
        fileComponentConfig->SetType("component");
-       fileComponentConfig->SetProperty("path", "libconfigfilecomponent.la");
-       fileComponentConfig->SetProperty("filename", "icinga.conf");
+       fileComponentConfig->SetProperty("configFilename", "icinga.conf");
        GetConfigHive()->AddObject(fileComponentConfig);
 
        RunEventLoop();
@@ -50,8 +49,15 @@ int IcingaApplication::ConfigObjectCreatedHandler(ConfigHiveEventArgs::RefType e
        if (ea->Object->GetType() == "component") {
                string path;
                
-               if (!ea->Object->GetProperty("path", &path))
-                       throw exception(/*"Missing path property"*/);
+               if (!ea->Object->GetProperty("path", &path)) {
+#ifdef _WIN32
+                       path = ea->Object->GetName() + ".dll";
+#else /* _WIN32 */
+                       path = "lib" + ea->Object->GetName() + ".la";
+#endif /* _WIN32 */
+
+                       // TODO: try to figure out where the component is located */
+               }
 
                LoadComponent(path, ea->Object);
        }
index 209e6b655a80f73df0d908f677d861dee9624c42..f7f92d0a4467905cb1045796271d5e0658e34988 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_ICINGAAPPLICATION_H
-#define I2_ICINGAAPPLICATION_H
+#ifndef ICINGAAPPLICATION_H
+#define ICINGAAPPLICATION_H
 
 namespace icinga
 {
@@ -25,4 +25,4 @@ public:
 
 }
 
-#endif /* I2_ICINGAAPPLICATION_H */
+#endif /* ICINGAAPPLICATION_H */
index f92b802b8f529b021935e904bc1da89ca5c91b53..934244492c3c1c27cf203a9247b95145ccb71fbd 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_CONNECTIONMANAGER_H
-#define I2_CONNECTIONMANAGER_H
+#ifndef CONNECTIONMANAGER_H
+#define CONNECTIONMANAGER_H
 
 namespace icinga
 {
@@ -34,4 +34,4 @@ public:
 
 }
 
-#endif /* I2_CONNECTIONMANAGER_H */
+#endif /* CONNECTIONMANAGER_H */
index a25d58ce0128dda7f763ec1c98bd24e7d4081e87..dfbec61c2c73a4b1e231ce38ed61f1a52977211a 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_JSONRPC_H
-#define I2_JSONRPC_H
+#ifndef I2JSONRPC_H
+#define I2JSONRPC_H
 
 #include <map>
 #include <i2-base.h>
@@ -11,4 +11,4 @@
 #include "jsonrpcserver.h"
 #include "connectionmanager.h"
 
-#endif /* I2_JSONRPC_H */
+#endif /* I2JSONRPC_H */
index 58e6e3edcd4508720a281a5e6230af3aef82db67..6d66898a818b24485bb7dd9dd9730b7176a4591e 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_JSONRPCCLIENT_H
-#define I2_JSONRPCCLIENT_H
+#ifndef JSONRPCCLIENT_H
+#define JSONRPCCLIENT_H
 
 namespace icinga
 {
@@ -30,4 +30,4 @@ public:
 
 }
 
-#endif /* I2_JSONRPCCLIENT_H */
+#endif /* JSONRPCCLIENT_H */
index 1f63d553cc947ae5e4db14aefa5c56949e40d3e9..b6c34566b8b42486fd32db5038f6078fca0a0391 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_JSONRPCMESSAGE_H
-#define I2_JSONRPCMESSAGE_H
+#ifndef JSONRPCMESSAGE_H
+#define JSONRPCMESSAGE_H
 
 namespace icinga
 {
@@ -53,4 +53,4 @@ public:
 
 }
 
-#endif /* I2_JSONRPCMESSAGE_H */
+#endif /* JSONRPCMESSAGE_H */
index 70c70c4a7c01adc04ea21e9977b4ee0369a09ce1..4dde753110f722fdad714ea4f716410733548ecc 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_JSONRPCSERVER_H
-#define I2_JSONRPCSERVER_H
+#ifndef JSONRPCSERVER_H
+#define JSONRPCSERVER_H
 
 namespace icinga
 {
@@ -15,4 +15,4 @@ public:
 
 }
 
-#endif /* I2_JSONRPCSERVER_H */
\ No newline at end of file
+#endif /* JSONRPCSERVER_H */
index f44e3f61d39a9aa78d92330a8a29847376fe71be..4c2152a444f0723267635f936e14e6273b2bbc48 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef I2_NETSTRING_H
-#define I2_NETSTRING_H
+#ifndef NETSTRING_H
+#define NETSTRING_H
 
 namespace icinga
 {
@@ -20,4 +20,4 @@ public:
 
 }
 
-#endif /* I2_NETSTRING_H */
+#endif /* NETSTRING_H */