IOFireWireLibIsochChannel.h [plain text]
#ifndef __IOFireWireLibIsochChannel_H__
#define __IOFireWireLibIsochChannel_H__
#include "IOFireWireLibPriv.h"
#include "IOFireWireLibIsochPort.h"
#include <IOKit/firewire/IOFireWireLibIsoch.h>
class IOFireWireLibIsochChannelImp: public IOFireWireIUnknown
{
public:
IOFireWireLibIsochChannelImp(
IOFireWireDeviceInterfaceImp& inUserClient) ;
~IOFireWireLibIsochChannelImp() ;
virtual IOReturn Init(
Boolean inDoIRM,
IOByteCount inPacketSize,
IOFWSpeed inPrefSpeed) ;
static void ForceStopHandler(
IOFireWireLibPseudoAddressSpaceRef refCon,
IOReturn result,
void** args,
int numArgs) ;
virtual IOReturn SetTalker(
IOFireWireLibIsochPortRef talker ) ;
virtual IOReturn AddListener(
IOFireWireLibIsochPortRef listener ) ;
virtual IOReturn AllocateChannel() ;
virtual IOReturn ReleaseChannel() ;
virtual IOReturn Start() ;
virtual IOReturn Stop() ;
virtual IOFireWireIsochChannelForceStopHandler
SetChannelForceStopHandler(
IOFireWireIsochChannelForceStopHandler stopProc) ;
virtual void SetRefCon(
void* stopProcRefCon) ;
virtual void* GetRefCon() ;
virtual Boolean NotificationIsOn() ;
virtual Boolean TurnOnNotification() ;
virtual void TurnOffNotification() ;
virtual void ClientCommandIsComplete(
FWClientCommandID commandID,
IOReturn status) ;
protected:
IOFireWireDeviceInterfaceImp& mUserClient ;
FWKernIsochChannelRef mKernChannelRef ;
Boolean mNotifyIsOn ;
IOFireWireIsochChannelForceStopHandler mForceStopHandler ;
void* mUserRefCon ;
io_async_ref_t mAsyncRef ;
IOFireWireLibIsochPortImp* mTalker ;
CFMutableArrayRef mListeners ;
IOFireWireLibIsochChannelRef mRefInterface ;
IOFWSpeed mSpeed ;
IOFWSpeed mPrefSpeed ;
UInt32 mChannel ;
} ;
class IOFireWireLibIsochChannelCOM: public IOFireWireLibIsochChannelImp
{
public:
IOFireWireLibIsochChannelCOM(
IOFireWireDeviceInterfaceImp& inUserClient) ;
virtual ~IOFireWireLibIsochChannelCOM() ;
struct InterfaceMap
{
IUnknownVTbl* pseudoVTable ;
IOFireWireLibIsochChannelCOM* obj ;
} ;
static IOFireWireIsochChannelInterface sInterface ;
InterfaceMap mInterface ;
inline static IOFireWireLibIsochChannelCOM* GetThis(IOFireWireLibIsochChannelRef self)
{ return ((InterfaceMap*)self)->obj ;}
static IUnknownVTbl** Alloc(
IOFireWireDeviceInterfaceImp& inUserClient,
Boolean inDoIRM,
IOByteCount inPacketSize,
IOFWSpeed inPrefSpeed) ;
virtual HRESULT QueryInterface(REFIID iid, void ** ppv ) ;
static IOReturn SSetTalker(
IOFireWireLibIsochChannelRef self,
IOFireWireLibIsochPortRef talker) ;
static IOReturn SAddListener(
IOFireWireLibIsochChannelRef self,
IOFireWireLibIsochPortRef listener) ;
static IOReturn SAllocateChannel(
IOFireWireLibIsochChannelRef self) ;
static IOReturn SReleaseChannel(
IOFireWireLibIsochChannelRef self) ;
static IOReturn SStart(
IOFireWireLibIsochChannelRef self) ;
static IOReturn SStop(
IOFireWireLibIsochChannelRef self) ;
static IOFireWireIsochChannelForceStopHandler
SSetChannelForceStopHandler(
IOFireWireLibIsochChannelRef self,
IOFireWireIsochChannelForceStopHandler stopProc) ;
static void SSetRefCon(
IOFireWireLibIsochChannelRef self,
void* stopProcRefCon) ;
static void* SGetRefCon(
IOFireWireLibIsochChannelRef self) ;
static Boolean SNotificationIsOn(
IOFireWireLibIsochChannelRef self) ;
static Boolean STurnOnNotification(
IOFireWireLibIsochChannelRef self) ;
static void STurnOffNotification(
IOFireWireLibIsochChannelRef self) ;
static void SClientCommandIsComplete(
IOFireWireLibIsochChannelRef self,
FWClientCommandID commandID,
IOReturn status) ;
} ;
#endif __IOFireWireLibIsochChannel_H__