1 /* 2 * Copyright (c) 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_SERVICE_INFO_H 10 #define HDF_SERVICE_INFO_H 11 12 #include "hdf_device_node.h" 13 14 struct HdfServiceInfo { 15 const char *servName; 16 const char *servInfo; 17 uint16_t devClass; 18 devid_t devId; 19 const char *interfaceDesc; 20 }; 21 HdfServiceInfoInit(struct HdfServiceInfo * info,const struct HdfDeviceNode * devNode)22static inline void HdfServiceInfoInit(struct HdfServiceInfo *info, const struct HdfDeviceNode *devNode) 23 { 24 info->servName = devNode->servName; 25 info->servInfo = devNode->servInfo; 26 info->devClass = devNode->deviceObject.deviceClass; 27 info->devId = devNode->devId; 28 info->interfaceDesc = devNode->interfaceDesc; 29 } 30 31 #endif // HDF_SERVICE_INFO_H