IOFWIsochChannel.h [plain text]
#ifndef _IOKIT_IOFWISOCHCHANNEL_H
#define _IOKIT_IOFWISOCHCHANNEL_H
#include <libkern/c++/OSObject.h>
#include <IOKit/firewire/IOFireWireFamilyCommon.h>
enum
{
kFWIsochChannelUnknownCondition = 0,
kFWIsochChannelNotEnoughBandwidth = 1,
kFWIsochChannelChannelNotAvailable = 2
};
class IOFireWireController;
class IOFWIsochChannel;
class IOFWIsochPort;
class OSSet;
class IOFWReadQuadCommand;
class IOFWCompareAndSwapCommand;
class IOFWIsochChannel : public OSObject
{
OSDeclareDefaultStructors(IOFWIsochChannel)
public:
typedef IOReturn (ForceStopNotificationProc)(void* refCon, IOFWIsochChannel* channel, UInt32 stopCondition );
protected:
IOFireWireController * fControl;
ForceStopNotificationProc* fStopProc;
void * fStopRefCon;
IOFWIsochPort * fTalker;
OSSet * fListeners;
bool fDoIRM;
UInt32 fBandwidth; UInt32 fPacketSize;
IOFWSpeed fPrefSpeed;
IOFWSpeed fSpeed; UInt32 fChannel; IOFWReadQuadCommand * fReadCmd;
IOFWCompareAndSwapCommand * fLockCmd;
UInt32 fGeneration;
IOLock * fLock;
struct ExpansionData { };
ExpansionData *reserved;
static void threadFunc( void * arg );
virtual IOReturn updateBandwidth(bool claim);
virtual void reallocBandwidth( UInt32 generation );
virtual void free();
public:
virtual bool init( IOFireWireController *control, bool doIRM, UInt32 packetSize,
IOFWSpeed prefSpeed, ForceStopNotificationProc* stopProc,
void *stopRefCon );
virtual void handleBusReset();
virtual IOReturn setTalker(IOFWIsochPort *talker);
virtual IOReturn addListener(IOFWIsochPort *listener);
virtual IOReturn allocateChannel();
virtual IOReturn releaseChannel();
virtual IOReturn start();
virtual IOReturn stop();
protected:
IOReturn allocateChannelBegin( IOFWSpeed speed, UInt64 allowedChans, UInt32 * channel = NULL ) ;
IOReturn releaseChannelComplete() ;
private:
OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 0);
OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 1);
OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 2);
OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 3);
};
typedef IOFWIsochChannel::ForceStopNotificationProc FWIsochChannelForceStopNotificationProc ;
typedef IOFWIsochChannel::ForceStopNotificationProc* FWIsochChannelForceStopNotificationProcPtr ;
#endif