• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_CORE_INCLUDE_APPMGR_APP_MGR_CONSTANTS_H
17 #define FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_CORE_INCLUDE_APPMGR_APP_MGR_CONSTANTS_H
18 
19 namespace OHOS {
20 namespace AppExecFwk {
21 namespace Constants {
22 const std::string APP_MGR_SERVICE_NAME = "AppMgrService";
23 }  // namespace Constants
24 
25 enum class ApplicationState {
26     APP_STATE_BEGIN = 0,
27     APP_STATE_CREATE = APP_STATE_BEGIN,
28     APP_STATE_READY,
29     APP_STATE_FOREGROUND,
30     APP_STATE_BACKGROUND,
31     APP_STATE_SUSPENDED,
32     APP_STATE_TERMINATED,
33     APP_STATE_END,
34 };
35 
36 enum class AbilityState {
37     ABILITY_STATE_BEGIN = 0,
38     ABILITY_STATE_CREATE = ABILITY_STATE_BEGIN,
39     ABILITY_STATE_READY,
40     ABILITY_STATE_FOREGROUND,
41     ABILITY_STATE_BACKGROUND,
42     ABILITY_STATE_TERMINATED,
43     ABILITY_STATE_END,
44     ABILITY_STATE_CONNECTED,
45     ABILITY_STATE_DISCONNECTED,
46 };
47 
48 enum class ExtensionState {
49     EXTENSION_STATE_CREATE = 0,
50     EXTENSION_STATE_READY,
51     EXTENSION_STATE_CONNECTED,
52     EXTENSION_STATE_DISCONNECTED,
53     EXTENSION_STATE_TERMINATED,
54 };
55 
56 enum AppMgrResultCode {
57     RESULT_OK = 0,
58     ERROR_SERVICE_NOT_READY,
59     ERROR_SERVICE_NOT_CONNECTED,
60 };
61 }  // namespace AppExecFwk
62 }  // namespace OHOS
63 #endif  // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_CORE_INCLUDE_APPMGR_APP_MGR_CONSTANTS_H
64