diff --git a/api/@ohos.bundle.bundleManager.d.ts b/api/@ohos.bundle.bundleManager.d.ts index 51d2a6b6bae4915eb985ceb02d0910b12fa8a19c..5147531c4390bbe92ff8487c82b4d04c105c1342 100644 --- a/api/@ohos.bundle.bundleManager.d.ts +++ b/api/@ohos.bundle.bundleManager.d.ts @@ -987,6 +987,15 @@ declare namespace bundleManager { */ WEB_NATIVE_MESSAGING = 32, + /** + * Indicates extension info with type of the faultLog + * + * @syscap SystemCapability.BundleManager.BundleFramework.Core + * @since 21 dynamic + * @since 22 static + */ + FAULT_LOG = 33, + /** * Indicates extension info with type of unspecified * diff --git a/api/@ohos.hiviewdfx.FaultLogExtensionAbility.d.ts b/api/@ohos.hiviewdfx.FaultLogExtensionAbility.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bc667d65c98073d60dc027d141f9b7df185ba427 --- /dev/null +++ b/api/@ohos.hiviewdfx.FaultLogExtensionAbility.d.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit PerformanceAnalysisKit + */ + +import type FaultLogExtensionContext from './@ohos.hiviewdfx.FaultLogExtensionContext'; + +/** + * Class of the FaultLog extension ability. + * + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger + * @stagemodelonly + * @since 21 dynamic + */ +declare class FaultLogExtensionAbility { + /** + * Indicates FaultLog extension ability context. + * + * @type { FaultLogExtensionContext } + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger + * @stagemodelonly + * @since 21 dynamic + */ + context: FaultLogExtensionContext; + + /** + * Called back when a FaultLog extension is ready to report fault. + * + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger + * @stagemodelonly + * @since 21 dynamic + */ + onFaultReportReady(): void; + + /** + * Called back when a FaultLog extension is connected. + * + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger + * @stagemodelonly + * @since 21 dynamic + */ + onConnect(): void; + + /** + * Called back when a FaultLog extension is disconnected. + * + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger + * @stagemodelonly + * @since 21 dynamic + */ + onDisconnect(): void; +} + +/** + * Class of the FaultLog extension ability. + * + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger + * @stagemodelonly + * @since 21 dynamic + */ +export default FaultLogExtensionAbility; diff --git a/api/@ohos.hiviewdfx.FaultLogExtensionContext.d.ts b/api/@ohos.hiviewdfx.FaultLogExtensionContext.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5d8e774f1764640c9ae544f8440de6f2e1ff4eaf --- /dev/null +++ b/api/@ohos.hiviewdfx.FaultLogExtensionContext.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit PerformanceAnalysisKit + */ + +import ExtensionContext from './application/ExtensionContext'; +/** + * The context of FaultLog extension. + * + * @extends ExtensionContext + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger + * @stagemodelonly + * @since 21 dynamic + */ +export default class FaultLogExtensionContext extends ExtensionContext { +} diff --git a/kits/@kit.PerformanceAnalysisKit.d.ts b/kits/@kit.PerformanceAnalysisKit.d.ts index f4c18bf7ddf5bdda6d54715f64b75069adf5d552..101df3b88ef552c27aea45f2ba752a3b875ee067 100644 --- a/kits/@kit.PerformanceAnalysisKit.d.ts +++ b/kits/@kit.PerformanceAnalysisKit.d.ts @@ -27,10 +27,12 @@ import hiSysEvent from '@ohos.hiSysEvent'; import hiTraceChain from '@ohos.hiTraceChain'; import hiTraceMeter from '@ohos.hiTraceMeter'; import logLibrary from '@ohos.logLibrary'; +import FaultLogExtensionAbility from '@ohos.hiviewdfx.FaultLogExtensionAbility'; +import FaultLogExtensionContext from '@ohos.hiviewdfx.FaultLogExtensionContext'; export { hiAppEvent, hiSysEvent, hiTraceChain, hiTraceMeter, hichecker, hidebug, hilog, - logLibrary + logLibrary, FaultLogExtensionAbility, FaultLogExtensionContext }; /*** endif */