mirror of https://github.com/Icinga/icinga2.git
39 lines
951 B
C++
39 lines
951 B
C++
#ifndef CONFIGHIVE_H
|
|
#define CONFIGHIVE_H
|
|
|
|
namespace icinga
|
|
{
|
|
|
|
struct ConfigHiveEventArgs : public EventArgs
|
|
{
|
|
typedef shared_ptr<ConfigHiveEventArgs> Ptr;
|
|
typedef weak_ptr<ConfigHiveEventArgs> WeakPtr;
|
|
|
|
ConfigObject::Ptr Object;
|
|
string Property;
|
|
string OldValue;
|
|
};
|
|
|
|
class ConfigHive : public Object
|
|
{
|
|
public:
|
|
typedef shared_ptr<ConfigHive> Ptr;
|
|
typedef weak_ptr<ConfigHive> WeakPtr;
|
|
|
|
typedef map< string, map<string, ConfigObject::Ptr> >::iterator TypeIterator;
|
|
typedef map<string, ConfigObject::Ptr>::iterator ObjectIterator;
|
|
map< string, map<string, ConfigObject::Ptr> > Objects;
|
|
|
|
void AddObject(ConfigObject::Ptr object);
|
|
void RemoveObject(ConfigObject::Ptr object);
|
|
ConfigObject::Ptr GetObject(const string& type, const string& name = string());
|
|
|
|
event<ConfigHiveEventArgs::Ptr> OnObjectCreated;
|
|
event<ConfigHiveEventArgs::Ptr> OnObjectRemoved;
|
|
event<ConfigHiveEventArgs::Ptr> OnPropertyChanged;
|
|
};
|
|
|
|
}
|
|
|
|
#endif /* CONFIGHIVE_H */
|