From a8897a3d41caa0e8203a26510a270bc9423158b8 Mon Sep 17 00:00:00 2001 From: y00656910 Date: Wed, 13 Mar 2024 09:46:44 +0800 Subject: [PATCH] define string constant Signed-off-by: y00656910 Change-Id: I45304853593eba90d61ba7bb7c3ef2bc868a18f1 Signed-off-by: y00656910 --- .../include/image_source_mdk.h | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/multimedia/image_framework/include/image_source_mdk.h b/multimedia/image_framework/include/image_source_mdk.h index 437e4816a..34e371159 100644 --- a/multimedia/image_framework/include/image_source_mdk.h +++ b/multimedia/image_framework/include/image_source_mdk.h @@ -65,142 +65,156 @@ typedef struct ImageSourceNative_ ImageSourceNative; /** * @brief Defines a pointer to bits per sample, one of the image properties. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * Add static keyword since API 12, it is used to limit the scope of the constant to a single file. * * @Syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ -const char* OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE = "BitsPerSample"; +static const char* OHOS_IMAGE_PROPERTY_BITS_PER_SAMPLE = "BitsPerSample"; /** * @brief Defines a pointer to the orientation, one of the image properties. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * Add static keyword since API 12, it is used to limit the scope of the constant to a single file. * * @Syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ -const char* OHOS_IMAGE_PROPERTY_ORIENTATION = "Orientation"; +static const char* OHOS_IMAGE_PROPERTY_ORIENTATION = "Orientation"; /** * @brief Defines a pointer to the image length, one of the image properties. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * Add static keyword since API 12, it is used to limit the scope of the constant to a single file. * * @Syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ -const char* OHOS_IMAGE_PROPERTY_IMAGE_LENGTH = "ImageLength"; +static const char* OHOS_IMAGE_PROPERTY_IMAGE_LENGTH = "ImageLength"; /** * @brief Defines a pointer to the image width, one of the image properties. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * Add static keyword since API 12, it is used to limit the scope of the constant to a single file. * * @Syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ -const char* OHOS_IMAGE_PROPERTY_IMAGE_WIDTH = "ImageWidth"; +static const char* OHOS_IMAGE_PROPERTY_IMAGE_WIDTH = "ImageWidth"; /** * @brief Defines a pointer to the GPS latitude, one of the image properties. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * Add static keyword since API 12, it is used to limit the scope of the constant to a single file. * * @Syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ -const char* OHOS_IMAGE_PROPERTY_GPS_LATITUDE = "GPSLatitude"; +static const char* OHOS_IMAGE_PROPERTY_GPS_LATITUDE = "GPSLatitude"; /** * @brief Defines a pointer to the GPS longitude, one of the image properties. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * Add static keyword since API 12, it is used to limit the scope of the constant to a single file. * * @Syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ -const char* OHOS_IMAGE_PROPERTY_GPS_LONGITUDE = "GPSLongitude"; +static const char* OHOS_IMAGE_PROPERTY_GPS_LONGITUDE = "GPSLongitude"; /** * @brief Defines a pointer to the GPS latitude reference information, one of the image properties. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * Add static keyword since API 12, it is used to limit the scope of the constant to a single file. * * @Syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ -const char* OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF = "GPSLatitudeRef"; +static const char* OHOS_IMAGE_PROPERTY_GPS_LATITUDE_REF = "GPSLatitudeRef"; /** * @brief Defines a pointer to the GPS longitude reference information, one of the image properties. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * Add static keyword since API 12, it is used to limit the scope of the constant to a single file. * * @Syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ -const char* OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF = "GPSLongitudeRef"; +static const char* OHOS_IMAGE_PROPERTY_GPS_LONGITUDE_REF = "GPSLongitudeRef"; /** * @brief Defines a pointer to the created date and time, one of the image properties. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * Add static keyword since API 12, it is used to limit the scope of the constant to a single file. * * @Syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ -const char* OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL = "DateTimeOriginal"; +static const char* OHOS_IMAGE_PROPERTY_DATE_TIME_ORIGINAL = "DateTimeOriginal"; /** * @brief Defines a pointer to the exposure time, one of the image properties. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * Add static keyword since API 12, it is used to limit the scope of the constant to a single file. * * @Syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ -const char* OHOS_IMAGE_PROPERTY_EXPOSURE_TIME = "ExposureTime"; +static const char* OHOS_IMAGE_PROPERTY_EXPOSURE_TIME = "ExposureTime"; /** * @brief Defines a pointer to the scene type, one of the image properties. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * Add static keyword since API 12, it is used to limit the scope of the constant to a single file. * * @Syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ -const char* OHOS_IMAGE_PROPERTY_SCENE_TYPE = "SceneType"; +static const char* OHOS_IMAGE_PROPERTY_SCENE_TYPE = "SceneType"; /** * @brief Defines a pointer to the ISO speed ratings, one of the image properties. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * Add static keyword since API 12, it is used to limit the scope of the constant to a single file. * * @Syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ -const char* OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS = "ISOSpeedRatings"; +static const char* OHOS_IMAGE_PROPERTY_ISO_SPEED_RATINGS = "ISOSpeedRatings"; /** * @brief Defines a pointer to the f-number of the image, one of the image properties. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * Add static keyword since API 12, it is used to limit the scope of the constant to a single file. * * @Syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ -const char* OHOS_IMAGE_PROPERTY_F_NUMBER = "FNumber"; +static const char* OHOS_IMAGE_PROPERTY_F_NUMBER = "FNumber"; /** * @brief Defines a pointer to the compressed bits per pixel, one of the image properties. * It is used in {@link OH_ImageSource_GetImageProperty} and {@link OH_ImageSource_ModifyImageProperty}. + * Add static keyword since API 12, it is used to limit the scope of the constant to a single file. * * @Syscap SystemCapability.Multimedia.Image * @since 10 * @version 4.0 */ -const char* OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL = "CompressedBitsPerPixel"; +static const char* OHOS_IMAGE_PROPERTY_COMPRESSED_BITS_PER_PIXEL = "CompressedBitsPerPixel"; /** * @brief Defines the region of the image source to decode.