1 // KDiskDeviceUserDataWriter.h
3 #ifndef _K_DISK_DEVICE_USER_DATA_WRITER_H
4 #define _K_DISK_DEVICE_USER_DATA_WRITER_H
6 #include <SupportDefs.h>
8 struct user_disk_device_data
;
9 struct user_partition_data
;
12 namespace DiskDevice
{
14 class UserDataWriter
{
17 UserDataWriter(user_disk_device_data
*buffer
, size_t bufferSize
);
20 status_t
SetTo(user_disk_device_data
*buffer
, size_t bufferSize
);
23 void *AllocateData(size_t size
, size_t align
= 1);
24 user_partition_data
*AllocatePartitionData(size_t childCount
);
25 user_disk_device_data
*AllocateDeviceData(size_t childCount
);
27 char *PlaceString(const char *str
);
29 size_t AllocatedSize() const;
31 status_t
AddRelocationEntry(void *address
);
32 status_t
Relocate(void *address
);
35 struct RelocationEntryList
;
37 user_disk_device_data
*fBuffer
;
39 size_t fAllocatedSize
;
40 RelocationEntryList
*fRelocationEntries
;
43 } // namespace DiskDevice
44 } // namespace BPrivate
46 using BPrivate::DiskDevice::UserDataWriter
;
48 #endif // _K_DISK_DEVICE_USER_DATA_WRITER_H