mirror of https://github.com/Icinga/icinga2.git
parent
46e892cc60
commit
0013d26425
|
@ -133,7 +133,7 @@ void Comment::Stop(bool runtimeRemoved)
|
|||
|
||||
Checkable::Ptr Comment::GetCheckable(void) const
|
||||
{
|
||||
return m_Checkable;
|
||||
return static_pointer_cast<Checkable>(m_Checkable);
|
||||
}
|
||||
|
||||
bool Comment::IsExpired(void) const
|
||||
|
|
|
@ -22,13 +22,12 @@
|
|||
|
||||
#include "icinga/i2-icinga.hpp"
|
||||
#include "icinga/comment.thpp"
|
||||
#include "icinga/checkable.thpp"
|
||||
#include "remote/messageorigin.hpp"
|
||||
|
||||
namespace icinga
|
||||
{
|
||||
|
||||
class Checkable;
|
||||
|
||||
/**
|
||||
* A comment.
|
||||
*
|
||||
|
@ -65,7 +64,7 @@ protected:
|
|||
virtual void Stop(bool runtimeRemoved) override;
|
||||
|
||||
private:
|
||||
intrusive_ptr<Checkable> m_Checkable;
|
||||
ObjectImpl<Checkable>::Ptr m_Checkable;
|
||||
|
||||
static void CommentsExpireTimerHandler(void);
|
||||
};
|
||||
|
|
|
@ -147,7 +147,7 @@ void Downtime::Stop(bool runtimeRemoved)
|
|||
|
||||
Checkable::Ptr Downtime::GetCheckable(void) const
|
||||
{
|
||||
return m_Checkable;
|
||||
return static_pointer_cast<Checkable>(m_Checkable);
|
||||
}
|
||||
|
||||
bool Downtime::IsActive(void) const
|
||||
|
|
|
@ -22,13 +22,12 @@
|
|||
|
||||
#include "icinga/i2-icinga.hpp"
|
||||
#include "icinga/downtime.thpp"
|
||||
#include "icinga/checkable.thpp"
|
||||
#include "remote/messageorigin.hpp"
|
||||
|
||||
namespace icinga
|
||||
{
|
||||
|
||||
class Checkable;
|
||||
|
||||
/**
|
||||
* A downtime.
|
||||
*
|
||||
|
@ -75,7 +74,7 @@ protected:
|
|||
virtual void ValidateEndTime(double value, const ValidationUtils& utils) override;
|
||||
|
||||
private:
|
||||
intrusive_ptr<Checkable> m_Checkable;
|
||||
ObjectImpl<Checkable>::Ptr m_Checkable;
|
||||
|
||||
static void DowntimesExpireTimerHandler(void);
|
||||
};
|
||||
|
|
|
@ -119,7 +119,7 @@ void Notification::OnAllConfigLoaded(void)
|
|||
if (!m_Checkable)
|
||||
BOOST_THROW_EXCEPTION(ScriptError("Notification object refers to a host/service which doesn't exist.", GetDebugInfo()));
|
||||
|
||||
m_Checkable->RegisterNotification(this);
|
||||
GetCheckable()->RegisterNotification(this);
|
||||
}
|
||||
|
||||
void Notification::Start(bool runtimeCreated)
|
||||
|
@ -144,7 +144,7 @@ void Notification::Stop(bool runtimeRemoved)
|
|||
|
||||
Checkable::Ptr Notification::GetCheckable(void) const
|
||||
{
|
||||
return m_Checkable;
|
||||
return static_pointer_cast<Checkable>(m_Checkable);
|
||||
}
|
||||
|
||||
NotificationCommand::Ptr Notification::GetCommand(void) const
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "icinga/i2-icinga.hpp"
|
||||
#include "icinga/notification.thpp"
|
||||
#include "icinga/checkable.thpp"
|
||||
#include "icinga/user.hpp"
|
||||
#include "icinga/usergroup.hpp"
|
||||
#include "icinga/timeperiod.hpp"
|
||||
|
@ -66,7 +67,6 @@ enum NotificationType
|
|||
};
|
||||
|
||||
class NotificationCommand;
|
||||
class Checkable;
|
||||
class ApplyRule;
|
||||
struct ScriptFrame;
|
||||
class Host;
|
||||
|
@ -122,7 +122,7 @@ protected:
|
|||
virtual void Stop(bool runtimeRemoved) override;
|
||||
|
||||
private:
|
||||
intrusive_ptr<Checkable> m_Checkable;
|
||||
ObjectImpl<Checkable>::Ptr m_Checkable;
|
||||
|
||||
void ExecuteNotificationHelper(NotificationType type, const User::Ptr& user, const CheckResult::Ptr& cr, bool force, const String& author = "", const String& text = "");
|
||||
|
||||
|
|
Loading…
Reference in New Issue