• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2025 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_battery_srv_proxy.h"
17 namespace {
18 constexpr int32_t ERR_FAIL = -1;
19 }
20 namespace OHOS {
21 namespace PowerMgr {
GetCapacity(int32_t & capacity)22 int32_t MockBatterySrvProxy::GetCapacity(int32_t& capacity)
23 {
24     return ERR_FAIL;
25 }
26 
GetChargingStatus(uint32_t & chargeState)27 int32_t MockBatterySrvProxy::GetChargingStatus(uint32_t& chargeState)
28 {
29     return ERR_FAIL;
30 }
31 
GetHealthStatus(uint32_t & healthState)32 int32_t MockBatterySrvProxy::GetHealthStatus(uint32_t& healthState)
33 {
34     return ERR_FAIL;
35 }
36 
GetPluggedType(uint32_t & pluggedType)37 int32_t MockBatterySrvProxy::GetPluggedType(uint32_t& pluggedType)
38 {
39     return ERR_FAIL;
40 }
41 
GetVoltage(int32_t & voltage)42 int32_t MockBatterySrvProxy::GetVoltage(int32_t& voltage)
43 {
44     return ERR_FAIL;
45 }
46 
GetPresent(bool & present)47 int32_t MockBatterySrvProxy::GetPresent(bool& present)
48 {
49     return ERR_FAIL;
50 }
51 
GetTechnology(std::string & technology)52 int32_t MockBatterySrvProxy::GetTechnology(std::string& technology)
53 {
54     return ERR_FAIL;
55 }
56 
GetTotalEnergy(int32_t & totalEnergy)57 int32_t MockBatterySrvProxy::GetTotalEnergy(int32_t& totalEnergy)
58 {
59     return ERR_FAIL;
60 }
61 
GetCurrentAverage(int32_t & curAverage)62 int32_t MockBatterySrvProxy::GetCurrentAverage(int32_t& curAverage)
63 {
64     return ERR_FAIL;
65 }
66 
GetNowCurrent(int32_t & nowCurr)67 int32_t MockBatterySrvProxy::GetNowCurrent(int32_t& nowCurr)
68 {
69     return ERR_FAIL;
70 }
71 
GetRemainEnergy(int32_t & remainEnergy)72 int32_t MockBatterySrvProxy::GetRemainEnergy(int32_t& remainEnergy)
73 {
74     return ERR_FAIL;
75 }
76 
GetBatteryTemperature(int32_t & temperature)77 int32_t MockBatterySrvProxy::GetBatteryTemperature(int32_t& temperature)
78 {
79     return ERR_FAIL;
80 }
81 
GetCapacityLevel(uint32_t & batteryCapacityLevel)82 int32_t MockBatterySrvProxy::GetCapacityLevel(uint32_t& batteryCapacityLevel)
83 {
84     return ERR_FAIL;
85 }
86 
GetRemainingChargeTime(int64_t & remainTime)87 int32_t MockBatterySrvProxy::GetRemainingChargeTime(int64_t& remainTime)
88 {
89     return ERR_FAIL;
90 }
91 
SetBatteryConfig(const std::string & sceneName,const std::string & value,int32_t & batteryErr)92 int32_t MockBatterySrvProxy::SetBatteryConfig(const std::string& sceneName, const std::string& value,
93     int32_t& batteryErr)
94 {
95     return ERR_FAIL;
96 }
97 
GetBatteryConfig(const std::string & sceneName,std::string & getResult,int32_t & batteryErr)98 int32_t MockBatterySrvProxy::GetBatteryConfig(const std::string& sceneName, std::string& getResult,
99     int32_t& batteryErr)
100 {
101     return ERR_FAIL;
102 }
103 
IsBatteryConfigSupported(const std::string & featureName,bool & isResult,int32_t & batteryErr)104 int32_t MockBatterySrvProxy::IsBatteryConfigSupported(const std::string& featureName, bool& isResult,
105     int32_t& batteryErr)
106 {
107     return ERR_FAIL;
108 }
109 } // namespace PowerMgr
110 } // namespace OHOS
111