diff options
author | Muller, Alexander (A.) <amulle19@ford.com> | 2016-07-28 10:27:21 -0700 |
---|---|---|
committer | Muller, Alexander (A.) <amulle19@ford.com> | 2016-07-28 10:27:21 -0700 |
commit | e6b44e85ff659d724e6e60280de8f10b110d8da3 (patch) | |
tree | e8313d903893ec90cc0aecaaee9177ddcddb6a21 | |
parent | 3dc4d5cedc0de662197a26c9f01e94c972628ffc (diff) | |
download | sdl_ios-e6b44e85ff659d724e6e60280de8f10b110d8da3.tar.gz |
Moved Touch Manager to be a property of the Streaming Media Manager instead of the Proxy.
-rw-r--r-- | SmartDeviceLink/SDLProxy.h | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLProxy.m | 14 | ||||
-rw-r--r-- | SmartDeviceLink/SDLStreamingMediaManager.h | 7 | ||||
-rw-r--r-- | SmartDeviceLink/SDLStreamingMediaManager.m | 6 |
4 files changed, 12 insertions, 17 deletions
diff --git a/SmartDeviceLink/SDLProxy.h b/SmartDeviceLink/SDLProxy.h index 4d4d8137a..2d86439b7 100644 --- a/SmartDeviceLink/SDLProxy.h +++ b/SmartDeviceLink/SDLProxy.h @@ -9,7 +9,6 @@ @class SDLRPCRequestFactory; @class SDLStreamingMediaManager; @class SDLTimer; -@class SDLTouchManager; #import "SDLProtocolListener.h" #import "SDLProxyListener.h" @@ -29,7 +28,6 @@ @property (copy) NSString *debugConsoleGroupName; @property (readonly, copy) NSString *proxyVersion; @property (nonatomic, strong, readonly) SDLStreamingMediaManager *streamingMediaManager; -@property (nonatomic, strong, readonly) SDLTouchManager* touchManager; - (id)initWithTransport:(SDLAbstractTransport *)transport protocol:(SDLAbstractProtocol *)protocol diff --git a/SmartDeviceLink/SDLProxy.m b/SmartDeviceLink/SDLProxy.m index bc5ef192f..4470381ab 100644 --- a/SmartDeviceLink/SDLProxy.m +++ b/SmartDeviceLink/SDLProxy.m @@ -39,7 +39,6 @@ #import "SDLSystemContext.h" #import "SDLSystemRequest.h" #import "SDLTimer.h" -#import "SDLTouchManager.h" #import "SDLURLSession.h" @@ -58,7 +57,6 @@ const int POLICIES_CORRELATION_ID = 65535; @property (strong, nonatomic) NSMutableSet *mutableProxyListeners; @property (nonatomic, strong, readwrite) SDLStreamingMediaManager *streamingMediaManager; -@property (nonatomic, strong, readwrite) SDLTouchManager *touchManager; @end @@ -100,7 +98,6 @@ const int POLICIES_CORRELATION_ID = 65535; [self.protocol dispose]; [self.transport dispose]; - _touchManager = nil; _transport = nil; _protocol = nil; _mutableProxyListeners = nil; @@ -171,21 +168,12 @@ const int POLICIES_CORRELATION_ID = 65535; if (_streamingMediaManager == nil) { _streamingMediaManager = [[SDLStreamingMediaManager alloc] initWithProtocol:self.protocol]; [self.protocol.protocolDelegateTable addObject:_streamingMediaManager]; + [self.mutableProxyListeners addObject:_streamingMediaManager.touchManager]; } return _streamingMediaManager; } -- (SDLTouchManager*)touchManager { - if (_touchManager == nil) { - _touchManager = [[SDLTouchManager alloc] init]; - [self.mutableProxyListeners addObject:_touchManager]; - } - - return _touchManager; -} - - #pragma mark - SDLProtocolListener Implementation - (void)onProtocolOpened { _isConnected = YES; diff --git a/SmartDeviceLink/SDLStreamingMediaManager.h b/SmartDeviceLink/SDLStreamingMediaManager.h index 05a855e13..7e0b47dac 100644 --- a/SmartDeviceLink/SDLStreamingMediaManager.h +++ b/SmartDeviceLink/SDLStreamingMediaManager.h @@ -12,7 +12,7 @@ #import "SDLProtocolListener.h" @class SDLAbstractProtocol; - +@class SDLTouchManager; NS_ASSUME_NONNULL_BEGIN @@ -85,6 +85,11 @@ typedef void (^SDLStreamingStartBlock)(BOOL success, NSError *__nullable error); @property (assign, nonatomic, readonly) BOOL videoSessionConnected; @property (assign, nonatomic, readonly) BOOL audioSessionConnected; +/** + * Touch Manager responsible for providing touch event notifications. + */ +@property (nonatomic, strong, readonly) SDLTouchManager* touchManager; + @end diff --git a/SmartDeviceLink/SDLStreamingMediaManager.m b/SmartDeviceLink/SDLStreamingMediaManager.m index 616667c5b..c1877d7b5 100644 --- a/SmartDeviceLink/SDLStreamingMediaManager.m +++ b/SmartDeviceLink/SDLStreamingMediaManager.m @@ -12,7 +12,7 @@ #import "SDLAbstractProtocol.h" #import "SDLGlobals.h" - +#import "SDLTouchManager.h" NSString *const SDLErrorDomainStreamingMediaVideo = @"com.sdl.streamingmediamanager.video"; NSString *const SDLErrorDomainStreamingMediaAudio = @"com.sdl.streamingmediamanager.audio"; @@ -34,6 +34,8 @@ NS_ASSUME_NONNULL_BEGIN @property (copy, nonatomic, nullable) SDLStreamingStartBlock videoStartBlock; @property (copy, nonatomic, nullable) SDLStreamingStartBlock audioStartBlock; +@property (nonatomic, strong, readwrite) SDLTouchManager *touchManager; + @end @@ -56,6 +58,8 @@ NS_ASSUME_NONNULL_BEGIN _videoStartBlock = nil; _audioStartBlock = nil; + + _touchManager = [[SDLTouchManager alloc] init]; return self; } |