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 16 #ifndef DSLM_DEVICE_LIST_H 17 #define DSLM_DEVICE_LIST_H 18 19 #include <stdbool.h> 20 #include <stdint.h> 21 22 #include "device_security_defines.h" 23 #include "dslm_core_defines.h" 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 #define ONLINE_STATUS_ONLINE 1 30 #define ONLINE_STATUS_OFFLINE 0 31 32 typedef void (*ProcessDumpFunction)(const DslmDeviceInfo *info, int32_t dumpHandle); 33 34 DslmDeviceInfo *CreatOrGetDslmDeviceInfo(const DeviceIdentify *device); 35 36 DslmDeviceInfo *GetDslmDeviceInfo(const DeviceIdentify *device); 37 38 bool IsSameDevice(const DeviceIdentify *first, const DeviceIdentify *second); 39 40 void ForEachDeviceDump(const ProcessDumpFunction dumper, int32_t dumpHandle); 41 42 #ifdef __cplusplus 43 } 44 #endif 45 46 #endif // DSLM_DEVICE_LIST_H 47