icinga2/lib/livestatus/downtimestable.hpp

52 lines
1.4 KiB
C++
Raw Normal View History

/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2013-03-10 22:20:13 +01:00
#ifndef DOWNTIMESTABLE_H
#define DOWNTIMESTABLE_H
2014-05-25 16:23:35 +02:00
#include "livestatus/table.hpp"
2013-03-17 20:19:29 +01:00
using namespace icinga;
namespace icinga
2013-03-10 22:20:13 +01:00
{
/**
* @ingroup livestatus
*/
2018-01-04 06:11:04 +01:00
class DowntimesTable final : public Table
2013-03-10 22:20:13 +01:00
{
public:
DECLARE_PTR_TYPEDEFS(DowntimesTable);
2013-03-10 22:20:13 +01:00
DowntimesTable();
2013-03-10 22:20:13 +01:00
static void AddColumns(Table *table, const String& prefix = String(),
const Column::ObjectAccessor& objectAccessor = Column::ObjectAccessor());
2013-03-10 22:20:13 +01:00
String GetName() const override;
String GetPrefix() const override;
2013-03-10 22:20:13 +01:00
protected:
void FetchRows(const AddRowFunction& addRowFn) override;
private:
static Object::Ptr HostAccessor(const Value& row, const Column::ObjectAccessor& parentObjectAccessor);
static Object::Ptr ServiceAccessor(const Value& row, const Column::ObjectAccessor& parentObjectAccessor);
static Value AuthorAccessor(const Value& row);
static Value CommentAccessor(const Value& row);
static Value IdAccessor(const Value& row);
static Value EntryTimeAccessor(const Value& row);
static Value TypeAccessor(const Value& row);
static Value IsServiceAccessor(const Value& row);
static Value StartTimeAccessor(const Value& row);
static Value EndTimeAccessor(const Value& row);
static Value FixedAccessor(const Value& row);
static Value DurationAccessor(const Value& row);
static Value TriggeredByAccessor(const Value& row);
2013-03-10 22:20:13 +01:00
};
}
#endif /* DOWNTIMESTABLE_H */