VBoxManageUSB.cpp revision 0e8c50543ddbb0f538ed7b2ff4f08208291509bf
57a8a29640da346530aa76c1013de12ff3362addvboxsync * VBoxManage - VirtualBox's command-line interface.
57a8a29640da346530aa76c1013de12ff3362addvboxsync * Copyright (C) 2006-2009 Sun Microsystems, Inc.
57a8a29640da346530aa76c1013de12ff3362addvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
57a8a29640da346530aa76c1013de12ff3362addvboxsync * available from http://www.virtualbox.org. This file is free software;
57a8a29640da346530aa76c1013de12ff3362addvboxsync * you can redistribute it and/or modify it under the terms of the GNU
57a8a29640da346530aa76c1013de12ff3362addvboxsync * General Public License (GPL) as published by the Free Software
57a8a29640da346530aa76c1013de12ff3362addvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
57a8a29640da346530aa76c1013de12ff3362addvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
57a8a29640da346530aa76c1013de12ff3362addvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57a8a29640da346530aa76c1013de12ff3362addvboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
57a8a29640da346530aa76c1013de12ff3362addvboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
57a8a29640da346530aa76c1013de12ff3362addvboxsync * additional information or have any questions.
57a8a29640da346530aa76c1013de12ff3362addvboxsync/* missing XPCOM <-> COM wrappers */
#ifndef STDMETHOD_
#ifndef NS_GET_IID
#ifndef RT_OS_WINDOWS
using namespace com;
// public initializer/uninitializer for internal purposes only
MyUSBDevice(uint16_t a_u16VendorId, uint16_t a_u16ProductId, uint16_t a_bcdRevision, uint64_t a_u64SerialHash, const char *a_pszComment)
m_cRefs(0)
if (!cRefs)
return cRefs;
return E_NOINTERFACE;
AddRef();
return S_OK;
STDMETHOD(COMGETTER(VendorId))(USHORT *a_pusVendorId) { *a_pusVendorId = m_usVendorId; return S_OK; }
STDMETHOD(COMGETTER(ProductId))(USHORT *a_pusProductId) { *a_pusProductId = m_usProductId; return S_OK; }
STDMETHOD(COMGETTER(Revision))(USHORT *a_pusRevision) { *a_pusRevision = m_bcdRevision; return S_OK; }
STDMETHOD(COMGETTER(SerialHash))(ULONG64 *a_pullSerialHash) { *a_pullSerialHash = m_u64SerialHash; return S_OK; }
class Nullable
operator const T&() const { return mValue; }
mIsNull = false;
bool mIsNull;
T mValue;
struct USBFilterCmd
struct USBFilter
USBFilter ()
bool mGlobal;
return errorArgument("Failed to convert the -maskedinterfaces value '%s' to a number, rc=%Rrc", a->argv[i], rc);