137a09cd7Sopenharmony_ci/* 237a09cd7Sopenharmony_ci * Copyright (c) 2021 Huawei Device Co., Ltd. 337a09cd7Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 437a09cd7Sopenharmony_ci * you may not use this file except in compliance with the License. 537a09cd7Sopenharmony_ci * You may obtain a copy of the License at 637a09cd7Sopenharmony_ci * 737a09cd7Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 837a09cd7Sopenharmony_ci * 937a09cd7Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1037a09cd7Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1137a09cd7Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1237a09cd7Sopenharmony_ci * See the License for the specific language governing permissions and 1337a09cd7Sopenharmony_ci * limitations under the License. 1437a09cd7Sopenharmony_ci */ 1537a09cd7Sopenharmony_ci 1637a09cd7Sopenharmony_ci#ifndef THERMAL_SRV_PROXY_H 1737a09cd7Sopenharmony_ci#define THERMAL_SRV_PROXY_H 1837a09cd7Sopenharmony_ci 1937a09cd7Sopenharmony_ci#include "iremote_broker.h" 2037a09cd7Sopenharmony_ci#include "iremote_object.h" 2137a09cd7Sopenharmony_ci#include "iremote_proxy.h" 2237a09cd7Sopenharmony_ci#include "ithermal_action_callback.h" 2337a09cd7Sopenharmony_ci#include "ithermal_level_callback.h" 2437a09cd7Sopenharmony_ci#include "ithermal_srv.h" 2537a09cd7Sopenharmony_ci#include "nocopyable.h" 2637a09cd7Sopenharmony_ci#include "refbase.h" 2737a09cd7Sopenharmony_ci#include "thermal_level_info.h" 2837a09cd7Sopenharmony_ci#include "thermal_srv_sensor_info.h" 2937a09cd7Sopenharmony_ci#include <cstdint> 3037a09cd7Sopenharmony_ci#include <functional> 3137a09cd7Sopenharmony_ci#include <iosfwd> 3237a09cd7Sopenharmony_ci#include <vector> 3337a09cd7Sopenharmony_ci 3437a09cd7Sopenharmony_cinamespace OHOS { 3537a09cd7Sopenharmony_cinamespace PowerMgr { 3637a09cd7Sopenharmony_ciclass ThermalSrvProxy : public IRemoteProxy<IThermalSrv> { 3737a09cd7Sopenharmony_cipublic: 3837a09cd7Sopenharmony_ci explicit ThermalSrvProxy(const sptr<IRemoteObject>& impl) : IRemoteProxy<IThermalSrv>(impl) {} 3937a09cd7Sopenharmony_ci ~ThermalSrvProxy() = default; 4037a09cd7Sopenharmony_ci DISALLOW_COPY_AND_MOVE(ThermalSrvProxy); 4137a09cd7Sopenharmony_ci 4237a09cd7Sopenharmony_ci virtual bool SubscribeThermalTempCallback( 4337a09cd7Sopenharmony_ci const std::vector<std::string>& typeList, const sptr<IThermalTempCallback>& callback) override; 4437a09cd7Sopenharmony_ci virtual bool UnSubscribeThermalTempCallback(const sptr<IThermalTempCallback>& callback) override; 4537a09cd7Sopenharmony_ci virtual bool SubscribeThermalLevelCallback(const sptr<IThermalLevelCallback>& callback) override; 4637a09cd7Sopenharmony_ci virtual bool UnSubscribeThermalLevelCallback(const sptr<IThermalLevelCallback>& callback) override; 4737a09cd7Sopenharmony_ci virtual bool SubscribeThermalActionCallback(const std::vector<std::string>& actionList, const std::string& desc, 4837a09cd7Sopenharmony_ci const sptr<IThermalActionCallback>& callback) override; 4937a09cd7Sopenharmony_ci virtual bool UnSubscribeThermalActionCallback(const sptr<IThermalActionCallback>& callback) override; 5037a09cd7Sopenharmony_ci virtual bool GetThermalSrvSensorInfo(const SensorType& type, ThermalSrvSensorInfo& sensorInfo) override; 5137a09cd7Sopenharmony_ci virtual bool GetThermalLevel(ThermalLevel& level) override; 5237a09cd7Sopenharmony_ci virtual bool GetThermalInfo() override; 5337a09cd7Sopenharmony_ci virtual bool SetScene(const std::string& scene) override; 5437a09cd7Sopenharmony_ci virtual bool UpdateThermalState(const std::string& tag, const std::string& val, bool isImmed = false) override; 5537a09cd7Sopenharmony_ci virtual std::string ShellDump(const std::vector<std::string>& args, uint32_t argc) override; 5637a09cd7Sopenharmony_ci 5737a09cd7Sopenharmony_ciprivate: 5837a09cd7Sopenharmony_ci static inline BrokerDelegator<ThermalSrvProxy> delegator_; 5937a09cd7Sopenharmony_ci}; 6037a09cd7Sopenharmony_ci} // namespace PowerMgr 6137a09cd7Sopenharmony_ci} // namespace OHOS 6237a09cd7Sopenharmony_ci#endif // THERMAL_SRV_PROXY_H 63