On Wed, Feb 13, 2013 at 7:24 AM, Orin Eman <orin.e...@gmail.com> wrote:
> On Tue, Feb 12, 2013 at 2:38 PM, Nathan Hjelm <hje...@me.com> wrote:
>> Using descriptions like "stupid" for the proposed event names does nothing
>> to advance the discussion on what the API for libusb 1.0 should look like.
>> You, and others, have been given (and still have for a short time) an
>> opportunity to help define the official hotplug interface for the libusb 1.0
>> API. I like the names ARRIVED/LEFT as they reflect more than just the device
>> has been plugged in/unplugged. Device arrival signals the device was plugged
>> in, enumerated by the os, matched by os drivers (if any exist), and finally
>> enumerated by libusb. Left was chosen to match. We could still use
>> ADDED/REMOVED (or MATCHED/TERMINATED, ENUMERATED/TERMINATED,
>> etc) if that is what developers would rather see as part of the API.

This is a good point that the device will go through different state after
being plugged in, firstly the low level mechanical/electrical part, then the
OS enumeration part, and then the driver part. I think we need to differentiate
the enumeration part (device is okay, but may still be driverless) and then
the driver matching part, at least under Windows, since Pete wants to support
driverless device under Windows.

The detachment also involved the mechanical/electrical and the tear-down
part (tear down of the USB stack) but I think that is less a problem.

> "USB Complete Fourth Edition" titles a section "Detecting Attachment and
> Removal", so there is another choice.
>
> I would prefer something that did not imply a physical action for a device
> that was just plugged in/turned on/enabled/whatever caused it to show up.
> I'd suggest AVAILABLE.  I can't think of anything better than UNAVAILABLE
> for a device that has gone away for whatever reason, but REMOVED would be OK
> too.

UNAVAILABLE could mean many things.
1) UNAVAILABE because the device is physical removed.
2) UNAVAILABE because the device is plugged in but failed enumeration.
It could be that the device initially got enumerated but later failed some
standard request and then failed enumeration.
3) UNAVAILABE because the device has no driver under Windows. I think
this is not a problem for Mac OS X and Linux.

-- 
Xiaofan

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to