-
Notifications
You must be signed in to change notification settings - Fork 0
/
CWMethodOperation.h
57 lines (39 loc) · 1.02 KB
/
CWMethodOperation.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
57
//
// CWMethod.h
// MMCourseWork
//
// Created by Alexey Streltsow on 12/1/09.
// Copyright 2009 Karma World LLC. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "CWMethodKeys.h"
#import "NSArray+Additions.h"
@class CWMethodOperation;
@protocol CWOperationDelegate<NSObject>
@required
-(void)operationSucceeded:(CWMethodOperation*)operation;
-(void)operationFailed:(CWMethodOperation*)operation;
@end
@interface CWMethodOperation : NSOperation {
@private
NSLock* _locker;
@protected
NSError* _error;
id<CWOperationDelegate> _delegate;
NSMutableDictionary* _outputs;
NSMutableDictionary* _inputs;
}
@property (nonatomic, assign) id<CWOperationDelegate> delegate;
@property (nonatomic, retain) NSError* error;
+ (BOOL) allowsSynchronousExecution;
+ (NSArray*) outputKeys;
+ (NSArray*) inputKeys;
-(NSMutableDictionary*) outputs;
-(NSMutableDictionary*) inputs;
- (void) lock;
- (void) unlock;
- (BOOL) process; // this should be overridden
- (void) succceed;
- (void) fail;
+ (NSString*) description;
@end