• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 BASE_EVENTHANDLER_INTERFACES_INNER_API_EVENT_HANDLER_ERRORS_H
17 #define BASE_EVENTHANDLER_INTERFACES_INNER_API_EVENT_HANDLER_ERRORS_H
18 
19 #include "errors.h"
20 
21 namespace OHOS {
22 namespace AppExecFwk {
23 // Module id of event handler is assigned in "appexecfwk_errors.h"
24 const uint32_t APPEXECFWK_MODULE_EVENT_HANDLER = 0x10;
25 constexpr ErrCode EVENT_HANDLER_ERR_OFFSET = ErrCodeOffset(SUBSYS_APPEXECFWK, APPEXECFWK_MODULE_EVENT_HANDLER);
26 
27 enum {
28     // Invalid parameters.
29     EVENT_HANDLER_ERR_INVALID_PARAM = EVENT_HANDLER_ERR_OFFSET,
30     // Have not set event runner yet.
31     EVENT_HANDLER_ERR_NO_EVENT_RUNNER,
32     // Not support to listen file descriptors.
33     EVENT_HANDLER_ERR_FD_NOT_SUPPORT,
34     // File descriptor is already in listening.
35     EVENT_HANDLER_ERR_FD_ALREADY,
36     // Failed to listen file descriptor.
37     EVENT_HANDLER_ERR_FD_FAILED,
38     // No permit to start or stop deposited event runner.
39     EVENT_HANDLER_ERR_RUNNER_NO_PERMIT,
40     // Event runner is already running.
41     EVENT_HANDLER_ERR_RUNNER_ALREADY,
42 };
43 }  // namespace AppExecFwk
44 }  // namespace OHOS
45 
46 #endif  // BASE_EVENTHANDLER_INTERFACES_INNER_API_EVENT_HANDLER_ERRORS_H
47