From 56ae875861ab260b80a030f50c4aff9f9dc8fff0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 13:32:39 +0200 Subject: Adding upstream version 2.14.2. Signed-off-by: Daniel Baumann --- lib/remote/zone.hpp | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 lib/remote/zone.hpp (limited to 'lib/remote/zone.hpp') diff --git a/lib/remote/zone.hpp b/lib/remote/zone.hpp new file mode 100644 index 0000000..897b18e --- /dev/null +++ b/lib/remote/zone.hpp @@ -0,0 +1,46 @@ +/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */ + +#ifndef ZONE_H +#define ZONE_H + +#include "remote/i2-remote.hpp" +#include "remote/zone-ti.hpp" +#include "remote/endpoint.hpp" + +namespace icinga +{ + +/** + * @ingroup remote + */ +class Zone final : public ObjectImpl +{ +public: + DECLARE_OBJECT(Zone); + DECLARE_OBJECTNAME(Zone); + + void OnAllConfigLoaded() override; + + Zone::Ptr GetParent() const; + std::set GetEndpoints() const; + std::vector GetAllParentsRaw() const; + Array::Ptr GetAllParents() const override; + + bool CanAccessObject(const ConfigObject::Ptr& object); + bool IsChildOf(const Zone::Ptr& zone); + bool IsGlobal() const; + bool IsSingleInstance() const; + + static Zone::Ptr GetLocalZone(); + +protected: + void ValidateEndpointsRaw(const Lazy& lvalue, const ValidationUtils& utils) override; + +private: + Zone::Ptr m_Parent; + std::vector m_AllParents; +}; + +} + +#endif /* ZONE_H */ -- cgit v1.2.3