• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 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 "mock_power_mgr_client.h"
17 
18 namespace OHOS {
19 namespace PowerMgr {
PowerMgrClient()20 PowerMgrClient::PowerMgrClient() {}
~PowerMgrClient()21 PowerMgrClient::~PowerMgrClient() {}
22 
Connect()23 ErrCode PowerMgrClient::Connect()
24 {
25     return ERR_OK;
26 }
27 
ResetProxy(const wptr<IRemoteObject> & remote)28 void PowerMgrClient::ResetProxy(const wptr<IRemoteObject>& remote)
29 {
30 }
31 
OnRemoteDied(const wptr<IRemoteObject> & remote)32 void PowerMgrClient::PowerMgrDeathRecipient::OnRemoteDied(const wptr<IRemoteObject>& remote)
33 {
34 }
35 
RebootDevice(const std::string & reason)36 void PowerMgrClient::RebootDevice(const std::string& reason)
37 {
38 }
39 
ShutDownDevice(const std::string & reason)40 void PowerMgrClient::ShutDownDevice(const std::string& reason)
41 {
42 }
43 
SuspendDevice(SuspendDeviceType reason,bool suspendImmed)44 void PowerMgrClient::SuspendDevice(SuspendDeviceType reason, bool suspendImmed)
45 {
46 }
47 
WakeupDevice(WakeupDeviceType reason,const std::string & detail)48 void PowerMgrClient::WakeupDevice(WakeupDeviceType reason, const std::string& detail)
49 {
50 }
51 
RefreshActivity(UserActivityType type)52 void PowerMgrClient::RefreshActivity(UserActivityType type)
53 {
54 }
55 
IsRunningLockTypeSupported(uint32_t type)56 bool PowerMgrClient::IsRunningLockTypeSupported(uint32_t type)
57 {
58     return true;
59 }
60 
ForceSuspendDevice()61 bool PowerMgrClient::ForceSuspendDevice()
62 {
63     return true;
64 }
65 
IsScreenOn()66 bool PowerMgrClient::IsScreenOn()
67 {
68     return true;
69 }
70 
GetState()71 PowerState PowerMgrClient::GetState()
72 {
73     return  PowerState::UNKNOWN;
74 }
75 
CreateRunningLock(const std::string & name,RunningLockType type)76 std::shared_ptr<RunningLock> PowerMgrClient::CreateRunningLock(const std::string& name, RunningLockType type)
77 {
78     return nullptr;
79 }
80 
RegisterPowerStateCallback(const sptr<IPowerStateCallback> & callback)81 void PowerMgrClient::RegisterPowerStateCallback(const sptr<IPowerStateCallback>& callback)
82 {
83 }
84 
UnRegisterPowerStateCallback(const sptr<IPowerStateCallback> & callback)85 void PowerMgrClient::UnRegisterPowerStateCallback(const sptr<IPowerStateCallback>& callback)
86 {
87 }
88 
RegisterShutdownCallback(const sptr<IShutdownCallback> & callback,IShutdownCallback::ShutdownPriority priority)89 void PowerMgrClient::RegisterShutdownCallback(const sptr<IShutdownCallback>& callback,
90     IShutdownCallback::ShutdownPriority priority)
91 {
92 }
93 
UnRegisterShutdownCallback(const sptr<IShutdownCallback> & callback)94 void PowerMgrClient::UnRegisterShutdownCallback(const sptr<IShutdownCallback>& callback)
95 {
96 }
97 
RegisterPowerModeCallback(const sptr<IPowerModeCallback> & callback)98 void PowerMgrClient::RegisterPowerModeCallback(const sptr<IPowerModeCallback>& callback)
99 {
100 }
101 
UnRegisterPowerModeCallback(const sptr<IPowerModeCallback> & callback)102 void PowerMgrClient::UnRegisterPowerModeCallback(const sptr<IPowerModeCallback>& callback)
103 {
104 }
105 
SetDisplaySuspend(bool enable)106 void PowerMgrClient::SetDisplaySuspend(bool enable)
107 {
108 }
109 
SetDeviceMode(const uint32_t mode)110 void PowerMgrClient::SetDeviceMode(const uint32_t mode)
111 {
112 }
113 
GetDeviceMode()114 uint32_t PowerMgrClient::GetDeviceMode()
115 {
116     return ERR_OK;
117 }
118 
Dump(const std::vector<std::string> & args)119 std::string PowerMgrClient::Dump(const std::vector<std::string>& args)
120 {
121     return "ERR_OK";
122 }
123 } // namespace PowerMgr
124 } // namespace OHOS