include: Avoid some type redefinitions.
[wine.git] / dlls / hidclass.sys / hid.h
blobefa471223b87ead814698eb14592f9556b0c6ccf
1 /*
2 * Copyright 2015 Aric Stewart
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "ntstatus.h"
20 #define WIN32_NO_STATUS
21 #include "windef.h"
22 #include "winbase.h"
23 #include "winternl.h"
24 #include "winioctl.h"
25 #include "ddk/wdm.h"
26 #include "hidusage.h"
27 #include "ddk/hidport.h"
28 #include "ddk/hidclass.h"
29 #include "ddk/hidpi.h"
30 #include "wine/list.h"
31 #include "parse.h"
33 #define DEFAULT_POLL_INTERVAL 200
34 #define MAX_POLL_INTERVAL_MSEC 10000
36 typedef NTSTATUS (WINAPI *pAddDevice)(DRIVER_OBJECT *DriverObject, DEVICE_OBJECT *PhysicalDeviceObject);
38 typedef struct _BASE_DEVICE_EXTENSTION {
39 HID_DEVICE_EXTENSION deviceExtension;
41 HID_COLLECTION_INFORMATION information;
42 WINE_HIDP_PREPARSED_DATA *preparseData;
44 ULONG poll_interval;
45 WCHAR *device_name;
46 WCHAR *link_name;
47 HANDLE halt_event;
48 HANDLE thread;
50 LIST_ENTRY irp_queue;
52 /* Minidriver Specific stuff will end up here */
53 } BASE_DEVICE_EXTENSION;
55 typedef struct _minidriver
57 struct list entry;
59 HID_MINIDRIVER_REGISTRATION minidriver;
61 PDRIVER_UNLOAD DriverUnload;
63 pAddDevice AddDevice;
64 } minidriver;
66 NTSTATUS call_minidriver(ULONG code, DEVICE_OBJECT *device, void *in_buff, ULONG in_size, void *out_buff, ULONG out_size) DECLSPEC_HIDDEN;
67 minidriver* find_minidriver(DRIVER_OBJECT* driver) DECLSPEC_HIDDEN;
69 /* Internal device functions */
70 NTSTATUS HID_CreateDevice(DEVICE_OBJECT *native_device, HID_MINIDRIVER_REGISTRATION *driver, DEVICE_OBJECT **device) DECLSPEC_HIDDEN;
71 NTSTATUS HID_LinkDevice(DEVICE_OBJECT *device, LPCWSTR serial, LPCWSTR index) DECLSPEC_HIDDEN;
72 void HID_DeleteDevice(HID_MINIDRIVER_REGISTRATION *driver, DEVICE_OBJECT *device) DECLSPEC_HIDDEN;
74 /* Pseudo-Plug and Play support*/
75 NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT* PDO) DECLSPEC_HIDDEN;
76 void PNP_CleanupPNP(DRIVER_OBJECT *driver) DECLSPEC_HIDDEN;