icinga2/lib/livestatus/commentstable.hpp

50 lines
1.3 KiB
C++
Raw Permalink Normal View History

/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2013-03-10 22:20:13 +01:00
#ifndef COMMENTSTABLE_H
#define COMMENTSTABLE_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 CommentsTable final : public Table
2013-03-10 22:20:13 +01:00
{
public:
DECLARE_PTR_TYPEDEFS(CommentsTable);
2013-03-10 22:20:13 +01:00
CommentsTable();
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 EntryTypeAccessor(const Value& row);
static Value ExpiresAccessor(const Value& row);
static Value ExpireTimeAccessor(const Value& row);
2013-03-10 22:20:13 +01:00
};
}
#endif /* COMMENTSTABLE_H */