![]() |
Ignite Tools
|
00001 // 00002 // UA_ASIProgressDelegate.h 00003 // Part of UA_ASIHTTPRequest -> http://allseeing-i.com/ASIHTTPRequest 00004 // 00005 // Created by Ben Copsey on 13/04/2010. 00006 // Copyright 2010 All-Seeing Interactive. All rights reserved. 00007 // 00008 00009 @class UA_ASIHTTPRequest; 00010 00011 @protocol UA_ASIProgressDelegate <NSObject> 00012 00013 @optional 00014 00015 // These methods are used to update UIProgressViews (iPhone OS) or NSProgressIndicators (Mac OS X) 00016 // If you are using a custom progress delegate, you may find it easier to implement didReceiveBytes / didSendBytes instead 00017 #if TARGET_OS_IPHONE 00018 - (void)setProgress:(float)newProgress; 00019 #else 00020 - (void)setDoubleValue:(double)newProgress; 00021 - (void)setMaxValue:(double)newMax; 00022 #endif 00023 00024 // Called when the request receives some data - bytes is the length of that data 00025 - (void)request:(UA_ASIHTTPRequest *)request didReceiveBytes:(long long)bytes; 00026 00027 // Called when the request sends some data 00028 // The first 32KB (128KB on older platforms) of data sent is not included in this amount because of limitations with the CFNetwork API 00029 // bytes may be less than zero if a request needs to remove upload progress (probably because the request needs to run again) 00030 - (void)request:(UA_ASIHTTPRequest *)request didSendBytes:(long long)bytes; 00031 00032 // Called when a request needs to change the length of the content to download 00033 - (void)request:(UA_ASIHTTPRequest *)request incrementDownloadSizeBy:(long long)newLength; 00034 00035 // Called when a request needs to change the length of the content to upload 00036 // newLength may be less than zero when a request needs to remove the size of the internal buffer from progress tracking 00037 - (void)request:(UA_ASIHTTPRequest *)request incrementUploadSizeBy:(long long)newLength; 00038 @end