1/* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import { AbilityInfo } from "./abilityInfo"; 17 18/** 19 * @name Obtains configuration information about an module. 20 * @since 7 21 * @SysCap SystemCapability.Appexecfwk 22 * @permission NA 23 * @devices phone, tablet, tv, wearable, car 24 */ 25export interface HapModuleInfo { 26 /** 27 * @default Indicates the name of this hapmodule 28 * @since 7 29 * @SysCap SystemCapability.Appexecfwk 30 */ 31 readonly name: string; 32 /** 33 * @default Describes the hapmodule 34 * @since 7 35 * @SysCap SystemCapability.Appexecfwk 36 */ 37 readonly description: string; 38 /** 39 * @default Indicates the description of this hapmodule 40 * @since 7 41 * @SysCap SystemCapability.Appexecfwk 42 */ 43 readonly descriptionId: number; 44 /** 45 * @default Indicates the icon of this hapmodule 46 * @since 7 47 * @SysCap SystemCapability.Appexecfwk 48 */ 49 readonly icon: string; 50 /** 51 * @default Indicates the label of this hapmodule 52 * @since 7 53 * @SysCap SystemCapability.Appexecfwk 54 */ 55 readonly label: string; 56 /** 57 * @default Indicates the label id of this hapmodule 58 * @since 7 59 * @SysCap SystemCapability.Appexecfwk 60 */ 61 readonly labelId: number; 62 /** 63 * @default Indicates the icon id of this hapmodule 64 * @since 7 65 * @SysCap SystemCapability.Appexecfwk 66 */ 67 readonly iconId: number; 68 /** 69 * @default Indicates the background img of this hapmodule 70 * @since 7 71 * @SysCap SystemCapability.Appexecfwk 72 */ 73 readonly backgroundImg: string; 74 /** 75 * @default Indicates the supported modes of this hapmodule 76 * @since 7 77 * @SysCap SystemCapability.Appexecfwk 78 */ 79 readonly supportedModes: number; 80 /** 81 * @default Indicates the req capabilities of this hapmodule 82 * @since 7 83 * @SysCap SystemCapability.Appexecfwk 84 */ 85 readonly reqCapabilities: Array<string>; 86 /** 87 * @default The device types that this hapmodule can run on 88 * @since 7 89 * @SysCap SystemCapability.Appexecfwk 90 */ 91 readonly deviceTypes: Array<string>; 92 /** 93 * @default Obtains configuration information about ability 94 * @since 7 95 * @SysCap SystemCapability.Appexecfwk 96 */ 97 readonly abilityInfo: Array<AbilityInfo>; 98 /** 99 * @default Indicates the name of the .hap package to which the capability belongs 100 * @since 7 101 * @SysCap SystemCapability.Appexecfwk 102 */ 103 readonly moduleName: string; 104 /** 105 * @default Indicates the main ability name of this hapmodule 106 * @since 7 107 * @SysCap SystemCapability.Appexecfwk 108 */ 109 readonly mainAbilityName: string; 110 /** 111 * @default Indicates whether free installation of the hapmodule is supported 112 * @since 7 113 * @SysCap SystemCapability.Appexecfwk 114 */ 115 readonly installationFree: boolean; 116}