HardDisk2Impl.h revision 220bcc6fd5cf16df458060d6e825f88284e8a948
/* $Id$ */
/** @file
*
* VirtualBox COM class implementation
*/
/*
* Copyright (C) 2008 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.
*/
#ifndef ____H_HARDDISK2IMPL
#define ____H_HARDDISK2IMPL
#include "VirtualBoxBase.h"
#include "VirtualBoxImpl.h"
#include "HardDiskFormatImpl.h"
#include "MediumImpl.h"
#include <VBox/VBoxHDD-new.h>
#include <map>
////////////////////////////////////////////////////////////////////////////////
/**
* The HardDisk2 component class implements the IHardDisk2 interface.
*/
{
List;
void FinalRelease();
// public initializer/uninitializer for internal purposes only
void uninit();
// IMedium properties & methods
// IHardDisk2 properties
// IHardDisk2 methods
// public methods for internal purposes only
/**
* Shortcut to VirtualBoxBaseWithTypedChildrenNEXT::dependentChildren().
*/
bool isReadOnly();
/**
* Shortcut to #deleteStorage() that doesn't wait for operation completion
* and implies the progress object will be used for waiting.
*/
/**
* Shortcut to #deleteStorage() that wait for operation completion by
* blocking the current thread.
*/
/**
* Shortcut to #createDiffStorage() that doesn't wait for operation
* completion and implies the progress object will be used for waiting.
*/
/**
* Shortcut to #createDiffStorage() that wait for operation completion by
* blocking the current thread.
*/
bool aIgnoreAttachments = false);
/**
* Shortcut to #mergeTo() that doesn't wait for operation completion and
* implies the progress object will be used for waiting.
*/
/**
* Shortcut to #mergeTo() that wait for operation completion by
* blocking the current thread.
*/
/** Returns a preferred format for a differencing hard disk. */
// unsafe inline public methods for internal purposes only (ensure there is
// a caller and a read lock before calling them!)
/** For com::SupportErrorInfoImpl. */
static const char *ComponentName() { return "HardDisk2"; }
bool aWait);
bool aWait);
/**
* Returns VirtualBox::hardDiskTreeHandle(), for convenience. Don't forget
* to follow these locking rules:
*
* 1. The write lock on this handle must be either held alone on the thread
* or requested *after* the VirtualBox object lock. Mixing with other
* locks is prohibited.
*
* 2. The read lock on this handle may be intermixed with any other lock
* with the exception that it must be requested *after* the VirtualBox
* object lock.
*/
/** Reimplements VirtualBoxWithTypedChildren::childrenLock() to return
* treeLock(). */
const Guid &aSnapshotId);
void *pvUser);
/** weak parent */
struct Task;
struct Data
{
, implicit (false), numCreateDiffTasks (0)
bool implicit : 1;
};
};
#endif /* ____H_HARDDISK2IMPL */