mirror of
https://github.com/fadden/ciderpress.git
synced 2024-11-26 17:49:21 +00:00
aa3145856c
Focusing on the diskimg library this time, which deals with a lot of filesystem structures that have specific widths. This is still a bit lax in places, e.g. using "long" for lengths. Should either specify a bit width or use di_off_t. Also, added "override" keyword where appropriate. Also, bumped library version to 5.0.0.
41 lines
943 B
C++
41 lines
943 B
C++
/*
|
|
* CiderPress
|
|
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
|
|
* See the file LICENSE for distribution terms.
|
|
*/
|
|
/*
|
|
* Declarations for the Win32 SCSI Pass-Through Interface.
|
|
*/
|
|
#ifndef DISKIMG_SPTI_H
|
|
#define DISKIMG_SPTI_H
|
|
|
|
#ifdef _WIN32
|
|
|
|
namespace DiskImgLib {
|
|
|
|
/*
|
|
* This is currently implemented as a set of static functions. Do not
|
|
* instantiate the class.
|
|
*/
|
|
class DISKIMG_API SPTI {
|
|
public:
|
|
// Read blocks from the device.
|
|
static DIError ReadBlocks(HANDLE handle, long startBlock, short numBlocks,
|
|
long blockSize, void* buf);
|
|
|
|
// Get the capacity, expressed as the highest-available LBA and the device
|
|
// block size.
|
|
static DIError GetDeviceCapacity(HANDLE handle, uint32_t* pLastBlock,
|
|
uint32_t* pBlockSize);
|
|
|
|
private:
|
|
SPTI(void) {}
|
|
~SPTI(void) {}
|
|
};
|
|
|
|
} // namespace DiskImgLib
|
|
|
|
#endif /*_WIN32*/
|
|
|
|
#endif /*DISKIMG_SPTI_H*/
|