From d89a1836acbdf932783f840e05181875ccc184b1 Mon Sep 17 00:00:00 2001 From: zhouyanxu Date: Wed, 30 Mar 2022 14:32:25 +0800 Subject: [PATCH 1/2] Update light interface input and lightid Signed-off-by: zhouyanxu --- light/v1_0/ILightInterface.idl | 14 +++++++------- light/v1_0/LightTypes.idl | 18 +++++++++--------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/light/v1_0/ILightInterface.idl b/light/v1_0/ILightInterface.idl index ac97619e..fb2f0eb9 100644 --- a/light/v1_0/ILightInterface.idl +++ b/light/v1_0/ILightInterface.idl @@ -20,7 +20,7 @@ * @brief Provides APIs for the light service. * * The light module provides a unified interface for the light service to access the light driver. - * After obtaining the driver object or proxy, the light service distinguishes light devices by type + * After obtaining the driver object or proxy, the light service distinguishes light devices by id * and call related APIs to obtain light information, turn on or off a light, or set the blinking mode. * @since 3.1 */ @@ -28,7 +28,7 @@ /** * @file ILightInterface.idl * - * @brief Declares common APIs of the light module. These APIs can be used to obtain the light type, + * @brief Declares common APIs of the light module. These APIs can be used to obtain the light id, * turn on or off a light, and set the light brightness and blinking mode. * @since 3.1 */ @@ -57,14 +57,14 @@ interface ILightInterface { GetLightInfo([out] struct HdfLightInfo[] info); /** - * @brief Turns on available lights in the list based on the specified light type. + * @brief Turns on available lights in the list based on the specified light id. * - * @param lightId Indicates the light type. For details, see {@link HdfLightType}. + * @param lightId Indicates the light id. For details, see {@link HdfLightId}. * * @param effect Indicates the pointer to the lighting effect. For details, see {@link HdfLightEffect}. * * @return Returns 0 if the operation is successful. - * @return Returns -1 if the light type is not supported. + * @return Returns -1 if the light id is not supported. * @return Returns -2 if the blinking setting is not supported. * @return Returns -3 if the brightness setting is not supported. * @@ -73,9 +73,9 @@ interface ILightInterface { TurnOnLight([in] int lightId, [in] struct HdfLightEffect effect); /** - * @brief Turns off available lights in the list based on the specified light type. + * @brief Turns off available lights in the list based on the specified light id. * - * @param lightId Indicates the light type. For details, see {@link HdfLightType}. + * @param lightId Indicates the light id. For details, see {@link HdfLightId}. * * @return Returns 0 if the operation is successful. * @return Returns a negative value if the operation fails. diff --git a/light/v1_0/LightTypes.idl b/light/v1_0/LightTypes.idl index bbe19da3..a8573d54 100644 --- a/light/v1_0/LightTypes.idl +++ b/light/v1_0/LightTypes.idl @@ -21,14 +21,14 @@ * * The light module provides a unified interface for the light service to access the light driver. * After obtaining the light driver object or proxy, the service can call related APIs to obtain light information, - * turn on or off a light, and set the light blinking mode based on the light type. + * turn on or off a light, and set the light blinking mode based on the light id. * @since 3.1 */ /** * @file LightTypes.idl * - * @brief Defines the light data structure, including the light type, lighting mode, + * @brief Defines the light data structure, including the light id, lighting mode, * blinking mode and duration, return values, and lighting effect. * @since 3.1 */ @@ -36,26 +36,26 @@ package ohos.hdi.light.v1_0; /** - * @brief Enumerates the light types. + * @brief Enumerates the light ids. * * @since 3.1 */ -enum HdfLighType { - HDF_LIGHT_TYPE_BATTERY = 1, - HDF_LIGHT_TYPE_NOTIFICATIONS = 2, - HDF_LIGHT_TYPE_ATTENTION = 3, +enum HdfLighId { + HDF_LIGHT_ID_BATTERY = 1, + HDF_LIGHT_ID_NOTIFICATIONS = 2, + HDF_LIGHT_ID_ATTENTION = 3, HDF_LIGHT_ID_BUTT = 4, }; /** * @brief Defines the basic light information. * - * Basic light information includes the light type and custom extended information. + * Basic light information includes the light id and custom extended information. * * @since 3.1 */ struct HdfLightInfo { - int lightId; /** Light type. For details, see {@link HdfLighType}. */ + int lightId; /** Light id. For details, see {@link HdfLighId}. */ int reserved; /** Custom extended information. */ }; -- Gitee From 72d40ca5c330fc07d249f923ed5800d625364ba1 Mon Sep 17 00:00:00 2001 From: zhouyanxu Date: Wed, 30 Mar 2022 17:52:49 +0800 Subject: [PATCH 2/2] Update light interface input and lightid Signed-off-by: zhouyanxu --- light/v1_0/LightTypes.idl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/light/v1_0/LightTypes.idl b/light/v1_0/LightTypes.idl index a8573d54..29b4db5f 100644 --- a/light/v1_0/LightTypes.idl +++ b/light/v1_0/LightTypes.idl @@ -40,7 +40,7 @@ package ohos.hdi.light.v1_0; * * @since 3.1 */ -enum HdfLighId { +enum HdfLightId { HDF_LIGHT_ID_BATTERY = 1, HDF_LIGHT_ID_NOTIFICATIONS = 2, HDF_LIGHT_ID_ATTENTION = 3, @@ -55,7 +55,7 @@ enum HdfLighId { * @since 3.1 */ struct HdfLightInfo { - int lightId; /** Light id. For details, see {@link HdfLighId}. */ + int lightId; /** Light id. For details, see {@link HdfLightId}. */ int reserved; /** Custom extended information. */ }; -- Gitee