Lines Matching refs:device
32 bool GetUsbId(const Device& device, std::string* usb_id) {
35 if (device.id.size() < 2 * id_size) {
39 // The last characters of device id is a concatenation of VID and then PID.
40 const size_t vid_location = device.id.size() - 2 * id_size;
41 std::string id_vendor = device.id.substr(vid_location, id_size);
42 const size_t pid_location = device.id.size() - id_size;
43 std::string id_product = device.id.substr(pid_location, id_size);
52 bool GetUsbVersion(const Device& device, std::string* usb_version) {