HID APPROVE SDK  5.9
HID Approve SDK for iOS
 All Classes Files Functions Variables Enumerations Enumerator Properties Pages
<HIDTransaction> Protocol Reference

Encapsulates a transaction and exposes an API to apply an action status. More...

#import <HIDTransaction.h>

Inheritance diagram for <HIDTransaction>:
<HIDServerAction>

Instance Methods

(NSString *) - getAction:
 Returns the nature of the action. More...
 
(NSArray *) - getAllowedStatuses
 Returns a list of status (for instance "accept", "deny", "report") that can be set for that transaction. More...
 
(NSDate *) - getDate:
 Gets status change date for the transaction. More...
 
(NSDate *) - getExpiryDate:
 Returns Retrieves the expiration date associated with requested action. More...
 
(id< HIDKey >) - getSigningKey:
 Gets the Signing Key object associated with that transaction. More...
 
(NSString *) - getStatus:
 Returns the status of the transaction. More...
 
(BOOL) - setStatus:withSigningPassword:withSessionPassword:withParams:error:
 Communicates the status of this transaction. More...
 
(NSString *) - toString
 Returns the transaction text to be displayed to the user. More...
 
- Instance Methods inherited from <HIDServerAction>
(NSString *) - getPayload:
 Returns an optional payload related to the request action. More...
 

Detailed Description

Encapsulates a transaction and exposes an API to apply an action status.

Method Documentation

- (NSString*) getAction: (NSError **)  error

Returns the nature of the action.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the nature of the action, nil if not set yet or an error occurs.

Reimplemented from <HIDServerAction>.

- (NSArray*) getAllowedStatuses

Returns a list of status (for instance "accept", "deny", "report") that can be set for that transaction.

Returns
the NSString array contains the possible status values to be used with setStatus.
See also
- setStatus:withSigningPassword:withSessionPassword:withParams:error:

The values are retrieved from the transaction response message sent back by the server. The returned names can be used by the calling application to look up the corresponding value in a name/value pair resource file for customization/localization of displayed text to user.

- (NSDate*) getDate: (NSError **)  error

Gets status change date for the transaction.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the date, nil if not set yet or an error occurs.

Reimplemented from <HIDServerAction>.

- (NSDate*) getExpiryDate: (NSError **)  error

Returns Retrieves the expiration date associated with requested action.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the date, nil if not set yet or an error occurs.

Reimplemented from <HIDServerAction>.

- (id<HIDKey>) getSigningKey: (NSError **)  error

Gets the Signing Key object associated with that transaction.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the key, nil if an error occurs.
- (NSString*) getStatus: (NSError **)  error

Returns the status of the transaction.

Parameters
errorerror details. It may be nil.

Possible error codes are:

Returns
the status of the transaction, nil if not set yet or an error occurs.
- (BOOL) setStatus: (NSString *)  status
withSigningPassword: (NSString *)  signPassword
withSessionPassword: (NSString *)  sessionPassword
withParams: (NSArray *)  parameters
error: (NSError **)  error 

Communicates the status of this transaction.

Parameters
statusstatus to apply to transaction with signature.

The status must be one of the statuses returned by the getAllowedStatuses method.

Parameters
signPasswordthe password protecting the signature key. (can be nil if not required by the policy)
sessionPasswordtransaction protection key password (can be nil if not required by the policy)
parametersreserved for future use
errorerror details. It may be nil.

Possible error codes are:

Returns
boolean true if successful.
See also
- findKeys:error: (HIDContainer-p)
#HIDServerAction.getProtectionKey
#HIDTransaction.getSigningKey
- (NSString*) toString

Returns the transaction text to be displayed to the user.

Returns
Transaction text string.

Reimplemented from <HIDServerAction>.