• 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 #ifndef FOUNDATION_RESOURCESCHEDULE_WORKSCHEDULER_UTILS_ERRORS_H
16 #define FOUNDATION_RESOURCESCHEDULE_WORKSCHEDULER_UTILS_ERRORS_H
17 
18 #include <errors.h>
19 
20 namespace OHOS {
21 namespace WorkScheduler {
22 enum {
23     WORKSCHED_MODULE_TYPE = 0x00,
24 };
25 
26 // offset of workscheduler error, only be used in this file.
27 constexpr ErrCode WORKSCHED_SERVICE_ERR_OFFSET = ErrCodeOffset(SUBSYS_IAWARE, WORKSCHED_MODULE_TYPE);
28 
29 enum {
30     E_WORK_ID_INVALID = WORKSCHED_SERVICE_ERR_OFFSET + 1,
31     E_CLIENT_CONNECT_SERVICE_FAILED,
32     E_GET_WORK_STATUS_ERROR,
33     E_GET_WORKSCHED_SERVICE_FALIED,
34     E_START_WORK_FAILED,
35     E_STOP_WORK_FAILED,
36     E_STOP_AND_CANCEL_WORK_FAILED,
37     E_STOP_AND_CLEAR_WORKS_FAILED,
38     E_IS_LAST_WORK_TIMEOUT_FALSE
39 };
40 } // namespace WorkScheduler
41 } // namespace OHOS
42 #endif // FOUNDATION_RESOURCESCHEDULE_WORKSCHEDULER_UTILS_ERRORS_H