-
Notifications
You must be signed in to change notification settings - Fork 6
/
MVFileUpload.h
36 lines (30 loc) · 1.22 KB
/
MVFileUpload.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#import <Foundation/Foundation.h>
@class MVFileUpload,
MVUploadAuthorization;
@protocol MVFileUploadDelegate
@optional
- (BOOL)fileUploadShouldStart:(MVFileUpload*)fileUpload;
- (void)fileUploadDidStart:(MVFileUpload*)fileUpload;
- (void)fileUpload:(MVFileUpload*)fileUpload
didProgress:(float)percent;
- (void)fileUploadDidFinish:(MVFileUpload*)fileUpload;
- (void)fileUpload:(MVFileUpload*)fileUpload
didFailWithError:(NSError*)error;
@end
@interface MVFileUpload : NSObject
@property (strong, readonly) NSString *key;
@property (strong, readonly) NSData *data;
@property (strong, readonly) NSOperationQueue *operationQueue;
@property (strong, readwrite) MVUploadAuthorization *uploadAuthorization;
@property (readonly) float uploadPercentage;
@property (readonly, getter = isFinished) BOOL finished;
@property (readonly, getter = isError) BOOL error;
@property (strong, readonly) NSURL *remoteURL;
@property (strong, readonly) NSURL *remoteURLForAsset;
@property (weak, readwrite) NSObject <MVFileUploadDelegate> *delegate;
- (id)initWithKey:(NSString*)key
data:(NSData*)data
operationQueue:(NSOperationQueue*)operationQueue
uploadAuthorization:(MVUploadAuthorization*)uploadAuthorization;
- (void)start;
@end