2 // ASIProgressDelegate.h
3 // Part of ASIHTTPRequest -> http://allseeing-i.com/ASIHTTPRequest
5 // Created by Ben Copsey on 13/04/2010.
6 // Copyright 2010 All-Seeing Interactive. All rights reserved.
11 @protocol ASIProgressDelegate <NSObject>
15 // These methods are used to update UIProgressViews (iPhone OS) or NSProgressIndicators (Mac OS X)
16 // If you are using a custom progress delegate, you may find it easier to implement didReceiveBytes / didSendBytes instead
18 - (void)setProgress:(float)newProgress;
20 - (void)setDoubleValue:(double)newProgress;
21 - (void)setMaxValue:(double)newMax;
24 // Called when the request receives some data - bytes is the length of that data
25 - (void)request:(ASIHTTPRequest *)request didReceiveBytes:(long long)bytes;
27 // Called when the request sends some data
28 // The first 32KB (128KB on older platforms) of data sent is not included in this amount because of limitations with the CFNetwork API
29 // bytes may be less than zero if a request needs to remove upload progress (probably because the request needs to run again)
30 - (void)request:(ASIHTTPRequest *)request didSendBytes:(long long)bytes;
32 // Called when a request needs to change the length of the content to download
33 - (void)request:(ASIHTTPRequest *)request incrementDownloadSizeBy:(long long)newLength;
35 // Called when a request needs to change the length of the content to upload
36 // newLength may be less than zero when a request needs to remove the size of the internal buffer from progress tracking
37 - (void)request:(ASIHTTPRequest *)request incrementUploadSizeBy:(long long)newLength;