Download Print this page

Socket ScanAPI Reference Manual page 20

Advertisement

Socket ScanAPI Reference
// called Set with kSktScanPropIdAbort
result = HandleTerminate(scanObj);
break;
case
ISktScanMsg.kSktScanMsgGetComplete:
case
ISktScanMsg.kSktScanMsgSetComplete:
result = HandleGetOrSetComplete(scanObj);
break;
case
ISktScanMsg.kSktScanMsgEvent:
result = HandleEvent(scanObj);
break;
}
// release the ScanObject we received in the wait
_scanApi.ReleaseScanObject(scanObj);
}
}
}
private long
HandleGetOrSetComplete(ISktScanObject
{
long
result = SktScanErrors.ESKT_NOERROR;
ISktScanProperty
property = scanObj.Property;
switch
(property.ID)
{
case
ISktScanProperty.propId.kSktScanPropIdTriggerDevice:
// ungrey out the trigger button
buttonTrigger.Enabled = true;
result = scanObj.Msg.Result;
if
(!SktScanErrors.SKTSUCCESS(result))
{
DisplayError("Failed to trigger: "
}
break;
}
return
result;
}
Java source code:
// handler for the Trigger button
class
TriggerButtonHandler
private
ISktScanDevice _device=null;
private
ButtonField _button;
// constructor
public
TriggerButtonHandler(
{
_device=device;
_button=button;
}
© 2013 Socket Mobile, Inc.
//
+ result);
implements
Runnable {
ISktScanDevice device,
ButtonField button)
as Property ID
scanObj)
20/152

Advertisement

loading
Need help?

Need help?

Do you have a question about the ScanAPI and is the answer not in the manual?

Subscribe to Our Youtube Channel