/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @addtogroup thermal
* @{
*
* @brief Provides APIs for managing, controlling, and subscribing to the device temperature.
*
* After obtaining an object or proxy of this module, the thermal service can invoke related APIs to manage, control,
* and subscribe to the device temperature.
*
* @since 3.1
* @version 1.0
*/
/**
* @file IThermalInterface.idl
*
* @brief Provides APIs for managing, controlling, and subscribing to the device temperature.
*
*
*
* @since 3.1
* @version 1.0
*/
package ohos.hdi.thermal.v1_0;
import ohos.hdi.thermal.v1_0.ThermalTypes;
import ohos.hdi.thermal.v1_0.IThermalCallback;
/**
* @brief Represents APIs for managing, controlling, and subscribing to the device temperature.
*
*
*
* @since 3.1
*/
interface IThermalInterface {
/**
* @brief Sets the CPU frequency.
*
* @param freq CPU frequency to set.
*
* @return Returns HDF_SUCCESS if the operation is successful.
*
* @since 3.1
*/
SetCpuFreq([in] int freq);
/**
* @brief Sets the GPU frequency.
*
* @param freq GPU frequency to set.
*
* @return Returns HDF_SUCCESS if the operation is successful.
*
* @since 3.1
*/
SetGpuFreq([in] int freq);
/**
* @brief Sets the charging current.
*
* @param current Charging current, in mA.
*
* @return Returns HDF_SUCCESS if the operation is successful.
*
* @since 3.1
*/
SetBatteryCurrent([in] int current);
/**
* @brief Obtains the thermal information of the device.
*
* @param event Thermal information of the device, including the device type and temperature.
*
* @return Returns HDF_SUCCESS if the operation is successful.
* @see HdfThermalCallbackInfo
*
* @since 3.1
*/
GetThermalZoneInfo([out] struct HdfThermalCallbackInfo event);
/**
* @brief Registers the callback of the device thermal status.
*
* @param callbackObj Callback to register.
*
* @return Returns HDF_SUCCESS if the operation is successful.
* @see IThermalCallback
*
* @since 3.1
*/
Register([in] IThermalCallback callbackObj);
/**
* @brief Registers the callback of the device thermal status.
*
* @return Returns HDF_SUCCESS if the operation is successful.
*
* @since 3.1
*/
Unregister();
}
/** @} */