1 /*
2  * Copyright (c) 2021-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 OS_ACCOUNT_SERVICES_ACCOUNTMGR_INCLUDE_ACCOUNT_STATE_ACTION_H
17 #define OS_ACCOUNT_SERVICES_ACCOUNTMGR_INCLUDE_ACCOUNT_STATE_ACTION_H
18 
19 namespace OHOS {
20 namespace AccountSA {
21 /**
22  * Base class of state change process.
23  */
24 class AccountStateAction {
25 public:
26     /**
27      * Constructor.
28      *
29      * @param nextStateId the unique State ID. It should be a non-negative number.
30      */
AccountStateAction(const int nextStateId)31     explicit AccountStateAction(const int nextStateId) : nextState_(nextStateId) {}
32 
33     /**
34      * Destructor.
35      *
36      */
~AccountStateAction()37     virtual ~AccountStateAction() {}
38 
39     /**
40      * Get the next State ID.
41      *
42      * @return the next State ID
43      */
GetNextState()44     int GetNextState() const
45     {
46         return nextState_;
47     }
48 
49 private:
50     /**
51      * the next State ID
52      */
53     int nextState_;
54 };
55 } // namespace AccountSA
56 } // namespace OHOS
57 
58 #endif // OS_ACCOUNT_SERVICES_ACCOUNTMGR_INCLUDE_ACCOUNT_STATE_ACTION_H
59