• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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_INNERKITS_ITHERMAL_SRV_H
17 #define POWERMGR_INNERKITS_ITHERMAL_SRV_H
18 
19 #include "iremote_broker.h"
20 #include "iremote_object.h"
21 #include "ithermal_temp_callback.h"
22 #include "ithermal_level_callback.h"
23 #include "thermal_srv_sensor_info.h"
24 
25 namespace OHOS {
26 namespace PowerMgr {
27 class IThermalSrv : public IRemoteBroker {
28 public:
29     enum {
30         REG_THERMAL_TEMP_CALLBACK = 0,
31         UNREG_THERMAL_TEMP_CALLBACK,
32         REG_THERMAL_LEVEL_CALLBACK,
33         UNREG_THERMAL_LEVEL_CALLBACK,
34         GET_SENSOR_INFO,
35         GET_TEMP_LEVEL,
36         SHELL_DUMP
37     };
38 
39     virtual void SubscribeThermalTempCallback(const std::vector<std::string> &typeList,
40         const sptr<IThermalTempCallback>& callback) = 0;
41     virtual void UnSubscribeThermalTempCallback(const sptr<IThermalTempCallback>& callback) = 0;
42     virtual void SubscribeThermalLevelCallback(const sptr<IThermalLevelCallback>& callback) = 0;
43     virtual void UnSubscribeThermalLevelCallback(const sptr<IThermalLevelCallback>& callback) = 0;
44     virtual bool GetThermalSrvSensorInfo(const SensorType &type, ThermalSrvSensorInfo& sensorInfo) = 0;
45     virtual void GetThermalLevel(ThermalLevel& level) = 0;
46     virtual std::string ShellDump(const std::vector<std::string>& args, uint32_t argc) = 0;
47     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.powermgr.IThermalSrv");
48 };
49 } // namespace PowerMgr
50 } // namespace OHOS
51 #endif // POWERMGR_INNERKITS_ITHERMAL_SRV_H