1 | /* $Id: VBoxUSBFilterMgr.h 76527 2018-12-30 05:55:44Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VirtualBox Ring-0 USB Filter Manager.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2007-2017 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 | * The contents of this file may alternatively be used under the terms
|
---|
18 | * of the Common Development and Distribution License Version 1.0
|
---|
19 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
20 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
21 | * CDDL are applicable instead of those of the GPL.
|
---|
22 | *
|
---|
23 | * You may elect to license modified versions of this file under the
|
---|
24 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
25 | */
|
---|
26 |
|
---|
27 | #ifndef ___VBoxUSBFilterMgr_h
|
---|
28 | #define ___VBoxUSBFilterMgr_h
|
---|
29 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
30 | # pragma once
|
---|
31 | #endif
|
---|
32 |
|
---|
33 | #include <VBox/usbfilter.h>
|
---|
34 |
|
---|
35 | RT_C_DECLS_BEGIN
|
---|
36 |
|
---|
37 | /** @todo r=bird: VBOXUSBFILTER_CONTEXT isn't following the coding
|
---|
38 | * guildlines. Don't know which clueless dude did this... */
|
---|
39 | #if defined(RT_OS_WINDOWS)
|
---|
40 | typedef struct VBOXUSBFLTCTX *VBOXUSBFILTER_CONTEXT;
|
---|
41 | #define VBOXUSBFILTER_CONTEXT_NIL NULL
|
---|
42 | #else
|
---|
43 | typedef RTPROCESS VBOXUSBFILTER_CONTEXT;
|
---|
44 | #define VBOXUSBFILTER_CONTEXT_NIL NIL_RTPROCESS
|
---|
45 | #endif
|
---|
46 |
|
---|
47 | int VBoxUSBFilterInit(void);
|
---|
48 | void VBoxUSBFilterTerm(void);
|
---|
49 | void VBoxUSBFilterRemoveOwner(VBOXUSBFILTER_CONTEXT Owner);
|
---|
50 | int VBoxUSBFilterAdd(PCUSBFILTER pFilter, VBOXUSBFILTER_CONTEXT Owner, uintptr_t *puId);
|
---|
51 | int VBoxUSBFilterRemove(VBOXUSBFILTER_CONTEXT Owner, uintptr_t uId);
|
---|
52 | VBOXUSBFILTER_CONTEXT VBoxUSBFilterMatch(PCUSBFILTER pDevice, uintptr_t *puId);
|
---|
53 | VBOXUSBFILTER_CONTEXT VBoxUSBFilterMatchEx(PCUSBFILTER pDevice, uintptr_t *puId, bool fRemoveFltIfOneShot, bool *pfFilter, bool *pfIsOneShot);
|
---|
54 | VBOXUSBFILTER_CONTEXT VBoxUSBFilterGetOwner(uintptr_t uId);
|
---|
55 |
|
---|
56 | RT_C_DECLS_END
|
---|
57 |
|
---|
58 | #endif
|
---|