Created
December 2, 2009 17:17
-
-
Save olg/247356 to your computer and use it in GitHub Desktop.
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
typedef enum _S3OperationState { | |
S3OperationPending = 1, | |
S3OperationActive = 2, | |
S3OperationPendingRetry = 3, | |
S3OperationCanceled = 4, | |
S3OperationDone = 5, | |
S3OperationError = 6 | |
} S3OperationState; | |
@class S3Operation; | |
@class S3Connection; | |
@protocol S3OperationDelegate | |
- (void)operationStatusDidChange:(S3Operation *)o; | |
- (void)operationStateDidChange:(S3Operation *)o; | |
@end | |
@interface S3Operation : NSObject { | |
S3ConnectionInfo *_connectionInfo; | |
CFReadStreamRef _requestStream; | |
NSObject<S3OperationDelegate> *_delegate; | |
S3OperationState _state; | |
NSString *_informationalStatus; | |
NSError *_error; | |
BOOL _allowsRetry; | |
} | |
- (id)init; | |
- (S3ConnectionInfo *)connectionInfo; | |
- (void)setConnectionInfo:(S3ConnectionInfo *)connectionInfo | |
- (BOOL)isStreamedOperation; | |
- (id)delegate; | |
- (void)setDelegate:(id)delegate; | |
- (BOOL)active; | |
- (BOOL)operationSuccess; | |
- (NSError *)error; | |
- (void)setError:(NSError *)error; | |
- (NSString *)informationalStatus; | |
- (void)setInformationalStatus:(NSString *)informationalStatus; | |
- (void)stop:(id)sender; | |
- (void)start:(id)sender; | |
- (S3OperationState)state; | |
- (void)setState:(S3OperationState)state; | |
- (BOOL)allowsRetry; | |
- (void)setAllowsRetry:(BOOL)allowsRetry; | |
- (NSError*)errorFromHTTPRequestStatus:(int)status data:(NSData*)data; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment