mirror of https://github.com/Icinga/icinga2.git
Declare Checkable#IsStateOK() const
This commit is contained in:
parent
acf28fb5b0
commit
d33cfdf3c0
|
@ -97,7 +97,7 @@ public:
|
|||
void UpdateNextCheck(const MessageOrigin::Ptr& origin = nullptr);
|
||||
|
||||
bool HasBeenChecked() const;
|
||||
virtual bool IsStateOK(ServiceState state) = 0;
|
||||
virtual bool IsStateOK(ServiceState state) const = 0;
|
||||
|
||||
double GetLastCheck() const final;
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ int Host::GetSeverity() const
|
|||
return severity;
|
||||
}
|
||||
|
||||
bool Host::IsStateOK(ServiceState state)
|
||||
bool Host::IsStateOK(ServiceState state) const
|
||||
{
|
||||
return Host::CalculateState(state) == HostUp;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
HostState GetLastHardState() const override;
|
||||
int GetSeverity() const override;
|
||||
|
||||
bool IsStateOK(ServiceState state) override;
|
||||
bool IsStateOK(ServiceState state) const override;
|
||||
void SaveLastState(ServiceState state, double timestamp) override;
|
||||
|
||||
static HostState StateFromString(const String& state);
|
||||
|
|
|
@ -133,7 +133,7 @@ int Service::GetSeverity() const
|
|||
return severity;
|
||||
}
|
||||
|
||||
bool Service::IsStateOK(ServiceState state)
|
||||
bool Service::IsStateOK(ServiceState state) const
|
||||
{
|
||||
return state == ServiceOK;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
|
||||
bool ResolveMacro(const String& macro, const CheckResult::Ptr& cr, Value *result) const override;
|
||||
|
||||
bool IsStateOK(ServiceState state) override;
|
||||
bool IsStateOK(ServiceState state) const override;
|
||||
void SaveLastState(ServiceState state, double timestamp) override;
|
||||
|
||||
static ServiceState StateFromString(const String& state);
|
||||
|
|
Loading…
Reference in New Issue