1100ae2f9Sopenharmony_ci/*
2100ae2f9Sopenharmony_ci * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3100ae2f9Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4100ae2f9Sopenharmony_ci * you may not use this file except in compliance with the License.
5100ae2f9Sopenharmony_ci * You may obtain a copy of the License at
6100ae2f9Sopenharmony_ci *
7100ae2f9Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8100ae2f9Sopenharmony_ci *
9100ae2f9Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10100ae2f9Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11100ae2f9Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12100ae2f9Sopenharmony_ci * See the License for the specific language governing permissions and
13100ae2f9Sopenharmony_ci * limitations under the License.
14100ae2f9Sopenharmony_ci */
15100ae2f9Sopenharmony_ci
16100ae2f9Sopenharmony_ci#ifndef BASE_EVENTHANDLER_INTERFACES_INNER_API_EVENT_HANDLER_ERRORS_H
17100ae2f9Sopenharmony_ci#define BASE_EVENTHANDLER_INTERFACES_INNER_API_EVENT_HANDLER_ERRORS_H
18100ae2f9Sopenharmony_ci
19100ae2f9Sopenharmony_ci#include "errors.h"
20100ae2f9Sopenharmony_ci
21100ae2f9Sopenharmony_cinamespace OHOS {
22100ae2f9Sopenharmony_cinamespace AppExecFwk {
23100ae2f9Sopenharmony_ci// Module id of event handler is assigned in "appexecfwk_errors.h"
24100ae2f9Sopenharmony_ciconst uint32_t APPEXECFWK_MODULE_EVENT_HANDLER = 0x10;
25100ae2f9Sopenharmony_ciconstexpr ErrCode EVENT_HANDLER_ERR_OFFSET = ErrCodeOffset(SUBSYS_APPEXECFWK, APPEXECFWK_MODULE_EVENT_HANDLER);
26100ae2f9Sopenharmony_ci
27100ae2f9Sopenharmony_cienum {
28100ae2f9Sopenharmony_ci    // Invalid parameters.
29100ae2f9Sopenharmony_ci    EVENT_HANDLER_ERR_INVALID_PARAM = EVENT_HANDLER_ERR_OFFSET,
30100ae2f9Sopenharmony_ci    // Have not set event runner yet.
31100ae2f9Sopenharmony_ci    EVENT_HANDLER_ERR_NO_EVENT_RUNNER,
32100ae2f9Sopenharmony_ci    // Not support to listen file descriptors.
33100ae2f9Sopenharmony_ci    EVENT_HANDLER_ERR_FD_NOT_SUPPORT,
34100ae2f9Sopenharmony_ci    // File descriptor is already in listening.
35100ae2f9Sopenharmony_ci    EVENT_HANDLER_ERR_FD_ALREADY,
36100ae2f9Sopenharmony_ci    // Failed to listen file descriptor.
37100ae2f9Sopenharmony_ci    EVENT_HANDLER_ERR_FD_FAILED,
38100ae2f9Sopenharmony_ci    // No permit to start or stop deposited event runner.
39100ae2f9Sopenharmony_ci    EVENT_HANDLER_ERR_RUNNER_NO_PERMIT,
40100ae2f9Sopenharmony_ci    // Event runner is already running.
41100ae2f9Sopenharmony_ci    EVENT_HANDLER_ERR_RUNNER_ALREADY,
42100ae2f9Sopenharmony_ci};
43100ae2f9Sopenharmony_ci}  // namespace AppExecFwk
44100ae2f9Sopenharmony_ci}  // namespace OHOS
45100ae2f9Sopenharmony_ci
46100ae2f9Sopenharmony_ci#endif  // BASE_EVENTHANDLER_INTERFACES_INNER_API_EVENT_HANDLER_ERRORS_H
47