Daemon name was changed.
[platform/core/security/suspicious-activity-monitor.git] / device-agent / daemon / dpm / i_policy_group_enforce.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) 2018 Samsung Electronics Co., Ltd. All rights reserved.
5  */
6 /**
7  * @file   i_policy_group_enforce.h
8  * @brief  Interface for policy parsing and applying
9  * @date   Created May 10, 2017
10  * @author Mail to: <A HREF="mailto:a.volkov@samsung.com">Aleksey Volkov, a.volkov@samsung.com</A>
11  */
12
13
14 #ifndef IPOLICY_GRP_ENF_H
15 #define IPOLICY_GRP_ENF_H
16
17 #include <string>
18 #include <jsoncpp/json/value.h>
19
20
21 namespace core
22 {
23
24 /**
25  * @interface IPolicyGroupEnforce
26  * @brief interface for policy group applier instances. Each policy group should have own applier implementation.
27  * Used by PolicyEnforce class
28  * @see PolicyEnforce
29  */
30 class IPolicyGroupEnforce
31 {
32
33 public:
34     /**
35      * @brief Destructor
36      */
37     virtual ~IPolicyGroupEnforce() {}
38
39     /**
40      * @brief Init function. Used to init context of related module of policy group
41      * @return True in case of success, false otherwise
42      */
43     virtual bool Init() = 0;
44
45
46     /**
47      * @brief De-Init function. Used to close context of related module of policy group
48      */
49     virtual void Deinit() = 0;
50
51
52     /**
53      * @brief Parse and apply policies related to policy group.
54      * @param policy policy as parsed JSON object
55      * @return True in case of success, false otherwise
56      */
57     virtual bool ParseGroup(Json::Value& policy) = 0;
58 };
59
60
61 /**
62  * @brief Pointer type of IPolicyGroupEnforce interface object instance
63  */
64 typedef IPolicyGroupEnforce* IPolicyGroupEnforcePtr;
65
66
67 } //namespace core
68
69
70 #endif //IPOLICY_GRP_APPL_H