Some documentation. Courtesy of Jan Matejek.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21722 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -41,6 +41,7 @@ BDiskDevice::BDiskDevice()
|
|||||||
*/
|
*/
|
||||||
BDiskDevice::~BDiskDevice()
|
BDiskDevice::~BDiskDevice()
|
||||||
{
|
{
|
||||||
|
CancelModifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
// HasMedia
|
// HasMedia
|
||||||
@@ -179,6 +180,14 @@ BDiskDevice::IsModified() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PrepareModifications
|
// PrepareModifications
|
||||||
|
/*! \brief Initializes the partition hierarchy for modifications.
|
||||||
|
*
|
||||||
|
* Subsequent modifications are performed on so-called \a shadow structure
|
||||||
|
* and not written to device until \ref CommitModifications is called.
|
||||||
|
*
|
||||||
|
* \note This call locks the device. You need to call \ref CommitModifications
|
||||||
|
* or \ref CancelModifications to unlock it.
|
||||||
|
*/
|
||||||
status_t
|
status_t
|
||||||
BDiskDevice::PrepareModifications()
|
BDiskDevice::PrepareModifications()
|
||||||
{
|
{
|
||||||
@@ -202,6 +211,12 @@ BDiskDevice::PrepareModifications()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CommitModifications
|
// CommitModifications
|
||||||
|
/*! \brief Commits modifications to device.
|
||||||
|
*
|
||||||
|
* Creates a set of jobs that perform all the changes done after
|
||||||
|
* \ref PrepareModifications. The changes are then written to device.
|
||||||
|
* Unlocks the device for further use.
|
||||||
|
*/
|
||||||
status_t
|
status_t
|
||||||
BDiskDevice::CommitModifications(bool synchronously,
|
BDiskDevice::CommitModifications(bool synchronously,
|
||||||
BMessenger progressMessenger,
|
BMessenger progressMessenger,
|
||||||
@@ -223,6 +238,10 @@ BDiskDevice::CommitModifications(bool synchronously,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CancelModifications
|
// CancelModifications
|
||||||
|
/*! \brief Cancels all modifications performed on the device.
|
||||||
|
*
|
||||||
|
* Nothing is written on the device and it is unlocked for further use.
|
||||||
|
*/
|
||||||
status_t
|
status_t
|
||||||
BDiskDevice::CancelModifications()
|
BDiskDevice::CancelModifications()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user