ACS Bluetooth iOS/Mac OS X Library
1.0.0
|
The ABTBluetoothReader
class represents ACS Bluetooth readers.
More...
#import <ABTBluetoothReader.h>
Instance Methods | |
(void) | - attachPeripheral: |
Attaches the reader to the peripheral. More... | |
(void) | - detach |
Detaches the peripheral. More... | |
(BOOL) | - getDeviceInfoWithType: |
Gets the device information. More... | |
(BOOL) | - authenticateWithMasterKey: |
Authenticates the reader. More... | |
(BOOL) | - authenticateWithMasterKey:length: |
Authenticates the reader. More... | |
(BOOL) | - powerOnCard |
Powers on the card. More... | |
(BOOL) | - powerOffCard |
Powers off the card. More... | |
(BOOL) | - getCardStatus |
Gets the card status. More... | |
(BOOL) | - transmitApdu: |
Transmits the APDU. More... | |
(BOOL) | - transmitApdu:length: |
Transmits the APDU. More... | |
(BOOL) | - transmitEscapeCommand: |
Transmits the escape command. More... | |
(BOOL) | - transmitEscapeCommand:length: |
Transmits the escape command. More... | |
Protected Attributes | |
BOOL | _attached |
CBPeripheral * | _peripheral |
Properties | |
id< ABTBluetoothReaderDelegate > | delegate |
The delegate object specified to receive the Bluetooth reader events. More... | |
The ABTBluetoothReader
class represents ACS Bluetooth readers.
- (void) attachPeripheral: | (CBPeripheral *) | peripheral |
Attaches the reader to the peripheral.
peripheral | the peripheral. |
- (BOOL) authenticateWithMasterKey: | (NSData *) | masterKey |
Authenticates the reader.
masterKey | the master key. The length must be 16 bytes. |
YES
if the reader is attached, otherwise NO
. - (BOOL) authenticateWithMasterKey: | (const uint8_t *) | masterKey | |
length: | (NSUInteger) | length | |
Authenticates the reader.
masterKey | the master key. |
length | the master key length. The length must be 16 bytes. |
YES
if the reader is attached, otherwise NO
. - (void) detach |
Detaches the peripheral.
- (BOOL) getCardStatus |
Gets the card status.
In order to proceed this operation, your reader must be authenticated. When the Bluetooth reader returns the card status, it calls the bluetoothReader:didReturnCardStatus:error: (ABTBluetoothReaderDelegate-p) method of its delegate object.
YES
if the reader is attached, otherwise NO
. - (BOOL) getDeviceInfoWithType: | (ABTBluetoothReaderDeviceInfo) | type |
Gets the device information.
When the Bluetooth reader returns the device information, it calls the bluetoothReader:didReturnDeviceInfo:type:error: (ABTBluetoothReaderDelegate-p) method of its delegate object.
type | the device information type. |
YES
if the reader is attached and the device information type is supported, otherwise NO
. - (BOOL) powerOffCard |
Powers off the card.
In order to proceed this operation, your reader must be authenticated. When the Bluetooth reader powers off the card, it calls the bluetoothReader:didPowerOffCardWithError: (ABTBluetoothReaderDelegate-p) method of its delegate object.
YES
if the reader is attached, otherwise NO
. - (BOOL) powerOnCard |
Powers on the card.
In order to proceed this operation, your reader must be authenticated. When the Bluetooth reader powers on the card, it calls the bluetoothReader:didReturnAtr:error: (ABTBluetoothReaderDelegate-p) method of its delegate object.
YES
if the reader is attached, otherwise NO
. - (BOOL) transmitApdu: | (NSData *) | apdu |
Transmits the APDU.
In order to proceed this operation, your reader must be authenticated. When the Bluetooth reader returns the response APDU, it calls the bluetoothReader:didReturnResponseApdu:error: (ABTBluetoothReaderDelegate-p) method of its delegate object.
apdu | the command APDU. |
YES
if the reader is attached, otherwise NO
. - (BOOL) transmitApdu: | (const uint8_t *) | apdu | |
length: | (NSUInteger) | length | |
Transmits the APDU.
In order to proceed this operation, your reader must be authenticated. When the Bluetooth reader returns the response APDU, it calls the bluetoothReader:didReturnResponseApdu:error: (ABTBluetoothReaderDelegate-p) method of its delegate object.
apdu | the command APDU. |
length | the command APDU length. |
YES
if the reader is attached, otherwise NO
. - (BOOL) transmitEscapeCommand: | (NSData *) | command |
Transmits the escape command.
When the Bluetooth reader returns the escape response, it calls the bluetoothReader:didReturnEscapeResponse:error: (ABTBluetoothReaderDelegate-p) method of its delegate object.
command | the escape command. |
YES
if the reader is attached, otherwise NO
. - (BOOL) transmitEscapeCommand: | (const uint8_t *) | command | |
length: | (NSUInteger) | length | |
Transmits the escape command.
When the Bluetooth reader returns the escape response, it calls the bluetoothReader:didReturnEscapeResponse:error: (ABTBluetoothReaderDelegate-p) method of its delegate object.
command | the escape command. |
length | the escape command length. |
YES
if the reader is attached, otherwise NO
.
|
protected |
|
protected |
|
readwritenonatomicweak |
The delegate object specified to receive the Bluetooth reader events.