diff --git a/vibrator/v2_0/IVibratorInterface.idl b/vibrator/v2_0/IVibratorInterface.idl index 0e97f748db9c6fe8eb484aed3aae8525669455d8..828c9551f77d73639fc7f8a606cbe790567a8a58 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 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 diff --git a/vibrator/v2_0/VibratorTypes.idl b/vibrator/v2_0/VibratorTypes.idl index 6a4aa3b4ff2b5885ad58bd088bd449d8aef410bc..4c820a7bb2d336ecdfd25057cf59b8029f021884 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. *