2012-06-25 14:13:24 +02:00
|
|
|
#include "i2-icinga.h"
|
|
|
|
|
|
|
|
using namespace icinga;
|
|
|
|
|
2012-06-27 23:38:50 +02:00
|
|
|
void CheckResult::SetScheduleStart(time_t ts)
|
2012-06-25 14:13:24 +02:00
|
|
|
{
|
2012-06-29 12:18:50 +02:00
|
|
|
SetProperty("schedule_start", static_cast<long>(ts));
|
2012-06-25 14:13:24 +02:00
|
|
|
}
|
|
|
|
|
2012-06-27 23:38:50 +02:00
|
|
|
time_t CheckResult::GetScheduleStart(void) const
|
2012-06-25 14:13:24 +02:00
|
|
|
{
|
|
|
|
long value = 0;
|
2012-06-29 12:18:50 +02:00
|
|
|
GetProperty("schedule_start", &value);
|
2012-06-25 14:13:24 +02:00
|
|
|
return static_cast<time_t>(value);
|
|
|
|
}
|
|
|
|
|
2012-06-27 23:38:50 +02:00
|
|
|
void CheckResult::SetScheduleEnd(time_t ts)
|
2012-06-25 14:13:24 +02:00
|
|
|
{
|
2012-06-29 12:18:50 +02:00
|
|
|
SetProperty("schedule_end", static_cast<long>(ts));
|
2012-06-25 14:13:24 +02:00
|
|
|
}
|
|
|
|
|
2012-06-27 23:38:50 +02:00
|
|
|
time_t CheckResult::GetScheduleEnd(void) const
|
2012-06-25 14:13:24 +02:00
|
|
|
{
|
|
|
|
long value = 0;
|
2012-06-29 12:18:50 +02:00
|
|
|
GetProperty("schedule_end", &value);
|
2012-06-25 14:13:24 +02:00
|
|
|
return static_cast<time_t>(value);
|
|
|
|
}
|
|
|
|
|
2012-06-27 23:38:50 +02:00
|
|
|
void CheckResult::SetExecutionStart(time_t ts)
|
|
|
|
{
|
2012-06-29 12:18:50 +02:00
|
|
|
SetProperty("execution_start", static_cast<long>(ts));
|
2012-06-27 23:38:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
time_t CheckResult::GetExecutionStart(void) const
|
|
|
|
{
|
|
|
|
long value = 0;
|
2012-06-29 12:18:50 +02:00
|
|
|
GetProperty("execution_start", &value);
|
2012-06-27 23:38:50 +02:00
|
|
|
return static_cast<time_t>(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CheckResult::SetExecutionEnd(time_t ts)
|
|
|
|
{
|
2012-06-29 12:18:50 +02:00
|
|
|
SetProperty("execution_end", static_cast<long>(ts));
|
2012-06-27 23:38:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
time_t CheckResult::GetExecutionEnd(void) const
|
|
|
|
{
|
|
|
|
long value = 0;
|
2012-06-29 12:18:50 +02:00
|
|
|
GetProperty("execution_end", &value);
|
2012-06-27 23:38:50 +02:00
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2012-06-25 15:42:46 +02:00
|
|
|
void CheckResult::SetState(ServiceState state)
|
2012-06-25 14:13:24 +02:00
|
|
|
{
|
2012-06-29 12:18:50 +02:00
|
|
|
SetProperty("state", static_cast<long>(state));
|
2012-06-25 14:13:24 +02:00
|
|
|
}
|
|
|
|
|
2012-06-25 15:42:46 +02:00
|
|
|
ServiceState CheckResult::GetState(void) const
|
2012-06-25 14:13:24 +02:00
|
|
|
{
|
|
|
|
long value = StateUnknown;
|
2012-06-29 12:18:50 +02:00
|
|
|
GetProperty("state", &value);
|
2012-06-25 15:42:46 +02:00
|
|
|
return static_cast<ServiceState>(value);
|
2012-06-25 14:13:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CheckResult::SetOutput(string output)
|
|
|
|
{
|
2012-06-29 12:18:50 +02:00
|
|
|
SetProperty("output", output);
|
2012-06-25 14:13:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
string CheckResult::GetOutput(void) const
|
|
|
|
{
|
|
|
|
string value;
|
2012-06-29 12:18:50 +02:00
|
|
|
GetProperty("output", &value);
|
2012-06-25 14:13:24 +02:00
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2012-06-29 14:14:51 +02:00
|
|
|
void CheckResult::SetPerformanceDataRaw(const string& pd)
|
|
|
|
{
|
|
|
|
SetProperty("performance_data_raw", pd);
|
|
|
|
}
|
|
|
|
|
|
|
|
string CheckResult::GetPerformanceDataRaw(void) const
|
|
|
|
{
|
|
|
|
string value;
|
|
|
|
GetProperty("performance_data_raw", &value);
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2012-06-25 14:13:24 +02:00
|
|
|
void CheckResult::SetPerformanceData(const Dictionary::Ptr& pd)
|
|
|
|
{
|
2012-06-29 12:18:50 +02:00
|
|
|
SetProperty("performance_data", pd);
|
2012-06-25 14:13:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Dictionary::Ptr CheckResult::GetPerformanceData(void) const
|
|
|
|
{
|
|
|
|
Dictionary::Ptr value;
|
2012-06-29 12:18:50 +02:00
|
|
|
GetProperty("performance_data", &value);
|
2012-06-25 14:13:24 +02:00
|
|
|
return value;
|
|
|
|
}
|