1 /* 2 * Copyright (c) 2021 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 #include "pending_want_key.h" 17 #include "iremote_object.h" 18 19 namespace OHOS { 20 namespace AAFwk { SetType(const int32_t type)21void PendingWantKey::SetType(const int32_t type) 22 { 23 type_ = type; 24 } 25 SetBundleName(const std::string & bundleName)26void PendingWantKey::SetBundleName(const std::string &bundleName) 27 { 28 bundleName_ = bundleName; 29 } 30 SetRequestWho(const std::string & requestWho)31void PendingWantKey::SetRequestWho(const std::string &requestWho) 32 { 33 requestWho_ = requestWho; 34 } 35 SetRequestCode(int32_t requestCode)36void PendingWantKey::SetRequestCode(int32_t requestCode) 37 { 38 requestCode_ = requestCode; 39 } 40 SetRequestWant(const Want & requestWant)41void PendingWantKey::SetRequestWant(const Want &requestWant) 42 { 43 requestWant_ = requestWant; 44 } 45 SetRequestResolvedType(const std::string & requestResolvedType)46void PendingWantKey::SetRequestResolvedType(const std::string &requestResolvedType) 47 { 48 requestResolvedType_ = requestResolvedType; 49 } 50 SetAllWantsInfos(const std::vector<WantsInfo> & allWantsInfos)51void PendingWantKey::SetAllWantsInfos(const std::vector<WantsInfo> &allWantsInfos) 52 { 53 allWantsInfos_ = allWantsInfos; 54 } 55 SetFlags(int32_t flags)56void PendingWantKey::SetFlags(int32_t flags) 57 { 58 flags_ = flags; 59 } 60 SetCode(int32_t code)61void PendingWantKey::SetCode(int32_t code) 62 { 63 code_ = code; 64 } 65 SetUserId(int32_t userId)66void PendingWantKey::SetUserId(int32_t userId) 67 { 68 userId_ = userId; 69 } 70 GetType()71int32_t PendingWantKey::GetType() 72 { 73 return type_; 74 } 75 GetBundleName()76std::string PendingWantKey::GetBundleName() 77 { 78 return bundleName_; 79 } 80 GetRequestWho()81std::string PendingWantKey::GetRequestWho() 82 { 83 return requestWho_; 84 } 85 GetRequestCode()86int32_t PendingWantKey::GetRequestCode() 87 { 88 return requestCode_; 89 } 90 GetRequestWant()91Want PendingWantKey::GetRequestWant() 92 { 93 return requestWant_; 94 } 95 GetRequestResolvedType()96std::string PendingWantKey::GetRequestResolvedType() 97 { 98 return requestResolvedType_; 99 } 100 GetAllWantsInfos()101std::vector<WantsInfo> PendingWantKey::GetAllWantsInfos() 102 { 103 return allWantsInfos_; 104 } 105 GetFlags()106int32_t PendingWantKey::GetFlags() 107 { 108 return flags_; 109 } 110 GetCode()111int32_t PendingWantKey::GetCode() 112 { 113 return code_; 114 } 115 GetUserId()116int32_t PendingWantKey::GetUserId() 117 { 118 return userId_; 119 } 120 } // namespace AAFwk 121 } // namespace OHOS