1 /* 2 * Copyright (c) 2022 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_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_TARGET_ABILITY_INFO_H 17 #define FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_TARGET_ABILITY_INFO_H 18 19 #include <map> 20 #include <string> 21 22 #include "parcel.h" 23 24 namespace OHOS { 25 namespace AppExecFwk { 26 struct TargetInfo : public Parcelable { 27 std::string transactId; 28 std::string bundleName; 29 std::string moduleName; 30 std::string abilityName; 31 std::string action; 32 std::string uri; 33 std::string type; 34 int32_t flags; 35 int32_t reasonFlag; 36 int32_t callingUid; 37 int32_t callingAppType; 38 std::vector<std::string> callingBundleNames; 39 std::vector<std::string> callingAppIds; 40 std::vector<std::string> preloadModuleNames; 41 int32_t embedded = 0; 42 bool ReadFromParcel(Parcel &parcel); 43 virtual bool Marshalling(Parcel &parcel) const override; 44 static TargetInfo *Unmarshalling(Parcel &parcel); 45 }; 46 47 struct TargetExtSetting : public Parcelable { 48 std::map<std::string, std::string> extValues; 49 50 bool ReadFromParcel(Parcel &parcel); 51 virtual bool Marshalling(Parcel &parcel) const override; 52 static TargetExtSetting *Unmarshalling(Parcel &parcel); 53 }; 54 55 struct TargetAbilityInfo : public Parcelable { 56 std::string version; 57 TargetInfo targetInfo; 58 TargetExtSetting targetExtSetting; 59 60 bool ReadFromParcel(Parcel &parcel); 61 virtual bool Marshalling(Parcel &parcel) const override; 62 static TargetAbilityInfo *Unmarshalling(Parcel &parcel); 63 }; 64 } // namespace AppExecFwk 65 } // namespace OHOS 66 #endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_TARGET_ABILITY_INFO_H