The info about partitionable space will be provided by the userland disk
system add-ons. First work to make this class usable for them. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22539 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -12,25 +12,35 @@ struct partitionable_space_data;
|
||||
|
||||
class BPartitioningInfo {
|
||||
public:
|
||||
BPartitioningInfo();
|
||||
virtual ~BPartitioningInfo();
|
||||
BPartitioningInfo();
|
||||
virtual ~BPartitioningInfo();
|
||||
|
||||
void Unset();
|
||||
status_t SetTo(off_t offset, off_t size);
|
||||
void Unset();
|
||||
|
||||
partition_id PartitionID() const;
|
||||
status_t ExcludeOccupiedSpace(off_t offset,
|
||||
off_t size);
|
||||
|
||||
status_t GetPartitionableSpaceAt(int32 index, off_t *offset,
|
||||
off_t *size) const;
|
||||
int32 CountPartitionableSpaces() const;
|
||||
// TODO: We don't need the partition ID.
|
||||
partition_id PartitionID() const;
|
||||
|
||||
status_t GetPartitionableSpaceAt(int32 index,
|
||||
off_t* offset, off_t*size) const;
|
||||
int32 CountPartitionableSpaces() const;
|
||||
|
||||
private:
|
||||
status_t _SetTo(partition_id partition, int32 changeCounter);
|
||||
status_t _SetTo(partition_id partition,
|
||||
int32 changeCounter);
|
||||
|
||||
status_t _InsertSpaces(int32 index, int32 count);
|
||||
void _RemoveSpaces(int32 index, int32 count);
|
||||
|
||||
friend class BPartition;
|
||||
|
||||
partition_id fPartitionID;
|
||||
partitionable_space_data *fSpaces;
|
||||
int32 fCount;
|
||||
partition_id fPartitionID;
|
||||
partitionable_space_data* fSpaces;
|
||||
int32 fCount;
|
||||
int32 fCapacity;
|
||||
};
|
||||
|
||||
#endif // _PARTITIONING_INFO_H
|
||||
|
||||
Reference in New Issue
Block a user