diff options
-rw-r--r-- | SmartDeviceLink/SDLAbstractTransport.h | 4 | ||||
-rw-r--r-- | SmartDeviceLink/SDLIAPSession.h | 14 | ||||
-rw-r--r-- | SmartDeviceLink/SDLIAPSession.m | 3 | ||||
-rw-r--r-- | SmartDeviceLink/SDLIAPSessionDelegate.h | 4 | ||||
-rw-r--r-- | SmartDeviceLink/SDLIAPTransport.h | 7 | ||||
-rw-r--r-- | SmartDeviceLink/SDLIAPTransport.m | 5 | ||||
-rw-r--r-- | SmartDeviceLink/SDLStreamDelegate.h | 14 | ||||
-rw-r--r-- | SmartDeviceLink/SDLStreamDelegate.m | 4 | ||||
-rw-r--r-- | SmartDeviceLink/SDLTCPTransport.h | 4 | ||||
-rw-r--r-- | SmartDeviceLink/SDLTCPTransport.m | 3 | ||||
-rw-r--r-- | SmartDeviceLink/SDLTransportDelegate.h | 6 |
11 files changed, 54 insertions, 14 deletions
diff --git a/SmartDeviceLink/SDLAbstractTransport.h b/SmartDeviceLink/SDLAbstractTransport.h index a8a1f61be..5880a8fcb 100644 --- a/SmartDeviceLink/SDLAbstractTransport.h +++ b/SmartDeviceLink/SDLAbstractTransport.h @@ -4,6 +4,8 @@ #import "SDLTransportDelegate.h" +NS_ASSUME_NONNULL_BEGIN + @interface SDLAbstractTransport : NSObject @property (weak) id<SDLTransportDelegate> delegate; @@ -16,3 +18,5 @@ - (double)retryDelay; @end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLIAPSession.h b/SmartDeviceLink/SDLIAPSession.h index d21343894..8f28c64da 100644 --- a/SmartDeviceLink/SDLIAPSession.h +++ b/SmartDeviceLink/SDLIAPSession.h @@ -8,15 +8,17 @@ @class SDLStreamDelegate; +NS_ASSUME_NONNULL_BEGIN + typedef void (^SessionCompletionHandler)(BOOL success); @interface SDLIAPSession : NSObject -@property (strong, atomic) EAAccessory *accessory; -@property (strong, atomic) NSString *protocol; -@property (strong, atomic) EASession *easession; -@property (weak) id<SDLIAPSessionDelegate> delegate; -@property (strong, atomic) SDLStreamDelegate *streamDelegate; +@property (nullable, strong, atomic) EAAccessory *accessory; +@property (nullable, strong, atomic) NSString *protocol; +@property (nullable, strong, atomic) EASession *easession; +@property (nullable, weak) id<SDLIAPSessionDelegate> delegate; +@property (nullable, strong, atomic) SDLStreamDelegate *streamDelegate; - (instancetype)initWithAccessory:(EAAccessory *)accessory forProtocol:(NSString *)protocol; @@ -25,3 +27,5 @@ typedef void (^SessionCompletionHandler)(BOOL success); - (void)stop; @end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLIAPSession.m b/SmartDeviceLink/SDLIAPSession.m index 5020b2081..2e4ef2edd 100644 --- a/SmartDeviceLink/SDLIAPSession.m +++ b/SmartDeviceLink/SDLIAPSession.m @@ -7,6 +7,7 @@ #import "SDLStreamDelegate.h" #import "SDLTimer.h" +NS_ASSUME_NONNULL_BEGIN @interface SDLIAPSession () @@ -154,3 +155,5 @@ } @end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLIAPSessionDelegate.h b/SmartDeviceLink/SDLIAPSessionDelegate.h index 6ec7e189b..b391a38fc 100644 --- a/SmartDeviceLink/SDLIAPSessionDelegate.h +++ b/SmartDeviceLink/SDLIAPSessionDelegate.h @@ -5,9 +5,13 @@ #import <Foundation/Foundation.h> @class SDLIAPSession; +NS_ASSUME_NONNULL_BEGIN + @protocol SDLIAPSessionDelegate - (void)onSessionInitializationCompleteForSession:(SDLIAPSession *)session; - (void)onSessionStreamsEnded:(SDLIAPSession *)session; @end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLIAPTransport.h b/SmartDeviceLink/SDLIAPTransport.h index ff082b9b3..894869e49 100644 --- a/SmartDeviceLink/SDLIAPTransport.h +++ b/SmartDeviceLink/SDLIAPTransport.h @@ -6,10 +6,13 @@ #import "SDLAbstractTransport.h" #import "SDLIAPSessionDelegate.h" +NS_ASSUME_NONNULL_BEGIN @interface SDLIAPTransport : SDLAbstractTransport <SDLIAPSessionDelegate> -@property (strong, atomic) SDLIAPSession *controlSession; -@property (strong, atomic) SDLIAPSession *session; +@property (nullable, strong, atomic) SDLIAPSession *controlSession; +@property (nullable, strong, atomic) SDLIAPSession *session; @end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLIAPTransport.m b/SmartDeviceLink/SDLIAPTransport.m index cb45751ac..45ac8d771 100644 --- a/SmartDeviceLink/SDLIAPTransport.m +++ b/SmartDeviceLink/SDLIAPTransport.m @@ -15,6 +15,7 @@ #import "SDLTimer.h" #import <CommonCrypto/CommonDigest.h> +NS_ASSUME_NONNULL_BEGIN NSString *const legacyProtocolString = @"com.ford.sync.prot0"; NSString *const controlProtocolString = @"com.smartdevicelink.prot0"; @@ -32,7 +33,7 @@ int const streamOpenTimeoutSeconds = 2; @property (assign) int retryCounter; @property (assign) BOOL sessionSetupInProgress; -@property (strong) SDLTimer *protocolIndexTimer; +@property (nullable, strong) SDLTimer *protocolIndexTimer; @end @@ -473,3 +474,5 @@ int const streamOpenTimeoutSeconds = 2; } @end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLStreamDelegate.h b/SmartDeviceLink/SDLStreamDelegate.h index fdd8bfbac..f6b0115ad 100644 --- a/SmartDeviceLink/SDLStreamDelegate.h +++ b/SmartDeviceLink/SDLStreamDelegate.h @@ -3,6 +3,8 @@ #import <Foundation/Foundation.h> +NS_ASSUME_NONNULL_BEGIN + // Convenience typedefs typedef void (^SDLStreamOpenHandler)(NSStream *stream); typedef void (^SDLStreamHasBytesHandler)(NSInputStream *istream); @@ -13,10 +15,12 @@ typedef void (^SDLStreamEndHandler)(NSStream *stream); @interface SDLStreamDelegate : NSObject <NSStreamDelegate> -@property (nonatomic, copy) SDLStreamOpenHandler streamOpenHandler; -@property (nonatomic, copy) SDLStreamHasBytesHandler streamHasBytesHandler; -@property (nonatomic, copy) SDLStreamHasSpaceHandler streamHasSpaceHandler; -@property (nonatomic, copy) SDLStreamErrorHandler streamErrorHandler; -@property (nonatomic, copy) SDLStreamEndHandler streamEndHandler; +@property (nullable, nonatomic, copy) SDLStreamOpenHandler streamOpenHandler; +@property (nullable, nonatomic, copy) SDLStreamHasBytesHandler streamHasBytesHandler; +@property (nullable, nonatomic, copy) SDLStreamHasSpaceHandler streamHasSpaceHandler; +@property (nullable, nonatomic, copy) SDLStreamErrorHandler streamErrorHandler; +@property (nullable, nonatomic, copy) SDLStreamEndHandler streamEndHandler; @end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLStreamDelegate.m b/SmartDeviceLink/SDLStreamDelegate.m index 6c2db6c34..1e60fb3f5 100644 --- a/SmartDeviceLink/SDLStreamDelegate.m +++ b/SmartDeviceLink/SDLStreamDelegate.m @@ -5,6 +5,8 @@ #import "SDLStreamDelegate.h" #import "SDLDebugTool.h" +NS_ASSUME_NONNULL_BEGIN + @interface SDLStreamDelegate () { dispatch_queue_t _input_stream_queue; } @@ -90,3 +92,5 @@ SDLStreamEndHandler defaultStreamEndHandler = ^(NSStream *stream) { }; @end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLTCPTransport.h b/SmartDeviceLink/SDLTCPTransport.h index 2c9f55805..ef49db23c 100644 --- a/SmartDeviceLink/SDLTCPTransport.h +++ b/SmartDeviceLink/SDLTCPTransport.h @@ -3,6 +3,8 @@ #import "SDLAbstractTransport.h" +NS_ASSUME_NONNULL_BEGIN + @interface SDLTCPTransport : SDLAbstractTransport { CFSocketRef socket; } @@ -11,3 +13,5 @@ @property (strong, atomic) NSString *portNumber; @end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLTCPTransport.m b/SmartDeviceLink/SDLTCPTransport.m index cf46578cb..df37e5ce2 100644 --- a/SmartDeviceLink/SDLTCPTransport.m +++ b/SmartDeviceLink/SDLTCPTransport.m @@ -15,6 +15,7 @@ #import <sys/wait.h> #import <unistd.h> +NS_ASSUME_NONNULL_BEGIN // C function forward declarations. int call_socket(const char *hostname, const char *port); @@ -179,3 +180,5 @@ static void TCPCallback(CFSocketRef socket, CFSocketCallBackType type, CFDataRef [SDLDebugTool logInfo:logMessage withType:SDLDebugType_Transport_TCP toOutput:SDLDebugOutput_DeviceConsole]; } } + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLTransportDelegate.h b/SmartDeviceLink/SDLTransportDelegate.h index 4f4abe33f..78d3d77c4 100644 --- a/SmartDeviceLink/SDLTransportDelegate.h +++ b/SmartDeviceLink/SDLTransportDelegate.h @@ -1,10 +1,14 @@ // SDLTransportDelegate.h // +NS_ASSUME_NONNULL_BEGIN + @protocol SDLTransportDelegate <NSObject> - (void)onTransportConnected; - (void)onTransportDisconnected; - (void)onDataReceived:(NSData *)receivedData; -@end
\ No newline at end of file +@end + +NS_ASSUME_NONNULL_END |