diff --git a/AFNetworking/AFHTTPClient.h b/AFNetworking/AFHTTPClient.h index 687b9fd..e3d13b1 100644 --- a/AFNetworking/AFHTTPClient.h +++ b/AFNetworking/AFHTTPClient.h @@ -113,15 +113,7 @@ extern NSString * AFQueryStringFromParametersWithEncoding(NSDictionary *paramete [NSURL URLWithString:@"http://example2.com/" relativeToURL:baseURL]; // http://example2.com/ */ -@interface AFHTTPClient : NSObject { -@private - NSURL *_baseURL; - NSStringEncoding _stringEncoding; - AFHTTPClientParameterEncoding _parameterEncoding; - NSMutableArray *_registeredHTTPOperationClassNames; - NSMutableDictionary *_defaultHeaders; - NSOperationQueue *_operationQueue; -} +@interface AFHTTPClient : NSObject ///--------------------------------------- /// @name Accessing HTTP Client Properties diff --git a/AFNetworking/AFHTTPRequestOperation.h b/AFNetworking/AFHTTPRequestOperation.h index 122099e..d906129 100644 --- a/AFNetworking/AFHTTPRequestOperation.h +++ b/AFNetworking/AFHTTPRequestOperation.h @@ -26,14 +26,7 @@ /** `AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` for requests using the HTTP or HTTPS protocols. It encapsulates the concept of acceptable status codes and content types, which determine the success or failure of a request. */ -@interface AFHTTPRequestOperation : AFURLConnectionOperation { -@private - NSIndexSet *_acceptableStatusCodes; - NSSet *_acceptableContentTypes; - NSError *_HTTPError; - dispatch_queue_t _successCallbackQueue; - dispatch_queue_t _failureCallbackQueue; -} +@interface AFHTTPRequestOperation : AFURLConnectionOperation ///---------------------------------------------- /// @name Getting HTTP URL Connection Information diff --git a/AFNetworking/AFImageRequestOperation.h b/AFNetworking/AFImageRequestOperation.h index 7456d5f..7a7f78a 100644 --- a/AFNetworking/AFImageRequestOperation.h +++ b/AFNetworking/AFImageRequestOperation.h @@ -49,15 +49,7 @@ - `image/x-xbitmap` - `image/x-win-bitmap` */ -@interface AFImageRequestOperation : AFHTTPRequestOperation { -@private -#if __IPHONE_OS_VERSION_MIN_REQUIRED - UIImage *_responseImage; - CGFloat _imageScale; -#elif __MAC_OS_X_VERSION_MIN_REQUIRED - NSImage *_responseImage; -#endif -} +@interface AFImageRequestOperation : AFHTTPRequestOperation /** An image constructed from the response data. If an error occurs during the request, `nil` will be returned, and the `error` property will be set to the error. diff --git a/AFNetworking/AFJSONRequestOperation.h b/AFNetworking/AFJSONRequestOperation.h index 7c6a579..a1191f9 100644 --- a/AFNetworking/AFJSONRequestOperation.h +++ b/AFNetworking/AFJSONRequestOperation.h @@ -35,11 +35,7 @@ @warning JSON parsing will automatically use JSONKit, SBJSON, YAJL, or NextiveJSON, if provided. Otherwise, the built-in `NSJSONSerialization` class is used, if available (iOS 5.0 and Mac OS 10.7). If the build target does not either support `NSJSONSerialization` or include a third-party JSON library, a runtime exception will be thrown when attempting to parse a JSON request. */ -@interface AFJSONRequestOperation : AFHTTPRequestOperation { -@private - id _responseJSON; - NSError *_JSONError; -} +@interface AFJSONRequestOperation : AFHTTPRequestOperation ///---------------------------- /// @name Getting Response Data diff --git a/AFNetworking/AFPropertyListRequestOperation.h b/AFNetworking/AFPropertyListRequestOperation.h index 150041c..aa6e471 100644 --- a/AFNetworking/AFPropertyListRequestOperation.h +++ b/AFNetworking/AFPropertyListRequestOperation.h @@ -32,13 +32,7 @@ - `application/x-plist` */ -@interface AFPropertyListRequestOperation : AFHTTPRequestOperation { -@private - id _responsePropertyList; - NSPropertyListFormat _propertyListFormat; - NSPropertyListReadOptions _propertyListReadOptions; - NSError *_propertyListError; -} +@interface AFPropertyListRequestOperation : AFHTTPRequestOperation ///---------------------------- /// @name Getting Response Data diff --git a/AFNetworking/AFURLConnectionOperation.h b/AFNetworking/AFURLConnectionOperation.h index 14d0226..bef89dc 100644 --- a/AFNetworking/AFURLConnectionOperation.h +++ b/AFNetworking/AFURLConnectionOperation.h @@ -75,24 +75,7 @@ extern NSString * const AFNetworkingOperationDidFinishNotification; @warning Attempting to load a `file://` URL in iOS 4 may result in an `NSInvalidArgumentException`, caused by the connection returning `NSURLResponse` rather than `NSHTTPURLResponse`, which is the behavior as of iOS 5. */ -@interface AFURLConnectionOperation : NSOperation { -@private - unsigned short _state; - BOOL _cancelled; - NSRecursiveLock *_lock; - - NSSet *_runLoopModes; - - NSURLConnection *_connection; - NSURLRequest *_request; - NSHTTPURLResponse *_response; - NSError *_error; - - NSData *_responseData; - NSInteger _totalBytesRead; - NSMutableData *_dataAccumulator; - NSOutputStream *_outputStream; -} +@interface AFURLConnectionOperation : NSOperation ///------------------------------- /// @name Accessing Run Loop Modes diff --git a/AFNetworking/AFURLConnectionOperation.m b/AFNetworking/AFURLConnectionOperation.m index 172595a..fe520e2 100644 --- a/AFNetworking/AFURLConnectionOperation.m +++ b/AFNetworking/AFURLConnectionOperation.m @@ -85,6 +85,7 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat @interface AFURLConnectionOperation () @property (readwrite, nonatomic, assign) AFOperationState state; +@property (readwrite, nonatomic, assign, getter = isCancelled) BOOL cancelled; @property (readwrite, nonatomic, retain) NSRecursiveLock *lock; @property (readwrite, nonatomic, retain) NSURLConnection *connection; @property (readwrite, nonatomic, retain) NSURLRequest *request; @@ -106,6 +107,7 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat @implementation AFURLConnectionOperation @synthesize state = _state; +@synthesize cancelled = _cancelled; @synthesize connection = _connection; @synthesize runLoopModes = _runLoopModes; @synthesize request = _request; @@ -304,10 +306,6 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat return self.state == AFHTTPOperationFinishedState; } -- (BOOL)isCancelled { - return _cancelled; -} - - (BOOL)isConcurrent { return YES; } diff --git a/AFNetworking/AFXMLRequestOperation.h b/AFNetworking/AFXMLRequestOperation.h index 7fa919d..0beb677 100644 --- a/AFNetworking/AFXMLRequestOperation.h +++ b/AFNetworking/AFXMLRequestOperation.h @@ -39,14 +39,7 @@ When `AFXMLRequestOperation` is registered with `AFHTTPClient`, the response object in the success callback of `HTTPRequestOperationWithRequest:success:failure:` will be an instance of `NSXMLParser`. On platforms that support `NSXMLDocument`, you have the option to ignore the response object, and simply use the `responseXMLDocument` property of the operation argument of the callback. */ -@interface AFXMLRequestOperation : AFHTTPRequestOperation { -@private - NSXMLParser *_responseXMLParser; -#if __MAC_OS_X_VERSION_MIN_REQUIRED - NSXMLDocument *_responseXMLDocument; -#endif - NSError *_XMLError; -} +@interface AFXMLRequestOperation : AFHTTPRequestOperation ///---------------------------- /// @name Getting Response Data