HostDVDDriveImpl.cpp revision 26d2a42f095ded346df2e41cc4837cb426b4753a
/** @file
*
* VirtualBox COM class implementation
*/
/*
* Copyright (C) 2006-2007 Sun Microsystems, Inc.
*
* 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.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
#include "HostDVDDriveImpl.h"
#include <iprt/cpputils.h>
// constructor / destructor
/////////////////////////////////////////////////////////////////////////////
{
return S_OK;
}
void HostDVDDrive::FinalRelease()
{
uninit();
}
// public initializer/uninitializer for internal purposes only
/////////////////////////////////////////////////////////////////////////////
/**
* Initializes the host DVD drive object.
*
* @param aName Name of the drive.
* @param aUdi Universal device identifier (currently may be NULL).
* @param aDescription Human-readable drive description (may be NULL).
*
* @return COM result indicator.
*/
{
/* Enclose the state transition NotReady->InInit->Ready */
AutoInitSpan autoInitSpan (this);
/* Confirm the 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 HostDVDDrive::uninit()
{
/* Enclose the state transition Ready->InUninit->NotReady */
AutoUninitSpan autoUninitSpan (this);
if (autoUninitSpan.uninitDone())
return;
}
// IHostDVDDrive properties
/////////////////////////////////////////////////////////////////////////////
{
if (!aName)
return E_POINTER;
AutoCaller autoCaller (this);
/* mName is constant during life time, no need to lock */
return S_OK;
}
{
if (!aDescription)
return E_POINTER;
AutoCaller autoCaller (this);
/* mDescription is constant during life time, no need to lock */
return S_OK;
}
{
if (!aUdi)
return E_POINTER;
AutoCaller autoCaller (this);
/* mUdi is constant during life time, no need to lock */
return S_OK;
}