Added missing manipulation methods (though no implementation). Some cleanup. Renamed UniqueID() to ID().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3906 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8bb7454636
commit
bf5ffb0203
@ -35,6 +35,7 @@ public:
|
|||||||
bool IsDevice() const;
|
bool IsDevice() const;
|
||||||
bool IsReadOnly() const;
|
bool IsReadOnly() const;
|
||||||
bool IsMounted() const;
|
bool IsMounted() const;
|
||||||
|
bool IsBusy() const;
|
||||||
|
|
||||||
uint32 Flags() const;
|
uint32 Flags() const;
|
||||||
|
|
||||||
@ -42,8 +43,7 @@ public:
|
|||||||
const char *ContentName() const;
|
const char *ContentName() const;
|
||||||
const char *Type() const; // See DiskDeviceTypes.h
|
const char *Type() const; // See DiskDeviceTypes.h
|
||||||
const char *ContentType() const; // See DiskDeviceTypes.h
|
const char *ContentType() const; // See DiskDeviceTypes.h
|
||||||
partition_id UniqueID() const;
|
partition_id ID() const;
|
||||||
// TODO: just ID() ?
|
|
||||||
|
|
||||||
status_t GetDiskSystem(BDiskSystem *diskSystem) const;
|
status_t GetDiskSystem(BDiskSystem *diskSystem) const;
|
||||||
|
|
||||||
@ -82,13 +82,28 @@ public:
|
|||||||
status_t ValidateMove(off_t*) const;
|
status_t ValidateMove(off_t*) const;
|
||||||
status_t Move(off_t);
|
status_t Move(off_t);
|
||||||
|
|
||||||
|
bool CanSetName() const;
|
||||||
|
status_t ValidateSetName(char *name) const;
|
||||||
|
// adjusts name to be suitable
|
||||||
|
status_t SetName(const char *name);
|
||||||
|
|
||||||
|
bool CanSetContentName(bool *whileMounted = NULL) const;
|
||||||
|
status_t ValidateSetContentName(char *name) const;
|
||||||
|
// adjusts name to be suitable
|
||||||
|
status_t SetContentName(const char *name);
|
||||||
|
|
||||||
|
bool CanSetType() const;
|
||||||
|
status_t ValidateSetType(const char *type) const;
|
||||||
|
// type must be one the parent disk system's GetNextSupportedType()
|
||||||
|
// returns.
|
||||||
|
status_t SetType(const char *type);
|
||||||
|
|
||||||
bool CanEditParameters(bool *whileMounted = NULL) const;
|
bool CanEditParameters(bool *whileMounted = NULL) const;
|
||||||
status_t GetParameterEditor(
|
status_t GetParameterEditor(
|
||||||
BDiskScannerParameterEditor **editor,
|
BDiskScannerParameterEditor **editor,
|
||||||
BDiskScannerParameterEditor **contentEditor);
|
BDiskScannerParameterEditor **contentEditor);
|
||||||
status_t SetParameters(const char *parameters, const char *contentParameters);
|
status_t SetParameters(const char *parameters,
|
||||||
|
const char *contentParameters);
|
||||||
// TODO: Add name/content name editing methods, Also in BDiskSystem.
|
|
||||||
|
|
||||||
bool CanInitialize(const char *diskSystem) const;
|
bool CanInitialize(const char *diskSystem) const;
|
||||||
status_t GetInitializationParameterEditor(const char *system,
|
status_t GetInitializationParameterEditor(const char *system,
|
||||||
|
@ -135,6 +135,15 @@ BPartition::IsMounted() const
|
|||||||
// return (fPartitionData && fPartitionData->volume >= 0);
|
// return (fPartitionData && fPartitionData->volume >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsBusy
|
||||||
|
bool
|
||||||
|
BPartition::IsBusy() const
|
||||||
|
{
|
||||||
|
return (fPartitionData
|
||||||
|
&& (fPartitionData->flags
|
||||||
|
& (B_PARTITION_BUSY | B_PARTITION_DESCENDANT_BUSY)));
|
||||||
|
}
|
||||||
|
|
||||||
// Flags
|
// Flags
|
||||||
/*! \brief Returns the flags for this partitions.
|
/*! \brief Returns the flags for this partitions.
|
||||||
|
|
||||||
@ -194,7 +203,7 @@ BPartition::ContentType() const
|
|||||||
return (fPartitionData ? fPartitionData->content_type : NULL);
|
return (fPartitionData ? fPartitionData->content_type : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// UniqueID
|
// ID
|
||||||
/*! \brief Returns a unique identifier for this partition.
|
/*! \brief Returns a unique identifier for this partition.
|
||||||
|
|
||||||
The ID is not persistent, i.e. in general won't be the same after
|
The ID is not persistent, i.e. in general won't be the same after
|
||||||
@ -205,7 +214,7 @@ BPartition::ContentType() const
|
|||||||
\return A unique identifier for this partition.
|
\return A unique identifier for this partition.
|
||||||
*/
|
*/
|
||||||
int32
|
int32
|
||||||
BPartition::UniqueID() const
|
BPartition::ID() const
|
||||||
{
|
{
|
||||||
return (fPartitionData ? fPartitionData->id : -1);
|
return (fPartitionData ? fPartitionData->id : -1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user