GCKRequest Class

GCKRequest Class Reference

Overview

An object for tracking an asynchronous request.

See GCKRequestDelegate for the delegate protocol.

Since
3.0

Inherits NSObject.

Instance Method Summary

(void) 
Cancels the request. More...
(void) 
Completes the request and notifies the delegate accordingly. More...
(void) 
Fails the request with an error and notifies the delegate accordingly. More...
(void) 
Aborts the request with a reason and notifies the delegate accordingly. More...

Class Method Summary

Constructs a GCKRequest object for use by the calling application. More...

Property Summary

The delegate for receiving notifications about the status of the request. More...
GCKRequestID 
The unique ID assigned to this request. More...
The error that caused the request to fail, if any, otherwise nil . More...
BOOL 
A flag indicating whether the request is currently in progress. More...
BOOL 
A flag indicating whether this is an external request–that is, one created by the application rather than by the framework itself. More...

Method Detail

- (void) cancel

Cancels the request.

Canceling a request does not guarantee that the request will not complete on the receiver; it simply causes the sender to stop tracking the request.

+ ( GCKRequest *) applicationRequest

Constructs a GCKRequest object for use by the calling application.

Request objects created using this factory method can be managed by the application using the methods complete , failWithError: , and abortWithReason: .

Since
3.4
- (void) complete

Completes the request and notifies the delegate accordingly.

This method may only be called on GCKRequest objects that have been constructed by the application using the applicationRequest factory method. Calling this method on a GCKRequest object that was created by the framework itself will raise an exception.

Since
3.4
- (void) failWithError: ( GCKError *)  error

Fails the request with an error and notifies the delegate accordingly.

This method may only be called on GCKRequest objects that have been constructed by the application using the GCKRequest::requestWithID: factory method. Calling this method on a GCKRequest object that was created by the framework itself will raise an exception.

Parameters
error
The error describing the failure.
Since
3.4
- (void) abortWithReason: (GCKRequestAbortReason)  reason

Aborts the request with a reason and notifies the delegate accordingly.

This method may only be called on GCKRequest objects that have been constructed by the application using the GCKRequest::requestWithID: factory method. Calling this method on a GCKRequest object that was created by the framework itself will raise an exception.

Parameters
reason
The reason for the abort.
Since
3.4

Property Detail

- (id< GCKRequestDelegate >) delegate
read write nonatomic weak

The delegate for receiving notifications about the status of the request.

- (GCKRequestID) requestID
read nonatomic assign

The unique ID assigned to this request.

- ( GCKError *) error
read nonatomic copy

The error that caused the request to fail, if any, otherwise nil .

- (BOOL) inProgress
read nonatomic assign

A flag indicating whether the request is currently in progress.

- (BOOL) external
read nonatomic assign

A flag indicating whether this is an external request–that is, one created by the application rather than by the framework itself.

Since
3.4
Create a Mobile Website
View Site in Mobile | Classic
Share by: