mirror of
https://github.com/markdavidlong/AppleSAWS.git
synced 2025-02-16 11:30:26 +00:00
54 lines
1.0 KiB
C++
54 lines
1.0 KiB
C++
#ifndef DISKFILE_H
|
|
#define DISKFILE_H
|
|
|
|
#include <Qt>
|
|
#include <QMap>
|
|
#include <QString>
|
|
#include <QDebug>
|
|
#include <QCryptographicHash>
|
|
|
|
#include "util.h"
|
|
#include "sector.h"
|
|
#include "vtoc.h"
|
|
|
|
#include "genericfile.h"
|
|
|
|
class DiskFile
|
|
{
|
|
public:
|
|
DiskFile(QString filename = "");
|
|
~DiskFile();
|
|
|
|
bool read(QString filename);
|
|
|
|
Sector &getSector(TSPair ts) { return getSector(ts.track, ts.sector); }
|
|
|
|
Sector &getSector(int track, int sector) {
|
|
return m_contents[track][sector];
|
|
}
|
|
|
|
VTOC getVTOC();
|
|
|
|
QList<CatalogSector> getCatalogSectors();
|
|
|
|
GenericFile *getFile(FileDescriptiveEntry fde);
|
|
|
|
QByteArray getDataFromTrackSectorList(TrackSectorList tsl);
|
|
|
|
QList<FileDescriptiveEntry> getAllFDEs();
|
|
|
|
QByteArray fileHash() const { return m_hash; }
|
|
|
|
QString getDiskImageName() const { return m_imageName; }
|
|
private:
|
|
|
|
QMap< int, QMap< int, Sector> > m_contents;
|
|
QMap<FileDescriptiveEntry,GenericFile *> m_files;
|
|
QByteArray m_hash;
|
|
|
|
QString m_imageName;
|
|
|
|
};
|
|
|
|
#endif // DISKFILE_H
|