Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New progress system where the queue manages progress indicators
ProgressDelegates are now compatible with UIProgressViews as well as NSProgressIndicators
- Loading branch information
Showing
16 changed files
with
7,483 additions
and
804 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 was deleted.
Oops, something went wrong.
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,40 @@ | ||
// | ||
// ASIProgressQueue.h | ||
// asi-http-request | ||
// | ||
// Created by Ben Copsey on 07/11/2008. | ||
// Copyright 2008 All-Seeing Interactive. All rights reserved. | ||
// | ||
|
||
|
||
|
||
@interface ASIProgressQueue : NSOperationQueue { | ||
NSMutableArray *operations; | ||
|
||
id uploadProgressDelegate; | ||
int uploadProgressBytes; | ||
int uploadProgressTotalBytes; | ||
|
||
id downloadProgressDelegate; | ||
int downloadProgressBytes; | ||
int downloadProgressTotalBytes; | ||
|
||
} | ||
|
||
- (void)addOperation:(NSOperation *)operation; | ||
|
||
// Called at the start of a request to add on the size of this upload to the total | ||
- (void)incrementUploadSizeBy:(int)bytes; | ||
|
||
// Called during a request when data is written to the upload stream to increment the progress indicator | ||
- (void)incrementUploadProgressBy:(int)bytes; | ||
|
||
// Called at the start of a request to add on the size of this download to the total | ||
- (void)incrementDownloadSizeBy:(int)bytes; | ||
|
||
// Called during a request when data is received to increment the progress indicator | ||
- (void)incrementDownloadProgressBy:(int)bytes; | ||
|
||
@property (assign,setter=setUploadProgressDelegate:) id uploadProgressDelegate; | ||
@property (assign,setter=setDownloadProgressDelegate:) id downloadProgressDelegate; | ||
@end |
Oops, something went wrong.