IOFilterScheme.cpp [plain text]
#include <IOKit/storage/IOFilterScheme.h>
#define super IOStorage
OSDefineMetaClassAndStructors(IOFilterScheme, IOStorage)
#ifndef __LP64__
extern IOStorageAttributes gIOStorageAttributesUnsupported;
#endif
IOMedia * IOFilterScheme::getProvider() const
{
return (IOMedia *) IOService::getProvider();
}
bool IOFilterScheme::handleOpen(IOService * client,
IOOptionBits options,
void * argument)
{
return getProvider()->open(this, options, (uintptr_t) argument);
}
bool IOFilterScheme::handleIsOpen(const IOService * client) const
{
return getProvider()->isOpen(this);
}
void IOFilterScheme::handleClose(IOService * client, IOOptionBits options)
{
getProvider()->close(this, options);
}
void IOFilterScheme::read(IOService * client,
UInt64 byteStart,
IOMemoryDescriptor * buffer,
IOStorageAttributes * attributes,
IOStorageCompletion * completion)
{
#ifndef __LP64__
if ( IOStorage::_expansionData )
{
if ( attributes == &gIOStorageAttributesUnsupported )
{
attributes = NULL;
}
else
{
IOStorage::read( client, byteStart, buffer, attributes, completion );
return;
}
}
#endif
getProvider( )->read( this, byteStart, buffer, attributes, completion );
}
void IOFilterScheme::write(IOService * client,
UInt64 byteStart,
IOMemoryDescriptor * buffer,
IOStorageAttributes * attributes,
IOStorageCompletion * completion)
{
#ifndef __LP64__
if ( IOStorage::_expansionData )
{
if ( attributes == &gIOStorageAttributesUnsupported )
{
attributes = NULL;
}
else
{
IOStorage::write( client, byteStart, buffer, attributes, completion );
return;
}
}
#endif
getProvider( )->write( this, byteStart, buffer, attributes, completion );
}
IOReturn IOFilterScheme::synchronizeCache(IOService * client)
{
return getProvider()->synchronizeCache(this);
}
IOReturn IOFilterScheme::unmap(IOService * client,
IOStorageExtent * extents,
UInt32 extentsCount,
UInt32 options)
{
return getProvider( )->unmap( this, extents, extentsCount, options );
}
OSMetaClassDefineReservedUnused(IOFilterScheme, 0);
OSMetaClassDefineReservedUnused(IOFilterScheme, 1);
OSMetaClassDefineReservedUnused(IOFilterScheme, 2);
OSMetaClassDefineReservedUnused(IOFilterScheme, 3);
OSMetaClassDefineReservedUnused(IOFilterScheme, 4);
OSMetaClassDefineReservedUnused(IOFilterScheme, 5);
OSMetaClassDefineReservedUnused(IOFilterScheme, 6);
OSMetaClassDefineReservedUnused(IOFilterScheme, 7);
OSMetaClassDefineReservedUnused(IOFilterScheme, 8);
OSMetaClassDefineReservedUnused(IOFilterScheme, 9);
OSMetaClassDefineReservedUnused(IOFilterScheme, 10);
OSMetaClassDefineReservedUnused(IOFilterScheme, 11);
OSMetaClassDefineReservedUnused(IOFilterScheme, 12);
OSMetaClassDefineReservedUnused(IOFilterScheme, 13);
OSMetaClassDefineReservedUnused(IOFilterScheme, 14);
OSMetaClassDefineReservedUnused(IOFilterScheme, 15);
OSMetaClassDefineReservedUnused(IOFilterScheme, 16);
OSMetaClassDefineReservedUnused(IOFilterScheme, 17);
OSMetaClassDefineReservedUnused(IOFilterScheme, 18);
OSMetaClassDefineReservedUnused(IOFilterScheme, 19);
OSMetaClassDefineReservedUnused(IOFilterScheme, 20);
OSMetaClassDefineReservedUnused(IOFilterScheme, 21);
OSMetaClassDefineReservedUnused(IOFilterScheme, 22);
OSMetaClassDefineReservedUnused(IOFilterScheme, 23);
OSMetaClassDefineReservedUnused(IOFilterScheme, 24);
OSMetaClassDefineReservedUnused(IOFilterScheme, 25);
OSMetaClassDefineReservedUnused(IOFilterScheme, 26);
OSMetaClassDefineReservedUnused(IOFilterScheme, 27);
OSMetaClassDefineReservedUnused(IOFilterScheme, 28);
OSMetaClassDefineReservedUnused(IOFilterScheme, 29);
OSMetaClassDefineReservedUnused(IOFilterScheme, 30);
OSMetaClassDefineReservedUnused(IOFilterScheme, 31);
#ifndef __LP64__
extern "C" void _ZN14IOFilterScheme4readEP9IOServiceyP18IOMemoryDescriptor19IOStorageCompletion( IOFilterScheme * scheme, IOService * client, UInt64 byteStart, IOMemoryDescriptor * buffer, IOStorageCompletion completion )
{
scheme->read( client, byteStart, buffer, NULL, &completion );
}
extern "C" void _ZN14IOFilterScheme5writeEP9IOServiceyP18IOMemoryDescriptor19IOStorageCompletion( IOFilterScheme * scheme, IOService * client, UInt64 byteStart, IOMemoryDescriptor * buffer, IOStorageCompletion completion )
{
scheme->write( client, byteStart, buffer, NULL, &completion );
}
#endif