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 #include "account_priority_info.h"
17 
18 namespace OHOS {
19 namespace Memory {
20 namespace {
21 const int INVALID_PRIORITY = -1;
22 }
23 
AccountPriorityInfo(int id,std::string name,AccountSA::OsAccountType type,bool isActived)24 AccountPriorityInfo::AccountPriorityInfo(int id, std::string name, AccountSA::OsAccountType type, bool isActived)
25     : id_(id), name_(name), type_(type), isActived_(isActived)
26 {
27     priority_ = INVALID_PRIORITY;
28 }
29 
GetId()30 int AccountPriorityInfo::GetId()
31 {
32     return id_;
33 }
34 
SetId(int id)35 void AccountPriorityInfo::SetId(int id)
36 {
37     id_ = id;
38 }
39 
GetName()40 std::string AccountPriorityInfo::GetName()
41 {
42     return name_;
43 }
44 
SetName(std::string name)45 void AccountPriorityInfo::SetName(std::string name)
46 {
47     name_ = name;
48 }
49 
GetType()50 AccountSA::OsAccountType AccountPriorityInfo::GetType()
51 {
52     return type_;
53 }
54 
SetType(AccountSA::OsAccountType type)55 void AccountPriorityInfo::SetType(AccountSA::OsAccountType type)
56 {
57     type_ = type;
58 }
59 
GetIsActived()60 bool AccountPriorityInfo::GetIsActived()
61 {
62     return isActived_;
63 }
64 
SetIsActived(bool isActived)65 void AccountPriorityInfo::SetIsActived(bool isActived)
66 {
67     isActived_ = isActived;
68 }
69 
GetPriority()70 int AccountPriorityInfo::GetPriority()
71 {
72     return priority_;
73 }
74 
SetPriority(int priority)75 void AccountPriorityInfo::SetPriority(int priority)
76 {
77     priority_ = priority;
78 }
79 } // namespace Memory
80 } // namespace OHOS