IOFilterScheme.cpp [plain text]
#include <IOKit/storage/IOFilterScheme.h>
#define super IOStorage
OSDefineMetaClassAndStructors(IOFilterScheme, IOStorage)
IOMedia * IOFilterScheme::getProvider() const
{
return (IOMedia *) IOService::getProvider();
}
bool IOFilterScheme::handleOpen(IOService * client,
IOOptionBits options,
void * argument)
{
return getProvider()->open(this, options, (IOStorageAccess) (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)
{
getProvider( )->read( this, byteStart, buffer, attributes, completion );
}
void IOFilterScheme::write(IOService * client,
UInt64 byteStart,
IOMemoryDescriptor * buffer,
IOStorageAttributes * attributes,
IOStorageCompletion * completion)
{
getProvider( )->write( this, byteStart, buffer, attributes, completion );
}
IOReturn IOFilterScheme::synchronize(IOService * client,
UInt64 byteStart,
UInt64 byteCount,
IOStorageSynchronizeOptions options)
{
#if TARGET_OS_OSX && defined(__x86_64__)
if ( _respondsTo_synchronizeCache )
{
if ( options == _kIOStorageSynchronizeOption_super__synchronizeCache )
{
options = 0;
}
else
{
return IOStorage::synchronize( client, byteStart, byteCount, options );
}
}
#endif
return getProvider( )->synchronize( this, byteStart, byteCount, options );
}
IOReturn IOFilterScheme::unmap(IOService * client,
IOStorageExtent * extents,
UInt32 extentsCount,
IOStorageUnmapOptions options)
{
return getProvider( )->unmap( this, extents, extentsCount, options );
}
IOReturn
IOFilterScheme::getProvisionStatus(IOService * client,
UInt64 byteStart,
UInt64 byteCount,
UInt32 * extentsCount,
IOStorageProvisionExtent * extents,
IOStorageGetProvisionStatusOptions options)
{
return getProvider( )->getProvisionStatus( this, byteStart, byteCount, extentsCount, extents, options );
}
bool IOFilterScheme::lockPhysicalExtents(IOService * client)
{
return getProvider( )->lockPhysicalExtents( this );
}
IOStorage * IOFilterScheme::copyPhysicalExtent(IOService * client,
UInt64 * byteStart,
UInt64 * byteCount)
{
return getProvider( )->copyPhysicalExtent( this, byteStart, byteCount );
}
void IOFilterScheme::unlockPhysicalExtents(IOService * client)
{
getProvider( )->unlockPhysicalExtents( this );
}
IOReturn IOFilterScheme::setPriority(IOService * client,
IOStorageExtent * extents,
UInt32 extentsCount,
IOStoragePriority priority)
{
return getProvider( )->setPriority( this, extents, extentsCount, priority );
}
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);
#if TARGET_OS_OSX && defined(__x86_64__)
extern "C" void _ZN14IOFilterScheme16synchronizeCacheEP9IOService( IOFilterScheme * scheme, IOService * client )
{
scheme->synchronize( client, 0, 0 );
}
#endif