IDBLUE logo
Public Member Functions
ResponseFactory Class Reference

Public Member Functions

(BOOL) - addResponseMap:
(BOOL) - addResponseMap:withClassInfo:
(IDBlueResponse *) - getResponse:withAsync:

Detailed Description

ResponseFactory is responsible for creating IDBlueResponses from IDBluePackets


Member Function Documentation

Add the given CommandIdentifierClassInfo to the response map

Parameters:
classInfoThe CommandIdentifierClassInfo object to add
Returns:
TRUE if the classInfo was added, FALSE otherwise
- (BOOL) addResponseMap: (int)  commandIdentifier
withClassInfo: (Class)  classInfo 

Add the given command identifier / Class to the response map

Parameters:
commandIdentifierThe identifier of the command
classInfoClass for the IDBlueResponse subclass that handles responses for the given command identifier
Returns:
TRUE if the response map was added, FALSE otherwise
- (IDBlueResponse *) getResponse: (IDBluePacket*)  packet
withAsync: (BOOL)  async 

Gets a new IDBlueResponse object from the given response packet.

Parameters:
packetA response from an IDBLUE device
asyncWhether the response packet was sent asynchronously or not. An asynchronous packet is a response packet sent from IDBLUE without a corresponding request being sent to IDBLUE asking for the response. Asynchronous responses are sent from an IDBLUE device when the front button of the IDBLUE device is pressed while connected to a host.
Returns:
an instance of (or subclass of) IDBlueResponse that is used to process the data contained in the response packet. Typically, the response will be a NackResponse if a synchronous command was sent to IDBLUE and that command failed (or returned a warning), otherwise an instance of IDBlueResponse containing the requested data is returned. The return value is marked with autorelease

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.