IDBLUE logo
Public Member Functions | Static Public Member Functions
iOSSession Class Reference
Inheritance diagram for iOSSession:
IDBlueSession <ISessionHandler>

Public Member Functions

(BOOL) - setDevice:
(void) - eaAccessoryDidConnectNotification:
(void) - eaAccessoryDidDisconnectNotification:
(unsigned int) - readIncomingData:withFlush:
(EAAccessory *) - getDevice
(BOOL) - openFirstIDBlueDevice

Static Public Member Functions

(ObjectCollection *) + getDevices
(EAAccessory *) + getFirstIDBlueDevice
(BOOL) + isIDBlueDevice:

Detailed Description

iOSSession implements IDBlueSession, that manages searching for and connecting to IDBLUE devices using the EAAccessory Framework.


Member Function Documentation

- (void) eaAccessoryDidConnectNotification: (NSNotification*)  notification

Callback method that is invoked when an EAAccessory is connected to the iPhone.

- (void) eaAccessoryDidDisconnectNotification: (NSNotification*)  notification

Callback method that is invoked whne an EAAccessory is disconnected from the iPHone.

- (EAAccessory *) getDevice

Get the current IDBLUE device

Returns:
The EAAccessory representing the current IDBLUE device

Gets an array of EAAccerrory objects representing IDBLUE devices connected to the iPhone.

Returns:
an NSArray containing EAAccessory objects
Remarks:
Only IDBLUE devices that are connected to the iPhone are returned. You must manually connect the IDBLUE device (via Settings->General->Bluetooth on the iPhone) before calling getDevices.
+ (EAAccessory *) getFirstIDBlueDevice

Get the first IDBLUE device from the list of connected EAAccessories.

Returns:
The first EAAccessory that is an IDBLUE device from the list returned from getDevices if an IDBLUE device exists, nil otherwise.
+ (BOOL) isIDBlueDevice: (EAAccessory*)  accessory

Get whether an EAAccessory is an IDBLUE device or not.

Returns:
TRUE if the accessory is an IDBLUE device, false otherwise

Open a session to the first IDBLUE device found using getFirstIDBlueDevice

Returns:
TRUE if the device was set and a session was opened, FALSE otherwise
- (unsigned int) readIncomingData: (NSInputStream*)  input
withFlush: (BOOL)  flush 

Read all bytes available in the input stream

Parameters:
inputThe stream to read from
flushWheter to flush the data (i.e. don't process it), or process it as a response from IDBLUE.
Returns:
The number of bytes read
- (BOOL) setDevice: (EAAccessory*)  device

Sets the current IDBLUE device

Parameters:
deviceThe EAAccessory object of the IDBLUE device to connect to.
Returns:
Whether the set device was successful
Remarks:
Use getDevices to get the list of IDBLUE devices that are paired with the iPhone.

The documentation for this class was generated from the following files:

 

Generated on Mon Jan 19 2015 15:47:40
Copyright © 2015 Cathexis Innovations Inc. All Rights Reserved.