Ben Copsey

Cleanup:

* Move certain properties that the user really shouldn't access to private
* Rename outputStream to fileDownloadOutputStream
* Use getters in more places
... ... @@ -37,7 +37,7 @@ typedef enum _ASINetworkErrorType {
// The delegate, you need to manage setting and talking to your delegate in your subclasses
id delegate;
// A queue delegate that should *ALSO* be notified of delegate message
// A queue delegate that should *ALSO* be notified of delegate message (used by ASINetworkQueue)
id queue;
// HTTP method to use (GET / POST / PUT / DELETE). Defaults to GET
... ... @@ -95,7 +95,7 @@ typedef enum _ASINetworkErrorType {
NSString *temporaryFileDownloadPath;
// Used for writing data to a file when downloadDestinationPath is set
NSOutputStream *outputStream;
NSOutputStream *fileDownloadOutputStream;
// When the request fails or completes successfully, complete will be true
BOOL complete;
... ... @@ -104,9 +104,6 @@ typedef enum _ASINetworkErrorType {
// If error code is = ASIConnectionFailureErrorType (1, Connection failure occurred) - inspect [[error userInfo] objectForKey:NSUnderlyingErrorKey] for more information
NSError *error;
// If an authentication error occurs, we give the delegate a chance to handle it, ignoreError will be set to true
BOOL ignoreError;
// Username and password used for authentication
NSString *username;
NSString *password;
... ... @@ -366,37 +363,33 @@ typedef enum _ASINetworkErrorType {
@property (retain,readonly) NSString *authenticationRealm;
@property (retain) NSError *error;
@property (assign,readonly) BOOL complete;
@property (retain) NSDictionary *responseHeaders;
@property (retain,readonly) NSDictionary *responseHeaders;
@property (retain) NSMutableDictionary *requestHeaders;
@property (retain) NSMutableArray *requestCookies;
@property (retain) NSArray *responseCookies;
@property (retain,readonly) NSArray *responseCookies;
@property (assign) BOOL useCookiePersistance;
@property (retain) NSDictionary *requestCredentials;
@property (assign) int responseStatusCode;
@property (retain) NSMutableData *rawResponseData;
@property (retain) NSDate *lastActivityTime;
@property (assign,readonly) int responseStatusCode;
@property (retain,readonly) NSMutableData *rawResponseData;
@property (assign) NSTimeInterval timeOutSeconds;
@property (retain) NSString *requestMethod;
@property (retain) NSMutableData *postBody;
@property (assign) unsigned long long contentLength;
@property (assign) unsigned long long partialDownloadSize;
@property (assign,readonly) unsigned long long contentLength;
@property (assign) unsigned long long postLength;
@property (assign) BOOL shouldResetProgressIndicators;
@property (retain) ASIHTTPRequest *mainRequest;
@property (assign) BOOL showAccurateProgress;
@property (assign,readonly) unsigned long long totalBytesRead;
@property (assign,readonly) unsigned long long totalBytesSent;
@property (assign) unsigned long long uploadBufferSize;
@property (assign) NSStringEncoding defaultResponseEncoding;
@property (assign) NSStringEncoding responseEncoding;
@property (assign,readonly) NSStringEncoding responseEncoding;
@property (assign) BOOL allowCompressedResponse;
@property (assign) BOOL allowResumeForFileDownloads;
@property (retain) NSDictionary *userInfo;
@property (retain) NSString *postBodyFilePath;
@property (retain) NSOutputStream *postBodyWriteStream;
@property (retain) NSInputStream *postBodyReadStream;
@property (assign) BOOL shouldStreamPostDataFromDisk;
@property (assign) BOOL didCreateTemporaryPostDataFile;
@property (assign) BOOL useHTTPVersionOne;
@property (assign, readonly) unsigned long long partialDownloadSize;
@end
... ...
This diff is collapsed. Click to expand it.