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