]> granicus.if.org Git - icinga2/blobdiff - lib/icinga/service.hpp
Move the VMFrame class to libbase
[icinga2] / lib / icinga / service.hpp
index 8219af06744129d311a391cc5a61414d56d9b696..53e82edf9af0d5aba61878f4708c91b245b7f768 100644 (file)
@@ -36,14 +36,14 @@ namespace icinga
 class I2_ICINGA_API Service : public ObjectImpl<Service>, public MacroResolver
 {
 public:
-       DECLARE_PTR_TYPEDEFS(Service);
-       DECLARE_TYPENAME(Service);
+       DECLARE_OBJECT(Service);
+       DECLARE_OBJECTNAME(Service);
 
        static Service::Ptr GetByNamePair(const String& hostName, const String& serviceName);
 
        Host::Ptr GetHost(void) const;
 
-       virtual bool ResolveMacro(const String& macro, const CheckResult::Ptr& cr, String *result) const;
+       virtual bool ResolveMacro(const String& macro, const CheckResult::Ptr& cr, Value *result) const;
 
        static ServiceState StateFromString(const String& state);
        static String StateToString(ServiceState state);
@@ -53,15 +53,16 @@ public:
 
        static void RegisterApplyRuleHandler(void);
 
+       static void EvaluateApplyRules(const Host::Ptr& host);
+
 protected:
-       virtual void OnConfigLoaded(void);
+       virtual void OnAllConfigLoaded(void);
 
 private:
        Host::Ptr m_Host;
 
-       static bool EvaluateApplyRuleOne(const Host::Ptr& host, const ApplyRule& rule);
-       static void EvaluateApplyRule(const ApplyRule& rule);
-       static void EvaluateApplyRules(const std::vector<ApplyRule>& rules);
+       static void EvaluateApplyRuleInstance(const Host::Ptr& host, const String& name, ScriptFrame& frame, const ApplyRule& rule);
+       static bool EvaluateApplyRule(const Host::Ptr& host, const ApplyRule& rule);
 };
 
 I2_ICINGA_API boost::tuple<Host::Ptr, Service::Ptr> GetHostService(const Checkable::Ptr& checkable);