xref: /haiku/headers/private/wmi/wmi.h (revision b5efad4eae1a0754ce3e4eb87458279e81f61f61)
1 /*
2  * Copyright 2020, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _WMI_H_
6 #define _WMI_H_
7 
8 
9 #include <ACPI.h>
10 #include <device_manager.h>
11 #include <KernelExport.h>
12 
13 
14 
15 // Device node
16 
17 // guid (string)
18 #define WMI_GUID_STRING_ITEM "wmi/guid_string"
19 
20 // node type
21 #define WMI_DEVICE_TYPE_NAME "wmi/device/v1"
22 
23 // device cookie, issued by wmi bus manager
24 typedef void* wmi_device;
25 
26 
27 // bus manager device interface for peripheral driver
28 typedef struct {
29 	driver_module_info info;
30 
31 	status_t (*evaluate_method)(wmi_device device, uint8 instance,
32 		uint32 methodId, const acpi_data* in, acpi_data* out);
33 	status_t (*install_event_handler)(wmi_device device,
34 		const char* guidString, acpi_notify_handler handler, void* context);
35 	status_t (*remove_event_handler)(wmi_device device,
36 		const char* guidString);
37 	status_t (*get_event_data)(wmi_device device, uint32 notify,
38 		acpi_data* out);
39 	const char* (*get_uid)(wmi_device device);
40 } wmi_device_interface;
41 
42 
43 #endif	/* _WMI_H_ */
44