Server code for Barcode Agent