• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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 
16 #ifndef FOUNDATION_BUNDLE_FRAMEWORK_INNER_ABILITY_INFO_H
17 #define FOUNDATION_BUNDLE_FRAMEWORK_INNER_ABILITY_INFO_H
18 
19 #include "ability_info.h"
20 
21 namespace OHOS {
22 namespace AppExecFwk {
23 struct InnerAbilityInfo {
24     bool visible = false;
25     bool isLauncherAbility = false;
26     bool isNativeAbility = false;
27     bool enabled = false;
28     bool supportPipMode = false;
29     bool formEnabled = false;
30     bool removeMissionAfterTerminate = false;
31     bool isModuleJson = false;
32     bool isStageBasedModel = false;
33     bool continuable = false;
34     bool excludeFromMissions = false;
35     bool unclearableMission = false;
36     bool excludeFromDock = false;
37     bool recoverable = false;
38     bool isolationProcess = false;
39     bool multiUserShared = false;
40     bool grantPermission = false;
41     bool directLaunch = true;
42     LinkType linkType = LinkType::DEEP_LINK;
43     uint32_t labelId = 0;
44     uint32_t descriptionId = 0;
45     uint32_t iconId = 0;
46     uint32_t orientationId = 0;
47     uint32_t formEntity = 0;
48     uint32_t backgroundModes = 0;
49     uint32_t startWindowId = 0;
50     uint32_t startWindowIconId = 0;
51     uint32_t startWindowBackgroundId = 0;
52     uint32_t maxWindowWidth = 0;
53     uint32_t minWindowWidth = 0;
54     uint32_t maxWindowHeight = 0;
55     uint32_t minWindowHeight = 0;
56     uint32_t packageSize = 0;
57     int32_t minFormHeight = 0;
58     int32_t defaultFormHeight = 0;
59     int32_t minFormWidth = 0;
60     int32_t defaultFormWidth = 0;
61     int32_t priority = 0;
62     int32_t appIndex = 0;
63     int32_t uid = -1;
64     AbilityType type = AbilityType::UNKNOWN;
65     ExtensionAbilityType extensionAbilityType = ExtensionAbilityType::UNSPECIFIED;
66     DisplayOrientation orientation = DisplayOrientation::UNSPECIFIED;
67     LaunchMode launchMode = LaunchMode::SINGLETON;
68     CompileMode compileMode = CompileMode::JS_BUNDLE;
69     AbilitySubType subType = AbilitySubType::UNSPECIFIED;
70     int64_t installTime = 0;
71     double maxWindowRatio = 0;
72     double minWindowRatio = 0;
73     std::string name;
74     std::string label;
75     std::string description;
76     std::string iconPath;
77     std::string theme;
78     std::string kind;
79     std::string extensionTypeName;
80     std::string srcPath;
81     std::string srcLanguage = Constants::SRC_LANGUAGE_JS;
82     std::string arkTSMode = Constants::ARKTS_MODE_DYNAMIC;
83     std::string process;
84     std::string uri;
85     std::string targetAbility;
86     std::string readPermission;
87     std::string writePermission;
88     std::string package;
89     std::string bundleName;
90     std::string moduleName;
91     std::string applicationName;
92     std::string codePath;
93     std::string resourcePath;
94     std::string hapPath;
95     std::string srcEntrance;
96     std::string startWindow;
97     std::string startWindowIcon;
98     std::string startWindowBackground;
99     std::string preferMultiWindowOrientation = Constants::PREFER_MULTI_WINDOW_ORIENTATION_DEFAULT;
100     std::string originalBundleName;
101     std::string appName;
102     std::string privacyUrl;
103     std::string privacyName;
104     std::string downloadUrl;
105     std::string versionName;
106     std::string className;
107     std::string originalClassName;
108     std::string uriPermissionMode;
109     std::string uriPermissionPath;
110     std::string libPath;
111     std::string deviceId;
112     std::vector<std::string> permissions;
113     std::vector<std::string> deviceTypes;
114     std::vector<std::string> deviceCapabilities;
115     std::vector<std::string> configChanges;
116     std::vector<SkillUriForAbilityAndExtension> skillUri;
117     std::vector<Skill> skills;
118     std::vector<Metadata> metadata;
119     std::vector<SupportWindowMode> windowModes;
120     std::vector<std::string> supportExtNames;
121     std::vector<std::string> supportMimeTypes;
122     std::vector<std::string> continueType;
123     MetaData metaData;
124     std::unordered_set<std::string> continueBundleNames;
125     StartWindowResource startWindowResource;
126 
127     static AbilityInfo ConvertToAbilityInfo(const InnerAbilityInfo &innerAbilityInfo);
128 };
129 }  // namespace AppExecFwk
130 }  // namespace OHOS
131 #endif  // FOUNDATION_BUNDLE_FRAMEWORK_INNER_ABILITY_INFO_H
132