diff options
Diffstat (limited to 'macosx/HandBrakeXPCService')
-rw-r--r-- | macosx/HandBrakeXPCService/HBRemoteCoreProtocol.h | 5 | ||||
-rw-r--r-- | macosx/HandBrakeXPCService/HandBrakeXPCService.m | 22 |
2 files changed, 1 insertions, 26 deletions
diff --git a/macosx/HandBrakeXPCService/HBRemoteCoreProtocol.h b/macosx/HandBrakeXPCService/HBRemoteCoreProtocol.h index 97c8870ef..37fc73e2d 100644 --- a/macosx/HandBrakeXPCService/HBRemoteCoreProtocol.h +++ b/macosx/HandBrakeXPCService/HBRemoteCoreProtocol.h @@ -19,11 +19,6 @@ NS_ASSUME_NONNULL_BEGIN - (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 keepPreviews:(BOOL)keepPreviews withReply:(void (^)(HBCoreResult))reply; - (void)cancelScan; diff --git a/macosx/HandBrakeXPCService/HandBrakeXPCService.m b/macosx/HandBrakeXPCService/HandBrakeXPCService.m index facf01268..34d3c04cb 100644 --- a/macosx/HandBrakeXPCService/HandBrakeXPCService.m +++ b/macosx/HandBrakeXPCService/HandBrakeXPCService.m @@ -57,6 +57,7 @@ static void *HandBrakeXPCServiceContext = &HandBrakeXPCServiceContext; _core = [[HBCore alloc] initWithLogLevel:level queue:_queue]; _core.name = name; + _core.automaticallyPreventSleep = NO; // Completion handler void (^completionHandler)(HBCoreResult result) = ^(HBCoreResult result) @@ -105,13 +106,6 @@ static void *HandBrakeXPCServiceContext = &HandBrakeXPCServiceContext; }); } -- (void)setAutomaticallyPreventSleep:(BOOL)automaticallyPreventSleep -{ - dispatch_sync(_queue, ^{ - self.core.automaticallyPreventSleep = automaticallyPreventSleep; - }); -} - - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { if (context == HandBrakeXPCServiceContext) @@ -124,20 +118,6 @@ static void *HandBrakeXPCServiceContext = &HandBrakeXPCServiceContext; } } -- (void)preventSleep -{ - dispatch_sync(_queue, ^{ - [self.core preventSleep]; - }); -} - -- (void)allowSleep -{ - dispatch_sync(_queue, ^{ - [self.core allowSleep]; - }); -} - - (void)scanURL:(NSURL *)url titleIndex:(NSUInteger)index previews:(NSUInteger)previewsNum minDuration:(NSUInteger)seconds keepPreviews:(BOOL)keepPreviews withReply:(void (^)(HBCoreResult))reply { dispatch_sync(_queue, ^{ |