Permalink
Browse files

Merge branch 'master' into geo-position-header

  • Loading branch information...
mattt committed Sep 14, 2012
2 parents 637f8fb + c838016 commit f5ef7ba1b07fe74834346fbb4c67b728e33982f6
Showing with 819 additions and 999 deletions.
  1. +5 −5 AFNetworking.podspec
  2. +162 −108 AFNetworking/AFHTTPClient.h
  3. +169 −159 AFNetworking/AFHTTPClient.m
  4. +17 −38 AFNetworking/AFHTTPRequestOperation.h
  5. +82 −83 AFNetworking/AFHTTPRequestOperation.m
  6. +2 −6 AFNetworking/AFImageRequestOperation.h
  7. +13 −15 AFNetworking/AFImageRequestOperation.m
  8. +2 −2 AFNetworking/AFJSONRequestOperation.h
  9. +12 −15 AFNetworking/AFJSONRequestOperation.m
  10. +0 −26 AFNetworking/AFJSONUtilities.h
  11. +0 −217 AFNetworking/AFJSONUtilities.m
  12. +5 −7 AFNetworking/AFNetworkActivityIndicatorManager.m
  13. +1 −1 AFNetworking/AFPropertyListRequestOperation.h
  14. +10 −12 AFNetworking/AFPropertyListRequestOperation.m
  15. +72 −67 AFNetworking/AFURLConnectionOperation.h
  16. +120 −85 AFNetworking/AFURLConnectionOperation.m
  17. +2 −2 AFNetworking/AFXMLRequestOperation.h
  18. +12 −20 AFNetworking/AFXMLRequestOperation.m
  19. +7 −5 AFNetworking/UIImageView+AFNetworking.m
  20. +14 −0 CHANGES
  21. +12 −0 Example/AFNetworking Example.entitlements
  22. +58 −62 Example/AFNetworking Mac Example.xcodeproj/project.pbxproj
  23. +13 −19 Example/AFNetworking iOS Example.xcodeproj/project.pbxproj
  24. +1 −1 Example/AppDelegate.h
  25. +7 −3 Example/AppDelegate.m
  26. +4 −2 Example/Classes/Controllers/PublicTimelineViewController.m
  27. +4 −4 Example/Classes/Models/Tweet.h
  28. +5 −16 Example/Classes/Models/Tweet.m
  29. +1 −1 Example/Classes/Models/User.h
  30. +2 −0 Example/Classes/Models/User.m
  31. BIN Example/Icon.png
  32. BIN Example/Icon@2x.png
  33. +3 −3 Example/iOS-Info.plist
  34. +2 −15 README.md
View
@@ -1,12 +1,12 @@
Pod::Spec.new do |s|
s.name = 'AFNetworking'
- s.version = '0.10.0'
+ s.version = '1.0RC2'
s.license = 'MIT'
- s.summary = 'A delightful iOS and OS X networking framework'
+ s.summary = 'A delightful iOS and OS X networking framework.'
s.homepage = 'https://github.com/AFNetworking/AFNetworking'
- s.authors = {'Mattt Thompson' => 'm@mattt.me', 'Scott Raymond' => 'sco@gowalla.com'}
- s.source = { :git => 'https://github.com/AFNetworking/AFNetworking.git', :tag => '0.10.0' }
+ s.authors = {'Mattt Thompson' => 'm@mattt.me', 'Scott Raymond' => 'sco@scottraymond.net'}
+ s.source = { :git => 'https://github.com/AFNetworking/AFNetworking.git', :tag => '1.0RC2' }
s.source_files = 'AFNetworking'
- s.clean_paths = ['iOS Example', 'Mac Example', 'AFNetworking.xcworkspace']
s.framework = 'SystemConfiguration'
+ s.prefix_header_contents = "#import <SystemConfiguration/SystemConfiguration.h>"
end
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -23,13 +23,6 @@
#import <Foundation/Foundation.h>
#import "AFURLConnectionOperation.h"
-/**
- Returns a set of MIME types detected in an HTTP `Accept` or `Content-Type` header.
- */
-extern NSSet * AFContentTypesFromHTTPHeader(NSString *string);
-
-extern NSString * AFCreateIncompleteDownloadDirectoryPath(void);
-
/**
`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.
*/
@@ -42,31 +35,7 @@ extern NSString * AFCreateIncompleteDownloadDirectoryPath(void);
/**
The last HTTP response received by the operation's connection.
*/
-@property (readonly, nonatomic, retain) NSHTTPURLResponse *response;
-
-/**
- Set a target file for the response, will stream directly into this destination.
- Defaults to nil, which will use a memory stream. Will create a new outputStream on change.
-
- Note: Changing this while the request is not in ready state will be ignored.
- */
-@property (nonatomic, copy) NSString *responseFilePath;
-
-
-/**
- Expected total length. This is different than expectedContentLength if the file is resumed.
- On regular requests, this is equal to self.response.expectedContentLength unless we resume a request.
-
- Note: this can also be -1 if the file size is not sent (*)
- */
-@property (assign, readonly) long long totalContentLength;
-
-/**
- Indicator for the file offset on partial/resumed downloads.
- This is greater than zero if the file download is resumed.
- */
-@property (assign, readonly) long long offsetContentLength;
-
+@property (readonly, nonatomic, strong) NSHTTPURLResponse *response;
///----------------------------------------------------------
/// @name Managing And Checking For Acceptable HTTP Responses
@@ -92,9 +61,9 @@ extern NSString * AFCreateIncompleteDownloadDirectoryPath(void);
*/
@property (nonatomic, assign) dispatch_queue_t failureCallbackQueue;
-///-------------------------------------------------------------
-/// @name Managing Accceptable HTTP Status Codes & Content Types
-///-------------------------------------------------------------
+///------------------------------------------------------------
+/// @name Managing Acceptable HTTP Status Codes & Content Types
+///------------------------------------------------------------
/**
Returns an `NSIndexSet` object containing the ranges of acceptable HTTP status codes. When non-`nil`, the operation will set the `error` property to an error in `AFErrorDomain`. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
@@ -104,7 +73,7 @@ extern NSString * AFCreateIncompleteDownloadDirectoryPath(void);
+ (NSIndexSet *)acceptableStatusCodes;
/**
- Adds status codes to the set of acceptable HTTP status codes returned by `+acceptableStatusCodes` in subsequent calls by this class and its descendents.
+ Adds status codes to the set of acceptable HTTP status codes returned by `+acceptableStatusCodes` in subsequent calls by this class and its descendants.
@param statusCodes The status codes to be added to the set of acceptable HTTP status codes
*/
@@ -118,7 +87,7 @@ extern NSString * AFCreateIncompleteDownloadDirectoryPath(void);
+ (NSSet *)acceptableContentTypes;
/**
- Adds content types to the set of acceptable MIME types returned by `+acceptableContentTypes` in subsequent calls by this class and its descendents.
+ Adds content types to the set of acceptable MIME types returned by `+acceptableContentTypes` in subsequent calls by this class and its descendants.
@param contentTypes The content types to be added to the set of acceptable MIME types
*/
@@ -144,11 +113,21 @@ extern NSString * AFCreateIncompleteDownloadDirectoryPath(void);
Sets the `completionBlock` property with a block that executes either the specified success or failure block, depending on the state of the request on completion. If `error` returns a value, which can be caused by an unacceptable status code or content type, then `failure` is executed. Otherwise, `success` is executed.
@param success The block to be executed on the completion of a successful request. This block has no return value and takes two arguments: the receiver operation and the object constructed from the response data of the request.
- @param failure The block to be executed on the completion of an unsuccessful request. This block has no return value and takes two arguments: the receiver operation and the error that occured during the request.
+ @param failure The block to be executed on the completion of an unsuccessful request. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the request.
@discussion This method should be overridden in subclasses in order to specify the response object passed into the success block.
*/
- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;
@end
+
+///----------------
+/// @name Functions
+///----------------
+
+/**
+ Returns a set of MIME types detected in an HTTP `Accept` or `Content-Type` header.
+ */
+extern NSSet * AFContentTypesFromHTTPHeader(NSString *string);
+
Oops, something went wrong.

0 comments on commit f5ef7ba

Please sign in to comment.