-
Notifications
You must be signed in to change notification settings - Fork 0
/
ExportController.h
56 lines (46 loc) · 1.45 KB
/
ExportController.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
// ExportController.h
// Tagalog
//
// Created by Nathan Vander Wilt on 5/13/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@class TLPhotoSourceItem;
@interface ExportController : NSObject {
IBOutlet NSWindow* exportSheet;
__weak IBOutlet NSTextField* progressText;
__weak IBOutlet NSProgressIndicator* progressMeter;
__weak IBOutlet NSButton* cancelButton;
@private
id delegate;
NSWindow* window;
NSSet* copiedItems;
NSMapTable* itemsWithMetadata;
BOOL shouldCancel;
NSMutableSet* warnings;
}
@property (nonatomic, assign) id delegate;
@property (nonatomic, assign) NSWindow* window;
@property (nonatomic, copy) NSSet* copiedItems;
@property (nonatomic, copy) NSMapTable* itemsWithMetadata;
@property (nonatomic, readonly) NSSet* warnings;
- (void)export;
- (IBAction)cancel:(id)sender;
// for subclass implementation
- (BOOL)prepareForExport:(NSError**)err;
- (BOOL)exportItem:(TLPhotoSourceItem*)item
withMetadata:(NSDictionary*)metadata
error:(NSError**)err;
- (BOOL)copyItem:(TLPhotoSourceItem*)item
error:(NSError**)err;
- (void)cancelExport;
- (BOOL)finishExport:(NSError**)err;
- (void)noteWarning:(NSError*)warning;
@end
@interface NSObject (ExportControllerDelegate)
- (void)exportDidFinish:(ExportController*)theExportController;
- (void)exportDidCancel:(ExportController*)theExportController;
- (void)exportDidFail:(ExportController*)theExportController
withError:(NSError*)err;
@end