diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 761db11e78276b8ac0f14824c6f0b299068b49e2..dc77d61be62c8fb38c737916b2b571c5d7c45539 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -23,11 +23,8 @@ import { AbilityInfo as _AbilityInfo } from './bundle/abilityInfo'; import { ExtensionAbilityInfo as _ExtensionAbilityInfo } from './bundle/extensionAbilityInfo'; import { PermissionDef as _PermissionDef } from './bundle/PermissionDef'; import { ElementName as _ElementName } from './bundle/elementName'; -import { DispatchInfo as _DispatchInfo } from './bundle/dispatchInfo'; import Want from './@ohos.application.Want'; import image from './@ohos.multimedia.image'; -import pack from './bundle/packInfo'; -import * as _PackInfo from './bundle/packInfo'; import * as _BundleInfo from './bundle/bundleInfo'; import * as _BundleInstaller from './bundle/bundleInstaller'; @@ -847,51 +844,6 @@ declare namespace bundle { function isApplicationEnabled(bundleName: string, callback: AsyncCallback): void; function isApplicationEnabled(bundleName: string): Promise; - /** - * Set the module wether need upgrade - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @param bundleName Indicates the bundle name of the application. - * @param moduleName Indicates the module name of the application. - * @param upgradeFlag Indicates upgradeFlag of the application. - * @systemapi Hide this for inner system use - * @deprecated since 9 - * @useinstead ohos.bundle.freeInstall#setHapModuleUpgradeFlag - */ - function setModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: UpgradeFlag, callback: AsyncCallback):void; - function setModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: UpgradeFlag): Promise; - - /** - * Checks whether a specified module is removable. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @param bundleName Indicates the bundle name of the application. - * @param moduleName Indicates the module name of the application. - * @returns Returns true if the module is removable; returns false otherwise. - * @systemapi Hide this for inner system use - * @deprecated since 9 - * @useinstead ohos.bundle.freeInstall#isHapModuleRemovable - */ - function isModuleRemovable(bundleName: string, moduleName: string, callback: AsyncCallback): void; - function isModuleRemovable(bundleName: string, moduleName: string): Promise; - - /** - * Obtains bundlePackInfo based on bundleName and bundleFlags. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @param bundleName Indicates the application bundle name to be queried. - * @param bundlePackFlag Indicates the application bundle pack flag to be queried. - * @return Returns the BundlePackInfo object. - * @systemapi hide this for inner system use - * @deprecated since 9 - * @useinstead ohos.bundle.freeInstall#getBundlePackInfo - */ - function getBundlePackInfo(bundleName: string, bundlePackFlag : pack.BundlePackFlag, callback: AsyncCallback): void; - function getBundlePackInfo(bundleName: string, bundlePackFlag : pack.BundlePackFlag): Promise; - /** * Obtains information about the current ability. * @@ -908,19 +860,6 @@ declare namespace bundle { function getAbilityInfo(bundleName: string, moduleName: string, abilityName: string, callback: AsyncCallback): void; function getAbilityInfo(bundleName: string, moduleName: string, abilityName: string): Promise; - /** - * Obtains information about the dispatcher version. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @return Returns the DispatchInfo object for the current ability. - * @systemapi hide this for inner system use - * @deprecated since 9 - * @useinstead ohos.bundle.freeInstall#getDispatchInfo - */ - function getDispatcherVersion(callback: AsyncCallback): void; - function getDispatcherVersion(): Promise; - /** * Obtains the label of a specified ability. * @@ -1180,123 +1119,6 @@ declare namespace bundle { * @syscap SystemCapability.BundleManager.BundleFramework */ export type ElementName = _ElementName; - - /** - * The dispatch info class. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ - export type DispatchInfo = _DispatchInfo; - - /** - * The bundle pack info class. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ - export type BundlePackInfo = _PackInfo.BundlePackInfo; - - /** - * The package info class. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ - export type PackageConfig = _PackInfo.PackageConfig; - - /** - * The package summary class. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ - export type PackageSummary = _PackInfo.PackageSummary; - - /** - * The bundle summary class. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ - export type BundleConfigInfo = _PackInfo.BundleConfigInfo; - - /** - * The extension ability forms class. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ - export type ExtensionAbilities = _PackInfo.ExtensionAbilities; - - /** - * The module summary of a bundle. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ - export type ModuleConfigInfo = _PackInfo.ModuleConfigInfo; - - /** - * The bundle info summary class. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ - export type ModuleDistroInfo = _PackInfo.ModuleDistroInfo; - - /** - * The ability info of a module. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ - export type ModuleAbilityInfo = _PackInfo.ModuleAbilityInfo; - - /** - * The form info of an ability. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ - export type AbilityFormInfo = _PackInfo.AbilityFormInfo; - - /** - * The bundle version class. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ - export type Version = _PackInfo.Version; - - /** - * The bundle Api version class. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ - export type ApiVersion = _PackInfo.ApiVersion; - - /** - * Flags which are used to indicate bundle pack. - * - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ - export type BundlePackFlag = _PackInfo.BundlePackFlag; } export default bundle; diff --git a/api/bundle/dispatchInfo.d.ts b/api/bundle/dispatchInfo.d.ts deleted file mode 100644 index 2538eb4c831ea6986e6501eec53294e77820b8ba..0000000000000000000000000000000000000000 --- a/api/bundle/dispatchInfo.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2022 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. - */ - -/** - * @name The dispatch info class. - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ - export interface DispatchInfo { - /** - * @default Indicates the dispatchInfo version - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly version: string; - - /** - * @default Indicates the free install interface version number - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly dispatchAPI: string; -} \ No newline at end of file diff --git a/api/bundle/packInfo.d.ts b/api/bundle/packInfo.d.ts deleted file mode 100644 index 1c4a45903d8717db95af7b2fc2ca5ae93fd72b60..0000000000000000000000000000000000000000 --- a/api/bundle/packInfo.d.ts +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Copyright (c) 2022 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. - */ - -/** - * @name The bundle pack info class. - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ -export interface BundlePackInfo { - /** - * @default This contains package information in pack.info - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly packages: Array; - - /** - * @default This contains bundle summary information in pack.info - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly summary: PackageSummary; -} - -/** - * @name PackageConfig: the package info class. - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ -export interface PackageConfig { - /** - * @default Indicates the device type of this package - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly deviceType: Array; - - /** - * @default Indicates the name of this package - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly name: string; - - /** - * @default Indicates the module type of this package - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly moduleType: string; - - /** - * @default Indicates whether this package is delivery and install - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly deliveryWithInstall: boolean; -} - -/** - * @name PackageSummary: the package summary class. - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ -export interface PackageSummary { - /** - * @default Indicates the bundle config info of this package - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly app: BundleConfigInfo; - - /** - * @default Indicates the modules config info of this package - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly modules: Array; -} - -/** - * @name BundleConfigInfo: the bundle summary class. - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ -export interface BundleConfigInfo { - /** - * @default Indicates the name of this bundle - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly bundleName: string; - - /** - * @default Indicates the bundle version - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly version: Version; -} - -/** - * @name ExtensionAbilities: the extension ability forms class. - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ - export interface ExtensionAbilities { - /** - * @default Indicates the name of this extension ability - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly name: string; - - /** - * @default Indicates the ability forms info - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly forms: Array; -} - -/** - * @name ModuleConfigInfo: the module summary of a bundle. - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ -export interface ModuleConfigInfo { - /** - * @default Indicates the api version - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly apiVersion: ApiVersion; - - /** - * @default Indicates the devices type - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly deviceType: Array; - - /** - * @default Indicates the module distro info - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly distro: ModuleDistroInfo; - - /** - * @default Indicates the abilities info of this module - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly abilities: Array; - - /** - * @default Indicates extension abilities info of this module - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly extensionAbilities: Array; -} - -/** - * @name ModuleDistroInfo: the bundle info summary class. - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ -export interface ModuleDistroInfo { - /** - * @default Indicates the name of main ability - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly mainAbility: string; - - /** - * @default Indicates is delivery with install - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly deliveryWithInstall: boolean; - - /** - * @default Indicates is free install - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly installationFree: boolean; - - /** - * @default Indicates the module name - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly moduleName: string; - - /** - * @default Indicates the module type - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly moduleType: string; -} - -/** - * @name ModuleAbilityInfo: the ability info of a module. - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ -export interface ModuleAbilityInfo { - /** - * @default Indicates the name of this module ability - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly name: string; - - /** - * @default Indicates the label of this module ability - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly label: string; - - /** - * @default Indicates is visible - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly visible: boolean; - - /** - * @default Indicates the ability forms info - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly forms: Array; -} - -/** - * @name AbilityFormInfo: the form info of an ability. - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ -export interface AbilityFormInfo { - /** - * @default Indicates the name of this ability - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly name: string; - - /** - * @default Indicates the type of this ability - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly type: string; - - /** - * @default Indicates is enabled update - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly updateEnabled: boolean; - - /** - * @default Indicates the scheduled update time - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly scheduledUpdateTime: string; - - /** - * @default Indicates the update duration - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly updateDuration: number; - - /** - * @default Indicates the ability support dimensions - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly supportDimensions: Array; - - /** - * @default Indicates the ability default dimension - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly defaultDimension: number; -} - -/** - * @name Version: the bundle version class. - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ -export interface Version { - /** - * @default Indicates the min compatible code of this version - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly minCompatibleVersionCode: number; - - /** - * @default Indicates the name of this version - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly name: string; - - /** - * @default Indicates the code of this version - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly code: number; -} - -/** - * @name ApiVersion: the bundle Api version class. - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - * @systemapi hide this for inner system use - */ -export interface ApiVersion { - /** - * @default Indicates the min compatible code of this version - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly releaseType: string; - - /** - * @default Indicates the name of this version - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly compatible: number; - - /** - * @default Indicates the code of this version - * @since 9 - * @syscap SystemCapability.BundleManager.BundleFramework - */ - readonly target: number; -} - -/** -* @name BundlePackFlag -* @since 9 -* @syscap SystemCapability.BundleManager.BundleFramework -* @import NA -* @systemapi hide this for inner system use -*/ -export enum BundlePackFlag { - GET_PACK_INFO_ALL = 0x00000000, - GET_PACKAGES = 0x00000001, - GET_BUNDLE_SUMMARY = 0x00000002, - GET_MODULE_SUMMARY = 0x00000004, -} \ No newline at end of file