HardDiskAttachmentImpl.cpp revision 26d2a42f095ded346df2e41cc4837cb426b4753a
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsync * VirtualBox COM class implementation
e64031e20c39650a7bc902a3e1aba613b9415deevboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsync * available from http://www.virtualbox.org. This file is free software;
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsync * you can redistribute it and/or modify it under the terms of the GNU
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsync * General Public License (GPL) as published by the Free Software
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
f41e2072ec8320014565f76f4905e47f80b17262vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
f41e2072ec8320014565f76f4905e47f80b17262vboxsync * additional information or have any questions.
f41e2072ec8320014565f76f4905e47f80b17262vboxsync// constructor / destructor
f41e2072ec8320014565f76f4905e47f80b17262vboxsync/////////////////////////////////////////////////////////////////////////////
f41e2072ec8320014565f76f4905e47f80b17262vboxsync// public initializer/uninitializer for internal purposes only
f41e2072ec8320014565f76f4905e47f80b17262vboxsync/////////////////////////////////////////////////////////////////////////////
f41e2072ec8320014565f76f4905e47f80b17262vboxsync * Initializes the hard disk attachment object.
f41e2072ec8320014565f76f4905e47f80b17262vboxsync * @param aHD Hard disk object.
f41e2072ec8320014565f76f4905e47f80b17262vboxsync * @param aBus Bus type.
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsync * @param aChannel Channel number.
f41e2072ec8320014565f76f4905e47f80b17262vboxsync * @param aDevice Device number on the channel.
f41e2072ec8320014565f76f4905e47f80b17262vboxsync * @param aImplicit Wether the attachment contains an implicitly created diff.
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsyncHRESULT HardDisk2Attachment::init (HardDisk2 *aHD, StorageBus_T aBus, LONG aChannel,
f41e2072ec8320014565f76f4905e47f80b17262vboxsync /* Enclose the state transition NotReady->InInit->Ready */
f41e2072ec8320014565f76f4905e47f80b17262vboxsync /* Confirm a successful initialization when it's the case */
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsync * Uninitializes the instance.
f41e2072ec8320014565f76f4905e47f80b17262vboxsync * Called from FinalRelease().
f41e2072ec8320014565f76f4905e47f80b17262vboxsync /* Enclose the state transition Ready->InUninit->NotReady */
f41e2072ec8320014565f76f4905e47f80b17262vboxsync// IHardDisk2Attachment properties
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsync/////////////////////////////////////////////////////////////////////////////
f41e2072ec8320014565f76f4905e47f80b17262vboxsyncSTDMETHODIMP HardDisk2Attachment::COMGETTER(HardDisk) (IHardDisk2 **aHardDisk)
f41e2072ec8320014565f76f4905e47f80b17262vboxsyncSTDMETHODIMP HardDisk2Attachment::COMGETTER(Bus) (StorageBus_T *aBus)
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsync /* m.bus is constant during life time, no need to lock */
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsyncSTDMETHODIMP HardDisk2Attachment::COMGETTER(Channel) (LONG *aChannel)
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsync /* m.channel is constant during life time, no need to lock */
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsyncSTDMETHODIMP HardDisk2Attachment::COMGETTER(Device) (LONG *aDevice)
261a4578c86ef14d89385dde78f0139b41a0cb8evboxsync /* m.device is constant during life time, no need to lock */