summaryrefslogtreecommitdiffstats
path: root/macosx/HandBrakeXPCService/HBRemoteCoreProtocol.h
blob: 5fd0805e0be9c68d95b20a05eda27e699f6be681 (plain)
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
/*  This file is part of the HandBrake source code.
 Homepage: <http://handbrake.fr/>.
 It may be used under the terms of the GNU General Public License. */

#import <Foundation/Foundation.h>

@import HandBrakeKit;

@protocol HBRemoteCoreProtocol

- (void)setUpWithLogLevel:(NSInteger)level name:(NSString *)name;
- (void)tearDown;

- (void)provideResourceAccessWithBookmarks:(NSArray<NSData *> *)bookmarks;

- (void)setAutomaticallyPreventSleep:(BOOL)automaticallyPreventSleep;

- (void)preventSleep;
- (void)allowSleep;

- (void)scanURL:(NSURL *)url titleIndex:(NSUInteger)index previews:(NSUInteger)previewsNum minDuration:(NSUInteger)seconds withReply:(void (^)(HBCoreResult))reply;
- (void)cancelScan;

- (void)encodeJob:(HBJob *)job withReply:(void (^)(HBCoreResult))reply;
- (void)cancelEncode;

- (void)pauseEncode;
- (void)resumeEncode;

@end

@protocol HBRemoteProgressProtocol

- (void)updateState:(HBState)state;
- (void)updateProgress:(double)currentProgress hours:(int)hours minutes:(int)minutes seconds:(int)seconds state:(HBState)state info:(NSString *)info;

- (void)forwardOutput:(NSString *)text;
- (void)forwardError:(NSString *)text;

@end