forked from gnachman/iTerm2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileTransferManager.h
More file actions
51 lines (37 loc) · 1.65 KB
/
FileTransferManager.h
File metadata and controls
51 lines (37 loc) · 1.65 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// DownloadManager.h
// iTerm
//
// Created by George Nachman on 12/21/13.
//
//
#import <Cocoa/Cocoa.h>
#import "TransferrableFile.h"
@class TransferrableFileMenuItemViewController;
@interface FileTransferManager : NSObject
@property(nonatomic, readonly) NSMutableArray *files;
+ (instancetype)sharedInstance;
- (void)removeItem:(TransferrableFileMenuItemViewController *)viewController;
- (void)animateImage:(NSImage *)image intoDownloadsMenuFromPoint:(NSPoint)point onScreen:(NSScreen *)screen;
- (void)openDownloadsMenu;
- (void)openUploadsMenu;
#pragma mark - Calls made by subclasses of TransferrableFile
// Connection initiation has started.
- (void)transferrableFileDidStartTransfer:(TransferrableFile *)transferrableFile;
// Stop was requested.
- (void)transferrableFileWillStop:(TransferrableFile *)transferrableFile;
// A transfer stopped with -stop has finally stopped.
- (void)transferrableFileDidStopTransfer:(TransferrableFile *)transferrableFile;
// Number of bytes transferred has changed or total size has been discovered.
- (void)transferrableFileProgressDidChange:(TransferrableFile *)transferrableFile;
// |error| is nil on success
- (void)transferrableFile:(TransferrableFile *)transferrableFile
didFinishTransmissionWithError:(NSError *)error;
// Shows a modal alert with the text in |prompt| and a freeform keyboard input. Returns the
// value entered.
- (NSString *)transferrableFile:(TransferrableFile *)transferrableFile
keyboardInteractivePrompt:(NSString *)prompt;
// Shows message, returns YES if OK, NO if Cancel
- (BOOL)transferrableFile:(TransferrableFile *)transferrableFile
confirmMessage:(NSString *)message;
@end