]> granicus.if.org Git - icinga2/blob - lib/db_ido/servicedbobject.hpp
Merge pull request #7185 from Icinga/bugfix/gelfwriter-wrong-log-facility
[icinga2] / lib / db_ido / servicedbobject.hpp
1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2
3 #ifndef SERVICEDBOBJECT_H
4 #define SERVICEDBOBJECT_H
5
6 #include "db_ido/dbobject.hpp"
7 #include "base/configobject.hpp"
8 #include "icinga/service.hpp"
9
10 namespace icinga
11 {
12
13 /**
14  * A Service database object.
15  *
16  * @ingroup ido
17  */
18 class ServiceDbObject final : public DbObject
19 {
20 public:
21         DECLARE_PTR_TYPEDEFS(ServiceDbObject);
22
23         ServiceDbObject(const DbType::Ptr& type, const String& name1, const String& name2);
24
25         static void StaticInitialize();
26
27         Dictionary::Ptr GetConfigFields() const override;
28         Dictionary::Ptr GetStatusFields() const override;
29
30         void OnConfigUpdateHeavy() override;
31         void OnConfigUpdateLight() override;
32
33         String CalculateConfigHash(const Dictionary::Ptr& configFields) const override;
34
35 private:
36         void DoCommonConfigUpdate();
37 };
38
39 }
40
41 #endif /* SERVICEDBOBJECT_H */