• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef FOUNDATION_RESOURCESCHEDULE_BACKGROUND_TASK_MGR_FRAMEWORKS_COMMON_INCLUDE_BGTASKMGR_INNER_ERRORS_H
17 #define FOUNDATION_RESOURCESCHEDULE_BACKGROUND_TASK_MGR_FRAMEWORKS_COMMON_INCLUDE_BGTASKMGR_INNER_ERRORS_H
18 
19 #include "errors.h"
20 
21 namespace OHOS {
22 namespace BackgroundTaskMgr {
23 /**
24  * ErrCode layout
25  *
26  * +-----+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
27  * | Bit |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00|
28  * +-----+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
29  * |Field|Reserved|        Subsystem      |  Module      |                              Code             |
30  * +-----+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
31  */
32 
33 // BackgroundTaskMgr's module const defined.
34 enum : int {
35     BGTASK_MODULE_COMMON = 0x00,
36 };
37 
38 // Offset of background task manager sub-system's errcode base.
39 constexpr ErrCode BGTASK_COMMON_ERR_OFFSET = ErrCodeOffset(SUBSYS_IAWARE, BGTASK_MODULE_COMMON);
40 // Bgtask Common Error Code Defined.
41 enum : int {
42     ERR_BGTASK_SERVICE_NOT_READY = BGTASK_COMMON_ERR_OFFSET + 1,
43     ERR_BGTASK_SERVICE_NOT_CONNECTED,
44     ERR_BGTASK_REMOTE_DEAD,
45     ERR_BGTASK_PARCELABLE_FAILED,
46     ERR_BGTASK_TRANSACT_FAILED,
47     ERR_BGTASK_INVALID_PARAM,
48     ERR_BGTASK_NOT_ALLOWED,
49     ERR_BGTASK_OBJECT_EXISTS,
50     ERR_BGTASK_METHOD_CALLED_FAILED,
51     ERR_BGTASK_NON_SYSTEM_APP,
52     ERR_BGTASK_SYS_NOT_READY,
53     ERR_BGTASK_TASK_ERR,
54     ERR_BGTASK_PERMISSION_DENIED,
55     ERR_BGTASK_NOTIFICATION_ERR,
56     ERR_BGTASK_INVALID_BGMODE,
57     ERR_BGTASK_NO_MEMORY,
58     ERR_BGTASK_DATA_STORAGE_ERR,
59 };
60 }  // namespace BackgroundTaskMgr
61 }  // namespace OHOS
62 #endif  // FOUNDATION_RESOURCESCHEDULE_BACKGROUND_TASK_MGR_FRAMEWORKS_COMMON_INCLUDE_BGTASKMGR_INNER_ERRORS_H