2019-10-31 18:00:42 +00:00
|
|
|
#pragma once
|
|
|
|
#include "switch.h"
|
2019-11-13 11:16:13 +00:00
|
|
|
#include "IUSBDevice.h"
|
2019-10-31 18:00:42 +00:00
|
|
|
#include "SwitchUSBInterface.h"
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class SwitchUSBDevice : public IUSBDevice
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SwitchUSBDevice();
|
|
|
|
~SwitchUSBDevice();
|
|
|
|
|
|
|
|
//Initialize the class with the SetInterfaces call.
|
|
|
|
SwitchUSBDevice(UsbHsInterface *interfaces, int length);
|
|
|
|
|
|
|
|
//There are no devices to open on the switch, so instead this returns success if there are any interfaces
|
2019-11-13 11:27:43 +00:00
|
|
|
virtual Result Open() override;
|
2019-10-31 18:00:42 +00:00
|
|
|
//Closes all the interfaces associated with the class
|
2019-11-13 11:27:43 +00:00
|
|
|
virtual void Close() override;
|
2019-10-31 18:00:42 +00:00
|
|
|
|
|
|
|
// Resets the device
|
2019-11-13 11:27:43 +00:00
|
|
|
virtual void Reset() override;
|
2019-10-31 18:00:42 +00:00
|
|
|
|
|
|
|
//Create interfaces from the given array of specified element length
|
|
|
|
void SetInterfaces(UsbHsInterface *interfaces, int length);
|
|
|
|
};
|