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_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 enum { 31 REG_THERMAL_TEMP_CALLBACK = 0, 32 UNREG_THERMAL_TEMP_CALLBACK, 33 REG_THERMAL_LEVEL_CALLBACK, 34 UNREG_THERMAL_LEVEL_CALLBACK, 35 REG_THERMAL_ACTION_CALLBACK, 36 UNREG_THERMAL_ACTION_CALLBACK, 37 GET_SENSOR_INFO, 38 GET_TEMP_LEVEL, 39 GET_THERMAL_INFO, 40 SET_SCENE, 41 SHELL_DUMP 42 }; 43 44 virtual bool SubscribeThermalTempCallback( 45 const std::vector<std::string>& typeList, const sptr<IThermalTempCallback>& callback) = 0; 46 virtual bool UnSubscribeThermalTempCallback(const sptr<IThermalTempCallback>& callback) = 0; 47 virtual bool SubscribeThermalLevelCallback(const sptr<IThermalLevelCallback>& callback) = 0; 48 virtual bool UnSubscribeThermalLevelCallback(const sptr<IThermalLevelCallback>& callback) = 0; 49 virtual bool SubscribeThermalActionCallback(const std::vector<std::string>& actionList, const std::string& desc, 50 const sptr<IThermalActionCallback>& callback) = 0; 51 virtual bool UnSubscribeThermalActionCallback(const sptr<IThermalActionCallback>& callback) = 0; 52 virtual bool GetThermalSrvSensorInfo(const SensorType& type, ThermalSrvSensorInfo& sensorInfo) = 0; 53 virtual bool GetThermalLevel(ThermalLevel& level) = 0; 54 virtual bool GetThermalInfo() = 0; 55 virtual bool SetScene(const std::string& scene) = 0; 56 virtual std::string ShellDump(const std::vector<std::string>& args, uint32_t argc) = 0; 57 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.powermgr.IThermalSrv"); 58 }; 59 } // namespace PowerMgr 60 } // namespace OHOS 61 #endif // POWERMGR_INNERKITS_ITHERMAL_SRV_H 62