Barcode Reader Interface
IBarcodeReader
If a PED can scan a barcode, LS Pay gives access to a service handling the functions to activate and read.
IBarcodeReaderService
Not all functions might be used by a given PED:
- SetMode sends information to the PED about what type of scanning is to be expected.
- PowerOn activates the reader.
- PowerOff deactivates the reader
- OverrideScanEvent indicates if the POS needs to override the event and call PowerOn (true) or if the PED handles the functions automatically (false).
Copy
public interface IBarcodeReaderService
{
void SetMode(ScanMode mode);
void PowerOn();
void PowerOff();
bool OverrideScanEvent();
event BarcodeEventHandler BarcodeRead;
}
The barcode will be returned in an event and the POS will need to handle what to do when a response has been delivered, to power off or read another.
public delegate void BarcodeEventHandler(string code, BarcodeType type);