[SECARSP-143] Notifications component was implemented and integrated into Dashboard
[platform/core/security/suspicious-activity-monitor.git] / device-agent / samonitor / policyhandler.h
1 /**
2  * Samsung Ukraine R&D Center (SRK under a contract between)
3  * LLC "Samsung Electronics Co", Ltd (Seoul, Republic of Korea)
4  * Copyright (C) 2017 Samsung Electronics Co., Ltd. All rights reserved.
5  */
6 /**
7  * @file   policyhandler.h
8  * @brief  Class for handling policy enforcement events
9  * @date   Created Mar 6, 2018
10  * @author Mail to: <A HREF="mailto:d.lomtev@samsung.com">Dmytro Lomtiev, d.lomtev@samsung.com</A>
11  */
12
13 #ifndef POLICYHANDLER_H
14 #define POLICYHANDLER_H
15
16 #include <functional>
17 #include "eventlistener.h"
18
19 /**
20  * @brief Class for handling policies
21  */
22 class PolicyHandler: public NetworkManager::EventListener
23 {
24 public:
25     static const std::string POLICY_EVENT_TYPE;
26
27     /**
28      * @brief Constructor
29      * @param iotivity pointer to the IoTivity instance
30      */
31     PolicyHandler(NetworkManager::Connection& conn);
32
33     void accept(NetworkManager::Event& event) override;
34
35     /**
36      * @brief Shut down policy handling
37      */
38     void disable() {
39         disabled = true;
40     }
41
42 protected:
43     bool disabled;
44 };
45
46 #endif // POLICYHANDLER_H