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_DIALOG_SESSION_INFO_H
17 #define OHOS_ABILITY_RUNTIME_DIALOG_SESSION_INFO_H
18 
19 #include <string>
20 #include <vector>
21 
22 #include "application_info.h"
23 #include "json_serializer.h"
24 #include "parcel.h"
25 #include "refbase.h"
26 #include "want_params_wrapper.h"
27 
28 namespace OHOS {
29 namespace AAFwk {
30 struct DialogAbilityInfo {
31     std::string bundleName;
32     std::string moduleName;
33     std::string abilityName;
34     int32_t bundleIconId = 0;
35     int32_t bundleLabelId = 0;
36     int32_t abilityIconId = 0;
37     int32_t abilityLabelId = 0;
38     bool visible = true;
39     int32_t appIndex = 0;
40     AppExecFwk::MultiAppModeData multiAppMode;
41 
42     std::string GetURI() const;
43     bool ParseURI(const std::string &uri);
44     void Split(const std::string &str, const std::string &delim, std::vector<std::string> &vec);
45 };
46 
47 struct DialogSessionInfo : public Parcelable {
48     DialogAbilityInfo callerAbilityInfo;
49     std::vector<DialogAbilityInfo> targetAbilityInfos;
50     AAFwk::WantParams parameters;
51 
52     bool ReadFromParcel(Parcel &parcel);
53     virtual bool Marshalling(Parcel &parcel) const override;
54     static DialogSessionInfo *Unmarshalling(Parcel &parcel);
55 };
56 }  // namespace AAFwk
57 }  // namespace OHOS
58 #endif // OHOS_ABILITY_RUNTIME_DIALOG_SESSION_INFO_H
59