1 | /* $Id: VBoxUSBFilterMgr.h 44528 2013-02-04 14:27:54Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VirtualBox Ring-0 USB Filter Manager.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2011 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef ___VBoxUSBFilterMgr_h
|
---|
19 | #define ___VBoxUSBFilterMgr_h
|
---|
20 |
|
---|
21 | #include <VBox/usbfilter.h>
|
---|
22 |
|
---|
23 | RT_C_DECLS_BEGIN
|
---|
24 |
|
---|
25 | #if defined(RT_OS_WINDOWS)
|
---|
26 | typedef struct VBOXUSBFLTCTX *VBOXUSBFILTER_CONTEXT;
|
---|
27 | #define VBOXUSBFILTER_CONTEXT_NIL NULL
|
---|
28 | #else
|
---|
29 | typedef RTPROCESS VBOXUSBFILTER_CONTEXT;
|
---|
30 | #define VBOXUSBFILTER_CONTEXT_NIL NIL_RTPROCESS
|
---|
31 | #endif
|
---|
32 |
|
---|
33 | int VBoxUSBFilterInit(void);
|
---|
34 | void VBoxUSBFilterTerm(void);
|
---|
35 | void VBoxUSBFilterRemoveOwner(VBOXUSBFILTER_CONTEXT Owner);
|
---|
36 | int VBoxUSBFilterAdd(PCUSBFILTER pFilter, VBOXUSBFILTER_CONTEXT Owner, uintptr_t *puId);
|
---|
37 | int VBoxUSBFilterRemove(VBOXUSBFILTER_CONTEXT Owner, uintptr_t uId);
|
---|
38 | VBOXUSBFILTER_CONTEXT VBoxUSBFilterMatch(PCUSBFILTER pDevice, uintptr_t *puId);
|
---|
39 | VBOXUSBFILTER_CONTEXT VBoxUSBFilterMatchEx(PCUSBFILTER pDevice, uintptr_t *puId, bool fRemoveFltIfOneShot, bool *pfFilter, bool *pfIsOneShot);
|
---|
40 | VBOXUSBFILTER_CONTEXT VBoxUSBFilterGetOwner(uintptr_t uId);
|
---|
41 |
|
---|
42 | RT_C_DECLS_END
|
---|
43 |
|
---|
44 | #endif
|
---|