2009-11-21 01:45:08 +00:00
|
|
|
#ifndef __DISKCOPY42IMAGE_H__
|
|
|
|
#define __DISKCOPY42IMAGE_H__
|
|
|
|
|
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-11-21 01:45:08 +00:00
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2009-12-16 01:33:28 +00:00
|
|
|
namespace Device {
|
2009-11-21 01:45:08 +00:00
|
|
|
|
|
|
|
class DiskCopy42Image : public DiskImage {
|
|
|
|
public:
|
|
|
|
virtual ~DiskCopy42Image();
|
|
|
|
|
|
|
|
static DiskCopy42Image *Create(const char *name, size_t blocks);
|
2009-11-26 15:58:10 +00:00
|
|
|
static DiskCopy42Image *Create(const char *name, size_t blocks, const char *vname);
|
|
|
|
|
2009-11-21 01:45:08 +00:00
|
|
|
static DiskCopy42Image *Open(MappedFile *);
|
|
|
|
|
|
|
|
static uint32_t Checksum(void *data, size_t size);
|
|
|
|
|
|
|
|
virtual void write(unsigned block, const void *bp);
|
|
|
|
|
2010-05-18 19:59:18 +00:00
|
|
|
|
2010-05-18 21:26:07 +00:00
|
|
|
virtual BlockCache *createBlockCache();
|
2010-05-18 19:59:18 +00:00
|
|
|
|
2009-11-21 01:45:08 +00:00
|
|
|
private:
|
|
|
|
|
2010-05-18 02:58:26 +00:00
|
|
|
DiskCopy42Image(const char *name, bool readOnly);
|
|
|
|
|
2009-11-21 01:45:08 +00:00
|
|
|
DiskCopy42Image(MappedFile *);
|
|
|
|
static void Validate(MappedFile *);
|
|
|
|
bool _changed;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|