1 | /* $Id: VBoxUsbFlt.h 36998 2011-05-07 20:19:55Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox USB Monitor Device Filtering functionality
|
---|
4 | */
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2011 Oracle Corporation
|
---|
7 | *
|
---|
8 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | * available from http://www.virtualbox.org. This file is free software;
|
---|
10 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | * General Public License (GPL) as published by the Free Software
|
---|
12 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
13 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
14 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | */
|
---|
16 | #ifndef ___VBoxUsbFlt_h___
|
---|
17 | #define ___VBoxUsbFlt_h___
|
---|
18 |
|
---|
19 | #include "VBoxUsbMon.h"
|
---|
20 | #include <VBoxUSBFilterMgr.h>
|
---|
21 |
|
---|
22 | #include <VBox/usblib-win.h>
|
---|
23 |
|
---|
24 | typedef struct VBOXUSBFLTCTX
|
---|
25 | {
|
---|
26 | LIST_ENTRY ListEntry;
|
---|
27 | PKEVENT pChangeEvent;
|
---|
28 | RTPROCESS Process;
|
---|
29 | uint32_t cActiveFilters;
|
---|
30 | BOOLEAN bRemoved;
|
---|
31 | } VBOXUSBFLTCTX, *PVBOXUSBFLTCTX;
|
---|
32 |
|
---|
33 | NTSTATUS VBoxUsbFltInit();
|
---|
34 | NTSTATUS VBoxUsbFltTerm();
|
---|
35 | NTSTATUS VBoxUsbFltCreate(PVBOXUSBFLTCTX pContext);
|
---|
36 | NTSTATUS VBoxUsbFltClose(PVBOXUSBFLTCTX pContext);
|
---|
37 | int VBoxUsbFltAdd(PVBOXUSBFLTCTX pContext, PUSBFILTER pFilter, uintptr_t *pId);
|
---|
38 | int VBoxUsbFltRemove(PVBOXUSBFLTCTX pContext, uintptr_t uId);
|
---|
39 | NTSTATUS VBoxUsbFltSetNotifyEvent(PVBOXUSBFLTCTX pContext, HANDLE hEvent);
|
---|
40 | NTSTATUS VBoxUsbFltFilterCheck(PVBOXUSBFLTCTX pContext);
|
---|
41 |
|
---|
42 | NTSTATUS VBoxUsbFltGetDevice(PVBOXUSBFLTCTX pContext, HVBOXUSBDEVUSR hDevice, PUSBSUP_GETDEV_MON pInfo);
|
---|
43 |
|
---|
44 | typedef void* HVBOXUSBFLTDEV;
|
---|
45 | HVBOXUSBFLTDEV VBoxUsbFltProxyStarted(PDEVICE_OBJECT pPdo);
|
---|
46 | void VBoxUsbFltProxyStopped(HVBOXUSBFLTDEV hDev);
|
---|
47 |
|
---|
48 | NTSTATUS VBoxUsbFltPdoAdd(PDEVICE_OBJECT pPdo, BOOLEAN *pbFiltered);
|
---|
49 | NTSTATUS VBoxUsbFltPdoAddCompleted(PDEVICE_OBJECT pPdo);
|
---|
50 | NTSTATUS VBoxUsbFltPdoRemove(PDEVICE_OBJECT pPdo);
|
---|
51 | BOOLEAN VBoxUsbFltPdoIsFiltered(PDEVICE_OBJECT pPdo);
|
---|
52 |
|
---|
53 | #endif /* #ifndef ___VBoxUsbFlt_h___ */
|
---|