1 /* 2 * Copyright (c) 2020-2022 Huawei Device Co., Ltd. 3 * 4 * HDF is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 9 #ifndef HDF_DEVICE_INFO_H 10 #define HDF_DEVICE_INFO_H 11 12 #include "hdf_slist.h" 13 14 enum { 15 HDF_SERVICE_UNUSABLE, 16 HDF_SERVICE_USABLE, 17 }; 18 19 enum { 20 HDF_DEV_LOCAL_SERVICE, 21 HDF_DEV_REMOTE_SERVICE, 22 }; 23 24 struct HdfDeviceInfo { 25 struct HdfSListNode node; 26 bool isDynamic; 27 uint16_t status; 28 uint16_t deviceType; 29 uint32_t deviceId; 30 uint16_t policy; 31 uint16_t priority; 32 uint16_t preload; 33 uint16_t permission; 34 const char *moduleName; 35 const char *svcName; 36 const char *deviceMatchAttr; 37 const char *deviceName; 38 }; 39 40 struct HdfPrivateInfo { 41 uint32_t length; 42 const void *data; 43 }; 44 45 struct HdfDeviceInfo *HdfDeviceInfoNewInstance(void); 46 void HdfDeviceInfoConstruct(struct HdfDeviceInfo *deviceInfo); 47 void HdfDeviceInfoFreeInstance(struct HdfDeviceInfo *deviceInfo); 48 void HdfDeviceInfoDelete(struct HdfSListNode *listEntry); 49 50 #endif /* HDF_DEVICE_INFO_H */ 51