• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "power_mgr_factory.h"
17 
18 #include "device_power_action.h"
19 #include "device_state_action.h"
20 #include "running_lock_action.h"
21 
22 using namespace std;
23 
24 namespace OHOS {
25 namespace PowerMgr {
GetDevicePowerAction()26 unique_ptr<IDevicePowerAction> PowerMgrFactory::GetDevicePowerAction()
27 {
28     return make_unique<DevicePowerAction>();
29 }
30 
GetDeviceStateAction()31 unique_ptr<IDeviceStateAction> PowerMgrFactory::GetDeviceStateAction()
32 {
33     return make_unique<DeviceStateAction>();
34 }
35 
GetRunningLockAction()36 unique_ptr<IRunningLockAction> PowerMgrFactory::GetRunningLockAction()
37 {
38     return make_unique<RunningLockAction>();
39 }
40 } // namespace PowerMgr
41 } // namespace OHOS
42