IDBLUE logo
IDBlueResponse.h
00001 
00002 // Copyright © 2013 Cathexis Innovations Inc. All rights reserved.
00003 
00004 #import <Foundation/Foundation.h>
00005 #import "IDBluePacket.h"
00006 
00007 @protocol IResponseHandler;
00008 @class IDBlueCommand;
00009 @class NackResponse;
00010 
00017 @interface IDBlueResponse : NSObject {
00018 @protected
00019         // The error code of the sent command
00020         CommandStatus _status;
00021         
00022         // The command identifier of the response. This may be different
00023         // than the command sent to IDBLUE, in the case of a NACK (failure)
00024         // response.
00025         CommandIdentifier _command;
00026         
00027 @private
00028         // A message that desribes the response
00029         NSString* _message;
00030         
00031         // The date / time the response was created
00032         NSDate* _timestamp;
00033         
00034         // Whether the current IDBlueResponse was sent asynchronously from
00035         // an IDBLUE device (i.e. the response was sent from IDBLUE without
00036         // being requested by the host, such as pressing the front button
00037         // resulting in a tag scan).
00038         BOOL _async;
00039         
00040         // The IDBluePacket the current IDBlueResponse was created from
00041         IDBluePacket* _packet;
00042 }
00043 
00048 -(BOOL) successful;
00049 
00053 -(CommandStatus) status;
00054 
00058 -(void) setStatus: (CommandStatus) status;
00059 
00063 -(NSString*) message;
00064 
00068 -(void) setMessage: (NSString*) message;
00069 
00073 -(NSDate*) timestamp;
00074 
00081 -(CommandIdentifier) command;
00082 
00086 -(void) setCommand: (CommandIdentifier) command;
00087 
00091 -(IDBluePacket*) packet;
00092 
00099 -(BOOL) isResponseFor: (CommandIdentifier) command;
00100 
00104 -(BOOL) async;
00105 
00109 -(void) set: (BOOL) async;
00110 
00119 -(id) initFromPacket: (IDBluePacket*) packet withAsync: (BOOL) async;
00120 
00126 -(BOOL) notifyAsynchronousResponse: (id<IResponseHandler>) handler;
00127 
00128 @end

 

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