59190ecd61435d19ba3515b876272aee7bd12298vboxsync/* $Id$ */
59190ecd61435d19ba3515b876272aee7bd12298vboxsync/** @file
59190ecd61435d19ba3515b876272aee7bd12298vboxsync * VirtualBox Ring-0 USB Filter Manager.
59190ecd61435d19ba3515b876272aee7bd12298vboxsync */
59190ecd61435d19ba3515b876272aee7bd12298vboxsync
59190ecd61435d19ba3515b876272aee7bd12298vboxsync/*
c7814cf6e1240a519cbec0441e033d0e2470ed00vboxsync * Copyright (C) 2007-2011 Oracle Corporation
59190ecd61435d19ba3515b876272aee7bd12298vboxsync *
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * available from http://www.virtualbox.org. This file is free software;
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * you can redistribute it and/or modify it under the terms of the GNU
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * General Public License (GPL) as published by the Free Software
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
c55c68b6a3324172e9dc207926215845880b0f90vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
59190ecd61435d19ba3515b876272aee7bd12298vboxsync */
59190ecd61435d19ba3515b876272aee7bd12298vboxsync
59190ecd61435d19ba3515b876272aee7bd12298vboxsync#ifndef ___VBoxUSBFilterMgr_h
59190ecd61435d19ba3515b876272aee7bd12298vboxsync#define ___VBoxUSBFilterMgr_h
59190ecd61435d19ba3515b876272aee7bd12298vboxsync
59190ecd61435d19ba3515b876272aee7bd12298vboxsync#include <VBox/usbfilter.h>
59190ecd61435d19ba3515b876272aee7bd12298vboxsync
59190ecd61435d19ba3515b876272aee7bd12298vboxsyncRT_C_DECLS_BEGIN
59190ecd61435d19ba3515b876272aee7bd12298vboxsync
df294ff29aab74013667896ef2d4f5bd1f782143vboxsync#if defined(RT_OS_WINDOWS)
df294ff29aab74013667896ef2d4f5bd1f782143vboxsynctypedef struct VBOXUSBFLTCTX *VBOXUSBFILTER_CONTEXT;
df294ff29aab74013667896ef2d4f5bd1f782143vboxsync#define VBOXUSBFILTER_CONTEXT_NIL NULL
df294ff29aab74013667896ef2d4f5bd1f782143vboxsync#else
df294ff29aab74013667896ef2d4f5bd1f782143vboxsynctypedef RTPROCESS VBOXUSBFILTER_CONTEXT;
df294ff29aab74013667896ef2d4f5bd1f782143vboxsync#define VBOXUSBFILTER_CONTEXT_NIL NIL_RTPROCESS
df294ff29aab74013667896ef2d4f5bd1f782143vboxsync#endif
df294ff29aab74013667896ef2d4f5bd1f782143vboxsync
59190ecd61435d19ba3515b876272aee7bd12298vboxsyncint VBoxUSBFilterInit(void);
59190ecd61435d19ba3515b876272aee7bd12298vboxsyncvoid VBoxUSBFilterTerm(void);
df294ff29aab74013667896ef2d4f5bd1f782143vboxsyncvoid VBoxUSBFilterRemoveOwner(VBOXUSBFILTER_CONTEXT Owner);
df294ff29aab74013667896ef2d4f5bd1f782143vboxsyncint VBoxUSBFilterAdd(PCUSBFILTER pFilter, VBOXUSBFILTER_CONTEXT Owner, uintptr_t *puId);
df294ff29aab74013667896ef2d4f5bd1f782143vboxsyncint VBoxUSBFilterRemove(VBOXUSBFILTER_CONTEXT Owner, uintptr_t uId);
df294ff29aab74013667896ef2d4f5bd1f782143vboxsyncVBOXUSBFILTER_CONTEXT VBoxUSBFilterMatch(PCUSBFILTER pDevice, uintptr_t *puId);
df294ff29aab74013667896ef2d4f5bd1f782143vboxsyncVBOXUSBFILTER_CONTEXT VBoxUSBFilterMatchEx(PCUSBFILTER pDevice, uintptr_t *puId, bool fRemoveFltIfOneShot, bool *pfFilter, bool *pfIsOneShot);
df294ff29aab74013667896ef2d4f5bd1f782143vboxsyncVBOXUSBFILTER_CONTEXT VBoxUSBFilterGetOwner(uintptr_t uId);
59190ecd61435d19ba3515b876272aee7bd12298vboxsync
59190ecd61435d19ba3515b876272aee7bd12298vboxsyncRT_C_DECLS_END
59190ecd61435d19ba3515b876272aee7bd12298vboxsync
59190ecd61435d19ba3515b876272aee7bd12298vboxsync#endif