-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simulating NSURLSession
- Loading branch information
Andy Mroczkowski
committed
Dec 13, 2013
1 parent
609c3ca
commit 8436676
Showing
18 changed files
with
355 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
Zinc/Private/ZincHTTPURLConnectionOperation+ZincURLSessionTask.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// ZincHTTPURLConnectionOperation+ZincURLSessionTask.h | ||
// Zinc-ObjC | ||
// | ||
// Created by Andy Mroczkowski on 12/12/13. | ||
// Copyright (c) 2013 MindSnacks. All rights reserved. | ||
// | ||
|
||
#import "ZincHTTPURLConnectionOperation.h" | ||
#import "ZincURLSession.h" | ||
|
||
@interface ZincHTTPURLConnectionOperation (ZincURLSessionTask) <ZincURLSessionTask> | ||
|
||
@end |
33 changes: 33 additions & 0 deletions
33
Zinc/Private/ZincHTTPURLConnectionOperation+ZincURLSessionTask.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// ZincHTTPURLConnectionOperation+ZincURLSessionTask.m | ||
// Zinc-ObjC | ||
// | ||
// Created by Andy Mroczkowski on 12/12/13. | ||
// Copyright (c) 2013 MindSnacks. All rights reserved. | ||
// | ||
|
||
#import "ZincHTTPURLConnectionOperation+ZincURLSessionTask.h" | ||
|
||
@implementation ZincHTTPURLConnectionOperation (ZincURLSessionTask) | ||
|
||
- (NSURLRequest *)originalRequest | ||
{ | ||
return self.request; | ||
} | ||
|
||
- (NSURLRequest *)currentRequest | ||
{ | ||
return self.request; | ||
} | ||
|
||
- (int64_t)countOfBytesReceived | ||
{ | ||
return self.totalBytesRead; | ||
} | ||
|
||
- (int64_t)countOfBytesExpectedToReceive | ||
{ | ||
return self.response.expectedContentLength; | ||
} | ||
|
||
@end |
Oops, something went wrong.