Package: android.hardware.usb@1.0

IUsbCallback

interface IUsbCallback

Callback object used for all the IUsb async methods which expects a result.Caller is expected to register the callback object using setCallback method to receive updates on the PortStatus.

Methods

notifyPortStatusChange

oneway notifyPortStatusChange (vec<PortStatus> currentPortStatus, Status retval)

Used to convey the current port status to the caller.Called either when PortState changes due to the port partner(or)when caller requested for the PortStatus update through queryPortStatus.

Details
RPC mode
oneway
Parameters
currentPortStatus
vector object of current status of all the typeC ports in the device.
retval
SUCCESS when query was done successfully.ERROR otherwise.

notifyRoleSwitchStatus

oneway notifyRoleSwitchStatus (string portName, PortRole newRole, Status retval)

Used to notify the result of the switchRole call to the caller.

Details
RPC mode
oneway
Parameters
portName
name of the port for which the roleswap is requested.
newRole
the new role requested by the caller.
retval
SUCCESS if the role switch succeeded.FAILURE otherwise.