haiku/headers/private/storage/PartitioningInfo.h
Coldfirex 2ca1376080 Mass updating of OpenBeOS text to Haiku
No functional code altered.

https://dev.haiku-os.org/ticket/17197

Change-Id: I75cc74f6be0ad968fd77c31fbe5b0f650a6fe9e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4364
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-11-07 10:00:35 +00:00

45 lines
1.1 KiB
C++

//----------------------------------------------------------------------
// This software is part of the Haiku distribution and is covered
// by the MIT License.
//---------------------------------------------------------------------
#ifndef _PARTITIONING_INFO_H
#define _PARTITIONING_INFO_H
#include <DiskDeviceDefs.h>
struct partitionable_space_data;
class BPartitioningInfo {
public:
BPartitioningInfo();
virtual ~BPartitioningInfo();
status_t SetTo(off_t offset, off_t size);
void Unset();
status_t ExcludeOccupiedSpace(off_t offset,
off_t size);
// 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;
void PrintToStream() const;
private:
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;
int32 fCapacity;
};
#endif // _PARTITIONING_INFO_H