xref: /haiku/headers/private/system/device_manager_defs.h (revision 1deede7388b04dbeec5af85cae7164735ea9e70d)
1 /*
2  * Copyright 2004-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _SYSTEM_DEVICE_MANAGER_DEFS_H
6 #define _SYSTEM_DEVICE_MANAGER_DEFS_H
7 
8 
9 #include <device_manager.h>
10 
11 
12 // temporary/optional device manager syscall API
13 #define DEVICE_MANAGER_SYSCALLS "device_manager"
14 
15 #define DM_GET_ROOT				1
16 #define DM_GET_CHILD			2
17 #define DM_GET_NEXT_CHILD		3
18 #define DM_GET_NEXT_ATTRIBUTE	4
19 
20 typedef addr_t device_node_cookie;
21 
22 struct device_attr_info {
23 	device_node_cookie 		node_cookie;
24 	device_node_cookie		cookie;
25 	char		name[255];
26 	type_code	type;
27 	union {
28 		uint8   ui8;
29 		uint16  ui16;
30 		uint32  ui32;
31 		uint64  ui64;
32 		char    string[255];
33 		struct {
34 			void    *data;
35 			size_t  length;
36 		} raw;
37 	} value;
38 };
39 
40 #endif	/* _SYSTEM_DEVICE_MANAGER_DEFS_H */
41