From 0a56c562518db4f55e70fbd9dbf94d7677a06f1d Mon Sep 17 00:00:00 2001 From: SUE Date: Thu, 3 Mar 2022 02:48:08 +0000 Subject: [PATCH] Signed-off-by:hellohyh001 --- api/@system.sensor.d.ts | 215 +--------------------------------------- 1 file changed, 1 insertion(+), 214 deletions(-) diff --git a/api/@system.sensor.d.ts b/api/@system.sensor.d.ts index ec89fd862..e5d7ecca4 100644 --- a/api/@system.sensor.d.ts +++ b/api/@system.sensor.d.ts @@ -461,166 +461,7 @@ export interface SubscribeGyroscopeOptions { /** * @syscap SystemCapability.Sensors.Sensor * @import import sensor from '@system.sensor'; - * @since 7 - * @deprecated since 8 - */ -export interface GravityResponse { - /** - * X-coordinate - * @since 7 - */ - x: number; - - /** - * Y-coordinate - * @since 7 - */ - y: number; - - /** - * Z-coordinate - * @since 7 - */ - z: number; -} - -/** - * @syscap SystemCapability.Sensors.Sensor - * @import import sensor from '@system.sensor'; - * @since 7 - * @deprecated since 8 - */ -export interface SubscribeGravityOptions { - /** - * Execution frequency of the callback function for listening to gravity sensor data. - * Available values are as follows: - * 1. game: Extremely high frequency (20 ms per callback), which is applicable to gaming. - * 2. ui: High frequency (60 ms per callback), which is applicable to UI updating. - * 3. normal: Regular frequency (200 ms per callback), which is application to low power consumption. - * The default value is normal. - * @since 7 - */ - interval: string; - - /** - * Called when gravity sensor data changes. - * @since 7 - */ - success: (data: GravityResponse) => void; - - /** - * Called when the listening fails. - * @since 7 - */ - fail?: (data: string, code: number) => void; -} - -/** - * @syscap SystemCapability.Sensors.Sensor - * @import import sensor from '@system.sensor'; - * @since 7 - * @deprecated since 8 - */ -export interface MagneticResponse { - /** - * X-coordinate - * @since 7 - */ - x: number; - - /** - * Y-coordinate - * @since 7 - */ - y: number; - - /** - * Z-coordinate - * @since 7 - */ - z: number; -} - -/** - * @syscap SystemCapability.Sensors.Sensor - * @import import sensor from '@system.sensor'; - * @since 7 - * @deprecated since 8 - */ -export interface SubscribeMagneticOptions { - /** - * Execution frequency of the callback function for listening to magnetic sensor data. - * Available values are as follows: - * 1. game: Extremely high frequency (20 ms per callback), which is applicable to gaming. - * 2. ui: High frequency (60 ms per callback), which is applicable to UI updating. - * 3. normal: Regular frequency (200 ms per callback), which is application to low power consumption. - * The default value is normal. - * @since 7 - */ - interval: string; - - /** - * Called when magnetic sensor data changes. - * @since 7 - */ - success: (data: MagneticResponse) => void; - - /** - * Called when the listening fails. - * @since 7 - */ - fail?: (data: string, code: number) => void; -} - -/** - * @syscap SystemCapability.Sensors.Sensor - * @import import sensor from '@system.sensor'; - * @since 7 - * @deprecated since 8 - */ -export interface HallResponse { - /** - * Indicates the hall sensor data. - * @since 7 - */ - value: number; -} - -/** - * @syscap SystemCapability.Sensors.Sensor - * @import import sensor from '@system.sensor'; - * @since 7 - * @deprecated since 8 - */ -export interface SubscribeHallOptions { - /** - * Execution frequency of the callback function for listening to hall sensor data. - * Available values are as follows: - * 1. game: Extremely high frequency (20 ms per callback), which is applicable to gaming. - * 2. ui: High frequency (60 ms per callback), which is applicable to UI updating. - * 3. normal: Regular frequency (200 ms per callback), which is application to low power consumption. - * The default value is normal. - * @since 7 - */ - interval: string; - - /** - * Called when hall sensor data changes. - * @since 7 - */ - success: (data: HallResponse) => void; - - /** - * Called when the listening fails. - * @since 7 - */ - fail?: (data: string, code: number) => void; -} - -/** - * @syscap SystemCapability.Sensors.Sensor - * @import import sensor from '@system.sensor'; - * @since 7 + * @since 6 * @deprecated since 8 */ export default class Sensor { @@ -821,58 +662,4 @@ export default class Sensor { * @deprecated since 8 */ static unsubscribeGyroscope(): void; - - /** - * Listens to gravity sensor data changes. - * If this API is called multiple times, the last call takes effect. - * @param options Options. - * @syscap SystemCapability.Sensors.Sensor - * @since 7 - * @deprecated since 8 - */ - static subscribeGravity(options: SubscribeGravityOptions): void; - - /** - * Cancels listening to gravity sensor data. - * @syscap SystemCapability.Sensors.Sensor - * @since 7 - * @deprecated since 8 - */ - static unsubscribeGravity(): void; - - /** - * Listens to magnetic sensor data changes. - * If this API is called multiple times, the last call takes effect. - * @param options Options. - * @syscap SystemCapability.Sensors.Sensor - * @since 7 - * @deprecated since 8 - */ - static subscribeMagnetic(options: SubscribeMagneticOptions): void; - - /** - * Cancels listening to magnetic sensor data. - * @syscap SystemCapability.Sensors.Sensor - * @since 7 - * @deprecated since 8 - */ - static unsubscribeMagnetic(): void; - - /** - * Listens to hall sensor data changes. - * If this API is called multiple times, the last call takes effect. - * @param options Options. - * @syscap SystemCapability.Sensors.Sensor - * @since 7 - * @deprecated since 8 - */ - static subscribeHall(options: SubscribeHallOptions): void; - - /** - * Cancels listening to hall sensor data. - * @syscap SystemCapability.Sensors.Sensor - * @since 7 - * @deprecated since 8 - */ - static unsubscribeHall(): void; }