1/*
2 * Copyright (c) 2023 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 EDM_ERRORS_H
16#define EDM_ERRORS_H
17
18#include <cstdint>
19#include <errors.h>
20
21namespace OHOS {
22namespace ExternalDeviceManager {
23#define EDM_MODULE_ID 1
24
25constexpr int32_t EDM_ERR_OFFSET = ErrCodeOffset(SUBSYS_DRIVERS, EDM_MODULE_ID);
26
27enum UsbErrCode : int32_t {
28    EDM_OK = 0,
29    EDM_NOK = EDM_ERR_OFFSET,
30    EDM_ERR_GET_SYSTEM_ABILITY_MANAGER_FAILED,
31    EDM_ERR_GET_SERVICE_FAILED,
32    EDM_ERR_CONNECTION_FAILED,
33    EDM_ERR_NOT_SUPPORT,
34    EDM_ERR_INVALID_PARAM,
35    EDM_ERR_INVALID_OBJECT,
36    EDM_EER_MALLOC_FAIL,
37    EDM_ERR_TIMEOUT,
38    EDM_ERR_DEVICE_BUSY,
39    EDM_ERR_IO,
40    EDM_ERR_NO_PERM,
41    EDM_ERR_OUT_OF_RANGE,
42    EDM_ERR_JSON_PARSE_FAIL,
43    EDM_ERR_JSON_OBJ_ERR,
44    EDM_ERR_USB_ERR,
45    EDM_ERR_NOT_SYSTEM_APP,
46};
47} // namespace ExternalDeviceManager
48} // namespace OHOS
49#endif // EDM_ERRORS_H