• 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_EXTENSION_INFO_H
17 #define FOUNDATION_BUNDLE_FRAMEWORK_INNER_EXTENSION_INFO_H
18 
19 #include "extension_ability_info.h"
20 
21 namespace OHOS {
22 namespace AppExecFwk {
23 struct InnerExtensionInfo {
24     bool visible = false;
25     bool enabled = true;
26     bool needCreateSandbox = false;
27     bool isolationProcess = false;
28     uint32_t iconId = 0;
29     uint32_t labelId = 0;
30     uint32_t descriptionId = 0;
31     int32_t priority = 0;
32     int32_t uid = -1;
33     int32_t appIndex = 0;
34     ExtensionAbilityType type = ExtensionAbilityType::UNSPECIFIED;
35     CompileMode compileMode = CompileMode::JS_BUNDLE;
36     ExtensionProcessMode extensionProcessMode = ExtensionProcessMode::UNDEFINED;
37     std::string bundleName;
38     std::string moduleName;
39     std::string name;
40     std::string srcEntrance;
41     std::string icon;
42     std::string label;
43     std::string description;
44     std::string readPermission;
45     std::string writePermission;
46     std::string uri;
47     std::string extensionTypeName;
48     std::string resourcePath;
49     std::string hapPath;
50     std::string process;
51     std::string customProcess;
52     std::string arkTSMode = Constants::ARKTS_MODE_DYNAMIC;
53     std::vector<std::string> permissions;
54     std::vector<std::string> appIdentifierAllowList;
55     std::vector<Metadata> metadata;
56     std::vector<SkillUriForAbilityAndExtension> skillUri;
57     std::vector<Skill> skills;
58     std::vector<std::string> dataGroupIds;
59     std::vector<std::string> validDataGroupIds;
60 
61     static ExtensionAbilityInfo ConvertToExtensionInfo(const InnerExtensionInfo &innerExtensionInfo);
62 };
63 }  // namespace AppExecFwk
64 }  // namespace OHOS
65 #endif  // FOUNDATION_BUNDLE_FRAMEWORK_INNER_EXTENSION_INFO_H
66