IOFWDelayCommand.cpp [plain text]
#include <IOKit/firewire/IOFWCommand.h>
#include <IOKit/firewire/IOFireWireController.h>
#include <IOKit/firewire/IOFireWireNub.h>
#include <IOKit/firewire/IOLocalConfigDirectory.h>
#include <IOKit/assert.h>
#include <IOKit/IOSyncer.h>
#include <IOKit/IOWorkLoop.h>
#include <IOKit/IOCommand.h>
OSDefineMetaClassAndStructors(IOFWDelayCommand, IOFWBusCommand)
OSMetaClassDefineReservedUnused(IOFWDelayCommand, 0);
#pragma mark -
bool IOFWDelayCommand::initWithDelay(IOFireWireController *control,
UInt32 delay, FWBusCallback completion, void *refcon)
{
if(!IOFWBusCommand::initWithController(control, completion, refcon))
return false;
fTimeout = delay;
return true;
}
IOReturn IOFWDelayCommand::reinit(UInt32 delay, FWBusCallback completion, void *refcon)
{
IOReturn res;
res = IOFWBusCommand::reinit(completion, refcon);
if(res != kIOReturnSuccess)
return res;
fTimeout = delay;
return kIOReturnSuccess;
}
IOReturn IOFWDelayCommand::execute()
{
fStatus = kIOReturnBusy;
return fStatus;
}