Permalink
Browse files

Merge branch 'master' of https://github.com/guykogus/AFNetworking int…

…o guykogus-master

Conflicts:
	AFNetworking/AFURLConnectionOperation.m

Signed-off-by: Mattt Thompson <m@mattt.me>
  • Loading branch information...
2 parents fc60c57 + 0530c9c commit 6b892ae29c1bd80658b9a777c243ed4df67076a4 @guykogus guykogus committed with mattt Dec 27, 2012
@@ -148,7 +148,7 @@ typedef enum {
@return The newly-initialized HTTP client
*/
-+ (AFHTTPClient *)clientWithBaseURL:(NSURL *)url;
++ (instancetype)clientWithBaseURL:(NSURL *)url;
/**
Initializes an `AFHTTPClient` object with the specified base URL.
@@ -205,7 +205,7 @@ @implementation AFHTTPClient
@synthesize networkReachabilityStatusBlock = _networkReachabilityStatusBlock;
#endif
-+ (AFHTTPClient *)clientWithBaseURL:(NSURL *)url {
++ (instancetype)clientWithBaseURL:(NSURL *)url {
return [[self alloc] initWithBaseURL:url];
}
@@ -76,11 +76,11 @@
@return A new image request operation
*/
#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
-+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
- success:(void (^)(UIImage *image))success;
++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(UIImage *image))success;
#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
-+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
- success:(void (^)(NSImage *image))success;
++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(NSImage *image))success;
#endif
/**
@@ -94,15 +94,15 @@
@return A new image request operation
*/
#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
-+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
- imageProcessingBlock:(UIImage *(^)(UIImage *image))imageProcessingBlock
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure;
++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ imageProcessingBlock:(UIImage *(^)(UIImage *image))imageProcessingBlock
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure;
#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
-+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
- imageProcessingBlock:(NSImage *(^)(NSImage *image))imageProcessingBlock
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSImage *image))success
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure;
++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ imageProcessingBlock:(NSImage *(^)(NSImage *image))imageProcessingBlock
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSImage *image))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure;
#endif
@end
@@ -46,8 +46,8 @@ @implementation AFImageRequestOperation
#endif
#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
-+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
- success:(void (^)(UIImage *image))success
++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(UIImage *image))success
{
return [self imageRequestOperationWithRequest:urlRequest imageProcessingBlock:nil success:^(NSURLRequest __unused *request, NSHTTPURLResponse __unused *response, UIImage *image) {
if (success) {
@@ -56,8 +56,8 @@ + (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)ur
} failure:nil];
}
#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
-+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
- success:(void (^)(NSImage *image))success
++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(NSImage *image))success
{
return [self imageRequestOperationWithRequest:urlRequest imageProcessingBlock:nil success:^(NSURLRequest __unused *request, NSHTTPURLResponse __unused *response, NSImage *image) {
if (success) {
@@ -69,10 +69,10 @@ + (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)ur
#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
-+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
- imageProcessingBlock:(UIImage *(^)(UIImage *))imageProcessingBlock
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure
++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ imageProcessingBlock:(UIImage *(^)(UIImage *))imageProcessingBlock
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure
{
AFImageRequestOperation *requestOperation = [[AFImageRequestOperation alloc] initWithRequest:urlRequest];
[requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
@@ -100,10 +100,10 @@ + (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)ur
return requestOperation;
}
#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
-+ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
- imageProcessingBlock:(NSImage *(^)(NSImage *))imageProcessingBlock
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSImage *image))success
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure
++ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ imageProcessingBlock:(NSImage *(^)(NSImage *))imageProcessingBlock
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSImage *image))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure
{
AFImageRequestOperation *requestOperation = [[AFImageRequestOperation alloc] initWithRequest:urlRequest];
[requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
@@ -64,8 +64,8 @@
@return A new JSON request operation
*/
-+ (AFJSONRequestOperation *)JSONRequestOperationWithRequest:(NSURLRequest *)urlRequest
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id JSON))success
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON))failure;
++ (instancetype)JSONRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id JSON))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON))failure;
@end
@@ -41,9 +41,9 @@ @implementation AFJSONRequestOperation
@synthesize JSONReadingOptions = _JSONReadingOptions;
@synthesize JSONError = _JSONError;
-+ (AFJSONRequestOperation *)JSONRequestOperationWithRequest:(NSURLRequest *)urlRequest
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id JSON))success
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON))failure
++ (instancetype)JSONRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id JSON))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON))failure
{
AFJSONRequestOperation *requestOperation = [(AFJSONRequestOperation *)[self alloc] initWithRequest:urlRequest];
[requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
@@ -58,7 +58,7 @@
@return The systemwide network activity indicator manager.
*/
-+ (AFNetworkActivityIndicatorManager *)sharedManager;
++ (instancetype)sharedManager;
/**
Increments the number of active network requests. If this number was zero before incrementing, this will start animating the status bar network activity indicator.
@@ -42,7 +42,7 @@ @implementation AFNetworkActivityIndicatorManager
@synthesize enabled = _enabled;
@dynamic networkActivityIndicatorVisible;
-+ (AFNetworkActivityIndicatorManager *)sharedManager {
++ (instancetype)sharedManager {
static AFNetworkActivityIndicatorManager *_sharedManager = nil;
static dispatch_once_t oncePredicate;
dispatch_once(&oncePredicate, ^{
@@ -61,8 +61,8 @@
@return A new property list request operation
*/
-+ (AFPropertyListRequestOperation *)propertyListRequestOperationWithRequest:(NSURLRequest *)urlRequest
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id propertyList))success
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id propertyList))failure;
++ (instancetype)propertyListRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id propertyList))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id propertyList))failure;
@end
@@ -43,9 +43,9 @@ @implementation AFPropertyListRequestOperation
@synthesize propertyListFormat = _propertyListFormat;
@synthesize propertyListError = _propertyListError;
-+ (AFPropertyListRequestOperation *)propertyListRequestOperationWithRequest:(NSURLRequest *)request
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id propertyList))success
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id propertyList))failure
++ (instancetype)propertyListRequestOperationWithRequest:(NSURLRequest *)request
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id propertyList))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id propertyList))failure
{
AFPropertyListRequestOperation *requestOperation = [(AFPropertyListRequestOperation *)[self alloc] initWithRequest:request];
[requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
@@ -66,9 +66,9 @@
@return A new XML request operation
*/
-+ (AFXMLRequestOperation *)XMLParserRequestOperationWithRequest:(NSURLRequest *)urlRequest
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLParser *XMLParser))success
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLParser *XMLParser))failure;
++ (instancetype)XMLParserRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLParser *XMLParser))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLParser *XMLParser))failure;
#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
@@ -81,9 +81,9 @@
@return A new XML request operation
*/
-+ (AFXMLRequestOperation *)XMLDocumentRequestOperationWithRequest:(NSURLRequest *)urlRequest
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLDocument *document))success
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLDocument *document))failure;
++ (instancetype)XMLDocumentRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLDocument *document))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLDocument *document))failure;
#endif
@end
@@ -48,9 +48,9 @@ @implementation AFXMLRequestOperation
#endif
@synthesize XMLError = _XMLError;
-+ (AFXMLRequestOperation *)XMLParserRequestOperationWithRequest:(NSURLRequest *)urlRequest
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLParser *XMLParser))success
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLParser *XMLParser))failure
++ (instancetype)XMLParserRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLParser *XMLParser))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLParser *XMLParser))failure
{
AFXMLRequestOperation *requestOperation = [(AFXMLRequestOperation *)[self alloc] initWithRequest:urlRequest];
[requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
@@ -67,9 +67,9 @@ + (AFXMLRequestOperation *)XMLParserRequestOperationWithRequest:(NSURLRequest *)
}
#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
-+ (AFXMLRequestOperation *)XMLDocumentRequestOperationWithRequest:(NSURLRequest *)urlRequest
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLDocument *document))success
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLDocument *document))failure
++ (instancetype)XMLDocumentRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLDocument *document))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLDocument *document))failure
{
AFXMLRequestOperation *requestOperation = [[self alloc] initWithRequest:urlRequest];
[requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, __unused id responseObject) {

0 comments on commit 6b892ae

Please sign in to comment.