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,bool continuous)58 bool DisplayPowerMgrClient::SetBrightness(uint32_t value, uint32_t displayId, bool continuous)
59 {
60 (void)value;
61 (void)displayId;
62 (void)continuous;
63 return true;
64 }
65
DiscountBrightness(double discount,uint32_t displayId)66 bool DisplayPowerMgrClient::DiscountBrightness(double discount, uint32_t displayId)
67 {
68 (void)discount;
69 (void)displayId;
70 return true;
71 }
72
OverrideBrightness(uint32_t value,uint32_t displayId,uint32_t duration)73 bool DisplayPowerMgrClient::OverrideBrightness(uint32_t value, uint32_t displayId, uint32_t duration)
74 {
75 (void)value;
76 (void)displayId;
77 (void)duration;
78 return true;
79 }
80
RestoreBrightness(uint32_t displayId,uint32_t duration)81 bool DisplayPowerMgrClient::RestoreBrightness(uint32_t displayId, uint32_t duration)
82 {
83 (void)displayId;
84 (void)duration;
85 return true;
86 }
87
GetBrightness(uint32_t displayId)88 uint32_t DisplayPowerMgrClient::GetBrightness(uint32_t displayId)
89 {
90 (void)displayId;
91 return BRIGHTNESS_OFF;
92 }
93
GetDefaultBrightness()94 uint32_t DisplayPowerMgrClient::GetDefaultBrightness()
95 {
96 return BRIGHTNESS_DEFAULT;
97 }
98
GetMaxBrightness()99 uint32_t DisplayPowerMgrClient::GetMaxBrightness()
100 {
101 return BRIGHTNESS_MAX;
102 }
103
GetMinBrightness()104 uint32_t DisplayPowerMgrClient::GetMinBrightness()
105 {
106 return BRIGHTNESS_MIN;
107 }
108
AdjustBrightness(uint32_t value,uint32_t duration,uint32_t id)109 bool DisplayPowerMgrClient::AdjustBrightness(uint32_t value, uint32_t duration, uint32_t id)
110 {
111 (void)value;
112 (void)duration;
113 (void)id;
114 return true;
115 }
116
AutoAdjustBrightness(bool enable)117 bool DisplayPowerMgrClient::AutoAdjustBrightness(bool enable)
118 {
119 (void)enable;
120 return true;
121 }
122
IsAutoAdjustBrightness()123 bool DisplayPowerMgrClient::IsAutoAdjustBrightness()
124 {
125 return true;
126 }
127
RegisterCallback(sptr<IDisplayPowerCallback> callback)128 bool DisplayPowerMgrClient::RegisterCallback(sptr<IDisplayPowerCallback> callback)
129 {
130 (void)callback;
131 return true;
132 }
133
BoostBrightness(int32_t timeoutMs,uint32_t displayId)134 bool DisplayPowerMgrClient::BoostBrightness(int32_t timeoutMs, uint32_t displayId)
135 {
136 (void)timeoutMs;
137 (void)displayId;
138 return true;
139 }
140
CancelBoostBrightness(uint32_t displayId)141 bool DisplayPowerMgrClient::CancelBoostBrightness(uint32_t displayId)
142 {
143 (void)displayId;
144 return true;
145 }
146
GetDeviceBrightness(uint32_t displayId)147 uint32_t DisplayPowerMgrClient::GetDeviceBrightness(uint32_t displayId)
148 {
149 (void)displayId;
150 return 0;
151 }
152
GetError()153 DisplayErrors DisplayPowerMgrClient::GetError()
154 {
155 return DisplayErrors::ERR_OK;
156 }
157 } // namespace DisplayPowerMgr
158 } // namespace OHOS
159