Added IsReadOnlyMedia(), IsWriteOnceMedia(), and renamed IsRemovable() to IsRemovableMedia() for consistency.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3904 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -15,8 +15,10 @@ public:
|
||||
BDiskDevice();
|
||||
virtual ~BDiskDevice();
|
||||
|
||||
bool IsRemovable() const;
|
||||
bool HasMedia() const;
|
||||
bool IsRemovableMedia() const;
|
||||
bool IsReadOnlyMedia() const;
|
||||
bool IsWriteOnceMedia() const;
|
||||
|
||||
status_t Eject(bool update = false);
|
||||
|
||||
|
||||
@@ -41,17 +41,6 @@ BDiskDevice::~BDiskDevice()
|
||||
{
|
||||
}
|
||||
|
||||
// IsRemovable
|
||||
/*! \brief Returns whether the device media are removable.
|
||||
\return \c true, if the device media are removable, \c false otherwise.
|
||||
*/
|
||||
bool
|
||||
BDiskDevice::IsRemovable() const
|
||||
{
|
||||
return (fDeviceData
|
||||
&& fDeviceData->device_flags & B_DISK_DEVICE_REMOVABLE);
|
||||
}
|
||||
|
||||
// HasMedia
|
||||
/*! \brief Returns whether the device contains a media.
|
||||
\return \c true, if the device contains a media, \c false otherwise.
|
||||
@@ -63,6 +52,33 @@ BDiskDevice::HasMedia() const
|
||||
&& fDeviceData->device_flags & B_DISK_DEVICE_HAS_MEDIA);
|
||||
}
|
||||
|
||||
// IsRemovableMedia
|
||||
/*! \brief Returns whether the device media are removable.
|
||||
\return \c true, if the device media are removable, \c false otherwise.
|
||||
*/
|
||||
bool
|
||||
BDiskDevice::IsRemovableMedia() const
|
||||
{
|
||||
return (fDeviceData
|
||||
&& fDeviceData->device_flags & B_DISK_DEVICE_REMOVABLE);
|
||||
}
|
||||
|
||||
// IsReadOnlyMedia
|
||||
bool
|
||||
BDiskDevice::IsReadOnlyMedia() const
|
||||
{
|
||||
return (fDeviceData
|
||||
&& fDeviceData->device_flags & B_DISK_DEVICE_READ_ONLY);
|
||||
}
|
||||
|
||||
// IsWriteOnceMedia
|
||||
bool
|
||||
BDiskDevice::IsWriteOnceMedia() const
|
||||
{
|
||||
return (fDeviceData
|
||||
&& fDeviceData->device_flags & B_DISK_DEVICE_WRITE_ONCE);
|
||||
}
|
||||
|
||||
// Eject
|
||||
/*! \brief Eject the device's media.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user