// List detected printers
status_t 
list_transport_ports(BMessage *msg)
{
	USBPrinterRoster roster;
	status_t status = roster.ListPrinters(msg);
	roster.Stop();
	return status;
}
Esempio n. 2
0
// 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';
}
Esempio n. 3
0
// List detected printers
status_t 
list_transport_ports(BMessage* msg)
{
	return gUSBPrinterRoster.ListPrinters(msg);
}