summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Elias <francois.elias@livio.io>2021-01-12 18:28:36 -0500
committerFrank Elias <francois.elias@livio.io>2021-01-12 18:28:36 -0500
commitead1f6dbf9686e436f3b8e7e73425a175d1e01f1 (patch)
treebe4f4767dbe5d5d083d89db288c4bcc46026e407
parent6a84b911b23b298d81268939d0966ff6c79df94b (diff)
downloadsdl_ios-ead1f6dbf9686e436f3b8e7e73425a175d1e01f1.tar.gz
Comment review
-rw-r--r--SmartDeviceLink/public/SDLSetMediaClockTimer.h13
-rw-r--r--SmartDeviceLink/public/SDLSetMediaClockTimer.m20
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSetMediaClockTimerSpec.m3
3 files changed, 32 insertions, 4 deletions
diff --git a/SmartDeviceLink/public/SDLSetMediaClockTimer.h b/SmartDeviceLink/public/SDLSetMediaClockTimer.h
index 2e5343245..001e16fbb 100644
--- a/SmartDeviceLink/public/SDLSetMediaClockTimer.h
+++ b/SmartDeviceLink/public/SDLSetMediaClockTimer.h
@@ -33,6 +33,8 @@ NS_ASSUME_NONNULL_BEGIN
@param playPauseIndicator An optional audio indicator to change the play/pause button
@return An object of SetMediaClockTimer
*/
++ (instancetype)countUpFromStartTimeInterval:(NSTimeInterval)startTime toEndTimeInterval:(NSTimeInterval)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator NS_SWIFT_NAME(countUp(from:to:playPauseIndicator:)) __deprecated_msg("Use countUpFromStartTimeInterval:toEndTimeInterval:playPauseIndicator:countRate: instead");
+
+ (instancetype)countUpFromStartTimeInterval:(NSTimeInterval)startTime toEndTimeInterval:(NSTimeInterval)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator countRate:(nullable NSNumber<SDLFloat> *)countRate NS_SWIFT_NAME(countUp(from:to:playPauseIndicator:countRate:));
/**
@@ -45,6 +47,8 @@ NS_ASSUME_NONNULL_BEGIN
@param playPauseIndicator An optional audio indicator to change the play/pause button
@return An object of SetMediaClockTimer
*/
++ (instancetype)countUpFromStartTime:(SDLStartTime *)startTime toEndTime:(SDLStartTime *)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator NS_SWIFT_NAME(countUp(from:to:playPauseIndicator:)) __deprecated_msg("Use countUpFromStartTime:toEndTime:playPauseIndicator:countRate: instead");
+
+ (instancetype)countUpFromStartTime:(SDLStartTime *)startTime toEndTime:(SDLStartTime *)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator countRate:(nullable NSNumber<SDLFloat> *)countRate NS_SWIFT_NAME(countUp(from:to:playPauseIndicator:countRate:));
/**
@@ -57,6 +61,8 @@ NS_ASSUME_NONNULL_BEGIN
@param playPauseIndicator An optional audio indicator to change the play/pause button
@return An object of SetMediaClockTimer
*/
++ (instancetype)countDownFromStartTimeInterval:(NSTimeInterval)startTime toEndTimeInterval:(NSTimeInterval)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator NS_SWIFT_NAME(countDown(from:to:playPauseIndicator:)) __deprecated_msg("Use countDownFromStartTimeInterval:toEndTimeInterval:playPauseIndicator:countRate: instead");
+
+ (instancetype)countDownFromStartTimeInterval:(NSTimeInterval)startTime toEndTimeInterval:(NSTimeInterval)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator countRate:(nullable NSNumber<SDLFloat> *)countRate NS_SWIFT_NAME(countDown(from:to:playPauseIndicator:countRate:));
/**
@@ -69,6 +75,8 @@ NS_ASSUME_NONNULL_BEGIN
@param playPauseIndicator An optional audio indicator to change the play/pause button
@return An object of SetMediaClockTimer
*/
++ (instancetype)countDownFromStartTime:(SDLStartTime *)startTime toEndTime:(SDLStartTime *)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator NS_SWIFT_NAME(countDown(from:to:playPauseIndicator:)) __deprecated_msg("Use countDownFromStartTime:toEndTime:playPauseIndicator:countRate: instead");
+
+ (instancetype)countDownFromStartTime:(SDLStartTime *)startTime toEndTime:(SDLStartTime *)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator countRate:(nullable NSNumber<SDLFloat> *)countRate NS_SWIFT_NAME(countDown(from:to:playPauseIndicator:countRate:));
/**
@@ -77,7 +85,7 @@ NS_ASSUME_NONNULL_BEGIN
@param playPauseIndicator An optional audio indicator to change the play/pause button
@return An object of SetMediaClockTimer
*/
-+ (instancetype)pauseWithPlayPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator NS_SWIFT_NAME(pause(playPauseIndicator:)) __deprecated_msg("Use initWithUpdateMode:startTime:endTime:audioStreamingIndicator:countRate: instead");
++ (instancetype)pauseWithPlayPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator NS_SWIFT_NAME(pause(playPauseIndicator:));
/**
Update a pause time (or pause and update the time) on a media clock timer
@@ -99,6 +107,9 @@ NS_ASSUME_NONNULL_BEGIN
*/
+ (instancetype)updatePauseWithNewStartTime:(SDLStartTime *)startTime endTime:(SDLStartTime *)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator NS_SWIFT_NAME(pause(newStart:newEnd:playPauseIndicator:));
+
++ (instancetype)resumeWithPlayPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator NS_SWIFT_NAME(resume(playPauseIndicator:)) __deprecated_msg("Use resumeWithPlayPauseIndicator:playPauseIndicator:countRate:");
+
/**
Resume a paused media clock timer. It resumes at the same time at which it was paused.
diff --git a/SmartDeviceLink/public/SDLSetMediaClockTimer.m b/SmartDeviceLink/public/SDLSetMediaClockTimer.m
index cf576919a..bcb483f14 100644
--- a/SmartDeviceLink/public/SDLSetMediaClockTimer.m
+++ b/SmartDeviceLink/public/SDLSetMediaClockTimer.m
@@ -47,6 +47,10 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
++ (instancetype)countUpFromStartTimeInterval:(NSTimeInterval)startTime toEndTimeInterval:(NSTimeInterval)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator {
+ return [self countUpFromStartTimeInterval:startTime toEndTimeInterval:endTime playPauseIndicator:playPauseIndicator countRate:nil];
+}
+
+ (instancetype)countUpFromStartTimeInterval:(NSTimeInterval)startTime toEndTimeInterval:(NSTimeInterval)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator countRate:(nullable NSNumber<SDLFloat> *)countRate {
SDLStartTime *startTimeRPC = [[SDLStartTime alloc] initWithTimeInterval:startTime];
SDLStartTime *endTimeRPC = [[SDLStartTime alloc] initWithTimeInterval:endTime];
@@ -54,10 +58,18 @@ NS_ASSUME_NONNULL_BEGIN
return [[self alloc] initWithUpdateMode:SDLUpdateModeCountUp startTime:startTimeRPC endTime:endTimeRPC audioStreamingIndicator:playPauseIndicator countRate:countRate];
}
++ (instancetype)countUpFromStartTime:(SDLStartTime *)startTime toEndTime:(SDLStartTime *)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator {
+ return [self countUpFromStartTime:startTime toEndTime:endTime playPauseIndicator:playPauseIndicator countRate:nil];
+}
+
+ (instancetype)countUpFromStartTime:(SDLStartTime *)startTime toEndTime:(SDLStartTime *)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator countRate:(nullable NSNumber<SDLFloat> *)countRate {
return [[self alloc] initWithUpdateMode:SDLUpdateModeCountUp startTime:startTime endTime:endTime audioStreamingIndicator:playPauseIndicator countRate:countRate];
}
++ (instancetype)countDownFromStartTimeInterval:(NSTimeInterval)startTime toEndTimeInterval:(NSTimeInterval)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator {
+ return [self countDownFromStartTimeInterval:startTime toEndTimeInterval:endTime playPauseIndicator:playPauseIndicator countRate:nil];
+}
+
+ (instancetype)countDownFromStartTimeInterval:(NSTimeInterval)startTime toEndTimeInterval:(NSTimeInterval)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator countRate:(nullable NSNumber<SDLFloat> *)countRate {
SDLStartTime *startTimeRPC = [[SDLStartTime alloc] initWithTimeInterval:startTime];
SDLStartTime *endTimeRPC = [[SDLStartTime alloc] initWithTimeInterval:endTime];
@@ -65,6 +77,10 @@ NS_ASSUME_NONNULL_BEGIN
return [[self alloc] initWithUpdateMode:SDLUpdateModeCountDown startTime:startTimeRPC endTime:endTimeRPC audioStreamingIndicator:playPauseIndicator countRate:countRate];
}
++ (instancetype)countDownFromStartTime:(SDLStartTime *)startTime toEndTime:(SDLStartTime *)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator {
+ return [self countDownFromStartTime:startTime toEndTime:endTime playPauseIndicator:playPauseIndicator countRate:nil];
+}
+
+ (instancetype)countDownFromStartTime:(SDLStartTime *)startTime toEndTime:(SDLStartTime *)endTime playPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator countRate:(nullable NSNumber<SDLFloat> *)countRate {
return [[self alloc] initWithUpdateMode:SDLUpdateModeCountDown startTime:startTime endTime:endTime audioStreamingIndicator:playPauseIndicator countRate:countRate];
}
@@ -84,6 +100,10 @@ NS_ASSUME_NONNULL_BEGIN
return [[self alloc] initWithUpdateMode:SDLUpdateModePause startTime:startTime endTime:endTime audioStreamingIndicator:playPauseIndicator countRate:nil];
}
++ (instancetype)resumeWithPlayPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator {
+ return [self resumeWithPlayPauseIndicator:playPauseIndicator countRate:nil];
+}
+
+ (instancetype)resumeWithPlayPauseIndicator:(nullable SDLAudioStreamingIndicator)playPauseIndicator countRate:(nullable NSNumber<SDLFloat> *)countRate {
return [[self alloc] initWithUpdateMode:SDLUpdateModeResume startTime:nil endTime:nil audioStreamingIndicator:playPauseIndicator countRate:countRate];
}
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSetMediaClockTimerSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSetMediaClockTimerSpec.m
index e820e333d..0cbdb5d9b 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSetMediaClockTimerSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSetMediaClockTimerSpec.m
@@ -102,10 +102,7 @@ describe(@"SetMediaClocktimer Spec", ^ {
});
it(@"should properly initialize with pauseWithPlayPauseIndicator:", ^{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLSetMediaClockTimer *testRequest = [SDLSetMediaClockTimer pauseWithPlayPauseIndicator:testIndicator];
-#pragma clang diagnostic pop
expect(testRequest.startTime).to(beNil());
expect(testRequest.endTime).to(beNil());