• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020-2021 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_device_desc.h"
13 #include "hdf_slist.h"
14 
15 enum {
16     HDF_SERVICE_UNUSABLE,
17     HDF_SERVICE_USABLE,
18 };
19 
20 enum {
21     HDF_DEV_LOCAL_SERVICE,
22     HDF_DEV_REMOTE_SERVICE,
23 };
24 
25 struct HdfDeviceInfo {
26     struct HdfSListNode node;
27     bool isDynamic;
28     uint16_t status;
29     uint16_t deviceType;
30     uint16_t hostId;
31     uint16_t deviceId;
32     uint16_t policy;
33     uint16_t priority;
34     uint16_t preload;
35     uint16_t permission;
36     const char *moduleName;
37     const char *svcName;
38     const char *deviceMatchAttr;
39     const void *private;
40 };
41 
42 struct HdfPrivateInfo {
43     uint32_t length;
44     const void *data;
45 };
46 
47 struct HdfDeviceInfo *HdfDeviceInfoNewInstance(void);
48 void HdfDeviceInfoConstruct(struct HdfDeviceInfo *deviceInfo);
49 void HdfDeviceInfoFreeInstance(struct HdfDeviceInfo *deviceInfo);
50 void HdfDeviceInfoDelete(struct HdfSListNode *listEntry);
51 
52 #endif /* HDF_DEVICE_INFO_H */
53