(confDesc gousb.ConfigDesc, subClass gousb.Class)
| 206 | } |
| 207 | |
| 208 | func findInterfaceForSubclass(confDesc gousb.ConfigDesc, subClass gousb.Class) (bool, int) { |
| 209 | for _, iface := range confDesc.Interfaces { |
| 210 | for _, alt := range iface.AltSettings { |
| 211 | isVendorClass := alt.Class == gousb.ClassVendorSpec |
| 212 | isCorrectSubClass := alt.SubClass == subClass |
| 213 | log.Debugf("iface:%v altsettings:%d isvendor:%t isub:%t", iface, len(iface.AltSettings), isVendorClass, isCorrectSubClass) |
| 214 | if isVendorClass && isCorrectSubClass { |
| 215 | return true, iface.Number |
| 216 | } |
| 217 | } |
| 218 | } |
| 219 | return false, -1 |
| 220 | } |
| 221 | |
| 222 | //IsActivated returns a boolean that is true when this device was enabled for screen mirroring and false otherwise. |
| 223 | func (d *IosDevice) IsActivated() bool { |
no outgoing calls
no test coverage detected