RemoteEmulatedUSBDeviceImpl.cpp revision c740281e4f5e61397e892447aeef2a7bdbbaaf8d
/* $Id$ */
/** @file
*
* VirtualBox IHostUSBDevice COM interface implementation
* for remote (VRDP) USB devices
*/
/*
* Copyright (C) 2006-2008 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#include "RemoteUSBDeviceImpl.h"
#include "AutoCaller.h"
#include "Logging.h"
// constructor / destructor
/////////////////////////////////////////////////////////////////////////////
{
return BaseFinalConstruct();
}
void RemoteUSBDevice::FinalRelease()
{
uninit();
}
// public initializer/uninitializer for internal purposes only
/////////////////////////////////////////////////////////////////////////////
/** @todo (sunlover) REMOTE_USB Device states. */
/**
* Initializes the remote USB device object.
*/
{
/* Enclose the state transition NotReady->InInit->Ready */
AutoInitSpan autoInitSpan(this);
unconst(mData.manufacturer) = pDevDesc->oManufacturer? (char *)pDevDesc + pDevDesc->oManufacturer: "";
unconst(mData.serialNumber) = pDevDesc->oSerialNumber? (char *)pDevDesc + pDevDesc->oSerialNumber: "";
char id[64];
RTStrPrintf(id, sizeof (id), REMOTE_USB_BACKEND_PREFIX_S "0x%08X&0x%08X", pDevDesc->id, u32ClientId);
/* Confirm a successful initialization */
return S_OK;
}
/**
* Uninitializes the instance and sets the ready flag to FALSE.
* Called either from FinalRelease() or by the parent when it gets destroyed.
*/
void RemoteUSBDevice::uninit()
{
LogFlowThisFunc(("\n"));
/* Enclose the state transition Ready->InUninit->NotReady */
AutoUninitSpan autoUninitSpan(this);
if (autoUninitSpan.uninitDone())
return;
}
// IUSBDevice properties
/////////////////////////////////////////////////////////////////////////////
{
AutoCaller autoCaller(this);
/* this is const, no need to lock */
return S_OK;
}
{
AutoCaller autoCaller(this);
/* this is const, no need to lock */
return S_OK;
}
{
AutoCaller autoCaller(this);
/* this is const, no need to lock */
return S_OK;
}
{
AutoCaller autoCaller(this);
/* this is const, no need to lock */
return S_OK;
}
{
AutoCaller autoCaller(this);
/* this is const, no need to lock */
return S_OK;
}
{
AutoCaller autoCaller(this);
/* this is const, no need to lock */
return S_OK;
}
{
AutoCaller autoCaller(this);
/* this is const, no need to lock */
return S_OK;
}
{
AutoCaller autoCaller(this);
/* this is const, no need to lock */
return S_OK;
}
{
AutoCaller autoCaller(this);
/* this is const, no need to lock */
return S_OK;
}
{
AutoCaller autoCaller(this);
/* this is const, no need to lock */
return S_OK;
}
{
AutoCaller autoCaller(this);
/* this is const, no need to lock */
return S_OK;
}
{
AutoCaller autoCaller(this);
/* RemoteUSBDevice is always remote. */
/* this is const, no need to lock */
return S_OK;
}
// IHostUSBDevice properties
////////////////////////////////////////////////////////////////////////////////
{
AutoCaller autoCaller(this);
return S_OK;
}
// public methods only for internal purposes
////////////////////////////////////////////////////////////////////////////////
/* vi: set tabstop=4 shiftwidth=4 expandtab: */