diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2020-04-17 09:03:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 09:03:19 -0400 |
commit | c0904a06d9451f15072641562526022ac58d14e0 (patch) | |
tree | df41b86a999f9c719c7977b5e1094d243496bb2c | |
parent | fa068d3b42f7e9ec2bfb6c7d37411b391b2d9200 (diff) | |
parent | 4ab1bbe5019b91644457e5c2eca37be4b767cae5 (diff) | |
download | sdl_ios-c0904a06d9451f15072641562526022ac58d14e0.tar.gz |
Merge pull request #1628 from smartdevicelink/bugfix/issue-1627-streamingmediamanager-secondarytransport-public
Fix SDLStreamingMediaManager private classes should not be public properties / methods
-rw-r--r-- | SmartDeviceLink/SDLLifecycleManager.m | 10 | ||||
-rw-r--r-- | SmartDeviceLink/SDLStreamingMediaManager.h | 8 | ||||
-rw-r--r-- | SmartDeviceLink/SDLStreamingMediaManager.m | 2 | ||||
-rw-r--r-- | SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m | 7 | ||||
-rw-r--r-- | SmartDeviceLinkTests/SDLStreamingMediaManagerSpec.m | 3 |
5 files changed, 21 insertions, 9 deletions
diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m index 4c6feafbc..c0f47177c 100644 --- a/SmartDeviceLink/SDLLifecycleManager.m +++ b/SmartDeviceLink/SDLLifecycleManager.m @@ -75,7 +75,15 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready"; NSString *const BackgroundTaskTransportName = @"com.sdl.transport.backgroundTask"; -#pragma mark - SDLManager Private Interface +#pragma mark - Protected Class Interfaces +@interface SDLStreamingMediaManager () + +@property (strong, nonatomic, nullable) SDLSecondaryTransportManager *secondaryTransportManager; +- (void)startSecondaryTransportWithProtocol:(SDLProtocol *)protocol; + +@end + +#pragma mark - SDLLifecycleManager Private Interface @interface SDLLifecycleManager () <SDLConnectionManagerType> diff --git a/SmartDeviceLink/SDLStreamingMediaManager.h b/SmartDeviceLink/SDLStreamingMediaManager.h index d33fc99cd..c3184c21d 100644 --- a/SmartDeviceLink/SDLStreamingMediaManager.h +++ b/SmartDeviceLink/SDLStreamingMediaManager.h @@ -117,8 +117,6 @@ NS_ASSUME_NONNULL_BEGIN */ @property (assign, nonatomic) BOOL showVideoBackgroundDisplay; -/// The manager for handling streaming over a secondary transport -@property (strong, nonatomic, nullable) SDLSecondaryTransportManager *secondaryTransportManager; #pragma mark - Lifecycle @@ -186,12 +184,6 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Secondary Transport Specific /** - * Starts the video/audio services on the passed protocol. This method is used internally. - * @param protocol The protocol to use for the audio/video services - */ -- (void)startSecondaryTransportWithProtocol:(SDLProtocol *)protocol; - -/** * Start the manager. This is used internally. To use an SDLStreamingMediaManager, you should use the manager found on `SDLManager`. */ - (void)startWithProtocol:(SDLProtocol *)protocol __deprecated_msg("Use startSecondaryTransportWithProtocol: instead"); diff --git a/SmartDeviceLink/SDLStreamingMediaManager.m b/SmartDeviceLink/SDLStreamingMediaManager.m index 3002c437b..01c8e557e 100644 --- a/SmartDeviceLink/SDLStreamingMediaManager.m +++ b/SmartDeviceLink/SDLStreamingMediaManager.m @@ -33,6 +33,8 @@ NS_ASSUME_NONNULL_BEGIN @property (strong, nonatomic, nullable) SDLProtocol *audioProtocol; @property (strong, nonatomic, nullable) SDLProtocol *videoProtocol; +@property (strong, nonatomic, nullable) SDLSecondaryTransportManager *secondaryTransportManager; + @end diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m index 9e5bac3cb..cda5285c4 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleManagerSpec.m @@ -47,6 +47,13 @@ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" +@interface SDLStreamingMediaManager () + +@property (strong, nonatomic, nullable) SDLSecondaryTransportManager *secondaryTransportManager; +- (void)startSecondaryTransportWithProtocol:(SDLProtocol *)protocol; + +@end + @interface SDLLifecycleManager () // this private property is used for testing @property (copy, nonatomic) dispatch_queue_t lifecycleQueue; diff --git a/SmartDeviceLinkTests/SDLStreamingMediaManagerSpec.m b/SmartDeviceLinkTests/SDLStreamingMediaManagerSpec.m index 704683688..2eaddbffb 100644 --- a/SmartDeviceLinkTests/SDLStreamingMediaManagerSpec.m +++ b/SmartDeviceLinkTests/SDLStreamingMediaManagerSpec.m @@ -25,6 +25,9 @@ @property (strong, nonatomic, nullable) SDLProtocol *audioProtocol; @property (strong, nonatomic, nullable) SDLProtocol *videoProtocol; +@property (strong, nonatomic, nullable) SDLSecondaryTransportManager *secondaryTransportManager; + +- (void)startSecondaryTransportWithProtocol:(SDLProtocol *)protocol; - (void)didUpdateFromOldVideoProtocol:(nullable SDLProtocol *)oldVideoProtocol toNewVideoProtocol:(nullable SDLProtocol *)newVideoProtocol fromOldAudioProtocol:(nullable SDLProtocol *)oldAudioProtocol toNewAudioProtocol:(nullable SDLProtocol *)newAudioProtocol; @end |