From 07195976ce0106a17ed57b08d2fb10d0c3020edb Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Mon, 15 Sep 2025 11:25:11 +0200 Subject: Initial commit --- QSCapturaPlugin/Commands/StartRecordingCommand.h | 13 +++++++++++++ QSCapturaPlugin/Commands/StartRecordingCommand.m | 23 +++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 QSCapturaPlugin/Commands/StartRecordingCommand.h create mode 100644 QSCapturaPlugin/Commands/StartRecordingCommand.m (limited to 'QSCapturaPlugin/Commands') diff --git a/QSCapturaPlugin/Commands/StartRecordingCommand.h b/QSCapturaPlugin/Commands/StartRecordingCommand.h new file mode 100644 index 0000000..aa6bcab --- /dev/null +++ b/QSCapturaPlugin/Commands/StartRecordingCommand.h @@ -0,0 +1,13 @@ +#import "Constants.h" +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface StartRecordingCommand : QSActionProvider + +- (QSObject *)startRecording:(QSObject *)directObject; + +@end + +NS_ASSUME_NONNULL_END diff --git a/QSCapturaPlugin/Commands/StartRecordingCommand.m b/QSCapturaPlugin/Commands/StartRecordingCommand.m new file mode 100644 index 0000000..4a3f1f3 --- /dev/null +++ b/QSCapturaPlugin/Commands/StartRecordingCommand.m @@ -0,0 +1,23 @@ +#import "StartRecordingCommand.h" +#import + +NS_ASSUME_NONNULL_BEGIN + +@implementation StartRecordingCommand + +- (QSObject *)startRecording:(QSObject *)directObject +{ + NSString *capturaURL = @"captura:?action=record"; + NSURL *url = [NSURL URLWithString:capturaURL]; + if (url) { + [[NSWorkspace sharedWorkspace] openURL:url]; + } else { + NSLog(@"Failed to create valid URL"); + } + + return directObject; +} + +@end + +NS_ASSUME_NONNULL_END -- cgit