Move EXPORT_COMPONENT() macros to the beginning of the files.

Fixes #3654
This commit is contained in:
Gunnar Beutner 2013-02-08 07:11:14 +01:00
parent 34d4f32398
commit b14027ec73
7 changed files with 14 additions and 16 deletions

View File

@ -21,6 +21,8 @@
using namespace icinga;
EXPORT_COMPONENT(checker, CheckerComponent);
void CheckerComponent::Start(void)
{
m_Endpoint = Endpoint::MakeEndpoint("checker", false);
@ -193,6 +195,3 @@ void CheckerComponent::ObjectRemovedHandler(const DynamicObject::Ptr& object)
m_IdleServices.erase(service);
m_PendingServices.erase(service);
}
EXPORT_COMPONENT(checker, CheckerComponent);

View File

@ -21,6 +21,8 @@
using namespace icinga;
EXPORT_COMPONENT(compat, CompatComponent);
/**
* Hint: The reason why we're using "\n" rather than std::endl is because
* std::endl also _flushes_ the output stream which severely degrades
@ -546,5 +548,3 @@ void CompatComponent::StatusTimerHandler(void)
if (rename(objectspathtmp.CStr(), objectspath.CStr()) < 0)
BOOST_THROW_EXCEPTION(PosixException("rename() failed", errno));
}
EXPORT_COMPONENT(compat, CompatComponent);

View File

@ -21,6 +21,8 @@
using namespace icinga;
EXPORT_COMPONENT(compatido, CompatIdoComponent);
const String CompatIdoComponent::DefaultSocketAddress = "127.0.0.1";
const String CompatIdoComponent::DefaultSocketPort = "5668";
const String CompatIdoComponent::DefaultInstanceName = "i2-default";
@ -835,6 +837,3 @@ void CompatIdoComponent::DumpStatusData(void)
DumpServiceStatus(service);
}
}
EXPORT_COMPONENT(compatido, CompatIdoComponent);

View File

@ -22,6 +22,8 @@
using namespace icinga;
EXPORT_COMPONENT(delegation, DelegationComponent);
void DelegationComponent::Start(void)
{
m_DelegationTimer = boost::make_shared<Timer>();
@ -203,5 +205,3 @@ void DelegationComponent::DelegationTimerHandler(void)
msgbuf << "Updated delegations for " << delegated << " services";
Logger::Write(LogInformation, "delegation", msgbuf.str());
}
EXPORT_COMPONENT(delegation, DelegationComponent);

View File

@ -21,6 +21,8 @@
using namespace icinga;
EXPORT_COMPONENT(demo, DemoComponent);
/**
* Starts the component.
*/
@ -71,5 +73,3 @@ void DemoComponent::HelloWorldRequestHandler(const Endpoint::Ptr& sender,
Logger::Write(LogInformation, "demo", "Got 'hello world' from identity=" +
(sender ? sender->GetName() : "(anonymous)"));
}
EXPORT_COMPONENT(demo, DemoComponent);

View File

@ -21,6 +21,8 @@
using namespace icinga;
EXPORT_COMPONENT(notification, NotificationComponent);
/**
* Starts the component.
*/
@ -48,5 +50,3 @@ void NotificationComponent::NotificationTimerHandler(void)
{
// TODO: implement
}
EXPORT_COMPONENT(notification, NotificationComponent);

View File

@ -21,6 +21,8 @@
using namespace icinga;
EXPORT_COMPONENT(replication, ReplicationComponent);
/**
* Starts the component.
*/
@ -248,5 +250,3 @@ void ReplicationComponent::RemoteObjectRemovedHandler(const RequestMessage& requ
object->Unregister();
}
}
EXPORT_COMPONENT(replication, ReplicationComponent);