#ifndef _DATA_H
# define _DATA_H
struct DeviceInfo;
struct VolumeDescriptor;
struct IOWrapper;
struct Extents {
off_t base;
off_t length;
};
typedef struct Extents Extents_t;
#define kExtentCount 100
struct ExtentList {
size_t count;
Extents_t extents[kExtentCount];
struct ExtentList *next;
};
typedef struct ExtentList ExtentList_t;
struct VolumeObjects {
struct DeviceInfo *devp;
struct VolumeDescriptor *vdp;
size_t count;
off_t byteCount;
ExtentList_t *list;
};
typedef struct VolumeObjects VolumeObjects_t;
extern VolumeObjects_t *InitVolumeObject(struct DeviceInfo *devp, struct VolumeDescriptor *vdp);
extern int AddExtent(VolumeObjects_t *vop, off_t start, off_t length);
extern void PrintVolumeObject(VolumeObjects_t*);
extern int CopyObjectsToDest(VolumeObjects_t*, struct IOWrapper *wrapper, off_t skip);
extern void WriteGatheredData(const char *, VolumeObjects_t*);
#endif