1 /* 2 * Copyright (c) 2025 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 /** 17 * @addtogroup DeviceManager 18 * @{ 19 * 20 * @brief Distributed device management module, 21 * which provides APIs to obtain information about trusted devices and local devices. 22 * 23 * @since 20 24 */ 25 26 /** 27 * @file oh_device_manager_err_code.h 28 * 29 * @brief Declares the error codes of the distributed device management module. 30 * File to include: <distributedhardware/device_manager/oh_device_manager_err_code.h> 31 * 32 * @kit DistributedServiceKit 33 * @library libdevicemanager_ndk.so 34 * @syscap SystemCapability.DistributedHardware.DeviceManager 35 * 36 * @since 20 37 */ 38 39 40 #ifndef OH_DEVICE_MANAGER_ERR_CODE_H 41 #define OH_DEVICE_MANAGER_ERR_CODE_H 42 43 #ifdef __cplusplus 44 extern "C" { 45 #endif 46 47 /** 48 * @brief Error code information of distributed device management module. 49 * 50 * @since 20 51 */ 52 typedef enum DeviceManager_ErrorCode { 53 /** 54 * @error Operation success. 55 */ 56 ERR_OK = 0, 57 /** 58 * @error Permission verification failed. 59 */ 60 ERR_PERMISSION_ERROR = 201, 61 /** 62 * @error Invalid parameter. 63 */ 64 ERR_INVALID_PARAMETER = 401, 65 /** 66 * @error Function execution failed. 67 */ 68 DM_ERR_FAILED = 11600101, 69 /** 70 * @error Failed to obtain the device management service. 71 */ 72 DM_ERR_OBTAIN_SERVICE = 11600102, 73 /** 74 * @error Failed to obtain the bundle name. 75 */ 76 DM_ERR_OBTAIN_BUNDLE_NAME = 11600109, 77 } DeviceManager_ErrorCode; 78 #ifdef __cplusplus 79 }; 80 #endif 81 82 /** @} */ 83 #endif 84