2009-12-16 01:33:28 +00:00
|
|
|
#ifndef __DAVEXDISKIMAGE_H__
|
|
|
|
#define __DAVEXDISKIMAGE_H__
|
2009-11-21 01:45:08 +00:00
|
|
|
|
|
|
|
#include <string>
|
2011-03-09 05:02:04 +00:00
|
|
|
#include <new>
|
2009-11-21 01:45:08 +00:00
|
|
|
|
2009-12-16 01:33:28 +00:00
|
|
|
#include <Device/BlockDevice.h>
|
2010-05-18 02:58:26 +00:00
|
|
|
#include <Device/DiskImage.h>
|
|
|
|
|
2009-12-16 01:33:28 +00:00
|
|
|
|
|
|
|
namespace Device {
|
2009-11-21 01:45:08 +00:00
|
|
|
|
|
|
|
// only supports 1 file; may be split over multiple files.
|
|
|
|
|
|
|
|
class DavexDiskImage : public DiskImage {
|
|
|
|
public:
|
|
|
|
|
|
|
|
virtual ~DavexDiskImage();
|
|
|
|
|
2011-02-22 04:57:50 +00:00
|
|
|
static BlockDevicePointer Create(const char *name, size_t blocks);
|
|
|
|
static BlockDevicePointer Create(const char *name, size_t blocks, const char *vname);
|
|
|
|
static BlockDevicePointer Open(MappedFile *);
|
2009-11-21 01:45:08 +00:00
|
|
|
|
2011-02-22 02:59:33 +00:00
|
|
|
virtual BlockCachePointer createBlockCache();
|
2009-11-21 01:45:08 +00:00
|
|
|
|
2011-03-09 05:02:04 +00:00
|
|
|
static bool Validate(MappedFile *, const std::nothrow_t &);
|
|
|
|
static bool Validate(MappedFile *);
|
2009-11-21 01:45:08 +00:00
|
|
|
|
2016-08-15 16:29:06 +00:00
|
|
|
|
2009-11-21 01:45:08 +00:00
|
|
|
DavexDiskImage(MappedFile *);
|
2016-08-15 16:29:06 +00:00
|
|
|
private:
|
|
|
|
DavexDiskImage();
|
2009-11-21 01:45:08 +00:00
|
|
|
|
|
|
|
bool _changed;
|
|
|
|
std::string _volumeName;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-12-16 01:33:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|