Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:AFNetworking/AFNetworking
Browse files Browse the repository at this point in the history
  • Loading branch information
mattt committed Mar 19, 2012
2 parents 71ebcff + d6b97d4 commit c998a18
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
24 changes: 18 additions & 6 deletions AFNetworking/AFJSONUtilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@

NSUInteger serializeOptionFlags = 0;
[invocation setArgument:&serializeOptionFlags atIndex:2]; // arguments 0 and 1 are self and _cmd respectively, automatically set by NSInvocation
[invocation setArgument:error atIndex:3];
if (error != NULL) {
[invocation setArgument:error atIndex:3];
}

[invocation invoke];
[invocation getReturnValue:&data];
Expand Down Expand Up @@ -99,7 +101,9 @@
[invocation setArgument:&object atIndex:2]; // arguments 0 and 1 are self and _cmd respectively, automatically set by NSInvocation
NSUInteger writeOptions = 0;
[invocation setArgument:&writeOptions atIndex:3];
[invocation setArgument:error atIndex:4];
if (error != NULL) {
[invocation setArgument:error atIndex:4];
}

[invocation invoke];
[invocation getReturnValue:&data];
Expand Down Expand Up @@ -138,7 +142,9 @@ id AFJSONDecode(NSData *data, NSError **error) {

NSUInteger parseOptionFlags = 0;
[invocation setArgument:&parseOptionFlags atIndex:2]; // arguments 0 and 1 are self and _cmd respectively, automatically set by NSInvocation
[invocation setArgument:error atIndex:3];
if (error != NULL) {
[invocation setArgument:error atIndex:3];
}

[invocation invoke];
[invocation getReturnValue:&JSON];
Expand All @@ -158,7 +164,9 @@ id AFJSONDecode(NSData *data, NSError **error) {

NSUInteger yajlParserOptions = 0;
[invocation setArgument:&yajlParserOptions atIndex:2]; // arguments 0 and 1 are self and _cmd respectively, automatically set by NSInvocation
[invocation setArgument:error atIndex:3];
if (error != NULL) {
[invocation setArgument:error atIndex:3];
}

[invocation invoke];
[invocation getReturnValue:&JSON];
Expand All @@ -169,7 +177,9 @@ id AFJSONDecode(NSData *data, NSError **error) {
invocation.selector = _NXJsonParserSelector;

[invocation setArgument:&data atIndex:2]; // arguments 0 and 1 are self and _cmd respectively, automatically set by NSInvocation
[invocation setArgument:error atIndex:3];
if (error != NULL) {
[invocation setArgument:error atIndex:3];
}
[invocation setArgument:&nullOption atIndex:4];

[invocation invoke];
Expand All @@ -185,7 +195,9 @@ id AFJSONDecode(NSData *data, NSError **error) {
[invocation setArgument:&data atIndex:2]; // arguments 0 and 1 are self and _cmd respectively, automatically set by NSInvocation
NSUInteger readOptions = 0;
[invocation setArgument:&readOptions atIndex:3];
[invocation setArgument:error atIndex:4];
if (error != NULL) {
[invocation setArgument:error atIndex:4];
}

[invocation invoke];
[invocation getReturnValue:&JSON];
Expand Down
8 changes: 4 additions & 4 deletions AFNetworking/AFURLConnectionOperation.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,18 +174,18 @@ extern NSString * const AFNetworkingOperationDidFinishNotification;
///---------------------------------

/**
Sets a callback to be called when an undetermined number of bytes have been downloaded from the server.
Sets a callback to be called when an undetermined number of bytes have been uploaded to the server.
@param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times.
@param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes three arguments: the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times.
@see setDownloadProgressBlock
*/
- (void)setUploadProgressBlock:(void (^)(NSInteger bytesWritten, NSInteger totalBytesWritten, NSInteger totalBytesExpectedToWrite))block;

/**
Sets a callback to be called when an undetermined number of bytes have been uploaded to the server.
Sets a callback to be called when an undetermined number of bytes have been downloaded from the server.
@param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes three arguments: the number of bytes read since the last time the upload progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times.
@param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times.
@see setUploadProgressBlock
*/
Expand Down

0 comments on commit c998a18

Please sign in to comment.