diff --git a/interfaces/kits/c/oh_sensor.h b/interfaces/kits/c/oh_sensor.h index 2f63c21978914e8ef3573f08dbce38e188863da6..ec17d224cc3a1c64bd67d7c95b0bca5c00741d05 100644 --- a/interfaces/kits/c/oh_sensor.h +++ b/interfaces/kits/c/oh_sensor.h @@ -45,8 +45,12 @@ extern "C" { * @param infos - Double pointer to the information about all sensors on the device. * For details, see {@link Sensor_Info}. * @param count - Pointer to the number of sensors on the device. - * @return Returns SENSOR_SUCCESS if the operation is successful; - * returns an error code defined in {@link Sensor_Result} otherwise. + * @return Returns SENSOR_SUCCESS if the operation is successful; returns the following error code otherwise. + * {@link SENSOR_SUCCESS} The operation is successful.\n + * {@link SENSOR_PERMISSION_DENIED} Permission verification failed.\n + * {@link SENSOR_PARAMETER_ERROR} Parameter check failed. For example, a mandatory parameter is not passed in, + * or the parameter type passed in is incorrect.\n + * {@link SENSOR_SERVICE_EXCEPTION} The sensor service is abnormal.\n * * @since 11 */ @@ -65,8 +69,12 @@ Sensor_Result OH_Sensor_GetInfos(Sensor_Info **infos, uint32_t *count); * For details, see {@link Sensor_SubscriptionAttribute}. * @param subscriber - Pointer to the subscriber information, which is used to specify the callback function for * reporting the sensor data. For details, see {@link Sensor_Subscriber}. - * @return Returns SENSOR_SUCCESS if the operation is successful; - * returns an error code defined in {@link Sensor_Result} otherwise. + * @return Returns SENSOR_SUCCESS if the operation is successful; returns the following error code otherwise. + * {@link SENSOR_SUCCESS} The operation is successful.\n + * {@link SENSOR_PERMISSION_DENIED} Permission verification failed.\n + * {@link SENSOR_PARAMETER_ERROR} Parameter check failed. For example, a mandatory parameter is not passed in, + * or the parameter type passed in is incorrect.\n + * {@link SENSOR_SERVICE_EXCEPTION} The sensor service is abnormal.\n * @permission ohos.permission.ACCELEROMETER or ohos.permission.GYROSCOPE or * ohos.permission.ACTIVITY_MOTION or ohos.permission.READ_HEALTH_DATA * @since 11 @@ -85,8 +93,12 @@ Sensor_Result OH_Sensor_Subscribe(const Sensor_SubscriptionId *id, * @param id - Pointer to the sensor subscription ID. For details, see {@link Sensor_SubscriptionId}. * @param subscriber - Pointer to the subscriber information, which is used to specify the callback function for * reporting the sensor data. For details, see {@link Sensor_Subscriber}. - * @return Returns SENSOR_SUCCESS if the operation is successful; - * returns an error code defined in {@link Sensor_Result} otherwise. + * @return Returns SENSOR_SUCCESS if the operation is successful; returns the following error code otherwise. + * {@link SENSOR_SUCCESS} The operation is successful.\n + * {@link SENSOR_PERMISSION_DENIED} Permission verification failed.\n + * {@link SENSOR_PARAMETER_ERROR} Parameter check failed. For example, a mandatory parameter is not passed in, + * or the parameter type passed in is incorrect.\n + * {@link SENSOR_SERVICE_EXCEPTION} The sensor service is abnormal.\n * @permission ohos.permission.ACCELEROMETER or ohos.permission.GYROSCOPE or * ohos.permission.ACTIVITY_MOTION or ohos.permission.READ_HEALTH_DATA * diff --git a/interfaces/kits/c/oh_sensor_type.h b/interfaces/kits/c/oh_sensor_type.h index f4d51c5b1e773acb4a4b6f376b35294000c719a3..a7e241b3ffe5332278c94ce423ddf6fe008d5190 100644 --- a/interfaces/kits/c/oh_sensor_type.h +++ b/interfaces/kits/c/oh_sensor_type.h @@ -120,23 +120,23 @@ typedef enum Sensor_Type { */ typedef enum Sensor_Result { /** - * The operation is successful. + * @error The operation is successful. * @since 11 */ SENSOR_SUCCESS = 0, /** - * Permission verification failed. + * @error Permission verification failed. * @since 11 */ SENSOR_PERMISSION_DENIED = 201, /** - * Parameter check failed. For example, a mandatory parameter is not passed in, + * @error Parameter check failed. For example, a mandatory parameter is not passed in, * or the parameter type passed in is incorrect. * @since 11 */ SENSOR_PARAMETER_ERROR = 401, /** - * The sensor service is abnormal. + * @error The sensor service is abnormal. * @since 11 */ SENSOR_SERVICE_EXCEPTION = 14500101,