From 0f822e023e9765b2184cd41d8fd4e01a954d6c20 Mon Sep 17 00:00:00 2001 From: wanghongenaf Date: Fri, 6 Jun 2025 05:58:26 +0000 Subject: [PATCH 1/3] update vibrator/v2_0/IVibratorInterface.idl. Signed-off-by: wanghongenaf --- vibrator/v2_0/IVibratorInterface.idl | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/vibrator/v2_0/IVibratorInterface.idl b/vibrator/v2_0/IVibratorInterface.idl index 0e97f748..b8fd7bdb 100644 --- a/vibrator/v2_0/IVibratorInterface.idl +++ b/vibrator/v2_0/IVibratorInterface.idl @@ -287,4 +287,45 @@ interface IVibratorInterface { * @version 2.0 */ UnRegVibratorPlugCallback([in] IVibratorPlugCallback callbackObj); + + /** + * @brief HD vibration data packet delivery. + * + * @param Indecates the Hd vibration data packet. + * + * @return Returns 0 if the operation is successful. + * @return Returns negative value if the get failed. + * + * @since 4.1 + * @version 2.0 + */ + PlayPatternBySessionId([in] DeviceVibratorInfo deviceVibratorInfo, [in] unsigned sessionId, [in] struct HapticPaket pkg); + + /** + * @brief HD vibration data packet delivery. + * + * @param Indecates the Hd vibration data packet. + * + * @return Returns 0 if the operation is successful. + * @return Returns negative value if the get failed. + * + * @since 4.1 + * @version 2.0 + */ + PlayPackageBySession([in] DeviceVibratorInfo deviceVibratorInfo, [in] unsigned int sessionId, [in] struct VibratorPackage vibratorPackage); + + /** + * @brief Stops the vibration. + * + * Before the vibrator starts, it must stop vibrating in any mode. This function can be used during + * and after the vibrating process. + * + * @param mode Indicates the vibration mode, which can be one-shot or periodic. For details, + * see {@link HdfVibratorMode}. + * @return Returns 0 if the operation is successful; returns a negative value otherwise. + * + * @since 4.1 + * @version 2.0 + */ + StopVibrateSessionId([in] DeviceVibratorInfo deviceVibratorInfo, [in] unsigned int sessionId); } \ No newline at end of file -- Gitee From 7ce7526d6d120f5a6ce888c98cb3ee86b22e6b68 Mon Sep 17 00:00:00 2001 From: wanghongenaf Date: Fri, 6 Jun 2025 06:00:28 +0000 Subject: [PATCH 2/3] update vibrator/v2_0/VibratorTypes.idl. Signed-off-by: wanghongenaf --- vibrator/v2_0/VibratorTypes.idl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/vibrator/v2_0/VibratorTypes.idl b/vibrator/v2_0/VibratorTypes.idl index 6a4aa3b4..4c820a7b 100644 --- a/vibrator/v2_0/VibratorTypes.idl +++ b/vibrator/v2_0/VibratorTypes.idl @@ -226,6 +226,22 @@ struct HapticPaket { struct HapticEvent[] events; }; +/** + * @brief Defines the vibration data delivery packet. + * + * The information include the different trypes of vibrationsr; + * + * @since 4.1 + */ +struct VibratorPackage { + /** Indicates the vibration data delivery time. */ + int time; + /** Indicates the vibration number of data to be delivered. */ + int eventNum; + /** Indicates the vibration data delivery event array. */ + struct HapticEvent[] events; +}; + /** * @brief Defines the vibration capability data package. * -- Gitee From 7c35bce6ec64a82a73e244d18cf60f8af36f533c Mon Sep 17 00:00:00 2001 From: wanghongenaf Date: Fri, 6 Jun 2025 07:15:11 +0000 Subject: [PATCH 3/3] update vibrator/v2_0/IVibratorInterface.idl. Signed-off-by: wanghongenaf --- vibrator/v2_0/IVibratorInterface.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vibrator/v2_0/IVibratorInterface.idl b/vibrator/v2_0/IVibratorInterface.idl index b8fd7bdb..828c9551 100644 --- a/vibrator/v2_0/IVibratorInterface.idl +++ b/vibrator/v2_0/IVibratorInterface.idl @@ -299,7 +299,7 @@ interface IVibratorInterface { * @since 4.1 * @version 2.0 */ - PlayPatternBySessionId([in] DeviceVibratorInfo deviceVibratorInfo, [in] unsigned sessionId, [in] struct HapticPaket pkg); + PlayPatternBySessionId([in] DeviceVibratorInfo deviceVibratorInfo, [in] unsigned int sessionId, [in] struct HapticPaket pkg); /** * @brief HD vibration data packet delivery. -- Gitee