1 /*
2  * Copyright (c) 2023 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 OHOS_ABILITY_RUNTIME_INSIGHT_INTENT_PROFILE_H
17 #define OHOS_ABILITY_RUNTIME_INSIGHT_INTENT_PROFILE_H
18 
19 #include <string>
20 #include <vector>
21 
22 #include "insight_intent_execute_param.h"
23 
24 namespace OHOS {
25 namespace AbilityRuntime {
26 using ExecuteMode = AppExecFwk::ExecuteMode;
27 
28 struct UIAbilityIntentInfo {
29     std::string abilityName;
30     std::vector<ExecuteMode> supportExecuteMode {};
31 };
32 
33 struct UIExtensionIntentInfo {
34     std::string abilityName;
35 };
36 
37 struct ServiceExtensionIntentInfo {
38     std::string abilityName;
39 };
40 
41 struct FormIntentInfo {
42     std::string abilityName;
43     std::string formName;
44 };
45 
46 struct InsightIntentInfo {
47     std::string intentName;
48     std::string intentDomain;
49     std::string intentVersion;
50     std::string srcEntry;
51     UIAbilityIntentInfo uiAbilityIntentInfo;
52     UIExtensionIntentInfo uiExtensionIntentInfo;
53     ServiceExtensionIntentInfo serviceExtensionIntentInfo;
54     FormIntentInfo formIntentInfo;
55 };
56 
57 class InsightIntentProfile {
58 public:
59     static bool TransformTo(const std::string &profileStr, std::vector<InsightIntentInfo> &infos);
60 };
61 } // namespace AbilityRuntime
62 } // namespace OHOS
63 #endif // OHOS_ABILITY_RUNTIME_INSIGHT_INTENT_PROFILE_H
64