• 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_INNER_API_ITHERMAL_SRV_H
17 #define POWERMGR_INNER_API_ITHERMAL_SRV_H
18 
19 #include "iremote_broker.h"
20 #include "iremote_object.h"
21 #include "ithermal_action_callback.h"
22 #include "ithermal_level_callback.h"
23 #include "ithermal_temp_callback.h"
24 #include "thermal_srv_sensor_info.h"
25 
26 namespace OHOS {
27 namespace PowerMgr {
28 class IThermalSrv : public IRemoteBroker {
29 public:
30     virtual bool SubscribeThermalTempCallback(
31         const std::vector<std::string>& typeList, const sptr<IThermalTempCallback>& callback) = 0;
32     virtual bool UnSubscribeThermalTempCallback(const sptr<IThermalTempCallback>& callback) = 0;
33     virtual bool SubscribeThermalLevelCallback(const sptr<IThermalLevelCallback>& callback) = 0;
34     virtual bool UnSubscribeThermalLevelCallback(const sptr<IThermalLevelCallback>& callback) = 0;
35     virtual bool SubscribeThermalActionCallback(const std::vector<std::string>& actionList, const std::string& desc,
36         const sptr<IThermalActionCallback>& callback) = 0;
37     virtual bool UnSubscribeThermalActionCallback(const sptr<IThermalActionCallback>& callback) = 0;
38     virtual bool GetThermalSrvSensorInfo(const SensorType& type, ThermalSrvSensorInfo& sensorInfo) = 0;
39     virtual bool GetThermalLevel(ThermalLevel& level) = 0;
40     virtual bool GetThermalInfo() = 0;
41     virtual bool SetScene(const std::string& scene) = 0;
42     virtual std::string ShellDump(const std::vector<std::string>& args, uint32_t argc) = 0;
43     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.powermgr.IThermalSrv");
44 };
45 } // namespace PowerMgr
46 } // namespace OHOS
47 #endif // POWERMGR_INNER_API_ITHERMAL_SRV_H
48