• 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 #ifndef POWERMGR_DISPLAY_MANAGER_DISPLAY_PARAM_HELPER_H
17 #define POWERMGR_DISPLAY_MANAGER_DISPLAY_PARAM_HELPER_H
18 
19 #include <cstdint>
20 #include <functional>
21 #include <iosfwd>
22 #include <singleton.h>
23 #include <string>
24 
25 namespace OHOS {
26 namespace DisplayPowerMgr {
27 class DisplayParamHelper {
28 public:
29     static uint32_t GetDefaultBrightness();
30     static uint32_t GetMaxBrightness();
31     static uint32_t GetMinBrightness();
32     typedef void (* BootCompletedCallback)();
33     static void RegisterBootCompletedCallback(BootCompletedCallback&);
34 
35 private:
36     static constexpr const char* KEY_DEFAULT_BRIGHTNESS {"const.display.brightness.default"};
37     static constexpr const char* KEY_MAX_BRIGHTNESS {"const.display.brightness.max"};
38     static constexpr const char* KEY_MIN_BRIGHTNESS {"const.display.brightness.min"};
39     static constexpr uint32_t BRIGHTNESS_MIN = 1;
40     static constexpr uint32_t BRIGHTNESS_DEFAULT = 102;
41     static constexpr uint32_t BRIGHTNESS_MAX = 255;
42 };
43 } // namespace DisplayPowerMgr
44 } // namespace OHOS
45 
46 #endif // POWERMGR_DISPLAY_MANAGER_DISPLAY_PARAM_HELPER_H
47