// List detected printers status_t list_transport_ports(BMessage *msg) { USBPrinterRoster roster; status_t status = roster.ListPrinters(msg); roster.Stop(); return status; }
// Implementation of USBTransport USBTransport::USBTransport(BDirectory *printer, BMessage *msg) : fPrinter(NULL) { BString key; if (printer->ReadAttrString("transport_address", &key) < 0) return; fPrinter = gUSBPrinterRoster.Printer(key.String()); if (!fPrinter) return; // If caller doesn't care... if (!msg) return; // Fill up the message msg->what = 'okok'; }
// List detected printers status_t list_transport_ports(BMessage* msg) { return gUSBPrinterRoster.ListPrinters(msg); }