Update year information of license boilerplate
[platform/core/uifw/multi-assistant-service.git] / plugins / wakeup-manager / inc / wakeup_policy.h
1 /*
2  * Copyright 2018-2019 Samsung Electronics Co., Ltd
3  *
4  * Licensed under the Flora License, Version 1.1 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://floralicense.org/license/
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef _WAKEUP_POLICY_H_
18 #define _WAKEUP_POLICY_H_
19
20 #include <string>
21 #include <memory>
22
23 #include <multi_assistant_service.h>
24
25 namespace multiassistant
26 {
27 namespace wakeup
28 {
29
30 using namespace std;
31
32 class IPolicyEventObserver
33 {
34 public:
35         virtual ~IPolicyEventObserver() = default;
36         virtual void on_wakeup(mas_wakeup_event_info wakeup_info) = 0;
37 };
38
39 class CWakeupPolicyImpl;
40
41 class CWakeupPolicy
42 {
43 public:
44         CWakeupPolicy();
45         CWakeupPolicy(IPolicyEventObserver *observer);
46         virtual ~CWakeupPolicy();
47
48         CWakeupPolicy(const CWakeupPolicy&) = delete;
49         CWakeupPolicy& operator=(const CWakeupPolicy&) = delete;
50
51         void subscribe(IPolicyEventObserver *observer);
52         void unsubscribe(IPolicyEventObserver *observer);
53
54         virtual void wakeup_candidate(mas_wakeup_event_info wakeup_info) = 0;
55 protected:
56         unique_ptr<CWakeupPolicyImpl> mImpl;
57 };
58
59 } // wakeup
60 } // multiassistant
61
62 #endif /* _WAKEUP_POLICY_H_ */