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 "display_power_mgr_client.h"
17
18 namespace OHOS {
19 namespace DisplayPowerMgr {
20 DisplayPowerMgrClient::DisplayPowerMgrClient() = default;
21 DisplayPowerMgrClient::~DisplayPowerMgrClient() = default;
22
GetProxy()23 sptr<IDisplayPowerMgr> DisplayPowerMgrClient::GetProxy()
24 {
25 return nullptr;
26 }
27
OnRemoteDied(const wptr<IRemoteObject> & remote)28 void DisplayPowerMgrClient::OnRemoteDied(const wptr<IRemoteObject>& remote)
29 {
30 (void)remote;
31 }
32
SetDisplayState(DisplayState state,PowerMgr::StateChangeReason reason,uint32_t id)33 bool DisplayPowerMgrClient::SetDisplayState(DisplayState state,
34 PowerMgr::StateChangeReason reason, uint32_t id)
35 {
36 (void)state;
37 (void)reason;
38 (void)id;
39 return true;
40 }
41
GetDisplayState(uint32_t id)42 DisplayState DisplayPowerMgrClient::GetDisplayState(uint32_t id)
43 {
44 (void)id;
45 return DisplayState::DISPLAY_UNKNOWN;
46 }
47
GetDisplayIds()48 std::vector<uint32_t> DisplayPowerMgrClient::GetDisplayIds()
49 {
50 return {};
51 }
52
GetMainDisplayId()53 int32_t DisplayPowerMgrClient::GetMainDisplayId()
54 {
55 return INVALID_DISPLAY_ID;
56 }
57
SetBrightness(uint32_t value,uint32_t displayId)58 bool DisplayPowerMgrClient::SetBrightness(uint32_t value, uint32_t displayId)
59 {
60 (void)value;
61 (void)displayId;
62 return true;
63 }
64
DiscountBrightness(double discount,uint32_t displayId)65 bool DisplayPowerMgrClient::DiscountBrightness(double discount, uint32_t displayId)
66 {
67 (void)discount;
68 (void)displayId;
69 return true;
70 }
71
OverrideBrightness(uint32_t value,uint32_t displayId)72 bool DisplayPowerMgrClient::OverrideBrightness(uint32_t value, uint32_t displayId)
73 {
74 (void)value;
75 (void)displayId;
76 return true;
77 }
78
RestoreBrightness(uint32_t displayId)79 bool DisplayPowerMgrClient::RestoreBrightness(uint32_t displayId)
80 {
81 (void)displayId;
82 return true;
83 }
84
GetBrightness(uint32_t displayId)85 uint32_t DisplayPowerMgrClient::GetBrightness(uint32_t displayId)
86 {
87 (void)displayId;
88 return BRIGHTNESS_OFF;
89 }
90
GetDefaultBrightness()91 uint32_t DisplayPowerMgrClient::GetDefaultBrightness()
92 {
93 return BRIGHTNESS_DEFAULT;
94 }
95
GetMaxBrightness()96 uint32_t DisplayPowerMgrClient::GetMaxBrightness()
97 {
98 return BRIGHTNESS_MAX;
99 }
100
GetMinBrightness()101 uint32_t DisplayPowerMgrClient::GetMinBrightness()
102 {
103 return BRIGHTNESS_MIN;
104 }
105
AdjustBrightness(uint32_t value,uint32_t duration,uint32_t id)106 bool DisplayPowerMgrClient::AdjustBrightness(uint32_t value, uint32_t duration, uint32_t id)
107 {
108 (void)value;
109 (void)duration;
110 (void)id;
111 return true;
112 }
113
AutoAdjustBrightness(bool enable)114 bool DisplayPowerMgrClient::AutoAdjustBrightness(bool enable)
115 {
116 (void)enable;
117 return true;
118 }
119
IsAutoAdjustBrightness()120 bool DisplayPowerMgrClient::IsAutoAdjustBrightness()
121 {
122 return true;
123 }
124
RegisterCallback(sptr<IDisplayPowerCallback> callback)125 bool DisplayPowerMgrClient::RegisterCallback(sptr<IDisplayPowerCallback> callback)
126 {
127 (void)callback;
128 return true;
129 }
130
BoostBrightness(int32_t timeoutMs,uint32_t displayId)131 bool DisplayPowerMgrClient::BoostBrightness(int32_t timeoutMs, uint32_t displayId)
132 {
133 (void)timeoutMs;
134 (void)displayId;
135 return true;
136 }
137
CancelBoostBrightness(uint32_t displayId)138 bool DisplayPowerMgrClient::CancelBoostBrightness(uint32_t displayId)
139 {
140 (void)displayId;
141 return true;
142 }
143
GetDeviceBrightness(uint32_t displayId)144 uint32_t DisplayPowerMgrClient::GetDeviceBrightness(uint32_t displayId)
145 {
146 (void)displayId;
147 return 0;
148 }
149
GetError()150 DisplayErrors DisplayPowerMgrClient::GetError()
151 {
152 return DisplayErrors::ERR_OK;
153 }
154 } // namespace DisplayPowerMgr
155 } // namespace OHOS
156