icinga2/lib/icinga/user.hpp

45 lines
851 B
C++
Raw Normal View History

/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2013-02-24 08:26:10 +01:00
#ifndef USER_H
#define USER_H
2014-05-25 16:23:35 +02:00
#include "icinga/i2-icinga.hpp"
2018-01-18 13:50:38 +01:00
#include "icinga/user-ti.hpp"
2014-05-25 16:23:35 +02:00
#include "icinga/timeperiod.hpp"
#include "remote/messageorigin.hpp"
2013-03-17 20:19:29 +01:00
2013-02-24 08:26:10 +01:00
namespace icinga
{
/**
* A User.
*
* @ingroup icinga
*/
2018-01-04 06:11:04 +01:00
class User final : public ObjectImpl<User>
2013-02-24 08:26:10 +01:00
{
public:
2014-11-03 00:44:04 +01:00
DECLARE_OBJECT(User);
DECLARE_OBJECTNAME(User);
2013-02-24 08:26:10 +01:00
void AddGroup(const String& name);
/* Notifications */
TimePeriod::Ptr GetPeriod() const;
void ValidateStates(const Lazy<Array::Ptr>& lvalue, const ValidationUtils& utils) override;
void ValidateTypes(const Lazy<Array::Ptr>& lvalue, const ValidationUtils& utils) override;
2013-02-27 21:49:03 +01:00
protected:
void Stop(bool runtimeRemoved) override;
void OnConfigLoaded() override;
void OnAllConfigLoaded() override;
private:
mutable boost::mutex m_UserMutex;
2013-02-24 08:26:10 +01:00
};
}
#endif /* USER_H */