Files
haiku-beta6/src/system/kernel/disk_device_manager/UserDataWriter.h
T

49 lines
1.1 KiB
C++
Raw Normal View History

// KDiskDeviceUserDataWriter.h
#ifndef _K_DISK_DEVICE_USER_DATA_WRITER_H
#define _K_DISK_DEVICE_USER_DATA_WRITER_H
#include <SupportDefs.h>
struct user_disk_device_data;
struct user_partition_data;
namespace BPrivate {
namespace DiskDevice {
class UserDataWriter {
public:
UserDataWriter();
UserDataWriter(user_disk_device_data *buffer, size_t bufferSize);
~UserDataWriter();
2003-09-28 15:15:20 +00:00
status_t SetTo(user_disk_device_data *buffer, size_t bufferSize);
void Unset();
void *AllocateData(size_t size, size_t align = 1);
user_partition_data *AllocatePartitionData(size_t childCount);
user_disk_device_data *AllocateDeviceData(size_t childCount);
char *PlaceString(const char *str);
size_t AllocatedSize() const;
2003-09-28 15:15:20 +00:00
status_t AddRelocationEntry(void *address);
status_t Relocate(void *address);
private:
2003-09-28 15:15:20 +00:00
struct RelocationEntryList;
user_disk_device_data *fBuffer;
size_t fBufferSize;
size_t fAllocatedSize;
2003-09-28 15:15:20 +00:00
RelocationEntryList *fRelocationEntries;
};
} // namespace DiskDevice
} // namespace BPrivate
using BPrivate::DiskDevice::UserDataWriter;
#endif // _K_DISK_DEVICE_USER_DATA_WRITER_H