HardDiskImpl.h revision 57b49c1557a310ee615bc0ee79dd2a2e92319a1b
/* $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_HARDDISKIMPL
#define ____H_HARDDISKIMPL
#include "VirtualBoxBase.h"
#include "VirtualBoxImpl.h"
#include "HardDiskFormatImpl.h"
#include "MediumImpl.h"
#include <map>
////////////////////////////////////////////////////////////////////////////////
/**
* The HardDisk component class implements the IHardDisk interface.
*/
{
List;
void FinalRelease();
// have to use a special enum for the overloaded init() below;
// can't use AccessMode_T from XIDL because that's mapped to an int
// and would be ambiguous
// public initializer/uninitializer for internal purposes only
void uninit();
// IMedium properties & methods
// IHardDisk properties
// IHardDisk 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 "HardDisk"; }
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);
const char *pszzValid);
/** weak parent */
struct Task;
struct Data
{
Data()
logicalSize(0),
autoReset(false),
implicit(false),
{}
bool implicit : 1;
};
};
#endif /* ____H_HARDDISKIMPL */
/* vi: set tabstop=4 shiftwidth=4 expandtab: */