1 /*
2 * Copyright (c) 2021-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 #include "ability_local_record.h"
17
18 #include "ability_thread.h"
19
20 namespace OHOS {
21 namespace AppExecFwk {
AbilityLocalRecord(const std::shared_ptr<AbilityInfo> & info,const sptr<IRemoteObject> & token,const std::shared_ptr<AAFwk::Want> & want,int32_t abilityRecordId)22 AbilityLocalRecord::AbilityLocalRecord(const std::shared_ptr<AbilityInfo> &info, const sptr<IRemoteObject> &token,
23 const std::shared_ptr<AAFwk::Want> &want, int32_t abilityRecordId)
24 : abilityInfo_(info), token_(token), want_(want), abilityRecordId_(abilityRecordId) {}
25
~AbilityLocalRecord()26 AbilityLocalRecord::~AbilityLocalRecord() {}
27
GetAbilityInfo()28 const std::shared_ptr<AbilityInfo> &AbilityLocalRecord::GetAbilityInfo()
29 {
30 return abilityInfo_;
31 }
32
GetToken()33 const sptr<IRemoteObject> &AbilityLocalRecord::GetToken()
34 {
35 return token_;
36 }
37
GetAbilityRecordId() const38 int32_t AbilityLocalRecord::GetAbilityRecordId() const
39 {
40 return abilityRecordId_;
41 }
42
GetAbilityThread()43 const sptr<AbilityThread> &AbilityLocalRecord::GetAbilityThread()
44 {
45 return abilityThread_;
46 }
47
SetAbilityThread(const sptr<AbilityThread> & abilityThread)48 void AbilityLocalRecord::SetAbilityThread(const sptr<AbilityThread> &abilityThread)
49 {
50 abilityThread_ = abilityThread;
51 }
52
GetWant()53 const std::shared_ptr<AAFwk::Want> &AbilityLocalRecord::GetWant()
54 {
55 return want_;
56 }
57 } // namespace AppExecFwk
58 } // namespace OHOS
59