-
Notifications
You must be signed in to change notification settings - Fork 11
/
TSServiceTester.h
61 lines (45 loc) · 1.73 KB
/
TSServiceTester.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
58
59
60
61
//
// TSServiceTester.h
// ThisService
//
// Created by Jesper on 2012-07-05.
// Copyright 2012 waffle software. All rights reserved.
// BSD licensed - see license.txt for more information.
//
//
#import <Cocoa/Cocoa.h>
#import "TSServiceTesting.h"
@class TSServiceTester;
@class TSService;
@protocol TSServiceTesterDelegate <NSObject>
- (void)testerLaunchedService:(TSServiceTester *)tester;
- (void)testerPairedWithService:(TSServiceTester *)tester;
- (void)tester:(TSServiceTester *)tester failedWithError:(NSString *)error;
- (void)testerBeganRunningService:(TSServiceTester *)tester;
- (void)testerWillInvokeService:(TSServiceTester *)tester withPasteboard:(NSPasteboard *)pasteboard;
- (void)testerFinishedRunningService:(TSServiceTester *)tester withPasteboard:(NSPasteboard *)pasteboard;
@end
@interface TSServiceTester : NSObject <TSServiceTestingProducer> {
NSString *_launchPath;
NSURL *_serviceURL;
TSService *_service;
id<TSServiceTestingSkeleton> _skeleton;
NSPasteboard *_pasteboard;
NSString *_registeredSkeletonName;
NSConnection *_connection;
NSTask *_serviceTask;
dispatch_source_t _taskExitSource;
id<TSServiceTesterDelegate> _delegate;
}
- (id)initWithServiceLaunchPath:(NSString *)launchPath service:(TSService *)service testServiceURL:(NSURL *)serviceURL;
@property (retain) id<TSServiceTestingSkeleton> skeleton;
@property (retain) NSPasteboard *pasteboard;
@property (retain) NSString *registeredSkeletonName;
@property (retain) NSConnection *connection;
@property (retain) NSTask *serviceTask;
@property (readonly, retain) TSService *service;
- (BOOL)startTesting;
- (void)setDelegate:(id<TSServiceTesterDelegate>)delegate;
- (BOOL)startConnection;
- (void)cancel;
@end