ScanApiHelper.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667
  1. //
  2. // ScanApiHelper.h
  3. // ScannerSettings
  4. //
  5. // Created by Eric Glaenzer on 7/29/11.
  6. // Copyright 2011 Socket Mobile, Inc. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "ScanApiIncludes.h"
  10. #import "DeviceInfo.h"
  11. @class ISktScanObject;
  12. @class ISktScanDevice;
  13. @class ISktScanDecodedData;
  14. @class ISktScanApi;
  15. #define CMD_MAX_RETRY 3 // maximum retry for a command
  16. /**
  17. * CommandContextDelegate
  18. * Each time a property command has completed,
  19. * this optional delegate will be called so
  20. * the ScanApiHelper user can either refresh the UI
  21. * with a property response and/or ask for another
  22. * property
  23. */
  24. @protocol CommandContextDelegate <NSObject>
  25. -(void)run:(ISktScanObject*)scanObj;
  26. @end
  27. @interface CommandContext : NSObject{
  28. id _target;
  29. SEL _response;
  30. enum eStatus{
  31. statusReady=1,
  32. statusNotCompleted,
  33. statusCompleted
  34. }status;
  35. BOOL _getOperation;
  36. ISktScanObject* _scanObj;
  37. ISktScanDevice* _device;
  38. DeviceInfo* _deviceInfo;
  39. int _symbologyId;
  40. int retry;
  41. }
  42. @property (nonatomic,readwrite)int retry;
  43. @property (nonatomic,readwrite)enum eStatus status;
  44. -(id)initWithParam:(BOOL)getOperation
  45. ScanObj:(ISktScanObject*)scanObj
  46. ScanDevice:(ISktScanDevice*)scanDevice
  47. Device:(DeviceInfo*)device
  48. Target:(id)target
  49. Response:(SEL)response;
  50. -(void)dealloc;
  51. -(ISktScanDevice*)getScanDevice;
  52. -(ISktScanObject*)getScanObject;
  53. -(SKTRESULT)doCallback:(ISktScanObject*)scanObj;
  54. -(SKTRESULT)doCommand;
  55. @end
  56. @protocol ScanApiHelperDelegate <NSObject>
  57. @optional
  58. /**
  59. * called each time a device connects to the host
  60. * @param result contains the result of the connection
  61. * @param newDevice contains the device information
  62. */
  63. -(void)onDeviceArrival:(SKTRESULT)result device:(DeviceInfo*)deviceInfo;
  64. /**
  65. * called each time a device disconnect from the host
  66. * @param deviceRemoved contains the device information
  67. */
  68. -(void) onDeviceRemoval:(DeviceInfo*) deviceRemoved;
  69. /**
  70. * called each time ScanAPI is reporting an error
  71. * @param result contains the error code
  72. */
  73. -(void) onError:(SKTRESULT) result;
  74. /**
  75. * called when ScanAPI initialization has been completed
  76. * @param result contains the initialization result
  77. */
  78. -(void) onScanApiInitializeComplete:(SKTRESULT) result;
  79. /**
  80. * called when ScanAPI has been terminated. This will be
  81. * the last message received from ScanAPI
  82. */
  83. -(void) onScanApiTerminated;
  84. /**
  85. * called when an error occurs during the retrieval
  86. * of a ScanObject from ScanAPI.
  87. * @param result contains the retrieval error code
  88. */
  89. -(void) onErrorRetrievingScanObject:(SKTRESULT) result;
  90. /**
  91. * called each time ScanAPI receives decoded data from scanner
  92. * @param result is ESKT_NOERROR when decodedData contains actual
  93. * decoded data. The result can be set to ESKT_CANCEL when the
  94. * end-user cancels a SoftScan operation
  95. * @param deviceInfo contains the device information from which
  96. * the data has been decoded
  97. * @param decodedData contains the decoded data information
  98. */
  99. -(void) onDecodedDataResult:(long) result device:(DeviceInfo*) device decodedData:(ISktScanDecodedData*) decodedData;
  100. // THIS IS THE PREVIOUS onDecodedData THAT WE KEEP FOR BACKWARD
  101. // COMPATIBILITY BUT THE BEST IS TO USE onDecodedDataResult THAT
  102. // PROVIDES A RESULT FIELD THAT COULD BE SET TO ESKT_CANCEL WHEN
  103. // THE END-USER CANCELS A SOFTSCAN OPERATION
  104. /**
  105. * called each time ScanAPI receives decoded data from scanner
  106. * @param deviceInfo contains the device information from which
  107. * the data has been decoded
  108. * @param decodedData contains the decoded data information
  109. */
  110. -(void) onDecodedData:(DeviceInfo*) device decodedData:(ISktScanDecodedData*) decodedData;
  111. @end
  112. /**
  113. * this class provides a set of common functions to retrieve
  114. * or configure a scanner or ScanAPI and to receive decoded
  115. * data from a scanner.<p>
  116. * This helper manages a commands list so the application
  117. * can send multiple command in a row, the helper will send
  118. * them one at a time. Each command has an optional callback
  119. * function that will be called each time a command complete.
  120. * By example, to get a device friendly name, use the
  121. * PostGetFriendlyName method and pass a callback function in
  122. * which you can update the UI with the newly fetched friendly
  123. * name. This operation will be completely asynchronous.<p>
  124. * ScanAPI Helper manages a list of device information. Most of
  125. * the time only one device is connected to the host. This list
  126. * could be configured to have always one item, that will be a
  127. * "No device connected" item in the case where there is no device
  128. * connected, or simply a device name when there is one device
  129. * connected. Use isDeviceConnected method to know if there is at
  130. * least one device connected to the host.<br>
  131. * Common usage scenario of ScanAPIHelper:<br>
  132. * <li> create an instance of ScanApiHelper: _scanApi=new ScanApiHelper();
  133. * <li> [optional] if a UI device list is used a no device connected
  134. * string can be specified:_scanApi.setNoDeviceText(getString(R.string.no_device_connected));
  135. * <li> register for notification: _scanApi.setNotification(_scanApiNotification);
  136. * <li> derive from ScanApiHelperNotification to handle the notifications coming
  137. * from ScanAPI including "Device Arrival", "Device Removal", "Decoded Data" etc...
  138. * <li> open ScanAPI to start using it:_scanApi.open();
  139. * <li> check the ScanAPI initialization result in the notifications:
  140. * _scanApiNotification.onScanApiInitializeComplete(long result){}
  141. * <li> monitor a scanner connection by using the notifications:
  142. * _scanApiNotification.onDeviceArrival(long result,DeviceInfo newDevice){}
  143. * _scanApiNotification.onDeviceRemoval(DeviceInfo deviceRemoved){}
  144. * <li> retrieve the decoded data from a scanner
  145. * _scanApiNotification.onDecodedData(DeviceInfo device,ISktScanDecodedData decodedData){}
  146. * <li> once the application is done using ScanAPI, close it using:
  147. * _scanApi.close();
  148. * @author ericg
  149. *
  150. */
  151. @interface ScanApiHelper : NSObject {
  152. id<ScanApiHelperDelegate> _delegate;
  153. NSString* _noDeviceText;// text to display when no device is connected
  154. NSMutableDictionary* _deviceInfoList;// list of device info
  155. BOOL _scanApiOpen;
  156. BOOL _scanApiTerminated;
  157. NSMutableArray* _commandContexts;
  158. ISktScanApi* _scanApi;
  159. ISktScanObject*_scanObjectReceived;
  160. NSObject* _commandContextsLock;
  161. NSMutableArray* _delegateStack;
  162. }
  163. +(ScanApiHelper*)sharedScanApiHelper;
  164. -(void)pushDelegate:(id<ScanApiHelperDelegate>)delegate;
  165. -(void)popDelegate:(id<ScanApiHelperDelegate>)delegate;
  166. /**
  167. * register for notifications in order to receive notifications such as
  168. * "Device Arrival", "Device Removal", "Decoded Data"...etc...
  169. * @param delegate
  170. */
  171. -(void)setDelegate:(id<ScanApiHelperDelegate>)delegate;
  172. /**
  173. * specifying a name to display when no device is connected
  174. * will add a no device connected item in the list with
  175. * the name specified, otherwise if there is no device connected
  176. * the list will be empty.
  177. */
  178. -(void)setNoDeviceText:(NSString*) noDeviceText;
  179. /**
  180. * get the list of devices. If there is no device
  181. * connected and a text has been specified for
  182. * when there is no device then the list will
  183. * contain one item which is the no device in the
  184. * list
  185. * @return
  186. */
  187. -(NSDictionary*) getDevicesList;
  188. /**
  189. * get a DeviceInfo object from a ScanObject received by ScanAPI.
  190. *
  191. * If no DeviceInfo matches, this method returns nil
  192. * @param scanObj, ScanObject received by ScanAPI that contains the
  193. * device information.
  194. *
  195. * @return a device info instance or nil if no device info in the list
  196. * matches to the ScanObj device information.
  197. */
  198. -(DeviceInfo*) getDeviceInfoFromScanObject:(ISktScanObject*)scanObj;
  199. /**
  200. * check if there is a device connected
  201. * @return
  202. */
  203. -(BOOL) isDeviceConnected;
  204. /**
  205. * flag to know if ScanAPI is open
  206. * @return
  207. */
  208. -(BOOL)isScanApiOpen;
  209. /**
  210. * open ScanAPI and initialize ScanAPI
  211. * The result of opening ScanAPI is returned in the callback
  212. * onScanApiInitializeComplete
  213. */
  214. -(void)open;
  215. /**
  216. * close ScanAPI. The callback onScanApiTerminated
  217. * is invoked as soon as ScanAPI is completely closed.
  218. * If a device is connected, a device removal will be received
  219. * during the process of closing ScanAPI.
  220. */
  221. -(void)close;
  222. /**
  223. * Check and consume asynchronous event from ScanAPI.
  224. * Typically this message could be called from a timer
  225. * handler
  226. */
  227. -(SKTRESULT)doScanApiReceive;
  228. /**
  229. * remove the pending commands for a specific device
  230. * or all the pending commands if null is passed as
  231. * iDevice parameter
  232. * @param iDevice reference to the device for which
  233. * the commands must be removed from the list or <b>null</b>
  234. * if all the commands must be removed.
  235. */
  236. -(void)removeCommand:(DeviceInfo*)deviceInfo;
  237. /**
  238. * postGetScanAPIVersion
  239. * retrieve the ScanAPI Version
  240. */
  241. -(void)postGetScanApiVersion:(id)target Response:(SEL)response;
  242. /**
  243. * postSetConfirmationMode
  244. * Configures ScanAPI so that scanned data must be confirmed by this application before the
  245. * scanner can be triggered again.
  246. */
  247. -(void)postSetConfirmationMode:(unsigned char)mode Target:(id)target Response:(SEL)response;
  248. /**
  249. * postScanApiAbort
  250. *
  251. * Request ScanAPI to shutdown. If there is some devices connected
  252. * we will receive Remove event for each of them, and once all the
  253. * outstanding devices are closed, then ScanAPI will send a
  254. * Terminate event upon which we can close this application.
  255. * If the ScanAPI Abort command failed, then the callback will
  256. * close ScanAPI
  257. */
  258. -(void)postScanApiAbort:(id)target Response:(SEL)response;
  259. /**
  260. * postSetDataConfirmation
  261. * acknowledge the decoded data<p>
  262. * This is only required if the scanner Confirmation Mode is set to kSktScanDataConfirmationModeApp
  263. */
  264. -(void)postSetDataConfirmation:(DeviceInfo*)deviceInfo Target:(id)target Response:(SEL)response;
  265. /**
  266. * postSetSoftScanStatus
  267. * enable or disable the softscan feature.
  268. */
  269. -(void)postSetSoftScanStatus:(unsigned char)action Target:(id)target Response:(SEL)response;
  270. /**
  271. * postGetSoftScanStatus
  272. * Retrieve the status of the softscan feature.
  273. */
  274. -(void)postGetSoftScanStatus:(id)target Response:(SEL)response;
  275. /**
  276. * postGetBtAddress
  277. * Creates a SktScanObject and initializes it to perform a request for the
  278. * Bluetooth address in the scanner.
  279. */
  280. -(void)postGetBtAddress:(DeviceInfo*)deviceInfo Target:(id)target Response:(SEL)response;
  281. /**
  282. * postGetDeviceType
  283. * Creates a SktScanObject and initializes it to perform a request for the
  284. * device type of the scanner.
  285. */
  286. -(void)postGetDeviceType:(DeviceInfo*)deviceInfo Target:(id)target Response:(SEL)response;
  287. /**
  288. * postGetFirmwareVersion
  289. * Creates a SktScanObject and initializes it to perform a request for the
  290. * firmware revision in the scanner.
  291. */
  292. -(void)postGetFirmwareVersion:(DeviceInfo*)deviceInfo Target:(id)target Response:(SEL)response;
  293. /**
  294. * postGetBattery
  295. * Creates a SktScanObject and initializes it to perform a request for the
  296. * battery level in the scanner.
  297. */
  298. -(void)postGetBattery:(DeviceInfo*)deviceInfo Target:(id)target Response:(SEL)response;
  299. /**
  300. * postGetStandConfig
  301. * Creates a SktScanObject and initializes it to perform a request for the
  302. * stand config of the scanner.
  303. */
  304. -(void)postGetStandConfig:(DeviceInfo*)deviceInfo Target:(id)target Response:(SEL)response;
  305. /**
  306. * postSetStandConfig
  307. * Creates a SktScanObject and initializes it to perform a request for changing the
  308. * stand config of the scanner.
  309. */
  310. -(void)postSetStandConfig:(DeviceInfo*)deviceInfo StandConfig:(long) standConfig Target:(id)target Response:(SEL)response;
  311. /**
  312. * postGetDecodeAction
  313. *
  314. * Creates a TSktScanObject and initializes it to perform a request for the
  315. * Decode Action in the scanner.
  316. *
  317. */
  318. -(void)postGetDecodeAction:(DeviceInfo*)deviceInfo Target:(id)target Response:(SEL)response;
  319. /**
  320. * postGetCapabilitiesDevice
  321. *
  322. * Creates a SktScanObject and initializes it to perform a request for the
  323. * Capabilities Device in the scanner.
  324. */
  325. -(void)postGetCapabilitiesDevice:(DeviceInfo*)deviceInfo Target:(id)target Response:(SEL)response;
  326. /**
  327. * postGetPostambleDevice
  328. *
  329. * Creates a SktScanObject and initializes it to perform a request for the
  330. * Postamble Device in the scanner.
  331. *
  332. */
  333. -(void)postGetPostambleDevice:(DeviceInfo*)deviceInfo Target:(id)target Response:(SEL)response;
  334. /**
  335. * postSetPostamble
  336. *
  337. * Configure the postamble of the device
  338. * @param deviceInfo
  339. * @param postamble
  340. */
  341. -(void)postSetPostambleDevice:(DeviceInfo*)deviceInfo Postamble:(NSString*)postamble Target:(id)target Response:(SEL)response;
  342. /**
  343. * postGetSymbologyInfo
  344. *
  345. * Creates a SktScanObject and initializes it to perform a request for the
  346. * Symbology Info in the scanner.
  347. *
  348. */
  349. -(void)postGetSymbologyInfo:(DeviceInfo*)deviceInfo SymbologyId:(int)symbologyId Target:(id)target Response:(SEL)response;
  350. /**
  351. * postSetSymbologyInfo
  352. * Constructs a request object for setting the Symbology Info in the scanner
  353. *
  354. */
  355. -(void)postSetSymbologyInfo:(DeviceInfo*)deviceInfo SymbologyId:(int)symbologyId Status:(BOOL)status Target:(id)target Response:(SEL)response;
  356. /**
  357. * postGetFriendlyName
  358. *
  359. * Creates a SktScanObject and initializes it to perform a request for the
  360. * friendly name in the scanner.
  361. *
  362. */
  363. -(void)postGetFriendlyName:(DeviceInfo*)deviceInfo Target:(id)target Response:(SEL)response;
  364. /**
  365. * postSetFriendlyName
  366. * Constructs a request object for setting the Friendly Name in the scanner
  367. *
  368. */
  369. -(void)postSetFriendlyName:(DeviceInfo*)deviceInfo FriendlyName:(NSString*)friendlyName Target:(id)target Response:(SEL)response;
  370. /**
  371. * postSetDecodeAction
  372. *
  373. * Configure the local decode action of the device
  374. *
  375. * @param deviceInfo
  376. * @param decodeAction
  377. */
  378. -(void)postSetDecodeAction:(DeviceInfo*)deviceInfo DecodeAction:(int)decodeAction Target:(id)target Response:(SEL)response;
  379. /**
  380. * postSetOverlayView
  381. *
  382. * Configure the Overlay view of softscan
  383. *
  384. * @param deviceInfo
  385. * @param decodeAction
  386. */
  387. -(void)postSetOverlayView:(DeviceInfo*)deviceInfo OverlayView:(id)overlayview Target:(id)target Response:(SEL)response;
  388. /**
  389. * postSetTriggerDevice
  390. *
  391. * start scanning
  392. *
  393. * @param deviceInfo
  394. * @param decodeAction
  395. */
  396. -(void)postSetTriggerDevice:(DeviceInfo*)deviceInfo Action:(unsigned char)action Target:(id)target Response:(SEL)response;
  397. /**
  398. * postGetDataEditingProfiles
  399. *
  400. * Get the list of Data Editing profiles
  401. *
  402. */
  403. -(void)postGetDataEditingProfiles:(id)target Response:(SEL)response;
  404. /**
  405. * postSetDataEditingProfiles
  406. *
  407. * Set the list of Data Editing profiles
  408. * This will add or remove profiles in function of
  409. * the current profiles list
  410. * @param profiles: semi colon separated list of the new profiles
  411. */
  412. -(void)postSetDataEditingProfiles:(NSString*)profiles Target:(id)target Response:(SEL)response;
  413. /**
  414. * postGetDataEditingCurrentProfile
  415. *
  416. * Get the Data Editing current profile
  417. *
  418. */
  419. -(void)postGetDataEditingCurrentProfile:(id)target Response:(SEL)response;
  420. /**
  421. * postSetDataEditingCurrentProfile
  422. *
  423. * Set the Data Editing current profile
  424. *
  425. * @param profile: new current profile selected
  426. */
  427. -(void)postSetDataEditingCurrentProfile:(NSString*)profile Target:(id)target Response:(SEL)response;
  428. /**
  429. * postGetDataEditingTriggerSymbology
  430. *
  431. * Get the Data Editing profile Trigger symbology list the
  432. * decoded data must come from
  433. *
  434. * @param profile to retrieve the trigger symbology list from
  435. */
  436. -(void)postGetDataEditingTriggerSymbology:(NSString*)profile Target:(id)target Response:(SEL)response;
  437. /**
  438. * postSetDataEditingTriggerSymbology
  439. *
  440. * Set the Data Editing profile Trigger symbology list
  441. *
  442. * @param profile to set the trigger symbology list to
  443. */
  444. -(void)postSetDataEditingTriggerSymbology:(NSString*)profileAndSymbology Target:(id)target Response:(SEL)response;
  445. /**
  446. * postGetDataEditingTriggerMinLength
  447. *
  448. * Get the Data Editing profile Trigger Minimum Length for the decoded Data
  449. *
  450. * @param profile to get the trigger minimum length
  451. */
  452. -(void)postGetDataEditingTriggerMinLength:(NSString*)profile Target:(id)target Response:(SEL)response;
  453. /**
  454. * postSetDataEditingTriggerMinLength
  455. *
  456. * Set the Data Editing profile Trigger Minimum Length for the decoded Data
  457. *
  458. * @param profileAndLength contains the profile and the minimum length in decimal
  459. */
  460. -(void)postSetDataEditingTriggerMinLength:(NSString*)profileAndLength Target:(id)target Response:(SEL)response;
  461. /**
  462. * postGetDataEditingTriggerMaxLength
  463. *
  464. * Get the Data Editing profile Trigger Maximum Length for the decoded Data
  465. *
  466. * @param profile to get the trigger maximum length
  467. */
  468. -(void)postGetDataEditingTriggerMaxLength:(NSString*)profile Target:(id)target Response:(SEL)response;
  469. /**
  470. * postSetDataEditingTriggerMaxLength
  471. *
  472. * Set the Data Editing profile Trigger Maximum Length for the decoded Data
  473. *
  474. * @param profileAndLength contains the profile and the maximum length in decimal
  475. */
  476. -(void)postSetDataEditingTriggerMaxLength:(NSString*)profileAndLength Target:(id)target Response:(SEL)response;
  477. /**
  478. * postGetDataEditingTriggerStartsBy
  479. *
  480. * Get the Data Editing profile Trigger Starts by string for the decoded Data
  481. *
  482. * @param profile to retrieve the trigger Starts by
  483. */
  484. -(void)postGetDataEditingTriggerStartsBy:(NSString*)profile Target:(id)target Response:(SEL)response;
  485. /**
  486. * postSetDataEditingTriggerStartsBy
  487. *
  488. * Set the Data Editing profile Trigger Starts by string for the decoded Data
  489. *
  490. * @param profileAndString contains the profile and Starts by string
  491. */
  492. -(void)postSetDataEditingTriggerStartsBy:(NSString*)profileAndString Target:(id)target Response:(SEL)response;
  493. /**
  494. * postGetDataEditingTriggerEndsWith
  495. *
  496. * Get the Data Editing profile Trigger Ends with string for the decoded Data
  497. *
  498. * @param profile to retrieve the trigger Ends with
  499. */
  500. -(void)postGetDataEditingTriggerEndsWith:(NSString*)profile Target:(id)target Response:(SEL)response;
  501. /**
  502. * postSetDataEditingTriggerEndsWith
  503. *
  504. * Set the Data Editing profile Trigger Ends with string for the decoded Data
  505. *
  506. * @param profileAndString contains the profile and the Ends With string
  507. */
  508. -(void)postSetDataEditingTriggerEndsWith:(NSString*)profileAndString Target:(id)target Response:(SEL)response;
  509. /**
  510. * postGetDataEditingTriggerContains
  511. *
  512. * Get the Data Editing profile Trigger Contains a string for the decoded Data
  513. *
  514. * @param profile to retrieve the trigger Contains string
  515. */
  516. -(void)postGetDataEditingTriggerContains:(NSString*)profile Target:(id)target Response:(SEL)response;
  517. /**
  518. * postSetDataEditingTriggerContains
  519. *
  520. * Set the Data Editing profile Trigger Contains a string for the decoded Data
  521. *
  522. * @param profileAndString contains the profile and the Contains string
  523. */
  524. -(void)postSetDataEditingTriggerContains:(NSString*)profileAndString Target:(id)target Response:(SEL)response;
  525. /**
  526. * postGetDataEditingOperations
  527. *
  528. * Get the Data Editing profile Operations applied to the decoded Data
  529. *
  530. * @param profile to retrieve the operations from
  531. */
  532. -(void)postGetDataEditingOperations:(NSString*)profile Target:(id)target Response:(SEL)response;
  533. /**
  534. * postSetDataEditingOperations
  535. *
  536. * Set the Data Editing profile Operations applied to the decoded Data
  537. *
  538. * @param profileAndOperation contains the profile and the operation to set to
  539. */
  540. -(void)postSetDataEditingOperations:(NSString*)profileAndOperations Target:(id)target Response:(SEL)response;
  541. /**
  542. * postGetDataEditingExport
  543. *
  544. * Export the Data Editing profile
  545. *
  546. * @param profile to export
  547. */
  548. -(void)postGetDataEditingExport:(NSString*)profile Target:(id)target Response:(SEL)response;
  549. /**
  550. * postSetDataEditingImport
  551. *
  552. * Import the Data Editing profile
  553. *
  554. * @param profile to Import from
  555. */
  556. -(void)postSetDataEditingImport:(NSString*)profile Target:(id)target Response:(SEL)response;
  557. /**
  558. * postGetDeviceSpecific
  559. *
  560. * post a command specific to a certain type of scanner
  561. * The command is usually a series of bytes that are understandable only
  562. * by one particular type of scanner therefore the type of scanner must be
  563. * checked prior calling this method
  564. *
  565. * @param deviceInfo to send the command to
  566. * @param pCommand pointer to the bytes to send to the device
  567. * @param length of the command in bytes
  568. * @param target main object receiving the response
  569. * @param response selector invoked when the response is received
  570. */
  571. -(void)postGetDeviceSpecific:(DeviceInfo*)deviceInfo Command:(unsigned char*)pCommand Length:(int) length Target:(id)target Response:(SEL) response;
  572. -(void)addCommand:(CommandContext*)command;
  573. -(void)initializeScanAPIThread:(id)arg;
  574. -(BOOL)handleScanObject:(ISktScanObject*)scanObj;
  575. -(SKTRESULT)handleDeviceArrival:(ISktScanObject*)scanObj;
  576. -(SKTRESULT)handleDeviceRemoval:(ISktScanObject*)scanObj;
  577. -(SKTRESULT)handleSetOrGetComplete:(ISktScanObject*)scanObj;
  578. -(SKTRESULT)handleEvent:(ISktScanObject*)scanObj;
  579. -(SKTRESULT)handleDecodedData:(ISktScanObject*)scanObj;
  580. -(SKTRESULT)sendNextCommand;
  581. @end