From 1d7bdf1bd0a000fe611ad138569b099a9bf96039 Mon Sep 17 00:00:00 2001 From: SongChunPeng Date: Tue, 24 Jun 2025 16:33:44 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=9B=B8=E6=9C=BA=E5=86=85=E5=AD=98?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: SongChunPeng --- api/@ohos.multimedia.camera.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/api/@ohos.multimedia.camera.d.ts b/api/@ohos.multimedia.camera.d.ts index c4eac85b28..6f3666d41c 100644 --- a/api/@ohos.multimedia.camera.d.ts +++ b/api/@ohos.multimedia.camera.d.ts @@ -1709,6 +1709,20 @@ declare namespace camera { * @since 19 */ off(type: 'torchStatusChange', callback?: AsyncCallback): void; + + /** + * Get camera storage size. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + getCameraStorageSize(): Promise; } /** -- Gitee From a3e68f5eeb463c1974f93d6a3692de25bd59b116 Mon Sep 17 00:00:00 2001 From: SongChunPeng Date: Fri, 27 Jun 2025 09:22:51 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=9B=B8=E6=9C=BA=E5=86=85=E5=AD=98?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: SongChunPeng --- api/@ohos.multimedia.camera.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.multimedia.camera.d.ts b/api/@ohos.multimedia.camera.d.ts index 6f3666d41c..d9ef2f050c 100644 --- a/api/@ohos.multimedia.camera.d.ts +++ b/api/@ohos.multimedia.camera.d.ts @@ -1713,7 +1713,7 @@ declare namespace camera { /** * Get camera storage size. * - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400102 - Operation not allowed. * @throws { BusinessError } 7400201 - Camera service fatal error. -- Gitee From 40cc2245cd75dba2a931941a0a4189a71432664a Mon Sep 17 00:00:00 2001 From: SongChunPeng Date: Mon, 18 Aug 2025 16:35:56 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=9B=B8=E6=9C=BA=E6=A1=86=E6=9E=B6?= =?UTF-8?q?=E5=88=87=E6=B5=81=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: SongChunPeng --- api/@ohos.multimedia.camera.d.ts | 62 ++++++++++++++++++++++++-------- 1 file changed, 48 insertions(+), 14 deletions(-) diff --git a/api/@ohos.multimedia.camera.d.ts b/api/@ohos.multimedia.camera.d.ts index d9ef2f050c..057e937004 100644 --- a/api/@ohos.multimedia.camera.d.ts +++ b/api/@ohos.multimedia.camera.d.ts @@ -1709,20 +1709,6 @@ declare namespace camera { * @since 19 */ off(type: 'torchStatusChange', callback?: AsyncCallback): void; - - /** - * Get camera storage size. - * - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400102 - Operation not allowed. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 20 - * @arkts 1.1&1.2 - */ - getCameraStorageSize(): Promise; } /** @@ -7766,6 +7752,30 @@ declare namespace camera { */ off(type: 'lcdFlashStatus', callback?: AsyncCallback): void; + /** + * Registers a callback for the camera switch request event. + * + * @param { 'cameraSwitchRequest' } type - Event type. + * @param { AsyncCallback } callback - Callback used to handle the camera switch request. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 21 + */ + on(type: 'cameraSwitchRequest', callback: AsyncCallback): void; + + /** + * Unregisters a callback for the camera switch request event. + * + * @param { 'cameraSwitchRequest' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to handle the camera switch request. If not provided, all callbacks for this event will be removed. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 21 + */ + off(type: 'cameraSwitchRequest', callback?: AsyncCallback): void; + /** * Gets session functions. * @@ -8219,6 +8229,30 @@ declare namespace camera { */ off(type: 'effectSuggestionChange', callback?: AsyncCallback): void; + /** + * Registers a callback for the camera switch request event. + * + * @param { 'cameraSwitchRequest' } type - Event type. + * @param { AsyncCallback } callback - Callback used to handle the camera switch request. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 21 + */ + on(type: 'cameraSwitchRequest', callback: AsyncCallback): void; + + /** + * Unregisters a callback for the camera switch request event. + * + * @param { 'cameraSwitchRequest' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to handle the camera switch request. If not provided, all callbacks for this event will be removed. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 21 + */ + off(type: 'cameraSwitchRequest', callback?: AsyncCallback): void; + /** * Gets session functions. * -- Gitee