HIDDevice::~HIDDevice() { ProtocolHandler *handler = fProtocolHandlerList; while (handler != NULL) { ProtocolHandler *next = handler->NextHandler(); delete handler; handler = next; } free(fTransferBuffer); }
ProtocolHandler * HIDDevice::ProtocolHandlerAt(uint32 index) const { ProtocolHandler *handler = fProtocolHandlerList; while (handler != NULL) { if (index == 0) return handler; handler = handler->NextHandler(); index--; } return NULL; }