update deprecate api

Signed-off-by: panqiangbiao <panqiangbiao@huawei.com>
This commit is contained in:
潘强标 2022-04-15 01:56:53 +00:00 committed by Gitee
parent 1f45aa4468
commit 29df3350a6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -80,24 +80,28 @@ declare namespace mediaLibrary {
* @since 6 * @since 6
* @syscap SystemCapability.Multimedia.MediaLibrary.Core * @syscap SystemCapability.Multimedia.MediaLibrary.Core
* @import import mediaLibrary from '@ohos.multimedia.mediaLibrary' * @import import mediaLibrary from '@ohos.multimedia.mediaLibrary'
* @deprecated since 9
*/ */
interface MediaAssetOption { interface MediaAssetOption {
/** /**
* URI of the media source. * URI of the media source.
* @since 6 * @since 6
* @syscap SystemCapability.Multimedia.MediaLibrary.Core * @syscap SystemCapability.Multimedia.MediaLibrary.Core
* @deprecated since 9
*/ */
src: string; src: string;
/** /**
* Multipurpose Internet Mail Extensions (MIME) type of the media. * Multipurpose Internet Mail Extensions (MIME) type of the media.
* @since 6 * @since 6
* @syscap SystemCapability.Multimedia.MediaLibrary.Core * @syscap SystemCapability.Multimedia.MediaLibrary.Core
* @deprecated since 9
*/ */
mimeType: string; mimeType: string;
/** /**
* Relative path for storing media resources. * Relative path for storing media resources.
* @since 6 * @since 6
* @syscap SystemCapability.Multimedia.MediaLibrary.Core * @syscap SystemCapability.Multimedia.MediaLibrary.Core
* @deprecated since 9
*/ */
relativePath?: string; relativePath?: string;
} }
@ -107,18 +111,21 @@ declare namespace mediaLibrary {
* @since 6 * @since 6
* @syscap SystemCapability.Multimedia.MediaLibrary.Core * @syscap SystemCapability.Multimedia.MediaLibrary.Core
* @import import mediaLibrary from '@ohos.multimedia.mediaLibrary' * @import import mediaLibrary from '@ohos.multimedia.mediaLibrary'
* @deprecated since 9
*/ */
interface MediaSelectOption { interface MediaSelectOption {
/** /**
* Media type, which can be image, video, or media (indicating both image and video). * Media type, which can be image, video, or media (indicating both image and video).
* @since 6 * @since 6
* @syscap SystemCapability.Multimedia.MediaLibrary.Core * @syscap SystemCapability.Multimedia.MediaLibrary.Core
* @deprecated since 9
*/ */
type: 'image' | 'video' | 'media'; type: 'image' | 'video' | 'media';
/** /**
* Maximum number of media items that can be selected * Maximum number of media items that can be selected
* @since 6 * @since 6
* @syscap SystemCapability.Multimedia.MediaLibrary.Core * @syscap SystemCapability.Multimedia.MediaLibrary.Core
* @deprecated since 9
*/ */
count: number; count: number;
} }
@ -959,6 +966,7 @@ declare namespace mediaLibrary {
* @syscap SystemCapability.Multimedia.MediaLibrary.Core * @syscap SystemCapability.Multimedia.MediaLibrary.Core
* @param option Media resource option. * @param option Media resource option.
* @param callback Callback used to return the URI that stores the media resources. * @param callback Callback used to return the URI that stores the media resources.
* @deprecated since 9
*/ */
storeMediaAsset(option: MediaAssetOption, callback: AsyncCallback<string>): void; storeMediaAsset(option: MediaAssetOption, callback: AsyncCallback<string>): void;
/** /**
@ -967,6 +975,7 @@ declare namespace mediaLibrary {
* @syscap SystemCapability.Multimedia.MediaLibrary.Core * @syscap SystemCapability.Multimedia.MediaLibrary.Core
* @param option Media resource option. * @param option Media resource option.
* @return Promise used to return the URI that stores the media resources. * @return Promise used to return the URI that stores the media resources.
* @deprecated since 9
*/ */
storeMediaAsset(option: MediaAssetOption): Promise<string>; storeMediaAsset(option: MediaAssetOption): Promise<string>;
/** /**
@ -977,6 +986,7 @@ declare namespace mediaLibrary {
* @param images List of images to preview. * @param images List of images to preview.
* @param index Sequence number of the first image to preview. * @param index Sequence number of the first image to preview.
* @param callback Callback used for image preview. No value is returned. * @param callback Callback used for image preview. No value is returned.
* @deprecated since 9
*/ */
startImagePreview(images: Array<string>, index: number, callback: AsyncCallback<void>): void; startImagePreview(images: Array<string>, index: number, callback: AsyncCallback<void>): void;
/** /**
@ -985,6 +995,7 @@ declare namespace mediaLibrary {
* @syscap SystemCapability.Multimedia.MediaLibrary.Core * @syscap SystemCapability.Multimedia.MediaLibrary.Core
* @param images List of images to preview. * @param images List of images to preview.
* @param callback Callback used for image preview. No value is returned. * @param callback Callback used for image preview. No value is returned.
* @deprecated since 9
*/ */
startImagePreview(images: Array<string>, callback: AsyncCallback<void>): void; startImagePreview(images: Array<string>, callback: AsyncCallback<void>): void;
/** /**
@ -995,6 +1006,7 @@ declare namespace mediaLibrary {
* @param images List of images to preview. * @param images List of images to preview.
* @param index Sequence number of the first image to preview. * @param index Sequence number of the first image to preview.
* @return Promise used to return whether the operation is successful. * @return Promise used to return whether the operation is successful.
* @deprecated since 9
*/ */
startImagePreview(images: Array<string>, index?: number): Promise<void>; startImagePreview(images: Array<string>, index?: number): Promise<void>;
/** /**
@ -1004,6 +1016,7 @@ declare namespace mediaLibrary {
* @syscap SystemCapability.Multimedia.MediaLibrary.Core * @syscap SystemCapability.Multimedia.MediaLibrary.Core
* @param option Media selection option. * @param option Media selection option.
* @param callback Callback used to return the list of URIs that store the selected media resources. * @param callback Callback used to return the list of URIs that store the selected media resources.
* @deprecated since 9
*/ */
startMediaSelect(option: MediaSelectOption, callback: AsyncCallback<Array<string>>): void; startMediaSelect(option: MediaSelectOption, callback: AsyncCallback<Array<string>>): void;
/** /**
@ -1013,6 +1026,7 @@ declare namespace mediaLibrary {
* @syscap SystemCapability.Multimedia.MediaLibrary.Core * @syscap SystemCapability.Multimedia.MediaLibrary.Core
* @param option Media selection option. * @param option Media selection option.
* @return Promise used to return the list of URIs that store the selected media resources. * @return Promise used to return the list of URIs that store the selected media resources.
* @deprecated since 9
*/ */
startMediaSelect(option: MediaSelectOption): Promise<Array<string>>; startMediaSelect(option: MediaSelectOption): Promise<Array<string>>;
/** /**