Download Print this page

Socket ScanAPI Reference Manual page 22

Advertisement

Socket ScanAPI Reference
}
}
// called from the ScanAPI consumer logic
// that is using the wait API
private long
HandleGetOrSetComplete(ISktScanObject scanObj) {
long
result=SktScanErrors.ESKT_NOERROR;
ISktScanProperty property=scanObj.getProperty();
switch(property.getID()){
case
ISktScanProperty.propId.
}
return
result;
}
};
© 2013 Socket Mobile, Inc.
int
propId=
scanObj[0].getMessage().getID();
switch(propId){
case
ISktScanMsg.kSktScanMsgIdDeviceArrival:
result=
break;
case
ISktScanMsg.kSktScanMsgIdDeviceRemoval:
result=
break;
case
ISktScanMsg.kSktScanMsgIdTerminate:
// we are done with ScanAPI, somebody
// called Set with Abort as MsgID
result=
break;
case
ISktScanMsg.kSktScanMsgSetComplete:
case
ISktScanMsg.kSktScanMsgGetComplete:
result=
break;
case
ISktScanMsg.kSktScanMsgEvent:
break;
}
// release the ScanObj we received in the wait
_scanApi.ReleaseScanObject(scanObj[0]);
}
kSktScanPropIdTriggerDevice:
// ungray out the trigger btn
_appRef.getTriggerBtn().
setVisualState(VISUAL_STATE_NORMAL);
result=scanObj.getMessage().getResult();
if(!SktScanErrors.SKTSUCCESS(result)){
DisplayError("Failed to trigger:
}
break;
HandleDeviceArrival(scanObj[0]);
HandleDeviceRemoval(scanObj[0]);
HandleTerminate(scanObj[0]);
HandleGetOrSetComplete(scanObj[0]);
"+result);
22/152

Advertisement

loading
Need help?

Need help?

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