Implement three simple policy for download data requests. I think it might be possible to replace all this code with a right configuration of NSURLRequest.
This commit is contained in:
1 parent
d9b7af3474
commit
1e6a4f57b3
8 files changed
+36
-25
No files matched your search
@@ -16,10 +16,16 @@
|
||||
BOOL isCancelled;
|
||||
}
|
||||
|
||||
typedef enum SBCachePolicy : NSUInteger {
|
||||
SBDefaultPolicy = 0,
|
||||
SBReturnCacheElseLoad,
|
||||
SBReloadIgnoringLocalCacheData,
|
||||
} SBCachePolicy;
|
||||
|
||||
#pragma mark Helper routines
|
||||
+ (NSDictionary *) parseFilename: (NSString *) filename;
|
||||
+ (NSString *) urlEncoded:(NSString *)s;
|
||||
+ (NSData *) downloadDataOrGetFromCache:(NSURL *)url;
|
||||
+ (NSData *)downloadDataFromURL:(NSURL *)url withCachePolicy:(SBCachePolicy)policy;
|
||||
|
||||
#pragma mark Static methods
|
||||
+ (NSArray *) languagesForProvider:(NSString *)aProvider;
|
||||
|
||||
Reference in new issue
Block a user