IOFWUserIsochPort.h [plain text]
#ifndef _IOKIT_IOFWUserIsochPortProxy_H
#define _IOKIT_IOFWUserIsochPortProxy_H
#include <IOKit/firewire/IOFWLocalIsochPort.h>
#include <IOKit/firewire/IOFireWireUserClient.h>
class IOFWUserIsochPort: public IOFWIsochPort
{
OSDeclareDefaultStructors(IOFWUserIsochPort)
public:
virtual bool init() ;
virtual IOReturn getSupported(IOFWSpeed &maxSpeed, UInt64 &chanSupported) ;
virtual IOReturn allocatePort(IOFWSpeed speed, UInt32 chan) ;
virtual IOReturn releasePort() ; virtual IOReturn start() ; virtual IOReturn stop() ;
protected:
IOFWSpeed fMaxSpeed ;
UInt32 fChanSupported ;
} ;
class IOFWUserIsochPortProxy: public OSObject
{
OSDeclareDefaultStructors(IOFWUserIsochPortProxy)
public:
virtual Boolean init(
IOFireWireUserClient* inUserClient) ;
virtual IOReturn getSupported(IOFWSpeed &maxSpeed, UInt64 &chanSupported) ;
virtual IOReturn allocatePort(IOFWSpeed speed, UInt32 chan) ;
virtual IOReturn releasePort() ; virtual IOReturn start() ; virtual IOReturn stop() ;
virtual const IOFWIsochPort* getPort() const { return fPort; }
protected:
IOFireWireUserClient* fUserClient ;
IOFWIsochPort* fPort ;
Boolean fPortStarted ;
Boolean fPortAllocated ;
virtual void free() ;
} ;
class IOFWUserLocalIsochPortProxy: public IOFWUserIsochPortProxy
{
OSDeclareDefaultStructors(IOFWUserLocalIsochPortProxy)
public:
virtual Boolean initWithUserDCLProgram(
FWLocalIsochPortAllocateParams* inParams,
IOFireWireUserClient* inUserClient) ;
virtual IOReturn getSupported(IOFWSpeed &maxSpeed, UInt64 &chanSupported) ;
virtual IOReturn allocatePort(IOFWSpeed speed, UInt32 chan) ;
virtual IOReturn releasePort() ;
static Boolean getDCLDataBuffer(
const DCLCommandStruct* inDCL,
IOVirtualAddress* outDataBuffer,
IOByteCount* outDataLength) ;
static void setDCLDataBuffer(
DCLCommandStruct* inDCL,
IOVirtualAddress inDataBuffer,
IOByteCount inDataLength) ;
static IOByteCount getDCLSize(
DCLCommandStruct* inDCL) ;
static void printDCLProgram(
const DCLCommandStruct* inDCL,
UInt32 inDCLCount) ;
virtual IOReturn convertToKernelDCL(
DCLUpdateDCLListStruct* inDCLCommand,
DCLCommandStruct* inUserDCLTable[],
DCLCommandStruct* inUserToKernelDCLLookupTable[],
UInt32 inLookupTableLength ) ;
virtual IOReturn convertToKernelDCL(
DCLJumpStruct* inDCLCommand,
DCLCommandStruct* inUserDCLTable[],
DCLCommandStruct* inUserToKernelDCLLookupTable[],
UInt32 inLookupTableLength ) ;
virtual IOReturn convertToKernelDCL(
DCLPtrTimeStampStruct* inDCLCommand,
IOVirtualRange inBufferRanges[],
UInt32 inBufferRangeCount,
IOMemoryDescriptor* inBufferMem) ;
virtual IOReturn convertToKernelDCL(
DCLCallProcStruct* inDCLCommand,
DCLCommandStruct* inUserDCL) ;
static Boolean findOffsetInRanges(
IOVirtualAddress inAddress,
IOVirtualRange inRanges[],
UInt32 inRangeCount,
IOByteCount* outOffset) ;
static Boolean userToKernLookup(
DCLCommandStruct* inDCLCommand,
DCLCommandStruct* inUserDCLList[],
DCLCommandStruct* inKernDCLList[],
UInt32 inTableLength,
DCLCommandStruct** outDCLCommand) ;
static void dclCallProcHandler(
DCLCommandStruct* pDCLCommand) ;
virtual IOReturn setAsyncRef_DCLCallProc(
OSAsyncReference asyncRef,
DCLCallCommandProcPtr inProc) ;
virtual IOReturn modifyJumpDCL(
UInt32 inJumpDCLCompilerData,
UInt32 inLabelDCLCompilerData) ;
protected:
IOMemoryDescriptor* fUserDCLProgramMem ;
IOByteCount fDCLProgramBytes ;
IOMemoryDescriptor* fUserBufferMem ;
Boolean fUserBufferMemPrepared ;
Boolean fUserDCLProgramMemPrepared ;
UInt8* fKernDCLProgramBuffer ;
DCLCommandStruct* fKernDCLProgramStart ;
Boolean fTalking ;
UInt32 fStartState ;
UInt32 fStartMask ;
UInt32 fStartEvent ;
UInt32 fUserToKernelDCLLookupTableLength ;
DCLCommandStruct** fUserToKernelDCLLookupTable ;
OSAsyncReference fDCLCallProcAsyncNotificationRef ;
virtual void free() ;
virtual IOReturn createPort() ;
} ;
#endif //_IOKIT_IOFWUserIsochPortProxy_H