IOFireWireAVCCommand.h [plain text]
#ifndef _IOKIT_IOFireWireAVCCommand_H
#define _IOKIT_IOFireWireAVCCommand_H
#include <IOKit/firewire/IOFWCommand.h>
class IOFireWireAVCCommand : public IOFWCommand
{
OSDeclareDefaultStructors(IOFireWireAVCCommand)
protected:
IOFWCommand *fWriteCmd;
IOMemoryDescriptor *fMem;
const UInt8 *fCommand;
UInt32 fCmdLen;
UInt8 *fResponse;
UInt32 *fResponseLen;
int fCurRetries;
int fMaxRetries;
UInt32 fWriteGen;
UInt16 fWriteNodeID;
bool bypassRobustCommandResponseMatching;
struct ExpansionData {
bool fStarted;
bool fSyncWakeupSignaled;
};
ExpansionData *fIOFireWireAVCCommandExpansion;
static void writeDone(void *refcon, IOReturn status, IOFireWireNub *device, IOFWCommand *fwCmd);
virtual IOReturn complete(IOReturn status);
virtual IOReturn execute();
virtual void free();
public:
virtual bool init(IOFireWireNub *device, const UInt8 * command, UInt32 cmdLen,
UInt8 * response, UInt32 * responseLen);
virtual IOReturn reinit(IOFireWireNub *device, const UInt8 * command, UInt32 cmdLen,
UInt8 * response, UInt32 * responseLen);
static IOFireWireAVCCommand *withNub(IOFireWireNub *device, const UInt8 * command, UInt32 cmdLen,
UInt8 * response, UInt32 * responseLen);
static IOFireWireAVCCommand *withNub(IOFireWireNub *device, UInt32 generation,
const UInt8 * command, UInt32 cmdLen, UInt8 * response, UInt32 * responseLen);
virtual UInt32 handleResponse(UInt16 nodeID, UInt32 len, const void *buf);
virtual IOReturn resetInterimTimeout();
virtual UInt32 handleResponseWithSimpleMatching(UInt16 nodeID, UInt32 len, const void *buf);
virtual IOReturn submit(bool queue = false);
private:
OSMetaClassDeclareReservedUsed(IOFireWireAVCCommand, 0);
OSMetaClassDeclareReservedUnused(IOFireWireAVCCommand, 1);
OSMetaClassDeclareReservedUnused(IOFireWireAVCCommand, 2);
OSMetaClassDeclareReservedUnused(IOFireWireAVCCommand, 3);
};
#endif // _IOKIT_IOFireWireAVCCommand_H