Guest User

Untitled

a guest
Apr 25th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. typedef enum _S3OperationState {
  2. S3OperationPending = 1,
  3. S3OperationActive = 2,
  4. S3OperationPendingRetry = 3,
  5. S3OperationCanceled = 4,
  6. S3OperationDone = 5,
  7. S3OperationError = 6
  8. } S3OperationState;
  9.  
  10. @class S3Operation;
  11. @class S3Connection;
  12.  
  13. @protocol S3OperationDelegate
  14. - (void)operationStatusDidChange:(S3Operation *)o;
  15. - (void)operationStateDidChange:(S3Operation *)o;
  16. @end
  17.  
  18. @interface S3Operation : NSObject {
  19. S3ConnectionInfo *_connectionInfo;
  20. CFReadStreamRef _requestStream;
  21. NSObject<S3OperationDelegate> *_delegate;
  22. S3OperationState _state;
  23. NSString *_informationalStatus;
  24. NSError *_error;
  25. BOOL _allowsRetry;
  26. }
  27.  
  28. - (id)init;
  29.  
  30. - (S3ConnectionInfo *)connectionInfo;
  31. - (void)setConnectionInfo:(S3ConnectionInfo *)connectionInfo
  32.  
  33. - (BOOL)isStreamedOperation;
  34.  
  35. - (id)delegate;
  36. - (void)setDelegate:(id)delegate;
  37.  
  38. - (BOOL)active;
  39. - (BOOL)operationSuccess;
  40.  
  41. - (NSError *)error;
  42. - (void)setError:(NSError *)error;
  43.  
  44. - (NSString *)informationalStatus;
  45. - (void)setInformationalStatus:(NSString *)informationalStatus;
  46.  
  47. - (void)stop:(id)sender;
  48. - (void)start:(id)sender;
  49.  
  50. - (S3OperationState)state;
  51. - (void)setState:(S3OperationState)state;
  52.  
  53. - (BOOL)allowsRetry;
  54. - (void)setAllowsRetry:(BOOL)allowsRetry;
  55.  
  56. - (NSError*)errorFromHTTPRequestStatus:(int)status data:(NSData*)data;
  57.  
  58. @end
Add Comment
Please, Sign In to add comment