• 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     uint32_t deviceId;
31     uint16_t policy;
32     uint16_t priority;
33     uint16_t preload;
34     uint16_t permission;
35     const char *moduleName;
36     const char *svcName;
37     const char *deviceMatchAttr;
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