diff --git a/vibrator/v2_0/IVibratorInterface.idl b/vibrator/v2_0/IVibratorInterface.idl index 0e97f748db9c6fe8eb484aed3aae8525669455d8..76f4318f90f043c8d1e241fae1c1c6a03a18732c 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 int sessionId, [in] struct HapticPaket hapticPaket); + + /** + * @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 2.2 + * @version 2.0 + */ + StopVibrateBySessionId([in] DeviceVibratorInfo deviceVibratorInfo, [in] unsigned int sessionId); } \ No newline at end of file diff --git a/vibrator/v2_0/VibratorTypes.idl b/vibrator/v2_0/VibratorTypes.idl index 6a4aa3b4ff2b5885ad58bd088bd449d8aef410bc..b58e920ee81c34f00fabadd5769ae72367238f07 100644 --- a/vibrator/v2_0/VibratorTypes.idl +++ b/vibrator/v2_0/VibratorTypes.idl @@ -284,4 +284,19 @@ struct HdfVibratorPlugInfo { int vibratorCnt; /**< The vibration plug state. */ int status; +}; +/** + * @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; }; \ No newline at end of file