Indivo Framework (iOS)
An iOS framework for Apps connecting to Indivo server
|
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... | |
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.
- (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.
anURLArray | An NSArray full of NSURL instances |
aCallback | The 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.
|
readnonatomiccopy |
Contains all INURLLoader instances that failed to load for any reason.
|
readnonatomiccopy |
Contains INURLLoader instances which loaded with an HTTP response < 400.