Indivo Framework (iOS)
An iOS framework for Apps connecting to Indivo server
 All Classes Functions Variables Properties Pages
Instance Methods | Properties | List of all members
INURLFetcher Class Reference

The fetcher is an accessor-class to INURLLoader objects; for example if you want to queue up loading multiple URLs you can use one fetcher instead of handling multiple INURLLoader instances yourself. More...

#import <INURLFetcher.h>

Inherits NSObject.

Instance Methods

(void) - cancel
 Abort loading. More...
 
(void) - getURLs:callback:
 Fetches all URLs sequentially and calls callback when finished. More...
 
(BOOL) - isIdle
 Returns YES if the queue is empty, which is true before loading has begun and after it has completed. More...
 

Properties

NSArray * failedLoads
 Contains all INURLLoader instances that failed to load for any reason. More...
 
NSArray * successfulLoads
 Contains INURLLoader instances which loaded with an HTTP response < 400. More...
 

Detailed Description

The fetcher is an accessor-class to INURLLoader objects; for example if you want to queue up loading multiple URLs you can use one fetcher instead of handling multiple INURLLoader instances yourself.

Method Documentation

- (void) cancel

Abort loading.

- (void) getURLs: (NSArray *)  anURLArray
callback: (INCancelErrorBlock)  aCallback 

Fetches all URLs sequentially and calls callback when finished.

The calls are put on a queue and, depending on their exit status, are put in the "successfulLoads" and "failedLoads" arrays, respectively. Be sure to check these properties when the callback is called, as even if an error is reported, some URLs might have loaded successfully.

Parameters
anURLArrayAn NSArray full of NSURL instances
aCallbackThe callback block to be executed when the call has finished
- (BOOL) isIdle

Returns YES if the queue is empty, which is true before loading has begun and after it has completed.

Property Documentation

- (NSArray*) failedLoads
readnonatomiccopy

Contains all INURLLoader instances that failed to load for any reason.

- (NSArray*) successfulLoads
readnonatomiccopy

Contains INURLLoader instances which loaded with an HTTP response < 400.


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