HardDiskImpl.h revision cdd4210965dea38987df21ac871713561bcf6f60
/* $Id$ */
/** @file
*
* VirtualBox COM class implementation
*/
/*
* Copyright (C) 2006-2007 innotek GmbH
*
* 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.
*/
#ifndef ____H_HARDDISKIMPL
#define ____H_HARDDISKIMPL
#include "VirtualBoxBase.h"
#include "Collection.h"
#include <VBox/VBoxHDD-new.h>
#include <iprt/semaphore.h>
#include <list>
////////////////////////////////////////////////////////////////////////////////
{
void FinalRelease();
// protected initializer/uninitializer for internal purposes only
// IHardDisk properties
// IHardDisk methods
// public methods for internal purposes only
bool isDifferencing() const
{
return mType == HardDiskType_NormalHardDisk &&
}
bool isParentImmutable() const
{
}
inline HVirtualDiskImage *asVDI();
/** Shortcut to #dependentChildrenLock() */
/**
* Shortcut to #dependentChildren().
* Do |AutoLock alock (childrenLock());| before acceessing the returned list!
*/
bool aCheckReaders = false);
// virtual methods that need to be [re]implemented by every subclass
void setBusy();
void clearBusy();
void addReader();
void releaseReader();
void addReaderOnAncestors();
void releaseReaderOnAncestors();
bool hasForeignChildren();
void clearBusyWithChildren();
/* the following must be called from under the lock */
// for VirtualBoxSupportErrorInfoImpl
/** weak VirualBox parent */
bool mBusy;
unsigned mReaders;
};
////////////////////////////////////////////////////////////////////////////////
{
void FinalRelease();
// public initializer/uninitializer for internal purposes only
void uninit();
// IHardDisk properties
// IVirtualDiskImage properties
// IVirtualDiskImage methods
STDMETHOD(DeleteImage)();
// public methods for internal purposes only
// for VirtualBoxSupportErrorInfoImpl
/** VDI asynchronous operation thread function */
enum State
{
/* the following must be greater than Created */
};
};
// dependent inline members
////////////////////////////////////////////////////////////////////////////////
{
}
////////////////////////////////////////////////////////////////////////////////
{
void FinalRelease();
// public initializer/uninitializer for internal purposes only
void uninit();
// IHardDisk properties
// IISCSIHardDisk properties
// public methods for internal purposes only
// for VirtualBoxSupportErrorInfoImpl
};
////////////////////////////////////////////////////////////////////////////////
{
void FinalRelease();
// public initializer/uninitializer for internal purposes only
void uninit();
// IHardDisk properties
// IVirtualDiskImage properties
// IVirtualDiskImage methods
STDMETHOD(DeleteImage)();
// public methods for internal purposes only
// for VirtualBoxSupportErrorInfoImpl
/** VDI asynchronous operation thread function */
enum State
{
/* the following must be greater than Created */
};
};
////////////////////////////////////////////////////////////////////////////////
{
void FinalRelease();
// public initializer/uninitializer for internal purposes only
void uninit();
// IHardDisk properties
// IVirtualDiskImage properties
// IVirtualDiskImage methods
STDMETHOD(DeleteImage)();
// public methods for internal purposes only
// for VirtualBoxSupportErrorInfoImpl
/** VDI asynchronous operation thread function */
enum State
{
/* the following must be greater than Created */
};
};
////////////////////////////////////////////////////////////////////////////////
{
void FinalRelease();
// public initializer/uninitializer for internal purposes only
void uninit();
// IHardDisk properties
// IVirtualDiskImage properties
// IVirtualDiskImage methods
STDMETHOD(DeleteImage)();
// public methods for internal purposes only
// for VirtualBoxSupportErrorInfoImpl
/** VDI asynchronous operation thread function */
enum State
{
/* the following must be greater than Created */
};
};
#endif // ____H_HARDDISKIMPL