* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/
-type DemoComponent {
+type Demo {
}
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/
-#include "demo/democomponent.h"
+#include "demo/demo.h"
#include "base/dynamictype.h"
#include "base/logger_fwd.h"
#include <boost/smart_ptr/make_shared.hpp>
using namespace icinga;
-REGISTER_TYPE(DemoComponent);
+REGISTER_TYPE(Demo);
/**
* Starts the component.
*/
-void DemoComponent::Start(void)
+void Demo::Start(void)
{
DynamicObject::Start();
m_DemoTimer = boost::make_shared<Timer>();
m_DemoTimer->SetInterval(5);
- m_DemoTimer->OnTimerExpired.connect(boost::bind(&DemoComponent::DemoTimerHandler, this));
+ m_DemoTimer->OnTimerExpired.connect(boost::bind(&Demo::DemoTimerHandler, this));
m_DemoTimer->Start();
}
/**
* Stops the component.
*/
-void DemoComponent::Stop(void)
+void Demo::Stop(void)
{
/* Nothing to do here. */
}
*
* @param - Event arguments for the timer.
*/
-void DemoComponent::DemoTimerHandler(void)
+void Demo::DemoTimerHandler(void)
{
Log(LogInformation, "demo", "Hello World!");
}
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/
-#ifndef DEMOCOMPONENT_H
-#define DEMOCOMPONENT_H
+#ifndef DEMO_H
+#define DEMO_H
#include "base/dynamicobject.h"
#include "base/timer.h"
/**
* @ingroup demo
*/
-class DemoComponent : public DynamicObject
+class Demo : public DynamicObject
{
public:
- DECLARE_PTR_TYPEDEFS(DemoComponent);
- DECLARE_TYPENAME(DemoComponent);
+ DECLARE_PTR_TYPEDEFS(Demo);
+ DECLARE_TYPENAME(Demo);
virtual void Start(void);
virtual void Stop(void);
}
-#endif /* DEMOCOMPONENT_H */
+#endif /* DEMO_H */