• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 };
20 
HdfServiceInfoInit(struct HdfServiceInfo * info,const struct HdfDeviceNode * devNode)21 static inline void HdfServiceInfoInit(struct HdfServiceInfo *info, const struct HdfDeviceNode *devNode)
22 {
23     info->servName = devNode->servName;
24     info->servInfo = devNode->servInfo;
25     info->devClass = devNode->deviceObject.deviceClass;
26     info->devId = devNode->devId;
27 }
28 
29 #endif // HDF_SERVICE_INFO_H