IDTech iOS Framework Guide  1.1.088
API reference for UniPay
IDT_UniPay.h
1 //
2 // IDT_UniPay.h
3 // IDTech
4 //
5 // Created by Randy Palermo on 7/2/14.
6 // Copyright (c) 2014 IDTech Products. All rights reserved.
7 //
8 
9 
10 
11 #import <Foundation/Foundation.h>
12 #import "IDTMSRData.h"
13 #import "APDUResponse.h"
14 #import "IDT_Device.h"
15 
16 
17 
18 
20 @protocol IDT_UniPay_Delegate <NSObject>
21 
22 @optional
23 -(void) deviceConnected;
24 -(void) deviceDisconnected;
25 - (void) plugStatusChange:(BOOL)deviceInserted;
26 - (void) dataInOutMonitor:(NSData*)data incoming:(BOOL)isIncoming;
28 
33 - (void) swipeMSRData:(IDTMSRData*)cardData;
34 - (void) deviceMessage:(NSString*)message;
36 
38 
39 
71 -(void) eventFunctionICC: (Byte) nICC_Attached;
72 
73 
74 
75 @end
76 
77 
81 @interface IDT_UniPay : NSObject<IDT_Device_Delegate>{
82  id<IDT_UniPay_Delegate> delegate;
83 }
84 
85 @property(strong) id<IDT_UniPay_Delegate> delegate;
86 
87 
88 
89 
98 +(NSString*) SDK_version;
99 
109 
110 
111 
112 
113 
123 -(RETURN_CODE) config_getModelNumber:(NSString**)response;
124 
135 -(RETURN_CODE) config_getSerialNumber:(NSString**)response;
136 
146 -(BOOL) config_setCmdTimeOutDuration: (float) nSecond;
147 
160 -(RETURN_CODE) config_setSerialNumber:(NSString*)strSN;
161 
162 
163 
164 
165 
174 -(RETURN_CODE) device_cancelConnectToAudioReader;
183 -(RETURN_CODE) device_connectToAudioReader;
184 
185 
186 
206 -(RETURN_CODE) device_getBatteryVoltage:(NSString**)response;
207 
217 -(RETURN_CODE) device_getFirmwareVersion:(NSString**)response;
218 
232 -(RETURN_CODE) device_getKSN:(int)keySlot ksn:(NSData**)ksn;
233 
243 -(RETURN_CODE) device_getLevelAndBaud:(NSString**)response;
244 
349 -(NSString *) device_getResponseCodeString: (int) errorCode;
350 
351 
363 
364 
365 
381 -(bool) device_isConnected:(IDT_DEVICE_Types)device;
382 
395 -(RETURN_CODE) device_rebootDevice;
396 
397 
409 -(RETURN_CODE) device_sendDataCommand:(NSData*)cmd calcLRC:(BOOL)lrc response:(NSData**)response;
421 -(RETURN_CODE) device_setAudioVolume:(float)val;
422 
423 
424 
442 -(RETURN_CODE) device_startRKI;
443 
444 
445 
461 -(RETURN_CODE) icc_exchangeAPDU:(NSData*)dataAPDU encrypted:(BOOL)encrypted response:(APDUResponse**)response;
462 
463 
487 -(RETURN_CODE) icc_exchangeEncryptedAPDU:(NSData*)dataAPDU response:(APDUResponse**)response;
488 
509 -(RETURN_CODE) icc_exchangeMultiAPDU:(NSArray*)dataAPDU response:(NSData**)response;
510 
522 -(RETURN_CODE) icc_getAPDU_KSN:(NSData**)ksn;
523 
524 
539 -(RETURN_CODE) icc_getExpiryDateOption:(NSString**)response;
540 
541 
574 -(RETURN_CODE) icc_getICCReaderStatus:(ICCReaderStatus**)readerStatus;
575 
589 -(RETURN_CODE) icc_getKeyFormatForICCDUKPT:(NSString**)response;
590 
603 -(RETURN_CODE) icc_getKeyTypeForICCDUKPT:(NSString**)response;
604 
605 
620 -(RETURN_CODE) icc_powerOffICC:(NSString**)error;
621 
622 
638 -(RETURN_CODE) icc_powerOnICC:(NSData**)response;
639 
640 
641 
642 
643 
655 -(RETURN_CODE) icc_setICCNotification:(BOOL)turnON;
656 
657 
658 
673 -(RETURN_CODE) icc_setKeyFormatForICCDUKPT:(int)encryption;
674 
675 
676 
677 
678 
679 
693 -(RETURN_CODE) icc_setKeyTypeForICCDUKPT:(int)encryption;
694 
695 
696 
714 -(RETURN_CODE) icc_loadDUKPTKey:(DUKPT_KEY_Type)type ksn:(NSString*)hexKSN initialKey:(NSString*)hexInitKey;
715 
716 
717 
728 -(RETURN_CODE) msr_cancelMSRSwipe;
729 
730 
731 
742 -(RETURN_CODE) msr_getClearPANID:(NSString**)response;
743 
744 
755 -(RETURN_CODE) msr_getExpirationMask:(NSString**)response;
756 
768 -(RETURN_CODE) msr_getSwipeEncryption:(NSString**)response;
769 
784 -(RETURN_CODE) msr_getSwipeForcedEncryptionOption:(NSString**)response;
785 
799 -(RETURN_CODE) msr_getSwipeMaskOption:(NSString**)response;
800 
801 
802 
803 
815 -(RETURN_CODE) msr_setClearPANID:(int)digits;
816 
817 
818 
830 -(RETURN_CODE) msr_setExpirationMask:(BOOL)masked;
831 
843 -(RETURN_CODE) msr_setSwipeEncryption:(int)encryption;
844 
845 
846 
861 -(RETURN_CODE) msr_setSwipeForcedEncryptionOption:(BOOL)track1 track2:(BOOL)track2 track3:(BOOL)track3 track3card0:(BOOL)track3card0;
862 
863 
864 
878 -(RETURN_CODE) msr_setSwipeMaskOption:(BOOL)track1 track2:(BOOL)track2 track3:(BOOL)track3;
879 
880 
908 -(RETURN_CODE) msr_startMSRSwipe:(int)track;
909 
910 
911 
919 -(bool) isConnected;
920 
926 -(void) attemptConnect;
927 
928 
929 @end
RETURN_CODE device_startRKI()
void deviceConnected()
Fires when device connects. If a connection is established before the delegate is established (no del...
void deviceDisconnected()
Fires when device disconnects.
RETURN_CODE device_rebootDevice()
NSString * SDK_version()
Definition: IDT_UniPay.h:81
Definition: IDT_UniPay.h:20
RETURN_CODE device_cancelConnectToAudioReader()
RETURN_CODE msr_cancelMSRSwipe()
bool isConnected()
void attemptConnect()
Definition: IDTCommon.h:13
id< IDT_UniPay_Delegate > delegate
Definition: IDT_UniPay.h:82
IDT_UniPay * sharedController()
RETURN_CODE device_connectToAudioReader()
BOOL device_isAudioReaderConnected()