1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #include "db_ido/commanddbobject.hpp"
4 #include "db_ido/dbtype.hpp"
5 #include "db_ido/dbvalue.hpp"
6 #include "icinga/command.hpp"
7 #include "icinga/compatutility.hpp"
8 #include "base/objectlock.hpp"
9 #include "base/convert.hpp"
11 using namespace icinga;
13 REGISTER_DBTYPE(Command, "command", DbObjectTypeCommand, "object_id", CommandDbObject);
15 CommandDbObject::CommandDbObject(const DbType::Ptr& type, const String& name1, const String& name2)
16 : DbObject(type, name1, name2)
19 Dictionary::Ptr CommandDbObject::GetConfigFields() const
21 Command::Ptr command = static_pointer_cast<Command>(GetObject());
23 return new Dictionary({
24 { "command_line", CompatUtility::GetCommandLine(command) }
28 Dictionary::Ptr CommandDbObject::GetStatusFields() const