summaryrefslogtreecommitdiffstats
path: root/lib/icinga/notificationcommand.hpp
blob: f0f6899e37a15b0be5a3ea5507401764de010d29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */

#ifndef NOTIFICATIONCOMMAND_H
#define NOTIFICATIONCOMMAND_H

#include "icinga/notificationcommand-ti.hpp"
#include "icinga/notification.hpp"

namespace icinga
{

class Notification;

/**
 * A notification command.
 *
 * @ingroup icinga
 */
class NotificationCommand final : public ObjectImpl<NotificationCommand>
{
public:
	DECLARE_OBJECT(NotificationCommand);
	DECLARE_OBJECTNAME(NotificationCommand);

	static thread_local NotificationCommand::Ptr ExecuteOverride;

	virtual Dictionary::Ptr Execute(const intrusive_ptr<Notification>& notification,
		const User::Ptr& user, const CheckResult::Ptr& cr, const NotificationType& type,
		const String& author, const String& comment,
		const Dictionary::Ptr& resolvedMacros = nullptr,
		bool useResolvedMacros = false);
};

}

#endif /* NOTIFICATIONCOMMAND_H */