IOFWIsochChannel.h [plain text]
#ifndef _IOKIT_IOFWISOCHCHANNEL_H
#define _IOKIT_IOFWISOCHCHANNEL_H
#include <libkern/c++/OSObject.h>
#include <IOKit/firewire/IOFWRegs.h>
enum
{
kFWIsochChannelUnknownCondition = 0,
kFWIsochChannelNotEnoughBandwidth = 1,
kFWIsochChannelChannelNotAvailable = 2
};
class IOFireWireController;
class IOFWIsochChannel;
class IOFWIsochPort;
class OSSet;
class IOFWReadQuadCommand;
class IOFWCompareAndSwapCommand;
typedef IOReturn (FWIsochChannelForceStopNotificationProc) (
void * refCon,
IOFWIsochChannel * isochChannelID,
UInt32 stopCondition);
typedef FWIsochChannelForceStopNotificationProc *FWIsochChannelForceStopNotificationProcPtr;
class IOFWIsochChannel : public OSObject
{
OSDeclareDefaultStructors(IOFWIsochChannel)
protected:
IOFireWireController *fControl;
FWIsochChannelForceStopNotificationProcPtr 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;
struct ExpansionData { };
ExpansionData *reserved;
static void threadFunc(void * arg, void *);
virtual IOReturn updateBandwidth(bool claim);
virtual void reallocBandwidth();
virtual void free();
public:
virtual bool init(IOFireWireController *control,
bool doIRM, UInt32 packetSize, IOFWSpeed prefSpeed,
FWIsochChannelForceStopNotificationProcPtr 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();
private:
OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 0);
OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 1);
OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 2);
OSMetaClassDeclareReservedUnused(IOFWIsochChannel, 3);
};
#endif