diff options
| author | Joel Fischer <joel@livio.io> | 2015-04-23 14:34:16 -0400 |
|---|---|---|
| committer | Joel Fischer <joel@livio.io> | 2015-04-23 14:34:16 -0400 |
| commit | e13cb34132f9d31fdc962b4fd58b97aa844a3740 (patch) | |
| tree | 632c80fd7f5daa4b815a1b79743a8d0d8bcf174f /SmartDeviceLink-iOS/SmartDeviceLink | |
| parent | 735d5725555e868de37513bf07b8a17200a2777f (diff) | |
| parent | 2241c69164e74e592dee3b92aa47581928d9ce88 (diff) | |
| download | sdl_ios-feature/enable_warnings.tar.gz | |
Merge branch 'develop' into feature/enable_warningsfeature/enable_warnings
Conflicts:
SmartDeviceLink-iOS/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
Diffstat (limited to 'SmartDeviceLink-iOS/SmartDeviceLink')
494 files changed, 3025 insertions, 2026 deletions
diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/ISDLProxy.h b/SmartDeviceLink-iOS/SmartDeviceLink/ISDLProxy.h deleted file mode 100644 index f8ac33d79..000000000 --- a/SmartDeviceLink-iOS/SmartDeviceLink/ISDLProxy.h +++ /dev/null @@ -1,21 +0,0 @@ -// ISDLProxy.h -// - - - -#import "SDLProtocol.h" -#import "SDLProxyListener" -#import "SDLRPCMessage" -#import "SDLTransport" - -@protocol ISDLProxy - --(id) initWithTransport:(NSObject<SDLTransport>*) transport protocol:(NSObject<SDLProtocol>*) protocol delegate:(NSObject<SDLProxyListener>*) delegate; - --(void) dispose; --(void) addDelegate:(NSObject<SDLProxyListener>*) delegate; - --(void) sendRPCRequest:(SDLRPCMessage*) msg; --(void) handleRpcMessage:(NSDictionary*) msg; - -@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/Info.plist b/SmartDeviceLink-iOS/SmartDeviceLink/Info.plist index e79788ec7..41950f60c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/Info.plist +++ b/SmartDeviceLink-iOS/SmartDeviceLink/Info.plist @@ -15,7 +15,7 @@ <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> - <string>3.1.0</string> + <string>4.0.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractProtocol.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractProtocol.h index cedb95374..012d869fb 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractProtocol.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractProtocol.h @@ -1,8 +1,6 @@ // SDLAbstractProtocol.h // - - #import "SDLInterfaceProtocol.h" #import "SDLTransport.h" #import "SDLProtocolListener.h" diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractProtocol.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractProtocol.m index 926f4c2e4..84630bdac 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractProtocol.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractProtocol.m @@ -3,7 +3,7 @@ #import "SDLAbstractProtocol.h" @implementation SDLAbstractProtocol -- (id)init { +- (instancetype)init { if (self = [super init]) { _debugConsoleGroupName = @"default"; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractTransport.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractTransport.h index 7dfb1c519..8d5241ab4 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractTransport.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractTransport.h @@ -5,6 +5,7 @@ #import "SDLTransport.h" #import "SDLTransportDelegate.h" + @interface SDLAbstractTransport : NSObject<SDLTransport> @property (weak) id<SDLTransportDelegate> delegate; @@ -12,7 +13,7 @@ @property (strong, readonly) NSString* endpointName; @property (strong, readonly) NSString* endpointParam; -- (id) initWithEndpoint:(NSString*) endpoint endpointParam:(NSString*) endointParam; +- (instancetype) initWithEndpoint:(NSString*) endpoint endpointParam:(NSString*) endointParam; - (void)notifyTransportConnected; - (void)notifyTransportDisconnected; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractTransport.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractTransport.m index 21958c64b..263677c7f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractTransport.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAbstractTransport.m @@ -2,9 +2,10 @@ #import "SDLAbstractTransport.h" + @implementation SDLAbstractTransport -- (id) initWithEndpoint:(NSString*) endpoint endpointParam:(NSString*) param { +- (instancetype) initWithEndpoint:(NSString*) endpoint endpointParam:(NSString*) param { if (self = [super init]) { _endpointName = endpoint; _endpointParam = param; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommand.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommand.h index b7a2a05ee..5a844200b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommand.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommand.h @@ -3,8 +3,8 @@ #import "SDLRPCRequest.h" -#import "SDLMenuParams.h" -#import "SDLImage.h" +@class SDLMenuParams; +@class SDLImage; /** @@ -35,7 +35,7 @@ /** * Constructs a new SDLAddCommand object */ --(id) init; +-(instancetype) init; /** * * Constructs a new SDLAddCommand object indicated by the NSMutableDictionary @@ -44,7 +44,7 @@ * * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract an Unique Command ID that identifies the command diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommand.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommand.m index 23be9feff..2488ae06e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommand.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommand.m @@ -5,15 +5,18 @@ #import "SDLAddCommand.h" #import "SDLNames.h" +#import "SDLMenuParams.h" +#import "SDLImage.h" + @implementation SDLAddCommand --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_AddCommand]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommandResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommandResponse.h index 97f8eeae5..77d116fd3 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommandResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommandResponse.h @@ -11,7 +11,7 @@ */ @interface SDLAddCommandResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommandResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommandResponse.m index c22c65885..3f5b4078f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommandResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddCommandResponse.m @@ -6,12 +6,12 @@ @implementation SDLAddCommandResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_AddCommand]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenu.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenu.h index a98dd8002..30eae0805 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenu.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenu.h @@ -21,14 +21,14 @@ /** * Constructs a new SDLAddSubMenu object */ --(id) init; +-(instancetype) init; /** * Constructs a new SDLAddSubMenu object indicated by the NSMutableDictionary parameter * <p> * * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract a Menu ID that identifies a sub menu diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenu.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenu.m index d78e0f710..7e5b5fccb 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenu.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenu.m @@ -6,12 +6,12 @@ @implementation SDLAddSubMenu --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_AddSubMenu]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenuResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenuResponse.h index d00edf600..bb3d421ce 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenuResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenuResponse.h @@ -9,7 +9,7 @@ */ @interface SDLAddSubMenuResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenuResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenuResponse.m index de4bf6b00..ea1a5d722 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenuResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAddSubMenuResponse.m @@ -6,12 +6,12 @@ @implementation SDLAddSubMenuResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_AddSubMenu]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAirbagStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAirbagStatus.h index df88a64ad..9b918ec69 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAirbagStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAirbagStatus.h @@ -1,15 +1,15 @@ // SDLAirbagStatus.h // - #import "SDLRPCMessage.h" -#import "SDLVehicleDataEventStatus.h" +@class SDLVehicleDataEventStatus; + @interface SDLAirbagStatus : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLVehicleDataEventStatus* driverAirbagDeployed; @property(strong) SDLVehicleDataEventStatus* driverSideAirbagDeployed; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAirbagStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAirbagStatus.m index 1533d0580..e7cbd9306 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAirbagStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAirbagStatus.m @@ -3,15 +3,17 @@ #import "SDLAirbagStatus.h" #import "SDLNames.h" +#import "SDLVehicleDataEventStatus.h" + @implementation SDLAirbagStatus --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlert.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlert.h index fdd98c08e..1dae3cdc6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlert.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlert.h @@ -40,14 +40,14 @@ /** * Constructs a new SDLAlert object */ --(id) init; +-(instancetype) init; /** * Constructs a new SDLAlert object indicated by the NSMutableDictionary parameter * <p> * * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract the String to be displayed in the first field of the display during diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlert.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlert.m index 3543d7ded..1fb900d0f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlert.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlert.m @@ -8,12 +8,12 @@ @implementation SDLAlert --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_Alert]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuver.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuver.h index 9932dd79b..56310950e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuver.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuver.h @@ -9,8 +9,8 @@ */ @interface SDLAlertManeuver : SDLRPCRequest {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSMutableArray* ttsChunks; @property(strong) NSMutableArray* softButtons; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuver.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuver.m index 0159df4b9..d64b1dd84 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuver.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuver.m @@ -10,12 +10,12 @@ @implementation SDLAlertManeuver --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_AlertManeuver]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuverResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuverResponse.h index 04c8bd692..5ee70e11a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuverResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuverResponse.h @@ -10,7 +10,7 @@ */ @interface SDLAlertManeuverResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuverResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuverResponse.m index 199dd4af0..e77258993 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuverResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertManeuverResponse.m @@ -7,12 +7,12 @@ @implementation SDLAlertManeuverResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_AlertManeuver]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertResponse.h index de54acf93..c52439cb1 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertResponse.h @@ -10,8 +10,8 @@ */ @interface SDLAlertResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSNumber* tryAgainTime; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertResponse.m index 4b0832d74..cf432a97a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAlertResponse.m @@ -7,12 +7,12 @@ @implementation SDLAlertResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_Alert]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAmbientLightStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAmbientLightStatus.h index 68520155e..6119d059c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAmbientLightStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAmbientLightStatus.h @@ -12,7 +12,7 @@ @interface SDLAmbientLightStatus : SDLEnum {} +(SDLAmbientLightStatus*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; +(SDLAmbientLightStatus*) NIGHT; +(SDLAmbientLightStatus*) TWILIGHT_1; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAmbientLightStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAmbientLightStatus.m index bc6c26eae..354d9cba5 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAmbientLightStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAmbientLightStatus.m @@ -12,7 +12,7 @@ SDLAmbientLightStatus* SDLAmbientLightStatus_DAY = nil; SDLAmbientLightStatus* SDLAmbientLightStatus_UNKNOWN = nil; SDLAmbientLightStatus* SDLAmbientLightStatus_INVALID = nil; -NSMutableArray* SDLAmbientLightStatus_values = nil; +NSArray* SDLAmbientLightStatus_values = nil; @implementation SDLAmbientLightStatus @@ -25,9 +25,9 @@ NSMutableArray* SDLAmbientLightStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLAmbientLightStatus_values == nil) { - SDLAmbientLightStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLAmbientLightStatus_values = @[ SDLAmbientLightStatus.NIGHT, SDLAmbientLightStatus.TWILIGHT_1, SDLAmbientLightStatus.TWILIGHT_2, @@ -36,7 +36,7 @@ NSMutableArray* SDLAmbientLightStatus_values = nil; SDLAmbientLightStatus.DAY, SDLAmbientLightStatus.UNKNOWN, SDLAmbientLightStatus.INVALID, - nil]; + ]; } return SDLAmbientLightStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppHMIType.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppHMIType.h index f797eeca7..6db03dfc1 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppHMIType.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppHMIType.h @@ -21,7 +21,7 @@ @abstract Store the enumeration of all possible SDLAppHMIType @result return an array that store all possible SDLAppHMIType */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract The App will have default rights. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppHMIType.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppHMIType.m index d394f58f8..73a158c1f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppHMIType.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppHMIType.m @@ -15,7 +15,7 @@ SDLAppHMIType* SDLAppHMIType_BACKGROUND_PROCESS = nil; SDLAppHMIType* SDLAppHMIType_TESTING = nil; SDLAppHMIType* SDLAppHMIType_SYSTEM = nil; -NSMutableArray* SDLAppHMIType_values = nil; +NSArray* SDLAppHMIType_values = nil; @implementation SDLAppHMIType @@ -28,9 +28,9 @@ NSMutableArray* SDLAppHMIType_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLAppHMIType_values == nil) { - SDLAppHMIType_values = [[NSMutableArray alloc] initWithObjects: + SDLAppHMIType_values = @[ SDLAppHMIType.DEFAULT, SDLAppHMIType.COMMUNICATION, SDLAppHMIType.MEDIA, @@ -41,7 +41,7 @@ NSMutableArray* SDLAppHMIType_values = nil; SDLAppHMIType.BACKGROUND_PROCESS, SDLAppHMIType.TESTING, SDLAppHMIType.SYSTEM, - nil]; + ]; } return SDLAppHMIType_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.h index 90c29f80b..37ddccd29 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.h @@ -21,7 +21,7 @@ @abstract Store the enumeration of all possible SDLAppInterfaceUnregisteredReason @result return an array that store all possible SDLAppInterfaceUnregisteredReason */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Vehicle ignition turned off. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.m index 7ace22188..bd26395c6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAppInterfaceUnregisteredReason.m @@ -14,7 +14,7 @@ SDLAppInterfaceUnregisteredReason* SDLAppInterfaceUnregisteredReason_MASTER_RESE SDLAppInterfaceUnregisteredReason* SDLAppInterfaceUnregisteredReason_FACTORY_DEFAULTS = nil; SDLAppInterfaceUnregisteredReason* SDLAppInterfaceUnregisteredReason_APP_UNAUTHORIZED = nil; -NSMutableArray* SDLAppInterfaceUnregisteredReason_values = nil; +NSArray* SDLAppInterfaceUnregisteredReason_values = nil; @implementation SDLAppInterfaceUnregisteredReason @@ -27,9 +27,9 @@ NSMutableArray* SDLAppInterfaceUnregisteredReason_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLAppInterfaceUnregisteredReason_values == nil) { - SDLAppInterfaceUnregisteredReason_values = [[NSMutableArray alloc] initWithObjects: + SDLAppInterfaceUnregisteredReason_values = @[ SDLAppInterfaceUnregisteredReason.IGNITION_OFF, SDLAppInterfaceUnregisteredReason.BLUETOOTH_OFF, SDLAppInterfaceUnregisteredReason.USB_DISCONNECTED, @@ -40,7 +40,7 @@ NSMutableArray* SDLAppInterfaceUnregisteredReason_values = nil; SDLAppInterfaceUnregisteredReason.MASTER_RESET, SDLAppInterfaceUnregisteredReason.FACTORY_DEFAULTS, SDLAppInterfaceUnregisteredReason.APP_UNAUTHORIZED, - nil]; + ]; } return SDLAppInterfaceUnregisteredReason_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioPassThruCapabilities.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioPassThruCapabilities.h index 3dbd8f948..a43c812ba 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioPassThruCapabilities.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioPassThruCapabilities.h @@ -1,13 +1,12 @@ // SDLAudioPassThruCapabilities.h // - - #import "SDLRPCMessage.h" -#import "SDLSamplingRate.h" -#import "SDLBitsPerSample.h" -#import "SDLAudioType.h" +@class SDLAudioType; +@class SDLBitsPerSample; +@class SDLSamplingRate; + /** * Describes different audio type configurations for SDLPerformAudioPassThru, e.g. {8kHz,8-bit,PCM} @@ -48,12 +47,12 @@ /** * Constructs a newly allocated SDLAudioPassThruCapabilities object */ --(id) init; +-(instancetype) init; /** * Constructs a newly allocated SDLAudioPassThruCapabilities object indicated by the Hashtable parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract The sampling rate for AudioPassThru<br> diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioPassThruCapabilities.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioPassThruCapabilities.m index b3b3d863f..5dbf1efe9 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioPassThruCapabilities.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioPassThruCapabilities.m @@ -4,16 +4,20 @@ #import "SDLAudioPassThruCapabilities.h" +#import "SDLAudioType.h" +#import "SDLBitsPerSample.h" #import "SDLNames.h" +#import "SDLSamplingRate.h" + @implementation SDLAudioPassThruCapabilities --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioStreamingState.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioStreamingState.h index f562a709a..e10c74c2e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioStreamingState.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioStreamingState.h @@ -24,7 +24,7 @@ @abstract Store the enumeration of all possible SDLAudioStreamingState @result return an array that store all possible SDLAudioStreamingState */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Currently streaming audio, if any, is audible to user. * @result SDLAudioStreamingState with value of <font color=gray><i>AUDIBLE</i></font> diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioStreamingState.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioStreamingState.m index 4062f974c..d6bef3641 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioStreamingState.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioStreamingState.m @@ -8,7 +8,7 @@ SDLAudioStreamingState* SDLAudioStreamingState_AUDIBLE = nil; SDLAudioStreamingState* SDLAudioStreamingState_ATTENUATED = nil; SDLAudioStreamingState* SDLAudioStreamingState_NOT_AUDIBLE = nil; -NSMutableArray* SDLAudioStreamingState_values = nil; +NSArray* SDLAudioStreamingState_values = nil; @implementation SDLAudioStreamingState @@ -21,13 +21,13 @@ NSMutableArray* SDLAudioStreamingState_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLAudioStreamingState_values == nil) { - SDLAudioStreamingState_values = [[NSMutableArray alloc] initWithObjects: + SDLAudioStreamingState_values = @[ SDLAudioStreamingState.AUDIBLE, SDLAudioStreamingState.ATTENUATED, SDLAudioStreamingState.NOT_AUDIBLE, - nil]; + ]; } return SDLAudioStreamingState_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioType.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioType.h index 0fa526c26..af1b14afc 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioType.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioType.h @@ -21,7 +21,7 @@ @abstract Store the enumeration of all possible SDLAudioType @result return an array that store all possible SDLAudioType */ -+(NSMutableArray*) values; ++(NSArray*) values; /** @abstract PCM raw audio diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioType.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioType.m index e9dd17b40..525e760b1 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioType.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLAudioType.m @@ -5,7 +5,7 @@ SDLAudioType* SDLAudioType_PCM = nil; -NSMutableArray* SDLAudioType_values = nil; +NSArray* SDLAudioType_values = nil; @implementation SDLAudioType @@ -18,11 +18,11 @@ NSMutableArray* SDLAudioType_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLAudioType_values == nil) { - SDLAudioType_values = [[NSMutableArray alloc] initWithObjects: + SDLAudioType_values = @[ SDLAudioType.PCM, - nil]; + ]; } return SDLAudioType_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLBeltStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLBeltStatus.h index f1a3cb88a..2dbf8d5b5 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLBeltStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLBeltStatus.h @@ -1,16 +1,15 @@ // SDLBeltStatus.h // - - #import "SDLRPCMessage.h" -#import "SDLVehicleDataEventStatus.h" +@class SDLVehicleDataEventStatus; + @interface SDLBeltStatus : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLVehicleDataEventStatus* driverBeltDeployed; @property(strong) SDLVehicleDataEventStatus* passengerBeltDeployed; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLBeltStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLBeltStatus.m index eec3919fa..eac8cadb2 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLBeltStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLBeltStatus.m @@ -1,19 +1,20 @@ // SDLBeltStatus.m // - #import "SDLBeltStatus.h" #import "SDLNames.h" +#import "SDLVehicleDataEventStatus.h" + @implementation SDLBeltStatus --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLBitsPerSample.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLBitsPerSample.h index 4fb18def3..6c233ddc5 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLBitsPerSample.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLBitsPerSample.h @@ -22,7 +22,7 @@ @abstract Store the enumeration of all possible SDLBitsPerSample @result return an array that store all possible SDLBitsPerSample */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract 8 bits per sample diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLBitsPerSample.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLBitsPerSample.m index ae3d301a9..6b3bf3376 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLBitsPerSample.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLBitsPerSample.m @@ -7,7 +7,7 @@ SDLBitsPerSample* SDLBitsPerSample_8_BIT = nil; SDLBitsPerSample* SDLBitsPerSample_16_BIT = nil; -NSMutableArray* SDLBitsPerSample_values = nil; +NSArray* SDLBitsPerSample_values = nil; @implementation SDLBitsPerSample @@ -20,12 +20,12 @@ NSMutableArray* SDLBitsPerSample_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLBitsPerSample_values == nil) { - SDLBitsPerSample_values = [[NSMutableArray alloc] initWithObjects: + SDLBitsPerSample_values = @[ SDLBitsPerSample._8_BIT, SDLBitsPerSample._16_BIT, - nil]; + ]; } return SDLBitsPerSample_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLBodyInformation.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLBodyInformation.h index 09a9d8051..01e4f2845 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLBodyInformation.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLBodyInformation.h @@ -1,12 +1,11 @@ // SDLBodyInformation.h // - - #import "SDLRPCMessage.h" -#import "SDLIgnitionStableStatus.h" -#import "SDLIgnitionStatus.h" +@class SDLIgnitionStableStatus; +@class SDLIgnitionStatus; + /** * The body information including power modes. @@ -16,14 +15,14 @@ /** * @abstract Constructs a new SDLBodyInformation object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLBodyInformation object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract References signal "PrkBrkActv_B_Actl". diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLBodyInformation.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLBodyInformation.m index d422aa76f..adaafb6d5 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLBodyInformation.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLBodyInformation.m @@ -4,16 +4,19 @@ #import "SDLBodyInformation.h" +#import "SDLIgnitionStableStatus.h" +#import "SDLIgnitionStatus.h" #import "SDLNames.h" + @implementation SDLBodyInformation --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonCapabilities.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonCapabilities.h index a0b5c4106..a0a5e6aa3 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonCapabilities.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonCapabilities.h @@ -1,11 +1,10 @@ // SDLButtonCapabilities.h // - - #import "SDLRPCMessage.h" -#import "SDLButtonName.h" +@class SDLButtonName; + /** * Provides information about the capabilities of a SDL HMI button. @@ -50,12 +49,12 @@ /** * Constructs a newly allocated SDLButtonCapabilities object */ --(id) init; +-(instancetype) init; /** * Constructs a newly allocated SDLButtonCapabilities object indicated by the Hashtable parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract The name of the SDL HMI button. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonCapabilities.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonCapabilities.m index 60c808d4b..71aab6b1b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonCapabilities.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonCapabilities.m @@ -1,19 +1,20 @@ // SDLButtonCapabilities.m // - #import "SDLButtonCapabilities.h" +#import "SDLButtonName.h" #import "SDLNames.h" + @implementation SDLButtonCapabilities --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonEventMode.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonEventMode.h index 7683af660..721a56669 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonEventMode.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonEventMode.h @@ -24,7 +24,7 @@ @abstract Store the enumeration of all possible SDLButtonEventMode @result return an array that store all possible SDLButtonEventMode */ -+(NSMutableArray*) values; ++(NSArray*) values; /** @abstract The button was released diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonEventMode.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonEventMode.m index d4305b8ad..01fb4e89b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonEventMode.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonEventMode.m @@ -7,7 +7,7 @@ SDLButtonEventMode* SDLButtonEventMode_BUTTONUP = nil; SDLButtonEventMode* SDLButtonEventMode_BUTTONDOWN = nil; -NSMutableArray* SDLButtonEventMode_values = nil; +NSArray* SDLButtonEventMode_values = nil; @implementation SDLButtonEventMode @@ -20,12 +20,12 @@ NSMutableArray* SDLButtonEventMode_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLButtonEventMode_values == nil) { - SDLButtonEventMode_values = [[NSMutableArray alloc] initWithObjects: + SDLButtonEventMode_values = @[ SDLButtonEventMode.BUTTONUP, SDLButtonEventMode.BUTTONDOWN, - nil]; + ]; } return SDLButtonEventMode_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonName.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonName.h index e8578eb25..901f08036 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonName.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonName.h @@ -39,7 +39,7 @@ @abstract Store the enumeration of all possible SDLButtonName @result return an array that store all possible SDLButtonName */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Represents the button usually labeled "OK". A typical use of this button diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonName.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonName.m index c69c6634f..69224dd1d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonName.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonName.m @@ -22,7 +22,7 @@ SDLButtonName* SDLButtonName_PRESET_9 = nil; SDLButtonName* SDLButtonName_CUSTOM_BUTTON = nil; SDLButtonName* SDLButtonName_SEARCH = nil; -NSMutableArray* SDLButtonName_values = nil; +NSArray* SDLButtonName_values = nil; @implementation SDLButtonName @@ -35,9 +35,9 @@ NSMutableArray* SDLButtonName_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLButtonName_values == nil) { - SDLButtonName_values = [[NSMutableArray alloc] initWithObjects: + SDLButtonName_values = @[ SDLButtonName.OK, SDLButtonName.SEEKLEFT, SDLButtonName.SEEKRIGHT, @@ -55,7 +55,7 @@ NSMutableArray* SDLButtonName_values = nil; SDLButtonName.PRESET_9, SDLButtonName.CUSTOM_BUTTON, SDLButtonName.SEARCH, - nil]; + ]; } return SDLButtonName_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonPressMode.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonPressMode.h index bbf53e6c2..f7ecaea3b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonPressMode.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonPressMode.h @@ -24,7 +24,7 @@ @abstract Store the enumeration of all possible SDLButtonPressMode @result return an array that store all possible SDLButtonPressMode */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract The button has been depressed for 2 seconds. The button may remain diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonPressMode.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonPressMode.m index 226e6b783..259f95d83 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonPressMode.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLButtonPressMode.m @@ -7,7 +7,7 @@ SDLButtonPressMode* SDLButtonPressMode_LONG = nil; SDLButtonPressMode* SDLButtonPressMode_SHORT = nil; -NSMutableArray* SDLButtonPressMode_values = nil; +NSArray* SDLButtonPressMode_values = nil; @implementation SDLButtonPressMode @@ -20,12 +20,12 @@ NSMutableArray* SDLButtonPressMode_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLButtonPressMode_values == nil) { - SDLButtonPressMode_values = [[NSMutableArray alloc] initWithObjects: + SDLButtonPressMode_values = @[ SDLButtonPressMode.LONG, SDLButtonPressMode.SHORT, - nil]; + ]; } return SDLButtonPressMode_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCarModeStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCarModeStatus.h index 35ea39718..cc131adb9 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCarModeStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCarModeStatus.h @@ -12,7 +12,7 @@ +(SDLCarModeStatus*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; /** Provides carmode NORMAL to each module. */ +(SDLCarModeStatus*) NORMAL; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCarModeStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCarModeStatus.m index 74827df2c..8f3ae266a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCarModeStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCarModeStatus.m @@ -9,7 +9,7 @@ SDLCarModeStatus* SDLCarModeStatus_FACTORY = nil; SDLCarModeStatus* SDLCarModeStatus_TRANSPORT = nil; SDLCarModeStatus* SDLCarModeStatus_CRASH = nil; -NSMutableArray* SDLCarModeStatus_values = nil; +NSArray* SDLCarModeStatus_values = nil; @implementation SDLCarModeStatus @@ -22,14 +22,14 @@ NSMutableArray* SDLCarModeStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLCarModeStatus_values == nil) { - SDLCarModeStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLCarModeStatus_values = @[ SDLCarModeStatus.NORMAL, SDLCarModeStatus.FACTORY, SDLCarModeStatus.TRANSPORT, SDLCarModeStatus.CRASH, - nil]; + ]; } return SDLCarModeStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistration.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistration.h index 949819ea3..d7ef35a12 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistration.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistration.h @@ -5,7 +5,7 @@ #import "SDLRPCRequest.h" -#import "SDLLanguage.h" +@class SDLLanguage; /** * If the app recognizes during the app registration that the SDL HMI language @@ -26,7 +26,7 @@ /** * Constructs a new SDLChangeRegistration object */ --(id) init; +-(instancetype) init; /** * Constructs a new SDLChangeRegistration object indicated by the NSMutableDictionary * parameter @@ -34,7 +34,7 @@ * * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract the language app want to change to diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistration.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistration.m index f600da522..62e72b455 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistration.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistration.m @@ -5,15 +5,16 @@ #import "SDLChangeRegistration.h" #import "SDLNames.h" +#import "SDLLanguage.h" @implementation SDLChangeRegistration --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_ChangeRegistration]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistrationResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistrationResponse.h index a07d3a79e..606dcffe7 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistrationResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistrationResponse.h @@ -12,7 +12,7 @@ */ @interface SDLChangeRegistrationResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistrationResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistrationResponse.m index 7ec710f90..a04e81031 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistrationResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLChangeRegistrationResponse.m @@ -8,12 +8,12 @@ @implementation SDLChangeRegistrationResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_ChangeRegistration]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCharacterSet.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCharacterSet.h index e8e94aaef..304ba59e1 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCharacterSet.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCharacterSet.h @@ -22,7 +22,7 @@ @abstract Store the enumeration of all possible SDLCharacterSet @result return an array that store all possible SDLCharacterSet */ -+(NSMutableArray*) values; ++(NSArray*) values; +(SDLCharacterSet*) TYPE2SET; +(SDLCharacterSet*) TYPE5SET; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCharacterSet.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCharacterSet.m index 1e0ddacd2..95a199a64 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCharacterSet.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCharacterSet.m @@ -9,7 +9,7 @@ SDLCharacterSet* SDLCharacterSet_TYPE5SET = nil; SDLCharacterSet* SDLCharacterSet_CID1SET = nil; SDLCharacterSet* SDLCharacterSet_CID2SET = nil; -NSMutableArray* SDLCharacterSet_values = nil; +NSArray* SDLCharacterSet_values = nil; @implementation SDLCharacterSet @@ -22,14 +22,14 @@ NSMutableArray* SDLCharacterSet_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLCharacterSet_values == nil) { - SDLCharacterSet_values = [[NSMutableArray alloc] initWithObjects: + SDLCharacterSet_values = @[ SDLCharacterSet.TYPE2SET, SDLCharacterSet.TYPE5SET, SDLCharacterSet.CID1SET, SDLCharacterSet.CID2SET, - nil]; + ]; } return SDLCharacterSet_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLChoice.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLChoice.h index 556482a63..487998d3f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLChoice.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLChoice.h @@ -1,11 +1,10 @@ // SDLChoice.h // - - #import "SDLRPCMessage.h" -#import "SDLImage.h" +@class SDLImage; + /** * A choice is an option which a user can select either via the menu or via voice recognition (VR) during an application initiated interaction. @@ -56,12 +55,12 @@ /** * Constructs a newly allocated SDLChoice object */ --(id) init; +-(instancetype) init; /** * Constructs a newly allocated SDLChoice object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract the application-scoped identifier that uniquely identifies this choice diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLChoice.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLChoice.m index 8587a45bf..06260160f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLChoice.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLChoice.m @@ -1,19 +1,20 @@ // SDLChoice.m // - #import "SDLChoice.h" +#import "SDLImage.h" #import "SDLNames.h" + @implementation SDLChoice --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLClusterModeStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLClusterModeStatus.h index 579aba34d..00799cbe0 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLClusterModeStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLClusterModeStatus.h @@ -1,18 +1,17 @@ // SDLClusterModeStatus.h // - - #import "SDLRPCMessage.h" -#import "SDLPowerModeQualificationStatus.h" -#import "SDLCarModeStatus.h" -#import "SDLPowerModeStatus.h" +@class SDLCarModeStatus; +@class SDLPowerModeQualificationStatus; +@class SDLPowerModeStatus; + @interface SDLClusterModeStatus : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSNumber* powerModeActive; @property(strong) SDLPowerModeQualificationStatus* powerModeQualificationStatus; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLClusterModeStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLClusterModeStatus.m index be8b48b92..37e5bef43 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLClusterModeStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLClusterModeStatus.m @@ -1,19 +1,22 @@ // SDLClusterModeStatus.m // - #import "SDLClusterModeStatus.h" +#import "SDLCarModeStatus.h" #import "SDLNames.h" +#import "SDLPowerModeQualificationStatus.h" +#import "SDLPowerModeStatus.h" + @implementation SDLClusterModeStatus --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCompassDirection.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCompassDirection.h index 1386cb692..ed445033f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCompassDirection.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCompassDirection.h @@ -24,7 +24,7 @@ @abstract Store the enumeration of all possible SDLCompassDirection @result return an array that store all possible SDLCompassDirection */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Direction North diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCompassDirection.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCompassDirection.m index 077c8ac63..cfc938761 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCompassDirection.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCompassDirection.m @@ -13,7 +13,7 @@ SDLCompassDirection* SDLCompassDirection_SOUTHEAST = nil; SDLCompassDirection* SDLCompassDirection_EAST = nil; SDLCompassDirection* SDLCompassDirection_NORTHEAST = nil; -NSMutableArray* SDLCompassDirection_values = nil; +NSArray* SDLCompassDirection_values = nil; @implementation SDLCompassDirection @@ -26,9 +26,9 @@ NSMutableArray* SDLCompassDirection_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLCompassDirection_values == nil) { - SDLCompassDirection_values = [[NSMutableArray alloc] initWithObjects: + SDLCompassDirection_values = @[ SDLCompassDirection.NORTH, SDLCompassDirection.NORTHWEST, SDLCompassDirection.WEST, @@ -37,7 +37,7 @@ NSMutableArray* SDLCompassDirection_values = nil; SDLCompassDirection.SOUTHEAST, SDLCompassDirection.EAST, SDLCompassDirection.NORTHEAST, - nil]; + ]; } return SDLCompassDirection_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLComponentVolumeStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLComponentVolumeStatus.h index f01fa80ac..192c81bc9 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLComponentVolumeStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLComponentVolumeStatus.h @@ -23,7 +23,7 @@ @abstract Store the enumeration of all possible SDLComponentVolumeStatus @result return an array that store all possible SDLComponentVolumeStatus */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract Unknown SDLComponentVolumeStatus diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLComponentVolumeStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLComponentVolumeStatus.m index 03306e55c..fa88c097d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLComponentVolumeStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLComponentVolumeStatus.m @@ -11,7 +11,7 @@ SDLComponentVolumeStatus* SDLComponentVolumeStatus_FAULT = nil; SDLComponentVolumeStatus* SDLComponentVolumeStatus_ALERT = nil; SDLComponentVolumeStatus* SDLComponentVolumeStatus_NOT_SUPPORTED = nil; -NSMutableArray* SDLComponentVolumeStatus_values = nil; +NSArray* SDLComponentVolumeStatus_values = nil; @implementation SDLComponentVolumeStatus @@ -24,16 +24,16 @@ NSMutableArray* SDLComponentVolumeStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLComponentVolumeStatus_values == nil) { - SDLComponentVolumeStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLComponentVolumeStatus_values = @[ SDLComponentVolumeStatus.UNKNOWN, SDLComponentVolumeStatus.NORMAL, SDLComponentVolumeStatus.LOW, SDLComponentVolumeStatus.FAULT, SDLComponentVolumeStatus.ALERT, SDLComponentVolumeStatus.NOT_SUPPORTED, - nil]; + ]; } return SDLComponentVolumeStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLConsoleController.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLConsoleController.h index 8df198d04..55e6425a7 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLConsoleController.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLConsoleController.h @@ -1,12 +1,12 @@ // SDLConsoleController.h // - @import Foundation; @import UIKit; #import "SDLDebugTool.h" + @interface SDLConsoleController : UITableViewController <SDLDebugToolConsole> { NSMutableArray* messageList; BOOL atBottom; @@ -15,7 +15,7 @@ @property (strong, readonly) NSMutableArray *messageList; --(id) initWithTableView:(UITableView*) tableView; +-(instancetype) initWithTableView:(UITableView*) tableView; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLConsoleController.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLConsoleController.m index d05548eab..820981f16 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLConsoleController.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLConsoleController.m @@ -1,17 +1,17 @@ // SDLConsoleController.m // - #import "SDLConsoleController.h" #import "SDLJSONEncoder.h" #import "SDLRPCResponse.h" + @implementation SDLConsoleController @synthesize messageList; --(id) initWithTableView:(UITableView*) tableView { +-(instancetype) initWithTableView:(UITableView*) tableView { if (self = [super initWithStyle:UITableViewStylePlain]) { self.tableView = tableView; self.tableView.delegate = self; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSet.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSet.h index 9723d8c2b..64917253c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSet.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSet.h @@ -27,7 +27,7 @@ /** * Constructs a new SDLCreateInteractionChoiceSet object */ --(id) init; +-(instancetype) init; /** * Constructs a new SDLCreateInteractionChoiceSet object indicated by the * NSMutableDictionary parameter @@ -35,7 +35,7 @@ * * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract a unique ID that identifies the Choice Set diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSet.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSet.m index 7b7266764..652f2b618 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSet.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSet.m @@ -9,12 +9,12 @@ @implementation SDLCreateInteractionChoiceSet --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_CreateInteractionChoiceSet]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.h index d806167bf..7d56b55bd 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.h @@ -13,7 +13,7 @@ */ @interface SDLCreateInteractionChoiceSetResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.m index 8e3940379..ddeb785e1 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.m @@ -8,12 +8,12 @@ @implementation SDLCreateInteractionChoiceSetResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_CreateInteractionChoiceSet]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDIDResult.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDIDResult.h index a1e54e0d5..1d8d09aa3 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDIDResult.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDIDResult.h @@ -1,16 +1,15 @@ // SDLDIDResult.h // - - #import "SDLRPCMessage.h" -#import "SDLVehicleDataResultCode.h" +@class SDLVehicleDataResultCode; + @interface SDLDIDResult : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLVehicleDataResultCode* resultCode; @property(strong) NSNumber* didLocation; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDIDResult.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDIDResult.m index 00d2b3c28..ce7648d14 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDIDResult.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDIDResult.m @@ -1,19 +1,20 @@ // SDLDIDResult.m // - #import "SDLDIDResult.h" #import "SDLNames.h" +#import "SDLVehicleDataResultCode.h" + @implementation SDLDIDResult --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDebugTool.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDebugTool.h index d436a4b0b..b6fd202ca 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDebugTool.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDebugTool.h @@ -3,15 +3,10 @@ @import Foundation; +#import "SDLDebugToolConsole.h" @class SDLRPCMessage; -@protocol SDLDebugToolConsole - -- (void)logInfo:(NSString *)info; - -@end - typedef NS_ENUM(UInt8, SDLDebugType) { SDLDebugType_Debug = 0, diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDebugTool.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDebugTool.m index dae221d96..b0ffb1a87 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDebugTool.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDebugTool.m @@ -1,7 +1,6 @@ // SDLDebugTool.m // - #import "SDLDebugTool.h" #import "SDLRPCMessage.h" #import "SDLSiphonServer.h" @@ -13,6 +12,7 @@ static NSMutableDictionary* namedConsoleSets = nil; bool debugToLogFile = false; + @implementation SDLDebugTool diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDebugToolConsole.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDebugToolConsole.h new file mode 100644 index 000000000..75d541e16 --- /dev/null +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDebugToolConsole.h @@ -0,0 +1,12 @@ +// +// SDLDebugToolConsole.h +// SmartDeviceLink-iOS + +#import <Foundation/Foundation.h> + +@protocol SDLDebugToolConsole <NSObject> + +@required +- (void)logInfo:(NSString *)info; + +@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDecoder.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDecoder.h index 4359e3bfc..06eda85f7 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDecoder.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDecoder.h @@ -4,7 +4,7 @@ @import Foundation; -@protocol SDLDecoder +@protocol SDLDecoder <NSObject> -(NSDictionary*) decode:(NSData*) msgBytes; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommand.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommand.h index 716b17d1c..5449019a8 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommand.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommand.h @@ -21,7 +21,7 @@ /** * Constructs a new SDLDeleteCommand object */ --(id) init; +-(instancetype) init; /** * Constructs a new SDLDeleteCommand object indicated by the NSMutableDictionary * parameter @@ -29,7 +29,7 @@ * * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract the Command ID that identifies the Command to be deleted from Command Menu diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommand.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommand.m index aaf0b277c..781366933 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommand.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommand.m @@ -8,12 +8,12 @@ @implementation SDLDeleteCommand --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_DeleteCommand]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommandResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommandResponse.h index fe300d888..384ffb482 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommandResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommandResponse.h @@ -12,7 +12,7 @@ */ @interface SDLDeleteCommandResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommandResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommandResponse.m index 0e70787a7..17ded077f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommandResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteCommandResponse.m @@ -8,12 +8,12 @@ @implementation SDLDeleteCommandResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_DeleteCommand]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFile.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFile.h index 44fd0dbec..f1f19e050 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFile.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFile.h @@ -17,14 +17,14 @@ /** * Constructs a new SDLDeleteFile object */ --(id) init; +-(instancetype) init; /** * Constructs a new SDLDeleteFile object indicated by the NSMutableDictionary parameter * <p> * * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract a file reference name diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFile.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFile.m index b0c0f123f..34f1dd732 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFile.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFile.m @@ -8,12 +8,12 @@ @implementation SDLDeleteFile --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_DeleteFile]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFileResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFileResponse.h index 8ba593a1c..c328c321e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFileResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFileResponse.h @@ -12,8 +12,8 @@ */ @interface SDLDeleteFileResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSNumber* spaceAvailable; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFileResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFileResponse.m index 3c850decb..5a744c9be 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFileResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteFileResponse.m @@ -8,12 +8,12 @@ @implementation SDLDeleteFileResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_DeleteFile]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSet.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSet.h index cea9cc9c3..776202647 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSet.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSet.h @@ -23,7 +23,7 @@ /** * Constructs a new SDLDeleteInteractionChoiceSet object */ --(id) init; +-(instancetype) init; /** * Constructs a new SDLDeleteInteractionChoiceSet object indicated by the * NSMutableDictionary parameter @@ -31,7 +31,7 @@ * * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract a unique ID that identifies the Choice Set diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSet.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSet.m index f2ed4f4e8..5b9cae0f6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSet.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSet.m @@ -8,12 +8,12 @@ @implementation SDLDeleteInteractionChoiceSet --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_DeleteInteractionChoiceSet]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.h index 4c4b0b564..35fd408b0 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.h @@ -12,7 +12,7 @@ */ @interface SDLDeleteInteractionChoiceSetResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.m index a5ea7d3e3..2c985579b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.m @@ -8,12 +8,12 @@ @implementation SDLDeleteInteractionChoiceSetResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_DeleteInteractionChoiceSet]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenu.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenu.h index cf5d747f8..a2b5b8697 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenu.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenu.h @@ -22,12 +22,12 @@ /** * Constructs a new SDLDeleteSubMenu object */ --(id) init; +-(instancetype) init; /** * Constructs a new SDLDeleteSubMenu object indicated by the NSMutableDictionary parameter<p> * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract the MenuID that identifies the SDLSubMenu to be delete diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenu.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenu.m index 4e083cbdc..edacfd69d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenu.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenu.m @@ -8,12 +8,12 @@ @implementation SDLDeleteSubMenu --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_DeleteSubMenu]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenuResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenuResponse.h index 2753fe92f..e9abf338f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenuResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenuResponse.h @@ -12,7 +12,7 @@ */ @interface SDLDeleteSubMenuResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenuResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenuResponse.m index 009af4b06..526ffb479 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenuResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeleteSubMenuResponse.m @@ -8,12 +8,12 @@ @implementation SDLDeleteSubMenuResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_DeleteSubMenu]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceInfo.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceInfo.h index 98cbee909..6d75a4eb7 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceInfo.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceInfo.h @@ -1,14 +1,13 @@ // SDLDeviceInfo.h // - - #import "SDLRPCMessage.h" + @interface SDLDeviceInfo : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSString* hardware; @property(strong) NSString* firmwareRev; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceInfo.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceInfo.m index d3016cf35..5ea9b6ed9 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceInfo.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceInfo.m @@ -1,19 +1,19 @@ // SDLDeviceInfo.m // - #import "SDLDeviceInfo.h" #import "SDLNames.h" + @implementation SDLDeviceInfo --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceLevelStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceLevelStatus.h index 95c403fef..4744c790c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceLevelStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceLevelStatus.h @@ -23,7 +23,7 @@ @abstract Store the enumeration of all possible SDLDeviceLevelStatus @result return an array that store all possible SDLDeviceLevelStatus */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Device Level Status is : <font color=green>Zero level bars</font> diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceLevelStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceLevelStatus.m index 1ae019c17..8913dc35a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceLevelStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceLevelStatus.m @@ -11,7 +11,7 @@ SDLDeviceLevelStatus* SDLDeviceLevelStatus_THREE_LEVEL_BARS = nil; SDLDeviceLevelStatus* SDLDeviceLevelStatus_FOUR_LEVEL_BARS = nil; SDLDeviceLevelStatus* SDLDeviceLevelStatus_NOT_PROVIDED = nil; -NSMutableArray* SDLDeviceLevelStatus_values = nil; +NSArray* SDLDeviceLevelStatus_values = nil; @implementation SDLDeviceLevelStatus @@ -24,16 +24,16 @@ NSMutableArray* SDLDeviceLevelStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLDeviceLevelStatus_values == nil) { - SDLDeviceLevelStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLDeviceLevelStatus_values = @[ SDLDeviceLevelStatus.ZERO_LEVEL_BARS, SDLDeviceLevelStatus.ONE_LEVEL_BARS, SDLDeviceLevelStatus.TWO_LEVEL_BARS, SDLDeviceLevelStatus.THREE_LEVEL_BARS, SDLDeviceLevelStatus.FOUR_LEVEL_BARS, SDLDeviceLevelStatus.NOT_PROVIDED, - nil]; + ]; } return SDLDeviceLevelStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceStatus.h index d30542426..1a3130aac 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceStatus.h @@ -1,12 +1,11 @@ // SDLDeviceStatus.h // - - #import "SDLRPCMessage.h" -#import "SDLDeviceLevelStatus.h" -#import "SDLPrimaryAudioSource.h" +@class SDLDeviceLevelStatus; +@class SDLPrimaryAudioSource; + /** * Describes the status related to a connected mobile device or SDL and if or how it is represented in the vehicle. @@ -104,12 +103,12 @@ /** * Constructs a newly allocated SDLDeviceStatus object */ --(id) init; +-(instancetype) init; /** * Constructs a newly allocated SDLDeviceStatus object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract NSNumber value indicates whether the voice recognition on or off diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceStatus.m index ff4812e70..7b90c7f30 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDeviceStatus.m @@ -1,19 +1,21 @@ // SDLDeviceStatus.m // - #import "SDLDeviceStatus.h" +#import "SDLDeviceLevelStatus.h" #import "SDLNames.h" +#import "SDLPrimaryAudioSource.h" + @implementation SDLDeviceStatus --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessage.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessage.h index cbe4735c3..2875ed688 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessage.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessage.h @@ -12,8 +12,8 @@ */ @interface SDLDiagnosticMessage : SDLRPCRequest {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSNumber* targetID; @property(strong) NSNumber* messageLength; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessage.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessage.m index f0313c3c8..0ee7c726f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessage.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessage.m @@ -8,12 +8,12 @@ @implementation SDLDiagnosticMessage --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_DiagnosticMessage]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessageResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessageResponse.h index e0f45129b..2a34c0898 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessageResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessageResponse.h @@ -10,8 +10,8 @@ */ @interface SDLDiagnosticMessageResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSMutableArray* messageDataResult; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessageResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessageResponse.m index 2b29d2174..db07d76ad 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessageResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDiagnosticMessageResponse.m @@ -7,12 +7,12 @@ @implementation SDLDiagnosticMessageResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_DiagnosticMessage]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDialNumber.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDialNumber.h new file mode 100644 index 000000000..48cca6a6d --- /dev/null +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDialNumber.h @@ -0,0 +1,22 @@ +// +// SDLDialNumber.h +// SmartDeviceLink-iOS + +#import "SDLRPCRequest.h" + +/** + This RPC is used to tell the head unit to use bluetooth to dial a phone number using the phone. + + @since SDL 4.0 + */ +@interface SDLDialNumber : SDLRPCRequest + +- (instancetype)init; +- (instancetype)initWithDictionary:(NSMutableDictionary *)dict; + +/** + * Up to 40 character string representing the phone number. All characters stripped except for '0'-'9', '*', '#', ',', ';', and '+' + */ +@property (strong, nonatomic) NSString *number; + +@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDialNumber.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDialNumber.m new file mode 100644 index 000000000..1cb599355 --- /dev/null +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDialNumber.m @@ -0,0 +1,33 @@ +// +// SDLDialNumber.m +// SmartDeviceLink-iOS + +#import "SDLDialNumber.h" + +#import "SDLNames.h" + +@implementation SDLDialNumber + +-(instancetype) init { + if (self = [super initWithName:NAMES_DialNumber]) {} + return self; +} + +-(instancetype) initWithDictionary:(NSMutableDictionary*)dict { + if (self = [super initWithDictionary:dict]) {} + return self; +} + +-(void) setNumber:(NSString *)number { + if (number != nil) { + parameters[NAMES_number] = number; + } else { + [parameters removeObjectForKey:NAMES_number]; + } +} + +-(NSString*)number { + return parameters[NAMES_number]; +} + +@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDialNumberResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDialNumberResponse.h new file mode 100644 index 000000000..fec54edad --- /dev/null +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDialNumberResponse.h @@ -0,0 +1,17 @@ +// +// SDLDialNumberResponse.h +// SmartDeviceLink-iOS + +#import <SmartDeviceLink/SmartDeviceLink.h> + +/** + Indicates the result, success, or failure of the SDLDialNumber request. + + @since SDL 4.0 + */ +@interface SDLDialNumberResponse : SDLRPCResponse + +- (instancetype)init; +- (instancetype)initWithDictionary:(NSMutableDictionary *)dict; + +@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDialNumberResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDialNumberResponse.m new file mode 100644 index 000000000..a43ef9823 --- /dev/null +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDialNumberResponse.m @@ -0,0 +1,22 @@ +// +// SDLDialNumberResponse.m +// SmartDeviceLink-iOS + +#import "SDLDialNumberResponse.h" + +#import "SDLNames.h" + + +@implementation SDLDialNumberResponse + +-(instancetype) init { + if (self = [super initWithName:NAMES_DialNumber]) {} + return self; +} + +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { + if (self = [super initWithDictionary:dict]) {} + return self; +} + +@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDimension.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDimension.h index 8ce5384b8..976654fa0 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDimension.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDimension.h @@ -5,7 +5,6 @@ #import "SDLEnum.h" #import <Foundation/Foundation.h> -#import <SmartDeviceLink/SDLEnum.h> /** * The supported dimensions of the GPS. @@ -24,7 +23,7 @@ @abstract Store the enumeration of all possible SDLDimension @result return an array that store all possible SDLDimension */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract No GPS at all diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDimension.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDimension.m index 1dae9ee6b..5d9e2336c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDimension.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDimension.m @@ -8,7 +8,7 @@ SDLDimension* SDLDimension_NO_FIX = nil; SDLDimension* SDLDimension_2D = nil; SDLDimension* SDLDimension_3D = nil; -NSMutableArray* SDLDimension_values = nil; +NSArray* SDLDimension_values = nil; @implementation SDLDimension @@ -21,13 +21,13 @@ NSMutableArray* SDLDimension_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLDimension_values == nil) { - SDLDimension_values = [[NSMutableArray alloc] initWithObjects: + SDLDimension_values = @[ SDLDimension.NO_FIX, SDLDimension._2D, SDLDimension._3D, - nil]; + ]; } return SDLDimension_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayCapabilities.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayCapabilities.h index 2cd34d6c7..4658b7fa8 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayCapabilities.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayCapabilities.h @@ -1,12 +1,11 @@ // SDLDisplayCapabilities.h // - - #import "SDLRPCMessage.h" -#import "SDLDisplayType.h" -#import "SDLScreenParams.h" +@class SDLDisplayType; +@class SDLScreenParams; + /** * Contains information about the display for the SDL system to which the application is currently connected. @@ -53,12 +52,12 @@ /** * Constructs a newly allocated SDLDisplayCapabilities object */ --(id) init; +-(instancetype) init; /** * Constructs a newly allocated SDLDisplayCapabilities object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract the type of display diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayCapabilities.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayCapabilities.m index f61303602..3e67e1b59 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayCapabilities.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayCapabilities.m @@ -1,22 +1,24 @@ // SDLDisplayCapabilities.m // - #import "SDLDisplayCapabilities.h" -#import "SDLNames.h" -#import "SDLTextField.h" +#import "SDLDisplayType.h" #import "SDLImageField.h" #import "SDLMediaClockFormat.h" +#import "SDLNames.h" +#import "SDLScreenParams.h" +#import "SDLTextField.h" + @implementation SDLDisplayCapabilities --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayType.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayType.h index e41f7623b..c1e2b6f17 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayType.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayType.h @@ -22,7 +22,7 @@ @abstract Store the enumeration of all possible SDLDisplayType @result return an array that store all possible SDLDisplayType */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract This display type provides a 2-line x 20 character "dot matrix" display. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayType.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayType.m index bd2825472..2572dbc55 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayType.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDisplayType.m @@ -15,7 +15,7 @@ SDLDisplayType* SDLDisplayType_MFD4 = nil; SDLDisplayType* SDLDisplayType_MFD5 = nil; SDLDisplayType* SDLDisplayType_GEN3_8_INCH = nil; -NSMutableArray* SDLDisplayType_values = nil; +NSArray* SDLDisplayType_values = nil; @implementation SDLDisplayType @@ -28,9 +28,9 @@ NSMutableArray* SDLDisplayType_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLDisplayType_values == nil) { - SDLDisplayType_values = [[NSMutableArray alloc] initWithObjects: + SDLDisplayType_values = @[ SDLDisplayType.CID, SDLDisplayType.TYPE2, SDLDisplayType.TYPE5, @@ -41,7 +41,7 @@ NSMutableArray* SDLDisplayType_values = nil; SDLDisplayType.MFD4, SDLDisplayType.MFD5, SDLDisplayType.GEN3_8_INCH, - nil]; + ]; } return SDLDisplayType_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDriverDistractionState.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDriverDistractionState.h index 2c930993b..c326d6dbd 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDriverDistractionState.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDriverDistractionState.h @@ -22,7 +22,7 @@ @abstract Store the enumeration of all possible SDLDriverDistractionState @result return an array that store all possible SDLDriverDistractionState */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Driver distraction rules are in effect. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDriverDistractionState.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDriverDistractionState.m index 31bc01f34..30f30f90f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLDriverDistractionState.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLDriverDistractionState.m @@ -7,7 +7,7 @@ SDLDriverDistractionState* SDLDriverDistractionState_DD_ON = nil; SDLDriverDistractionState* SDLDriverDistractionState_DD_OFF = nil; -NSMutableArray* SDLDriverDistractionState_values = nil; +NSArray* SDLDriverDistractionState_values = nil; @implementation SDLDriverDistractionState @@ -20,12 +20,12 @@ NSMutableArray* SDLDriverDistractionState_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLDriverDistractionState_values == nil) { - SDLDriverDistractionState_values = [[NSMutableArray alloc] initWithObjects: + SDLDriverDistractionState_values = @[ SDLDriverDistractionState.DD_ON, SDLDriverDistractionState.DD_OFF, - nil]; + ]; } return SDLDriverDistractionState_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallConfirmationStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallConfirmationStatus.h index 7484ac569..6b4461e6b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallConfirmationStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallConfirmationStatus.h @@ -12,7 +12,7 @@ @interface SDLECallConfirmationStatus : SDLEnum {} +(SDLECallConfirmationStatus*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; /** No E-Call signal triggered. */ diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallConfirmationStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallConfirmationStatus.m index f607a68ba..949effbe6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallConfirmationStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallConfirmationStatus.m @@ -12,7 +12,7 @@ SDLECallConfirmationStatus* SDLECallConfirmationStatus_CALL_UNSUCCESSFUL = nil; SDLECallConfirmationStatus* SDLECallConfirmationStatus_ECALL_CONFIGURED_OFF = nil; SDLECallConfirmationStatus* SDLECallConfirmationStatus_CALL_COMPLETE_DTMF_TIMEOUT = nil; -NSMutableArray* SDLECallConfirmationStatus_values = nil; +NSArray* SDLECallConfirmationStatus_values = nil; @implementation SDLECallConfirmationStatus @@ -25,9 +25,9 @@ NSMutableArray* SDLECallConfirmationStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLECallConfirmationStatus_values == nil) { - SDLECallConfirmationStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLECallConfirmationStatus_values = @[ SDLECallConfirmationStatus.NORMAL, SDLECallConfirmationStatus.CALL_IN_PROGRESS, SDLECallConfirmationStatus.CALL_CANCELLED, @@ -35,7 +35,7 @@ NSMutableArray* SDLECallConfirmationStatus_values = nil; SDLECallConfirmationStatus.CALL_UNSUCCESSFUL, SDLECallConfirmationStatus.ECALL_CONFIGURED_OFF, SDLECallConfirmationStatus.CALL_COMPLETE_DTMF_TIMEOUT, - nil]; + ]; } return SDLECallConfirmationStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallInfo.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallInfo.h index ca0a1929b..865bfb03c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallInfo.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallInfo.h @@ -1,17 +1,16 @@ // SDLECallInfo.h // - - #import "SDLRPCMessage.h" -#import "SDLVehicleDataNotificationStatus.h" -#import "SDLECallConfirmationStatus.h" +@class SDLVehicleDataNotificationStatus; +@class SDLECallConfirmationStatus; + @interface SDLECallInfo : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLVehicleDataNotificationStatus* eCallNotificationStatus; @property(strong) SDLVehicleDataNotificationStatus* auxECallNotificationStatus; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallInfo.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallInfo.m index 164455deb..df9925736 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallInfo.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLECallInfo.m @@ -1,19 +1,21 @@ // SDLECallInfo.m // - #import "SDLECallInfo.h" +#import "SDLECallConfirmationStatus.h" #import "SDLNames.h" +#import "SDLVehicleDataNotificationStatus.h" + @implementation SDLECallInfo --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEvent.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEvent.h index c8a638267..7f0c38894 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEvent.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEvent.h @@ -1,18 +1,17 @@ // SDLEmergencyEvent.h // - - #import "SDLRPCMessage.h" -#import "SDLEmergencyEventType.h" -#import "SDLFuelCutoffStatus.h" -#import "SDLVehicleDataEventStatus.h" +@class SDLEmergencyEventType; +@class SDLFuelCutoffStatus; +@class SDLVehicleDataEventStatus; + @interface SDLEmergencyEvent : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLEmergencyEventType* emergencyEventType; @property(strong) SDLFuelCutoffStatus* fuelCutoffStatus; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEvent.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEvent.m index f20e7133a..72a50cf0f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEvent.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEvent.m @@ -1,19 +1,22 @@ // SDLEmergencyEvent.m // - #import "SDLEmergencyEvent.h" +#import "SDLEmergencyEventType.h" +#import "SDLFuelCutoffStatus.h" #import "SDLNames.h" +#import "SDLVehicleDataEventStatus.h" + @implementation SDLEmergencyEvent --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEventType.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEventType.h index 0e06013ad..f269506aa 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEventType.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEventType.h @@ -13,7 +13,7 @@ @interface SDLEmergencyEventType : SDLEnum {} +(SDLEmergencyEventType*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; /** No emergency event has happened. */ diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEventType.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEventType.m index e33bbd2b4..f10c02ac7 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEventType.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEmergencyEventType.m @@ -12,7 +12,7 @@ SDLEmergencyEventType* SDLEmergencyEventType_ROLLOVER = nil; SDLEmergencyEventType* SDLEmergencyEventType_NOT_SUPPORTED = nil; SDLEmergencyEventType* SDLEmergencyEventType_FAULT = nil; -NSMutableArray* SDLEmergencyEventType_values = nil; +NSArray* SDLEmergencyEventType_values = nil; @implementation SDLEmergencyEventType @@ -25,9 +25,9 @@ NSMutableArray* SDLEmergencyEventType_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLEmergencyEventType_values == nil) { - SDLEmergencyEventType_values = [[NSMutableArray alloc] initWithObjects: + SDLEmergencyEventType_values = @[ SDLEmergencyEventType.NO_EVENT, SDLEmergencyEventType.FRONTAL, SDLEmergencyEventType.SIDE, @@ -35,7 +35,7 @@ NSMutableArray* SDLEmergencyEventType_values = nil; SDLEmergencyEventType.ROLLOVER, SDLEmergencyEventType.NOT_SUPPORTED, SDLEmergencyEventType.FAULT, - nil]; + ]; } return SDLEmergencyEventType_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPData.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPData.h index 5aae7a4c5..f039c42b7 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPData.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPData.h @@ -7,8 +7,8 @@ @interface SDLEncodedSyncPData : SDLRPCRequest {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSMutableArray* data; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPData.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPData.m index 646fd5c48..97d6a7ecd 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPData.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPData.m @@ -8,12 +8,12 @@ @implementation SDLEncodedSyncPData --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_EncodedSyncPData]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPDataResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPDataResponse.h index a1cc754b0..c9b6a9c0d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPDataResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPDataResponse.h @@ -7,7 +7,7 @@ @interface SDLEncodedSyncPDataResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPDataResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPDataResponse.m index 20034b215..69ff97f9e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPDataResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncodedSyncPDataResponse.m @@ -8,12 +8,12 @@ @implementation SDLEncodedSyncPDataResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_EncodedSyncPData]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncoder.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncoder.h index a742b4eb4..b36367c5a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncoder.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEncoder.h @@ -4,7 +4,7 @@ @import Foundation; -@protocol SDLEncoder +@protocol SDLEncoder <NSObject> -(NSData*) encodeDictionary:(NSDictionary*) dict; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThru.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThru.h index aba124a7e..9bbe0e9d6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThru.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThru.h @@ -20,7 +20,7 @@ /** * Constructs a new SDLEndAudioPassThru object */ --(id) init; +-(instancetype) init; /** * Constructs a new SDLEndAudioPassThru object indicated by the NSMutableDictionary * parameter @@ -28,6 +28,6 @@ * * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThru.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThru.m index 17a85dc3e..21e69b17e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThru.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThru.m @@ -8,12 +8,12 @@ @implementation SDLEndAudioPassThru --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_EndAudioPassThru]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThruResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThruResponse.h index 7fc543d93..cc2ffb3b9 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThruResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThruResponse.h @@ -12,7 +12,7 @@ */ @interface SDLEndAudioPassThruResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThruResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThruResponse.m index 0aa608e2f..a435eb61d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThruResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEndAudioPassThruResponse.m @@ -8,12 +8,12 @@ @implementation SDLEndAudioPassThruResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_EndAudioPassThru]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEnum.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEnum.h index 080382a23..0824dc349 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEnum.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEnum.h @@ -9,7 +9,9 @@ NSString* value; } --(id) initWithValue:(NSString*) value; +-(instancetype) initWithValue:(NSString*) value; + +-(BOOL) isEqualToEnum:(SDLEnum *) object; @property(strong, readonly) NSString* value; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEnum.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEnum.m index 9976e36b1..3662f3c8a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLEnum.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLEnum.m @@ -8,7 +8,7 @@ @synthesize value; --(id) initWithValue:(NSString*) aValue { +-(instancetype) initWithValue:(NSString*) aValue { if (self = [super init]) { value = aValue; } @@ -19,4 +19,33 @@ return value; } -@end +- (id)debugQuickLookObject { + return value; +} + +- (NSUInteger)hash { + return [self.value hash]; +} + +- (BOOL)isEqual:(id)object { + // Test pointer equality + if (self == object) { + return YES; + } + + // Test class equality, if not equal, value equality doesn't matter + if (![object isMemberOfClass:self.class]) { + return NO; + } + + return [self isEqualToEnum:object]; +} + +- (BOOL)isEqualToEnum:(SDLEnum *)object { + // Test value equality, if it's equal we're good + if ([self.value isEqualToString:object.value]) { + return YES; + } + + return NO; +}@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLFileType.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLFileType.h index a269f27ea..72e27b847 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLFileType.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLFileType.h @@ -23,7 +23,7 @@ @abstract Store the enumeration of all possible SDLFileType @result return an array that store all possible SDLFileType */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract file type : BMP diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLFileType.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLFileType.m index 216923be5..06d287856 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLFileType.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLFileType.m @@ -13,7 +13,7 @@ SDLFileType* SDLFileType_AUDIO_AAC = nil; SDLFileType* SDLFileType_BINARY = nil; SDLFileType* SDLFileType_JSON = nil; -NSMutableArray* SDLFileType_values = nil; +NSArray* SDLFileType_values = nil; @implementation SDLFileType @@ -26,9 +26,9 @@ NSMutableArray* SDLFileType_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLFileType_values == nil) { - SDLFileType_values = [[NSMutableArray alloc] initWithObjects: + SDLFileType_values = @[ SDLFileType.GRAPHIC_BMP, SDLFileType.GRAPHIC_JPEG, SDLFileType.GRAPHIC_PNG, @@ -37,7 +37,7 @@ NSMutableArray* SDLFileType_values = nil; SDLFileType.AUDIO_AAC, SDLFileType.BINARY, SDLFileType.JSON, - nil]; + ]; } return SDLFileType_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLFuelCutoffStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLFuelCutoffStatus.h index 40f072f62..7e9df72aa 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLFuelCutoffStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLFuelCutoffStatus.h @@ -13,7 +13,7 @@ */ @interface SDLFuelCutoffStatus : SDLEnum {} +(SDLFuelCutoffStatus*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; /** Fuel is cut off */ +(SDLFuelCutoffStatus*) TERMINATE_FUEL; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLFuelCutoffStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLFuelCutoffStatus.m index a719f28e5..8d25c94ff 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLFuelCutoffStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLFuelCutoffStatus.m @@ -8,7 +8,7 @@ SDLFuelCutoffStatus* SDLFuelCutoffStatus_TERMINATE_FUEL = nil; SDLFuelCutoffStatus* SDLFuelCutoffStatus_NORMAL_OPERATION = nil; SDLFuelCutoffStatus* SDLFuelCutoffStatus_FAULT = nil; -NSMutableArray* SDLFuelCutoffStatus_values = nil; +NSArray* SDLFuelCutoffStatus_values = nil; @implementation SDLFuelCutoffStatus @@ -21,13 +21,13 @@ NSMutableArray* SDLFuelCutoffStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLFuelCutoffStatus_values == nil) { - SDLFuelCutoffStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLFuelCutoffStatus_values = @[ SDLFuelCutoffStatus.TERMINATE_FUEL, SDLFuelCutoffStatus.NORMAL_OPERATION, SDLFuelCutoffStatus.FAULT, - nil]; + ]; } return SDLFuelCutoffStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLFunctionID.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLFunctionID.m index fab991478..e15035be8 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLFunctionID.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLFunctionID.m @@ -8,7 +8,7 @@ @implementation SDLFunctionID --(id) init { +-(instancetype) init { if (self = [super init]) { functionIDs = [NSDictionary dictionaryWithObjectsAndKeys: @@ -51,7 +51,8 @@ NAMES_SetDisplayLayout, @"36", NAMES_DiagnosticMessage, @"37", NAMES_SystemRequest, @"38", - + NAMES_SendLocation, @"39", + NAMES_DialNumber, @"40", NAMES_OnHMIStatus, @"32768", NAMES_OnAppInterfaceUnregistered, @"32769", NAMES_OnButtonEvent, @"32770", @@ -72,7 +73,7 @@ NAMES_SyncPData, @"65537", NAMES_OnEncodedSyncPData, @"98304", - NAMES_OnSyncPData, @"98405", + NAMES_OnSyncPData, @"98305", nil]; } @@ -80,7 +81,7 @@ } -(NSString *)getFunctionName:(int) functionID{ - + return [functionIDs objectForKey:[NSString stringWithFormat:@"%d", functionID]]; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGPSData.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGPSData.h index 3fde16966..c643b1346 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGPSData.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGPSData.h @@ -1,12 +1,11 @@ // SDLGPSData.h // - - #import "SDLRPCMessage.h" -#import "SDLCompassDirection.h" -#import "SDLDimension.h" +@class SDLCompassDirection; +@class SDLDimension; + /** * Describes the GPS data. Not all data will be available on all carlines. @@ -149,13 +148,13 @@ /** * Constructs a newly allocated SDLGPSData object */ --(id) init; +-(instancetype) init; /** * Constructs a newly allocated SDLGPSData object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract longitude degrees diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGPSData.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGPSData.m index 8640fa138..526c6d38d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGPSData.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGPSData.m @@ -1,19 +1,21 @@ // SDLGPSData.m // - #import "SDLGPSData.h" +#import "SDLCompassDirection.h" +#import "SDLDimension.h" #import "SDLNames.h" + @implementation SDLGPSData --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGenericResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGenericResponse.h index 8095ae894..568c0fe12 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGenericResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGenericResponse.h @@ -12,7 +12,7 @@ */ @interface SDLGenericResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGenericResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGenericResponse.m index 96764233c..ae91f13ba 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGenericResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGenericResponse.m @@ -8,12 +8,12 @@ @implementation SDLGenericResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_GenericResponse]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCs.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCs.h index 96a434cdd..8c3d8bc5d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCs.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCs.h @@ -18,14 +18,14 @@ /** * Constructs a new SDLGetDTCs object */ --(id) init; +-(instancetype) init; /** * Constructs a new SDLGetDTCs object indicated by the NSMutableDictionary parameter * <p> * * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract a name of the module to receive the DTC form * @discussion an NSNumber value representing a name of the module to receive diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCs.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCs.m index 002ed9173..aa13cfaa9 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCs.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCs.m @@ -8,12 +8,12 @@ @implementation SDLGetDTCs --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_GetDTCs]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCsResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCsResponse.h index e758c1df9..87b695863 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCsResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCsResponse.h @@ -12,8 +12,8 @@ */ @interface SDLGetDTCsResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSNumber* ecuHeader; @property(strong) NSMutableArray* dtc; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCsResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCsResponse.m index 57174cd3c..e69129eb3 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCsResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetDTCsResponse.m @@ -8,12 +8,12 @@ @implementation SDLGetDTCsResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_GetDTCs]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleData.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleData.h index 588858d31..d8ead1820 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleData.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleData.h @@ -21,14 +21,14 @@ /** * @abstract Constructs a new SDLGetVehicleData object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLGetVehicleData object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract A boolean value. If true, requests Gps data diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleData.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleData.m index 2d4c1ebf4..d1e074c67 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleData.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleData.m @@ -8,12 +8,12 @@ @implementation SDLGetVehicleData --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_GetVehicleData]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleDataResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleDataResponse.h index 7d1bd2b08..e7acd4e13 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleDataResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleDataResponse.h @@ -1,25 +1,24 @@ // SDLGetVehicleDataResponse.h // - - #import "SDLRPCResponse.h" -#import "SDLGPSData.h" -#import "SDLComponentVolumeStatus.h" -#import "SDLPRNDL.h" -#import "SDLTireStatus.h" -#import "SDLBeltStatus.h" -#import "SDLBodyInformation.h" -#import "SDLDeviceStatus.h" -#import "SDLVehicleDataEventStatus.h" -#import "SDLWiperStatus.h" -#import "SDLHeadLampStatus.h" -#import "SDLECallInfo.h" -#import "SDLAirbagStatus.h" -#import "SDLEmergencyEvent.h" -#import "SDLClusterModeStatus.h" -#import "SDLMyKey.h" +@class SDLAirbagStatus; +@class SDLBeltStatus; +@class SDLBodyInformation; +@class SDLClusterModeStatus; +@class SDLComponentVolumeStatus; +@class SDLDeviceStatus; +@class SDLECallInfo; +@class SDLEmergencyEvent; +@class SDLGPSData; +@class SDLHeadLampStatus; +@class SDLMyKey; +@class SDLPRNDL; +@class SDLTireStatus; +@class SDLVehicleDataEventStatus; +@class SDLWiperStatus; + /** * Get Vehicle Data Response is sent, when SDLGetVehicleData has been called @@ -32,14 +31,14 @@ /** * @abstract Constructs a new SDLGetVehicleDataResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLGetVehicleDataResponse object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleDataResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleDataResponse.m index 7c607e596..e6a9836f7 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleDataResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGetVehicleDataResponse.m @@ -4,16 +4,32 @@ #import "SDLGetVehicleDataResponse.h" +#import "SDLAirbagStatus.h" +#import "SDLBeltStatus.h" +#import "SDLBodyInformation.h" +#import "SDLClusterModeStatus.h" +#import "SDLComponentVolumeStatus.h" +#import "SDLDeviceStatus.h" +#import "SDLECallInfo.h" +#import "SDLEmergencyEvent.h" +#import "SDLGPSData.h" +#import "SDLHeadLampStatus.h" +#import "SDLMyKey.h" #import "SDLNames.h" +#import "SDLPRNDL.h" +#import "SDLTireStatus.h" +#import "SDLVehicleDataEventStatus.h" +#import "SDLWiperStatus.h" + @implementation SDLGetVehicleDataResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_GetVehicleData]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGlobalProperty.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGlobalProperty.h index 5db9a3cd2..4a6ce9190 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGlobalProperty.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGlobalProperty.h @@ -22,7 +22,7 @@ @abstract Store the enumeration of all possible SDLGlobalProperty @result return an array that store all possible SDLGlobalProperty */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract The help prompt to be spoken if the user needs assistance during a user-initiated interaction. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGlobalProperty.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGlobalProperty.m index 23b312429..6aac36b19 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLGlobalProperty.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLGlobalProperty.m @@ -12,7 +12,7 @@ SDLGlobalProperty* SDLGlobalProperty_MENUNAME = nil; SDLGlobalProperty* SDLGlobalProperty_MENUICON = nil; SDLGlobalProperty* SDLGlobalProperty_KEYBOARDPROPERTIES = nil; -NSMutableArray* SDLGlobalProperty_values = nil; +NSArray* SDLGlobalProperty_values = nil; @implementation SDLGlobalProperty @@ -25,9 +25,9 @@ NSMutableArray* SDLGlobalProperty_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLGlobalProperty_values == nil) { - SDLGlobalProperty_values = [[NSMutableArray alloc] initWithObjects: + SDLGlobalProperty_values = @[ SDLGlobalProperty.HELPPROMPT, SDLGlobalProperty.TIMEOUTPROMPT, SDLGlobalProperty.VRHELPTITLE, @@ -35,7 +35,7 @@ NSMutableArray* SDLGlobalProperty_values = nil; SDLGlobalProperty.MENUNAME, SDLGlobalProperty.MENUICON, SDLGlobalProperty.KEYBOARDPROPERTIES, - nil]; + ]; } return SDLGlobalProperty_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMICapabilities.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMICapabilities.h new file mode 100644 index 000000000..1f19db1c6 --- /dev/null +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMICapabilities.h @@ -0,0 +1,30 @@ +// +// SDLHMICapabilities.h +// SmartDeviceLink-iOS +// +// Created by Joel Fischer on 3/31/15. +// Copyright (c) 2015 smartdevicelink. All rights reserved. +// + +#import <SmartDeviceLink/SmartDeviceLink.h> + +@interface SDLHMICapabilities : SDLRPCStruct + +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; + +/** + Availability of build in Nav. True: Available, False: Not Available + + Boolean value. Optional. + */ +@property (copy, nonatomic) NSNumber *navigation; + +/** + Availability of build in phone. True: Available, False: Not Available + + Boolean value. Optional. + */ +@property (copy, nonatomic) NSNumber *phoneCall; + +@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMICapabilities.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMICapabilities.m new file mode 100644 index 000000000..53a512642 --- /dev/null +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMICapabilities.m @@ -0,0 +1,58 @@ +// +// SDLHMICapabilities.m +// SmartDeviceLink-iOS +// +// Created by Joel Fischer on 3/31/15. +// Copyright (c) 2015 smartdevicelink. All rights reserved. +// + +#import "SDLHMICapabilities.h" + +#import "SDLNames.h" + + +@implementation SDLHMICapabilities + +-(instancetype) init { + self = [super init]; + if (!self) { + return nil; + } + + return self; +} + +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { + self = [super initWithDictionary:dict]; + if (!self) { + return nil; + } + + return self; +} + +-(void) setNavigation:(NSNumber *)navigation { + if (navigation != nil) { + store[NAMES_navigation] = navigation; + } else { + [store removeObjectForKey:NAMES_navigation]; + } +} + +-(NSNumber *) navigation { + return store[NAMES_navigation]; +} + +-(void) setPhoneCall:(NSNumber *)phoneCall { + if (phoneCall != nil) { + store[NAMES_phoneCall] = phoneCall; + } else { + [store removeObjectForKey:NAMES_phoneCall]; + } +} + +-(NSNumber *) phoneCall { + return store[NAMES_phoneCall]; +} + +@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMILevel.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMILevel.h index 359d4722f..dbadf1d1c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMILevel.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMILevel.h @@ -23,19 +23,19 @@ @abstract store all possible SDLHMILevel values @result return an array with all possible HMILevel values inside */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract The application has full use of the SDL HMI. The app may output via TTS, display, or streaming audio and may gather input via VR, Menu, and button presses - * @result return the HMILevel with value of <font color=gray><i> HMI_FULL </i></font> + * @result return the HMILevel with value of <font color=gray><i> FULL </i></font> */ -+(SDLHMILevel*) HMI_FULL; ++(SDLHMILevel*) FULL; /** * @abstract This HMI Level is only defined for a media application using an HMI with an 8 inch touchscreen (Nav) system. The application's <i>Show</i> text is displayed and it receives button presses from media-oriented buttons (SEEKRIGHT, SEEKLEFT, TUNEUP, TUNEDOWN, PRESET_0-9) - * @result return the HMILevel with value of <font color=gray><i> HMI_LIMITED </i></font> + * @result return the HMILevel with value of <font color=gray><i> LIMITED </i></font> */ -+(SDLHMILevel*) HMI_LIMITED; ++(SDLHMILevel*) LIMITED; /** * @abstract App cannot interact with user via TTS, VR, Display or Button Presses. App can perform the following operations:<br/> @@ -53,15 +53,15 @@ * <li>Operation : ResetGlobalProperties</li> * <li>Operation : SetGlobalProperties</li> * </ul> - * @result return the HMILevel with value of <font color=gray><i> HMI_BACKGROUND </i></font> + * @result return the HMILevel with value of <font color=gray><i> BACKGROUND </i></font> */ -+(SDLHMILevel*) HMI_BACKGROUND; ++(SDLHMILevel*) BACKGROUND; /** * @abstract Application has been discovered by SDL, but application cannot send any requests or receive any notifications<br/> * @discussion An HMILevel of NONE can also mean that the user has exited the application by saying "exit appname" or selecting "exit" from the application's menu. When this happens, the application still has an active interface registration with SDL and all SDL resources the application has created (e.g. Choice Sets, subscriptions, etc.) still exist. But while the HMILevel is NONE, the application cannot send any messages to SYNC, except <i>UnregisterAppInterface</i></li> - * @result return the HMILevel with value of <font color=gray><i> HMI_NONE </i></font> + * @result return the HMILevel with value of <font color=gray><i> NONE </i></font> */ -+(SDLHMILevel*) HMI_NONE; ++(SDLHMILevel*) NONE; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMILevel.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMILevel.m index e21b3aa31..7ef57b92b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMILevel.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMILevel.m @@ -4,12 +4,12 @@ #import "SDLHMILevel.h" -SDLHMILevel* SDLHMILevel_HMI_FULL = nil; -SDLHMILevel* SDLHMILevel_HMI_LIMITED = nil; -SDLHMILevel* SDLHMILevel_HMI_BACKGROUND = nil; -SDLHMILevel* SDLHMILevel_HMI_NONE = nil; +SDLHMILevel* SDLHMILevel_FULL = nil; +SDLHMILevel* SDLHMILevel_LIMITED = nil; +SDLHMILevel* SDLHMILevel_BACKGROUND = nil; +SDLHMILevel* SDLHMILevel_NONE = nil; -NSMutableArray* SDLHMILevel_values = nil; +NSArray* SDLHMILevel_values = nil; @implementation SDLHMILevel @@ -22,44 +22,44 @@ NSMutableArray* SDLHMILevel_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLHMILevel_values == nil) { - SDLHMILevel_values = [[NSMutableArray alloc] initWithObjects: - SDLHMILevel.HMI_FULL, - SDLHMILevel.HMI_LIMITED, - SDLHMILevel.HMI_BACKGROUND, - SDLHMILevel.HMI_NONE, - nil]; + SDLHMILevel_values = @[ + [SDLHMILevel FULL], + [SDLHMILevel LIMITED], + [SDLHMILevel BACKGROUND], + [SDLHMILevel NONE] + ]; } return SDLHMILevel_values; } -+(SDLHMILevel*) HMI_FULL { - if (SDLHMILevel_HMI_FULL == nil) { - SDLHMILevel_HMI_FULL = [[SDLHMILevel alloc] initWithValue:@"FULL"]; ++(SDLHMILevel*) FULL { + if (SDLHMILevel_FULL == nil) { + SDLHMILevel_FULL = [[SDLHMILevel alloc] initWithValue:@"FULL"]; } - return SDLHMILevel_HMI_FULL; + return SDLHMILevel_FULL; } -+(SDLHMILevel*) HMI_LIMITED { - if (SDLHMILevel_HMI_LIMITED == nil) { - SDLHMILevel_HMI_LIMITED = [[SDLHMILevel alloc] initWithValue:@"LIMITED"]; ++(SDLHMILevel*) LIMITED { + if (SDLHMILevel_LIMITED == nil) { + SDLHMILevel_LIMITED = [[SDLHMILevel alloc] initWithValue:@"LIMITED"]; } - return SDLHMILevel_HMI_LIMITED; + return SDLHMILevel_LIMITED; } -+(SDLHMILevel*) HMI_BACKGROUND { - if (SDLHMILevel_HMI_BACKGROUND == nil) { - SDLHMILevel_HMI_BACKGROUND = [[SDLHMILevel alloc] initWithValue:@"BACKGROUND"]; ++(SDLHMILevel*) BACKGROUND { + if (SDLHMILevel_BACKGROUND == nil) { + SDLHMILevel_BACKGROUND = [[SDLHMILevel alloc] initWithValue:@"BACKGROUND"]; } - return SDLHMILevel_HMI_BACKGROUND; + return SDLHMILevel_BACKGROUND; } -+(SDLHMILevel*) HMI_NONE { - if (SDLHMILevel_HMI_NONE == nil) { - SDLHMILevel_HMI_NONE = [[SDLHMILevel alloc] initWithValue:@"NONE"]; ++(SDLHMILevel*) NONE { + if (SDLHMILevel_NONE == nil) { + SDLHMILevel_NONE = [[SDLHMILevel alloc] initWithValue:@"NONE"]; } - return SDLHMILevel_HMI_NONE; + return SDLHMILevel_NONE; } @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIPermissions.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIPermissions.h index 34502b594..7790c1c77 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIPermissions.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIPermissions.h @@ -45,12 +45,12 @@ /** * Constructs a newly allocated SDLHMIPermissions object */ --(id) init; +-(instancetype) init; /** * Constructs a newly allocated SDLHMIPermissions object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract a set of all HMI levels that are permitted for this given RPC diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIPermissions.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIPermissions.m index e107cf556..e0cd27fc2 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIPermissions.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIPermissions.m @@ -9,12 +9,12 @@ @implementation SDLHMIPermissions --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIZoneCapabilities.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIZoneCapabilities.h index cbf1fe17f..3dcd7c1c0 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIZoneCapabilities.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIZoneCapabilities.h @@ -9,31 +9,31 @@ * Specifies HMI Zones in the vehicle. * */ -@interface SDLHmiZoneCapabilities : SDLEnum {} +@interface SDLHMIZoneCapabilities : SDLEnum {} /*! @abstract return SDLHMIZoneCapabilities (FRONT / BACK) @param value NSString @result return SDLHMIZoneCapabilities */ -+(SDLHmiZoneCapabilities*) valueOf:(NSString*) value; ++(SDLHMIZoneCapabilities*) valueOf:(NSString*) value; /*! @abstract store all possible SDLHMIZoneCapabilities values @result return an array with all possible SDLHMIZoneCapabilities values inside */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Indicates HMI available for front seat passengers. * @result return a SDLHMIZoneCapabilities with value of <font color=gray><i> FRONT </i></font> * @since <font color=red><b> SmartDeviceLink 1.0 </b></font> */ -+(SDLHmiZoneCapabilities*) FRONT; ++(SDLHMIZoneCapabilities*) FRONT; /** * @abstract Indicates HMI available for rear seat passengers. * @result return a SDLHMIZoneCapabilities with value of <font color=gray><i> BACK </i></font> * @since <font color=red><b> SmartDeviceLink 1.0 </b></font> */ -+(SDLHmiZoneCapabilities*) BACK; ++(SDLHMIZoneCapabilities*) BACK; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIZoneCapabilities.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIZoneCapabilities.m index 566e46b72..d70809842 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIZoneCapabilities.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHMIZoneCapabilities.m @@ -1,18 +1,18 @@ -// SDLHmiZoneCapabilities.m +// SDLHMIZoneCapabilities.m // -#import "SDLHmiZoneCapabilities.h" +#import "SDLHMIZoneCapabilities.h" -SDLHmiZoneCapabilities* SDLHmiZoneCapabilities_FRONT = nil; -SDLHmiZoneCapabilities* SDLHmiZoneCapabilities_BACK = nil; +SDLHMIZoneCapabilities* SDLHMIZoneCapabilities_FRONT = nil; +SDLHMIZoneCapabilities* SDLHMIZoneCapabilities_BACK = nil; -NSMutableArray* SDLHmiZoneCapabilities_values = nil; +NSArray* SDLHMIZoneCapabilities_values = nil; -@implementation SDLHmiZoneCapabilities +@implementation SDLHMIZoneCapabilities -+(SDLHmiZoneCapabilities*) valueOf:(NSString*) value { - for (SDLHmiZoneCapabilities* item in SDLHmiZoneCapabilities.values) { ++(SDLHMIZoneCapabilities*) valueOf:(NSString*) value { + for (SDLHMIZoneCapabilities* item in SDLHMIZoneCapabilities.values) { if ([item.value isEqualToString:value]) { return item; } @@ -20,28 +20,28 @@ NSMutableArray* SDLHmiZoneCapabilities_values = nil; return nil; } -+(NSMutableArray*) values { - if (SDLHmiZoneCapabilities_values == nil) { - SDLHmiZoneCapabilities_values = [[NSMutableArray alloc] initWithObjects: - SDLHmiZoneCapabilities.FRONT, - SDLHmiZoneCapabilities.BACK, - nil]; ++(NSArray*) values { + if (SDLHMIZoneCapabilities_values == nil) { + SDLHMIZoneCapabilities_values = @[ + SDLHMIZoneCapabilities.FRONT, + SDLHMIZoneCapabilities.BACK, + ]; } - return SDLHmiZoneCapabilities_values; + return SDLHMIZoneCapabilities_values; } -+(SDLHmiZoneCapabilities*) FRONT { - if (SDLHmiZoneCapabilities_FRONT == nil) { - SDLHmiZoneCapabilities_FRONT = [[SDLHmiZoneCapabilities alloc] initWithValue:@"FRONT"]; ++(SDLHMIZoneCapabilities*) FRONT { + if (SDLHMIZoneCapabilities_FRONT == nil) { + SDLHMIZoneCapabilities_FRONT = [[SDLHMIZoneCapabilities alloc] initWithValue:@"FRONT"]; } - return SDLHmiZoneCapabilities_FRONT; + return SDLHMIZoneCapabilities_FRONT; } -+(SDLHmiZoneCapabilities*) BACK { - if (SDLHmiZoneCapabilities_BACK == nil) { - SDLHmiZoneCapabilities_BACK = [[SDLHmiZoneCapabilities alloc] initWithValue:@"BACK"]; ++(SDLHMIZoneCapabilities*) BACK { + if (SDLHMIZoneCapabilities_BACK == nil) { + SDLHMIZoneCapabilities_BACK = [[SDLHMIZoneCapabilities alloc] initWithValue:@"BACK"]; } - return SDLHmiZoneCapabilities_BACK; + return SDLHMIZoneCapabilities_BACK; } @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHeadLampStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHeadLampStatus.h index b7a2cde02..0d802b8b1 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHeadLampStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHeadLampStatus.h @@ -1,11 +1,10 @@ // SDLHeadLampStatus.h // - - #import "SDLRPCMessage.h" -#import "SDLAmbientLightStatus.h" +@class SDLAmbientLightStatus; + /** * Status of the head lamps @@ -14,13 +13,13 @@ /** * @abstract Constructs a new SDLHeadLampStatus object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLHeadLampStatus object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract A boolean value. Status of the low beam lamps. */ diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHeadLampStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHeadLampStatus.m index 448bddbce..568519e4d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLHeadLampStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLHeadLampStatus.m @@ -1,19 +1,20 @@ // SDLHeadLampStatus.m // - #import "SDLHeadLampStatus.h" +#import "SDLAmbientLightStatus.h" #import "SDLNames.h" + @implementation SDLHeadLampStatus --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLIAPTransport.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLIAPTransport.h index aebe4e4a8..f1383c551 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLIAPTransport.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLIAPTransport.h @@ -1,11 +1,10 @@ // SDLIAPTransport.h // - - -#import <ExternalAccessory/ExternalAccessory.h> +@import ExternalAccessory; #import "SDLAbstractTransport.h" + @interface SDLIAPTransport : SDLAbstractTransport <NSStreamDelegate> {} @property (assign) BOOL forceLegacy; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLIAPTransport.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLIAPTransport.m index 7025e7011..3ddb83a4c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLIAPTransport.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLIAPTransport.m @@ -37,7 +37,7 @@ @implementation SDLIAPTransport -- (id)init { +- (instancetype)init { if (self = [super initWithEndpoint:nil endpointParam:nil]) { [SDLDebugTool logInfo:@"Init" withType:SDLDebugType_Transport_iAP toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName]; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStableStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStableStatus.h index 78defc384..88cec972d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStableStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStableStatus.h @@ -22,7 +22,7 @@ @abstract store all possible SDLIgnitionStableStatus values @result return an array with all possible SDLIgnitionStableStatus values inside */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract The current ignition switch status is considered not to be stable. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStableStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStableStatus.m index fe7942bde..eb5776d71 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStableStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStableStatus.m @@ -8,7 +8,7 @@ SDLIgnitionStableStatus* SDLIgnitionStableStatus_IGNITION_SWITCH_NOT_STABLE = ni SDLIgnitionStableStatus* SDLIgnitionStableStatus_IGNITION_SWITCH_STABLE = nil; SDLIgnitionStableStatus* SDLIgnitionStableStatus_MISSING_FROM_TRANSMITTER = nil; -NSMutableArray* SDLIgnitionStableStatus_values = nil; +NSArray* SDLIgnitionStableStatus_values = nil; @implementation SDLIgnitionStableStatus @@ -21,13 +21,13 @@ NSMutableArray* SDLIgnitionStableStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLIgnitionStableStatus_values == nil) { - SDLIgnitionStableStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLIgnitionStableStatus_values = @[ SDLIgnitionStableStatus.IGNITION_SWITCH_NOT_STABLE, SDLIgnitionStableStatus.IGNITION_SWITCH_STABLE, SDLIgnitionStableStatus.MISSING_FROM_TRANSMITTER, - nil]; + ]; } return SDLIgnitionStableStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStatus.h index a136e3cc6..808f03535 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStatus.h @@ -22,7 +22,7 @@ @abstract store all possible SDLIgnitionStatus values @result return an array with all possible SDLIgnitionStatus values inside */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Ignition status currently unknown diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStatus.m index 144dedf11..18d8b777d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLIgnitionStatus.m @@ -11,7 +11,7 @@ SDLIgnitionStatus* SDLIgnitionStatus_RUN = nil; SDLIgnitionStatus* SDLIgnitionStatus_START = nil; SDLIgnitionStatus* SDLIgnitionStatus_INVALID = nil; -NSMutableArray* SDLIgnitionStatus_values = nil; +NSArray* SDLIgnitionStatus_values = nil; @implementation SDLIgnitionStatus @@ -24,16 +24,16 @@ NSMutableArray* SDLIgnitionStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLIgnitionStatus_values == nil) { - SDLIgnitionStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLIgnitionStatus_values = @[ SDLIgnitionStatus.UNKNOWN, SDLIgnitionStatus.OFF, SDLIgnitionStatus.ACCESSORY, SDLIgnitionStatus.RUN, SDLIgnitionStatus.START, SDLIgnitionStatus.INVALID, - nil]; + ]; } return SDLIgnitionStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImage.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImage.h index 0502108e3..2b5ac597c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImage.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImage.h @@ -1,11 +1,10 @@ // SDLImage.h // - - #import "SDLRPCMessage.h" -#import "SDLImageType.h" +@class SDLImageType; + /** *Specifies, which image shall be used, e.g. in SDLAlerts or on SDLSoftbuttons provided the display supports it. @@ -41,12 +40,12 @@ /** * Constructs a newly allocated SDLImage object */ --(id) init; +-(instancetype) init; /** * Constructs a newly allocated SDLImage object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract the static hex icon value or the binary image file name identifier (sent by SDLPutFile) * @discussion diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImage.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImage.m index 6fbcad7fd..16f29ff24 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImage.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImage.m @@ -1,19 +1,20 @@ // SDLImage.m // - #import "SDLImage.h" +#import "SDLImageType.h" #import "SDLNames.h" + @implementation SDLImage --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageField.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageField.h index 894a564c3..edcaa364f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageField.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageField.h @@ -1,17 +1,16 @@ // SDLImageField.h // - - #import "SDLRPCMessage.h" -#import "SDLImageFieldName.h" -#import "SDLImageResolution.h" +@class SDLImageFieldName; +@class SDLImageResolution; + @interface SDLImageField : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLImageFieldName* name; @property(strong) NSMutableArray* imageTypeSupported; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageField.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageField.m index 921a9ebb2..c3e4b65ca 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageField.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageField.m @@ -1,20 +1,22 @@ // SDLImageField.m // - #import "SDLImageField.h" -#import "SDLNames.h" #import "SDLFileType.h" +#import "SDLImageFieldName.h" +#import "SDLImageResolution.h" +#import "SDLNames.h" + @implementation SDLImageField --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageFieldName.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageFieldName.h index 73630f323..944902098 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageFieldName.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageFieldName.h @@ -14,7 +14,7 @@ @interface SDLImageFieldName : SDLEnum {} +(SDLImageFieldName*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; /** The image field for SoftButton * @@ -73,4 +73,10 @@ */ +(SDLImageFieldName*) showConstantTBTNextTurnIcon; +/** + * The optional image of a destination / location + * @since SDL 4.0 + */ ++(SDLImageFieldName*) locationImage; + @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageFieldName.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageFieldName.m index cfb0cafa9..c1843e7ba 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageFieldName.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageFieldName.m @@ -15,8 +15,9 @@ SDLImageFieldName* SDLImageFieldName_appIcon = nil; SDLImageFieldName* SDLImageFieldName_graphic = nil; SDLImageFieldName* SDLImageFieldName_showConstantTBTIcon = nil; SDLImageFieldName* SDLImageFieldName_showConstantTBTNextTurnIcon = nil; +SDLImageFieldName* SDLImageFieldName_locationImage = nil; -NSMutableArray* SDLImageFieldName_values = nil; +NSArray* SDLImageFieldName_values = nil; @implementation SDLImageFieldName @@ -29,9 +30,9 @@ NSMutableArray* SDLImageFieldName_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLImageFieldName_values == nil) { - SDLImageFieldName_values = [[NSMutableArray alloc] initWithObjects: + SDLImageFieldName_values = @[ SDLImageFieldName.softButtonImage, SDLImageFieldName.choiceImage, SDLImageFieldName.choiceSecondaryImage, @@ -43,7 +44,8 @@ NSMutableArray* SDLImageFieldName_values = nil; SDLImageFieldName.graphic, SDLImageFieldName.showConstantTBTIcon, SDLImageFieldName.showConstantTBTNextTurnIcon, - nil]; + SDLImageFieldName.locationImage, + ]; } return SDLImageFieldName_values; } @@ -125,4 +127,11 @@ NSMutableArray* SDLImageFieldName_values = nil; return SDLImageFieldName_showConstantTBTNextTurnIcon; } ++(SDLImageFieldName*) locationImage { + if (SDLImageFieldName_locationImage == nil) { + SDLImageFieldName_locationImage = [[SDLImageFieldName alloc] initWithValue:@"locationImage"]; + } + return SDLImageFieldName_locationImage; +} + @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageResolution.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageResolution.h index c4a880d76..40a21f082 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageResolution.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageResolution.h @@ -7,8 +7,8 @@ @interface SDLImageResolution : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSNumber* resolutionWidth; @property(strong) NSNumber* resolutionHeight; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageResolution.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageResolution.m index d5fa49cc5..d0688e1f4 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageResolution.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageResolution.m @@ -8,12 +8,12 @@ @implementation SDLImageResolution --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageType.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageType.h index 652f48e50..fc4cb4b37 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageType.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageType.h @@ -22,7 +22,7 @@ @abstract store all possible SDLImageType values @result return an array with all possible SDLImageType values inside */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Just the static hex icon value to be used diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageType.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageType.m index 49f426cf8..f6daf8867 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageType.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLImageType.m @@ -7,7 +7,7 @@ SDLImageType* SDLImageType_STATIC = nil; SDLImageType* SDLImageType_DYNAMIC = nil; -NSMutableArray* SDLImageType_values = nil; +NSArray* SDLImageType_values = nil; @implementation SDLImageType @@ -20,12 +20,12 @@ NSMutableArray* SDLImageType_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLImageType_values == nil) { - SDLImageType_values = [[NSMutableArray alloc] initWithObjects: + SDLImageType_values = @[ SDLImageType.STATIC, SDLImageType.DYNAMIC, - nil]; + ]; } return SDLImageType_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLInteractionMode.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLInteractionMode.h index e26c05a58..8d97f724f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLInteractionMode.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLInteractionMode.h @@ -24,7 +24,7 @@ @abstract store all possible SDLInteractionMode values @result return an array with all possible SDLInteractionMode values inside */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Interaction Mode : Manual Only diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLInteractionMode.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLInteractionMode.m index 4071607d2..c711a5fcd 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLInteractionMode.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLInteractionMode.m @@ -8,7 +8,7 @@ SDLInteractionMode* SDLInteractionMode_MANUAL_ONLY = nil; SDLInteractionMode* SDLInteractionMode_VR_ONLY = nil; SDLInteractionMode* SDLInteractionMode_BOTH = nil; -NSMutableArray* SDLInteractionMode_values = nil; +NSArray* SDLInteractionMode_values = nil; @implementation SDLInteractionMode @@ -21,13 +21,13 @@ NSMutableArray* SDLInteractionMode_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLInteractionMode_values == nil) { - SDLInteractionMode_values = [[NSMutableArray alloc] initWithObjects: + SDLInteractionMode_values = @[ SDLInteractionMode.MANUAL_ONLY, SDLInteractionMode.VR_ONLY, SDLInteractionMode.BOTH, - nil]; + ]; } return SDLInteractionMode_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLInterfaceProtocol.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLInterfaceProtocol.h index cfd4c05c2..8d7962f5d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLInterfaceProtocol.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLInterfaceProtocol.h @@ -1,15 +1,15 @@ // SDLProtocol.h // - - #import "SDLProtocolListener.h" -#import "SDLProtocolMessage.h" -#import "SDLRPCRequest.h" #import "SDLTransport.h" #import "SDLTransportDelegate.h" -@protocol SDLInterfaceProtocol<SDLTransportDelegate> +@class SDLProtocolMessage; +@class SDLRPCRequest; + + +@protocol SDLInterfaceProtocol <SDLTransportDelegate> @property (weak) id<SDLProtocolListener> protocolDelegate; @property (strong) id<SDLTransport> transport; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonDecoder.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonDecoder.h index 66b565701..116435e2a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonDecoder.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonDecoder.h @@ -1,11 +1,11 @@ // SDLJsonDecoder.h // - @import Foundation; #import "SDLDecoder.h" + @interface SDLJsonDecoder : NSObject<SDLDecoder> {} +(NSObject<SDLDecoder>*) instance; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonDecoder.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonDecoder.m index 03d0717ac..ca142ffeb 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonDecoder.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonDecoder.m @@ -1,11 +1,11 @@ // SDLJsonDecoder.m // - #import "SDLJsonDecoder.h" #import "SDLNames.h" + @implementation SDLJsonDecoder static NSObject<SDLDecoder>* jsonDecoderInstance; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonEncoder.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonEncoder.h index f959c4123..e0d65ee53 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonEncoder.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonEncoder.h @@ -1,11 +1,11 @@ // SDLJsonEncoder.h // - @import Foundation; #import "SDLEncoder.h" + @interface SDLJsonEncoder : NSObject<SDLEncoder> {} +(NSObject<SDLEncoder>*) instance; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonEncoder.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonEncoder.m index ac1219d03..b46c596e6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonEncoder.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLJsonEncoder.m @@ -1,10 +1,8 @@ // SDLJsonEncoder.m // - #import "SDLJsonEncoder.h" -#import "SDLNames.h" @implementation SDLJsonEncoder diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardEvent.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardEvent.h index a613f4a54..2e18b291e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardEvent.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardEvent.h @@ -13,7 +13,7 @@ @interface SDLKeyboardEvent : SDLEnum {} +(SDLKeyboardEvent*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; /** The use has pressed the keyboard key (applies to both SINGLE_KEYPRESS and RESEND_CURRENT_ENTRY modes). * @@ -35,7 +35,11 @@ /** The User has not finished entering text and the keyboard is aborted with the event of higher priority. * */ - +(SDLKeyboardEvent*) ENTRY_ABORTED; +/** + * @since SDL 4.0 + */ ++(SDLKeyboardEvent*) ENTRY_VOICE; + @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardEvent.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardEvent.m index 756aa811d..721629b92 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardEvent.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardEvent.m @@ -8,8 +8,9 @@ SDLKeyboardEvent* SDLKeyboardEvent_KEYPRESS = nil; SDLKeyboardEvent* SDLKeyboardEvent_ENTRY_SUBMITTED = nil; SDLKeyboardEvent* SDLKeyboardEvent_ENTRY_CANCELLED = nil; SDLKeyboardEvent* SDLKeyboardEvent_ENTRY_ABORTED = nil; +SDLKeyboardEvent* SDLKeyboardEvent_ENTRY_VOICE = nil; -NSMutableArray* SDLKeyboardEvent_values = nil; +NSArray* SDLKeyboardEvent_values = nil; @implementation SDLKeyboardEvent @@ -22,14 +23,15 @@ NSMutableArray* SDLKeyboardEvent_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLKeyboardEvent_values == nil) { - SDLKeyboardEvent_values = [[NSMutableArray alloc] initWithObjects: + SDLKeyboardEvent_values = @[ SDLKeyboardEvent.KEYPRESS, SDLKeyboardEvent.ENTRY_SUBMITTED, SDLKeyboardEvent.ENTRY_CANCELLED, SDLKeyboardEvent.ENTRY_ABORTED, - nil]; + SDLKeyboardEvent.ENTRY_VOICE, + ]; } return SDLKeyboardEvent_values; } @@ -62,4 +64,11 @@ NSMutableArray* SDLKeyboardEvent_values = nil; return SDLKeyboardEvent_ENTRY_ABORTED; } ++(SDLKeyboardEvent*) ENTRY_VOICE { + if (SDLKeyboardEvent_ENTRY_VOICE == nil) { + SDLKeyboardEvent_ENTRY_VOICE = [[SDLKeyboardEvent alloc] initWithValue:@"ENTRY_VOICE"]; + } + return SDLKeyboardEvent_ENTRY_VOICE; +} + @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardLayout.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardLayout.h index 9ec78dad4..b644b7d28 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardLayout.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardLayout.h @@ -13,7 +13,7 @@ @interface SDLKeyboardLayout : SDLEnum {} +(SDLKeyboardLayout*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; /** QWERTY layout (the name comes from the first six keys<br> appearing on the top left letter row of the keyboard and read from left to right) * */ diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardLayout.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardLayout.m index 1833dddb6..ac36dc9c4 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardLayout.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardLayout.m @@ -8,7 +8,7 @@ SDLKeyboardLayout* SDLKeyboardLayout_QWERTY = nil; SDLKeyboardLayout* SDLKeyboardLayout_QWERTZ = nil; SDLKeyboardLayout* SDLKeyboardLayout_AZERTY = nil; -NSMutableArray* SDLKeyboardLayout_values = nil; +NSArray* SDLKeyboardLayout_values = nil; @implementation SDLKeyboardLayout @@ -21,13 +21,13 @@ NSMutableArray* SDLKeyboardLayout_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLKeyboardLayout_values == nil) { - SDLKeyboardLayout_values = [[NSMutableArray alloc] initWithObjects: + SDLKeyboardLayout_values = @[ SDLKeyboardLayout.QWERTY, SDLKeyboardLayout.QWERTZ, SDLKeyboardLayout.AZERTY, - nil]; + ]; } return SDLKeyboardLayout_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardProperties.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardProperties.h index 64d5d3d98..c95252a6e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardProperties.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardProperties.h @@ -1,18 +1,17 @@ // SDLKeyboardProperties.h // - - #import "SDLRPCMessage.h" -#import "SDLLanguage.h" -#import "SDLKeyboardLayout.h" -#import "SDLKeypressMode.h" +@class SDLLanguage; +@class SDLKeyboardLayout; +@class SDLKeypressMode; + @interface SDLKeyboardProperties : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLLanguage* language; @property(strong) SDLKeyboardLayout* keyboardLayout; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardProperties.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardProperties.m index 38b1cc6e6..4a3aea64b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardProperties.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeyboardProperties.m @@ -1,19 +1,22 @@ // SDLKeyboardProperties.m // - #import "SDLKeyboardProperties.h" +#import "SDLKeyboardLayout.h" +#import "SDLKeypressMode.h" +#import "SDLLanguage.h" #import "SDLNames.h" + @implementation SDLKeyboardProperties --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeypressMode.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeypressMode.h index 5917de056..f0ac2a553 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeypressMode.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeypressMode.h @@ -15,7 +15,7 @@ @interface SDLKeypressMode : SDLEnum {} +(SDLKeypressMode*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; /** SINGLE_KEYPRESS:<br>Each and every User`s keypress must be reported (new notification for every newly entered single symbol). * diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeypressMode.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeypressMode.m index 8b9cc784e..16a296c2a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeypressMode.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLKeypressMode.m @@ -8,7 +8,7 @@ SDLKeypressMode* SDLKeypressMode_SINGLE_KEYPRESS = nil; SDLKeypressMode* SDLKeypressMode_QUEUE_KEYPRESSES = nil; SDLKeypressMode* SDLKeypressMode_RESEND_CURRENT_ENTRY = nil; -NSMutableArray* SDLKeypressMode_values = nil; +NSArray* SDLKeypressMode_values = nil; @implementation SDLKeypressMode @@ -21,13 +21,13 @@ NSMutableArray* SDLKeypressMode_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLKeypressMode_values == nil) { - SDLKeypressMode_values = [[NSMutableArray alloc] initWithObjects: + SDLKeypressMode_values = @[ SDLKeypressMode.SINGLE_KEYPRESS, SDLKeypressMode.QUEUE_KEYPRESSES, SDLKeypressMode.RESEND_CURRENT_ENTRY, - nil]; + ]; } return SDLKeypressMode_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLLanguage.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLLanguage.h index 8d5a4bdde..1a11d555a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLLanguage.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLLanguage.h @@ -23,7 +23,7 @@ @abstract store all possible Language values @result return an array with all possible Language values inside */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract language English_US */ diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLLanguage.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLLanguage.m index c3888c2d6..636e887cb 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLLanguage.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLLanguage.m @@ -29,7 +29,7 @@ SDLLanguage* SDLLanguage_CS_CZ = nil; SDLLanguage* SDLLanguage_DA_DK = nil; SDLLanguage* SDLLanguage_NO_NO = nil; -NSMutableArray* SDLLanguage_values = nil; +NSArray* SDLLanguage_values = nil; @implementation SDLLanguage @@ -42,9 +42,9 @@ NSMutableArray* SDLLanguage_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLLanguage_values == nil) { - SDLLanguage_values = [[NSMutableArray alloc] initWithObjects: + SDLLanguage_values = @[ SDLLanguage.EN_US, SDLLanguage.ES_MX, SDLLanguage.FR_CA, @@ -69,7 +69,7 @@ NSMutableArray* SDLLanguage_values = nil; SDLLanguage.CS_CZ, SDLLanguage.DA_DK, SDLLanguage.NO_NO, - nil]; + ]; } return SDLLanguage_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLLayoutMode.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLLayoutMode.h index 1ac2ab24e..5e5642232 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLLayoutMode.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLLayoutMode.h @@ -13,7 +13,7 @@ @interface SDLLayoutMode : SDLEnum {} +(SDLLayoutMode*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; /** This mode causes the interaction to display the previous set of choices as icons. * diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLLayoutMode.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLLayoutMode.m index 8a0f9d836..ed35f6c9d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLLayoutMode.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLLayoutMode.m @@ -10,7 +10,7 @@ SDLLayoutMode* SDLLayoutMode_LIST_ONLY = nil; SDLLayoutMode* SDLLayoutMode_LIST_WITH_SEARCH = nil; SDLLayoutMode* SDLLayoutMode_KEYBOARD = nil; -NSMutableArray* SDLLayoutMode_values = nil; +NSArray* SDLLayoutMode_values = nil; @implementation SDLLayoutMode @@ -23,15 +23,15 @@ NSMutableArray* SDLLayoutMode_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLLayoutMode_values == nil) { - SDLLayoutMode_values = [[NSMutableArray alloc] initWithObjects: + SDLLayoutMode_values = @[ SDLLayoutMode.ICON_ONLY, SDLLayoutMode.ICON_WITH_SEARCH, SDLLayoutMode.LIST_ONLY, SDLLayoutMode.LIST_WITH_SEARCH, SDLLayoutMode.KEYBOARD, - nil]; + ]; } return SDLLayoutMode_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFiles.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFiles.h index 6e5c7f690..60a8ee661 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFiles.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFiles.h @@ -16,12 +16,12 @@ /** * Constructs a new SDLListFiles object */ --(id) init; +-(instancetype) init; /** * Constructs a new SDLListFiles object indicated by the NSMutableDictionary parameter * <p> * * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFiles.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFiles.m index 591cdf3e6..b17d511e0 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFiles.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFiles.m @@ -8,12 +8,12 @@ @implementation SDLListFiles --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_ListFiles]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFilesResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFilesResponse.h index e880e025e..a67bd16e5 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFilesResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFilesResponse.h @@ -12,8 +12,8 @@ */ @interface SDLListFilesResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSMutableArray* filenames; @property(strong) NSNumber* spaceAvailable; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFilesResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFilesResponse.m index e819c34b7..4671cac36 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFilesResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLListFilesResponse.m @@ -8,12 +8,12 @@ @implementation SDLListFilesResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_ListFiles]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLLockScreenManager.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLLockScreenManager.h index 06f21cb50..7689cea36 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLLockScreenManager.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLLockScreenManager.h @@ -3,10 +3,12 @@ // SmartDeviceLink // +@import Foundation; + +@class SDLHMILevel; +@class SDLLockScreenStatus; +@class SDLOnLockScreenStatus; -#import "SDLHMILevel.h" -#import "SDLLockScreenStatus.h" -#import "SDLOnLockScreenStatus.h" @interface SDLLockScreenManager : NSObject diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLLockScreenManager.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLLockScreenManager.m index 522f1b4ca..62fb7fe3c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLLockScreenManager.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLLockScreenManager.m @@ -5,6 +5,11 @@ #import "SDLLockScreenManager.h" +#import "SDLHMILevel.h" +#import "SDLLockScreenStatus.h" +#import "SDLOnLockScreenStatus.h" + + @interface SDLLockScreenManager () @property (assign, nonatomic) BOOL bHaveDDStatus; @@ -37,9 +42,9 @@ _hmiLevel = hmiLevel; } - if ([SDLHMILevel.HMI_FULL.value isEqualToString:hmiLevel.value] || [SDLHMILevel.HMI_LIMITED.value isEqualToString:hmiLevel.value]) { + if ([SDLHMILevel.FULL.value isEqualToString:hmiLevel.value] || [SDLHMILevel.LIMITED.value isEqualToString:hmiLevel.value]) { _bUserSelected = YES; - } else if ([SDLHMILevel.HMI_NONE.value isEqualToString:hmiLevel.value]) { + } else if ([SDLHMILevel.NONE.value isEqualToString:hmiLevel.value]) { _bUserSelected = NO; } } @@ -56,9 +61,9 @@ - (SDLLockScreenStatus *)lockScreenStatus { - if (_hmiLevel == nil || _hmiLevel == [SDLHMILevel HMI_NONE]) { + if (_hmiLevel == nil || _hmiLevel == [SDLHMILevel NONE]) { return [SDLLockScreenStatus OFF]; - } else if (_hmiLevel == [SDLHMILevel HMI_BACKGROUND]) { + } else if (_hmiLevel == [SDLHMILevel BACKGROUND]) { if (!_bHaveDDStatus) { //we don't have driver distraction, lockscreen is entirely based on userselection @@ -79,7 +84,7 @@ { return [SDLLockScreenStatus OFF]; } - } else if (_hmiLevel == [SDLHMILevel HMI_FULL] || _hmiLevel == [SDLHMILevel HMI_LIMITED]) { + } else if (_hmiLevel == [SDLHMILevel FULL] || _hmiLevel == [SDLHMILevel LIMITED]) { if (_bHaveDDStatus && !_bDriverDistractionStatus) { return [SDLLockScreenStatus OPTIONAL]; } else { diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLLockScreenStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLLockScreenStatus.m index a6b45592b..06f6eded7 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLLockScreenStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLLockScreenStatus.m @@ -11,7 +11,7 @@ SDLLockScreenStatus* SDLLockScreenStatus_OFF = nil; SDLLockScreenStatus* SDLLockScreenStatus_OPTIONAL = nil; SDLLockScreenStatus* SDLLockScreenStatus_REQUIRED = nil; -NSMutableArray* SDLLockScreenStatus_values = nil; +NSArray* SDLLockScreenStatus_values = nil; + (SDLLockScreenStatus *)valueOf:(NSString *)value @@ -26,15 +26,15 @@ NSMutableArray* SDLLockScreenStatus_values = nil; return nil; } -+ (NSMutableArray *)values ++ (NSArray *)values { if (SDLLockScreenStatus_values == nil) { - SDLLockScreenStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLLockScreenStatus_values = @[ SDLLockScreenStatus.OFF, SDLLockScreenStatus.OPTIONAL, SDLLockScreenStatus.REQUIRED, - nil]; + ]; } return SDLLockScreenStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMaintenanceModeStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMaintenanceModeStatus.h index e59c6d38d..b1582f77e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMaintenanceModeStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMaintenanceModeStatus.h @@ -21,7 +21,7 @@ @abstract declare an array that store all possible Maintenance Mode Status inside @result return the array */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract Maintenance Mode Status : Normal diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMaintenanceModeStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMaintenanceModeStatus.m index cc4058c84..e0393e8d4 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMaintenanceModeStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMaintenanceModeStatus.m @@ -9,7 +9,7 @@ SDLMaintenanceModeStatus* SDLMaintenanceModeStatus_NEAR = nil; SDLMaintenanceModeStatus* SDLMaintenanceModeStatus_ACTIVE = nil; SDLMaintenanceModeStatus* SDLMaintenanceModeStatus_FEATURE_NOT_PRESENT = nil; -NSMutableArray* SDLMaintenanceModeStatus_values = nil; +NSArray* SDLMaintenanceModeStatus_values = nil; @implementation SDLMaintenanceModeStatus @@ -22,14 +22,14 @@ NSMutableArray* SDLMaintenanceModeStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLMaintenanceModeStatus_values == nil) { - SDLMaintenanceModeStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLMaintenanceModeStatus_values = @[ SDLMaintenanceModeStatus.NORMAL, SDLMaintenanceModeStatus.NEAR, SDLMaintenanceModeStatus.ACTIVE, SDLMaintenanceModeStatus.FEATURE_NOT_PRESENT, - nil]; + ]; } return SDLMaintenanceModeStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMediaClockFormat.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMediaClockFormat.h index aaf3b39e1..9915ac6ab 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMediaClockFormat.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMediaClockFormat.h @@ -25,7 +25,7 @@ @abstract declare an array that store all possible Media clock formats inside @result return the array */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Media clock format : Clock1 diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMediaClockFormat.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMediaClockFormat.m index cc35e5876..3912741df 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMediaClockFormat.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMediaClockFormat.m @@ -12,7 +12,7 @@ SDLMediaClockFormat* SDLMediaClockFormat_CLOCKTEXT2 = nil; SDLMediaClockFormat* SDLMediaClockFormat_CLOCKTEXT3 = nil; SDLMediaClockFormat* SDLMediaClockFormat_CLOCKTEXT4 = nil; -NSMutableArray* SDLMediaClockFormat_values = nil; +NSArray* SDLMediaClockFormat_values = nil; @implementation SDLMediaClockFormat @@ -25,9 +25,9 @@ NSMutableArray* SDLMediaClockFormat_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLMediaClockFormat_values == nil) { - SDLMediaClockFormat_values = [[NSMutableArray alloc] initWithObjects: + SDLMediaClockFormat_values = @[ SDLMediaClockFormat.CLOCK1, SDLMediaClockFormat.CLOCK2, SDLMediaClockFormat.CLOCK3, @@ -35,7 +35,7 @@ NSMutableArray* SDLMediaClockFormat_values = nil; SDLMediaClockFormat.CLOCKTEXT2, SDLMediaClockFormat.CLOCKTEXT3, SDLMediaClockFormat.CLOCKTEXT4, - nil]; + ]; } return SDLMediaClockFormat_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMenuParams.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMenuParams.h index f747762a3..211088541 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMenuParams.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMenuParams.h @@ -60,12 +60,12 @@ /** * Constructs a newly allocated SDLMenuParams object */ --(id) init; +-(instancetype) init; /** * Constructs a newly allocated SDLMenuParams object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract the unique ID of an existing submenu to which a command will be added diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMenuParams.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMenuParams.m index 6df36cb2d..55f013021 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMenuParams.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMenuParams.m @@ -8,12 +8,12 @@ @implementation SDLMenuParams --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMyKey.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMyKey.h index 4bd6ac6f2..519f6641b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMyKey.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMyKey.h @@ -1,16 +1,15 @@ // SDLMyKey.h // - - #import "SDLRPCMessage.h" -#import "SDLVehicleDataStatus.h" +@class SDLVehicleDataStatus; + @interface SDLMyKey : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLVehicleDataStatus* e911Override; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMyKey.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMyKey.m index 20b35d4ad..843445954 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLMyKey.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLMyKey.m @@ -1,19 +1,20 @@ // SDLMyKey.m // - #import "SDLMyKey.h" #import "SDLNames.h" +#import "SDLVehicleDataStatus.h" + @implementation SDLMyKey --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLNames.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLNames.h index 5dc94cf6a..05e9d8543 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLNames.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLNames.h @@ -7,6 +7,7 @@ #define NAMES_accPedalPosition @"accPedalPosition" #define NAMES_actual @"actual" #define NAMES_AddCommand @"AddCommand" +#define NAMES_addressLines @"addressLines" #define NAMES_AddSubMenu @"AddSubMenu" #define NAMES_airbagStatus @"airbagStatus" #define NAMES_Alert @"Alert" @@ -165,6 +166,9 @@ #define NAMES_length @"length" #define NAMES_limitedCharacterList @"limitedCharacterList" #define NAMES_ListFiles @"ListFiles" +#define NAMES_locationDescription @"locationDescription" +#define NAMES_locationImage @"locationImage" +#define NAMES_locationName @"locationName" #define NAMES_longitudeDegrees @"longitudeDegrees" #define NAMES_longPress @"longPress" #define NAMES_longPressAvailable @"longPressAvailable" @@ -205,12 +209,14 @@ #define NAMES_muteAudio @"muteAudio" #define NAMES_myKey @"myKey" #define NAMES_name @"name" +#define NAMES_navigation @"navigation" #define NAMES_navigationText @"navigationText" #define NAMES_navigationText1 @"navigationText1" #define NAMES_navigationText2 @"navigationText2" #define NAMES_nextTurnIcon @"nextTurnIcon" #define NAMES_ngnMediaScreenAppName @"ngnMediaScreenAppName" #define NAMES_notification @"notification" +#define NAMES_number @"number" #define NAMES_numCustomPresetsAvailable @"numCustomPresetsAvailable" #define NAMES_numTicks @"numTicks" #define NAMES_odometer @"odometer" @@ -253,6 +259,8 @@ #define NAMES_PerformInteraction @"PerformInteraction" #define NAMES_permissionItem @"permissionItem" #define NAMES_persistentFile @"persistentFile" +#define NAMES_phoneCall @"phoneCall" +#define NAMES_phoneNumber @"phoneNumber" #define NAMES_phoneRoaming @"phoneRoaming" #define NAMES_playTone @"playTone" #define NAMES_position @"position" @@ -302,6 +310,7 @@ #define NAMES_secondaryImage @"secondaryImage" #define NAMES_secondaryText @"secondaryText" #define NAMES_seconds @"seconds" +#define NAMES_SendLocation @"SendLocation" #define NAMES_SetAppIcon @"SetAppIcon" #define NAMES_SetDisplayLayout @"SetDisplayLayout" #define NAMES_SetGlobalProperties @"SetGlobalProperties" @@ -341,6 +350,7 @@ #define NAMES_systemContext @"systemContext" #define NAMES_systemFile @"systemFile" #define NAMES_SystemRequest @"SystemRequest" +#define NAMES_DialNumber @"DialNumber" #define NAMES_targetID @"targetID" #define NAMES_templatesAvailable @"templatesAvailable" #define NAMES_tertiaryText @"tertiaryText" diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLObjectWithPriority.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLObjectWithPriority.h index eff2f642a..2f2c5d0f2 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLObjectWithPriority.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLObjectWithPriority.h @@ -5,11 +5,16 @@ @import Foundation; + @interface SDLObjectWithPriority : NSObject @property (strong) id object; @property (assign) NSInteger priority; +- (instancetype)initWithObject:(id)object priority:(NSInteger)priority NS_DESIGNATED_INITIALIZER; + ++ (instancetype)objectWithObject:(id)object priority:(NSInteger)priority; + @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLObjectWithPriority.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLObjectWithPriority.m index 565868dcb..57e5d0f40 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLObjectWithPriority.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLObjectWithPriority.m @@ -5,6 +5,27 @@ #import "SDLObjectWithPriority.h" + @implementation SDLObjectWithPriority +- (instancetype)initWithObject:(id)object priority:(NSInteger)priority { + self = [super init]; + if (self == nil) { + return nil; + } + + self.object = object; + self.priority = priority; + + return self; +} + +- (instancetype)init { + return [self initWithObject:nil priority:NSIntegerMax]; +} + ++ (instancetype)objectWithObject:(id)object priority:(NSInteger)priority { + return [[self alloc] initWithObject:object priority:priority]; +} + @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAppInterfaceUnregistered.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAppInterfaceUnregistered.h index 2a1899478..bf78505a4 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAppInterfaceUnregistered.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAppInterfaceUnregistered.h @@ -1,11 +1,10 @@ // SDLOnAppInterfaceUnregistered.h // - - #import "SDLRPCNotification.h" -#import "SDLAppInterfaceUnregisteredReason.h" +@class SDLAppInterfaceUnregisteredReason; + /** * Notifies an application that its interface registration has been terminated. This means that all SDL resources @@ -46,12 +45,12 @@ /** *Constructs a newly allocated SDLOnAppInterfaceUnregistered object */ --(id) init; +-(instancetype) init; /** *<p>Constructs a newly allocated SDLOnAppInterfaceUnregistered object indicated by the NSMutableDictionary parameter</p> *@param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract the reason application's interface was terminated diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAppInterfaceUnregistered.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAppInterfaceUnregistered.m index b7a664370..44dd32ffd 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAppInterfaceUnregistered.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAppInterfaceUnregistered.m @@ -1,19 +1,20 @@ // SDLOnAppInterfaceUnregistered.m // - #import "SDLOnAppInterfaceUnregistered.h" +#import "SDLAppInterfaceUnregisteredReason.h" #import "SDLNames.h" + @implementation SDLOnAppInterfaceUnregistered --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnAppInterfaceUnregistered]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAudioPassThru.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAudioPassThru.h index 258f0332c..1e117f7a1 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAudioPassThru.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAudioPassThru.h @@ -28,10 +28,10 @@ /** *Constructs a newly allocated SDLOnAudioPassThru object */ --(id) init; +-(instancetype) init; /** *<p>Constructs a newly allocated SDLOnAudioPassThru object indicated by the NSMutableDictionary parameter</p> *@param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAudioPassThru.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAudioPassThru.m index bb393b57a..5235bf3ce 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAudioPassThru.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnAudioPassThru.m @@ -8,12 +8,12 @@ @implementation SDLOnAudioPassThru --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnAudioPassThru]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonEvent.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonEvent.h index bed791623..6ab9dba9e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonEvent.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonEvent.h @@ -1,12 +1,11 @@ // SDLOnButtonEvent.h // - - #import "SDLRPCNotification.h" -#import "SDLButtonName.h" -#import "SDLButtonEventMode.h" +@class SDLButtonName; +@class SDLButtonEventMode; + /** * Notifies application that user has depressed or released a button to which @@ -85,7 +84,7 @@ /** *Constructs a newly allocated SDLOnButtonEvent object */ --(id) init; +-(instancetype) init; /** * <p> * Constructs a newly allocated SDLOnButtonEvent object indicated by the @@ -94,7 +93,7 @@ * * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract the name of the button diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonEvent.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonEvent.m index f0b42de18..4272e610f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonEvent.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonEvent.m @@ -1,19 +1,21 @@ // SDLOnButtonEvent.m // - #import "SDLOnButtonEvent.h" +#import "SDLButtonName.h" +#import "SDLButtonEventMode.h" #import "SDLNames.h" + @implementation SDLOnButtonEvent --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnButtonEvent]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonPress.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonPress.h index 014f328a9..bf48a43e8 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonPress.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonPress.h @@ -1,12 +1,11 @@ // SDLOnButtonPress.h // - - #import "SDLRPCNotification.h" -#import "SDLButtonName.h" -#import "SDLButtonPressMode.h" +@class SDLButtonName; +@class SDLButtonPressMode; + /** * <p> @@ -92,7 +91,7 @@ /** *Constructs a newly allocated SDLOnButtonPress object */ --(id) init; +-(instancetype) init; /** * <p> * Constructs a newly allocated SDLOnButtonPress object indicated by the @@ -101,7 +100,7 @@ * * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract the button's name diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonPress.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonPress.m index 1dabe7007..2297315de 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonPress.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnButtonPress.m @@ -1,19 +1,21 @@ // SDLOnButtonPress.m // - #import "SDLOnButtonPress.h" +#import "SDLButtonName.h" +#import "SDLButtonPressMode.h" #import "SDLNames.h" + @implementation SDLOnButtonPress --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnButtonPress]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnCommand.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnCommand.h index 7c5e76439..c26c7de5d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnCommand.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnCommand.h @@ -1,11 +1,10 @@ // SDLOnCommand.h // - - #import "SDLRPCNotification.h" -#import "SDLTriggerSource.h" +@class SDLTriggerSource; + /** * This is called when a command was selected via VR after pressing the PTT button, or selected from the menu after @@ -57,12 +56,12 @@ /** *Constructs a newly allocated SDLRPCNotification object */ --(id) init; +-(instancetype) init; /** *<p>Constructs a newly allocated SDLRPCNotification object indicated by the NSMutableDictionary parameter</p> *@param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract the Command's ID diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnCommand.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnCommand.m index 69a92cc4d..53434c3c0 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnCommand.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnCommand.m @@ -1,19 +1,20 @@ // SDLOnCommand.m // - #import "SDLOnCommand.h" #import "SDLNames.h" +#import "SDLTriggerSource.h" + @implementation SDLOnCommand --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnCommand]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnDriverDistraction.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnDriverDistraction.h index 5d9a9b3a2..47f08729b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnDriverDistraction.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnDriverDistraction.h @@ -1,11 +1,10 @@ // SDLOnDriverDistraction.h // - - #import "SDLRPCNotification.h" -#import "SDLDriverDistractionState.h" +@class SDLDriverDistractionState; + /** * <p>Notifies the application of the current driver distraction state (whether driver distraction rules are in effect, or @@ -22,7 +21,7 @@ * <ul><li>Any</li></ul> * </ul> * <p></p> - * <b>Parameter List:</b> + * <b>Parameter Lists:</b> * <table border="1" rules="all"> * <tr> * <th>Name</th> @@ -44,12 +43,12 @@ /** *Constructs a newly allocated SDLOnDriverDistraction object */ --(id) init; +-(instancetype) init; /** *<p>Constructs a newly allocated SDLOnDriverDistraction object indicated by the NSMutableDictionary parameter</p> *@param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract the driver distraction state(i.e. whether driver distraction rules are in effect, or not) diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnDriverDistraction.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnDriverDistraction.m index 3cd206af0..622d77ffd 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnDriverDistraction.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnDriverDistraction.m @@ -1,19 +1,20 @@ // SDLOnDriverDistraction.m // - #import "SDLOnDriverDistraction.h" +#import "SDLDriverDistractionState.h" #import "SDLNames.h" + @implementation SDLOnDriverDistraction --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnDriverDistraction]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnEncodedSyncPData.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnEncodedSyncPData.h index 969fb4045..50684b1bf 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnEncodedSyncPData.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnEncodedSyncPData.h @@ -1,14 +1,13 @@ // SDLOnEncodedSyncPData.h // - - #import "SDLRPCNotification.h" + @interface SDLOnEncodedSyncPData : SDLRPCNotification {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSMutableArray* data; @property(strong) NSString* URL; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnEncodedSyncPData.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnEncodedSyncPData.m index 2c87a71de..3907c067d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnEncodedSyncPData.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnEncodedSyncPData.m @@ -1,19 +1,19 @@ // SDLOnEncodedSyncPData.m // - #import "SDLOnEncodedSyncPData.h" #import "SDLNames.h" + @implementation SDLOnEncodedSyncPData --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnEncodedSyncPData]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHMIStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHMIStatus.h index 910cadb2f..7f14374b7 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHMIStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHMIStatus.h @@ -1,13 +1,12 @@ // SDLOnHMIStatus.h // - - #import "SDLRPCNotification.h" -#import "SDLHMILevel.h" -#import "SDLAudioStreamingState.h" -#import "SDLSystemContext.h" +@class SDLAudioStreamingState; +@class SDLHMILevel; +@class SDLSystemContext; + /** * <p>Notifies an application that HMI conditions have changed for the application. This indicates whether the application @@ -67,12 +66,12 @@ /** *Constructs a newly allocated SDLOnHMIStatus object */ --(id) init; +-(instancetype) init; /** *<p>Constructs a newly allocated SDLOnHMIStatus object indicated by the NSMutableDictionary parameter</p> *@param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract SDLHMILevel in effect for the application * @discussion diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHMIStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHMIStatus.m index ae5b78dd2..73f5eccd6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHMIStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHMIStatus.m @@ -1,19 +1,22 @@ // SDLOnHMIStatus.m // - #import "SDLOnHMIStatus.h" +#import "SDLAudioStreamingState.h" +#import "SDLHMILevel.h" #import "SDLNames.h" +#import "SDLSystemContext.h" + @implementation SDLOnHMIStatus --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnHMIStatus]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHashChange.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHashChange.h index ba2e91b81..dc9564ab6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHashChange.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHashChange.h @@ -7,8 +7,8 @@ @interface SDLOnHashChange : SDLRPCNotification {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSString* hashID; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHashChange.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHashChange.m index 7d5546641..85566fa68 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHashChange.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnHashChange.m @@ -8,12 +8,12 @@ @implementation SDLOnHashChange --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnHashChange]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnKeyboardInput.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnKeyboardInput.h index d405c4953..debb53835 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnKeyboardInput.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnKeyboardInput.h @@ -1,16 +1,15 @@ // SDLOnKeyboardInput.h // - - #import "SDLRPCNotification.h" -#import "SDLKeyboardEvent.h" +@class SDLKeyboardEvent; + @interface SDLOnKeyboardInput : SDLRPCNotification {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLKeyboardEvent* event; @property(strong) NSString* data; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnKeyboardInput.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnKeyboardInput.m index 715a61fbe..e1b940869 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnKeyboardInput.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnKeyboardInput.m @@ -1,19 +1,20 @@ // SDLOnKeyboardInput.m // - #import "SDLOnKeyboardInput.h" +#import "SDLKeyboardEvent.h" #import "SDLNames.h" + @implementation SDLOnKeyboardInput --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnKeyboardInput]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLanguageChange.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLanguageChange.h index ae4aebf58..c057e7643 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLanguageChange.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLanguageChange.h @@ -1,11 +1,10 @@ // SDLOnLanguageChange.h // - - #import "SDLRPCNotification.h" -#import "SDLLanguage.h" +@class SDLLanguage; + /** * Provides information to what language the SDL HMI language was changed @@ -61,12 +60,12 @@ /** *Constructs a newly allocated SDLOnLanguageChange object */ --(id) init; +-(instancetype) init; /** *<p>Constructs a newly allocated SDLOnLanguageChange object indicated by the NSMutableDictionary parameter</p> *@param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract language that current SDL voice engine(VR+TTS) use * @discussion diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLanguageChange.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLanguageChange.m index 78c489579..19a7fc831 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLanguageChange.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLanguageChange.m @@ -1,19 +1,20 @@ // SDLOnLanguageChange.m // - #import "SDLOnLanguageChange.h" +#import "SDLLanguage.h" #import "SDLNames.h" + @implementation SDLOnLanguageChange --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnLanguageChange]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLockScreenStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLockScreenStatus.h index f329888bb..489a791b2 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLockScreenStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLockScreenStatus.h @@ -3,14 +3,12 @@ // SmartDeviceLink // -#import "SDLLockScreenStatus.h" - #import "SDLRPCNotification.h" - @class SDLHMILevel; @class SDLLockScreenStatus; + /** * To help prevent driver distraction, any SmartDeviceLink application is required to implement a lockscreen that must be enforced while the application is active on the system while the vehicle is in motion. * @@ -21,8 +19,8 @@ */ @interface SDLOnLockScreenStatus : SDLRPCNotification -- (id)init; -- (id)initWithDictionary:(NSMutableDictionary *)dict; +- (instancetype)init; +- (instancetype)initWithDictionary:(NSMutableDictionary *)dict; /** * <p>Get the current driver distraction status(i.e. whether driver distraction rules are in effect, or not)</p> diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLockScreenStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLockScreenStatus.m index 678a2cb52..5e73fbef8 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLockScreenStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnLockScreenStatus.m @@ -8,16 +8,17 @@ #import "SDLHMILevel.h" #import "SDLLockScreenStatus.h" + @implementation SDLOnLockScreenStatus -- (id)init { +- (instancetype)init { if (self = [super initWithName:@"OnLockScreenStatus"]) { } return self; } -- (id)initWithDictionary:(NSMutableDictionary*) dict { +- (instancetype)initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) { } @@ -51,7 +52,7 @@ - (SDLHMILevel *)hmiLevel { NSObject* obj = [parameters objectForKey:@"hmilevel"]; - if ([obj isKindOfClass:SDLLockScreenStatus.class]) { + if ([obj isKindOfClass:SDLHMILevel.class]) { return (SDLHMILevel *)obj; } else { return [SDLHMILevel valueOf:(NSString*)obj]; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnPermissionsChange.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnPermissionsChange.h index 666f5944a..7338bc417 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnPermissionsChange.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnPermissionsChange.h @@ -1,10 +1,9 @@ // SDLOnPermissionsChange.h // - - #import "SDLRPCNotification.h" + /** * Provides update to app of which sets of functions are available * <p> @@ -51,12 +50,12 @@ /** *Constructs a newly allocated SDLOnPermissionsChange object */ --(id) init; +-(instancetype) init; /** *<p>Constructs a newly allocated SDLOnPermissionsChange object indicated by the NSMutableDictionary parameter</p> *@param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract an Array of SDLPermissionItem object describing change in permissions for a given set of RPCs diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnPermissionsChange.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnPermissionsChange.m index 8a7b6909c..5d70d9e4e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnPermissionsChange.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnPermissionsChange.m @@ -1,20 +1,20 @@ // SDLOnPermissionsChange.m // - #import "SDLOnPermissionsChange.h" #import "SDLNames.h" #import "SDLPermissionItem.h" + @implementation SDLOnPermissionsChange --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnPermissionsChange]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSyncPData.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSyncPData.h index 7c8d0ad16..c93c7c8a2 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSyncPData.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSyncPData.h @@ -7,8 +7,8 @@ @interface SDLOnSyncPData : SDLRPCNotification {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSString* URL; @property(strong) NSNumber* Timeout; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSyncPData.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSyncPData.m index 04b3a4bae..2be4ee4da 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSyncPData.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSyncPData.m @@ -8,12 +8,12 @@ @implementation SDLOnSyncPData --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnSyncPData]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSystemRequest.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSystemRequest.h index 28ae674b4..4f3fb0a89 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSystemRequest.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSystemRequest.h @@ -1,17 +1,16 @@ // SDLOnSystemRequest.h // - - #import "SDLRPCNotification.h" -#import "SDLRequestType.h" -#import "SDLFileType.h" +@class SDLFileType; +@class SDLRequestType; + @interface SDLOnSystemRequest : SDLRPCNotification {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLRequestType* requestType; @property(strong) NSString* url; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSystemRequest.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSystemRequest.m index a8814f87b..74fdf9134 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSystemRequest.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnSystemRequest.m @@ -1,19 +1,21 @@ // SDLOnSystemRequest.m // - #import "SDLOnSystemRequest.h" +#import "SDLFileType.h" #import "SDLNames.h" +#import "SDLRequestType.h" + @implementation SDLOnSystemRequest --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnSystemRequest]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTBTClientState.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTBTClientState.h index e9b5af928..73ffb23c5 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTBTClientState.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTBTClientState.h @@ -1,16 +1,15 @@ // SDLOnTBTClientState.h // - - #import "SDLRPCNotification.h" -#import "SDLTBTState.h" +@class SDLTBTState; + @interface SDLOnTBTClientState : SDLRPCNotification {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLTBTState* state; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTBTClientState.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTBTClientState.m index 5f249ed06..70f5e087c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTBTClientState.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTBTClientState.m @@ -1,19 +1,20 @@ // SDLOnTBTClientState.m // - #import "SDLOnTBTClientState.h" #import "SDLNames.h" +#import "SDLTBTState.h" + @implementation SDLOnTBTClientState --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnTBTClientState]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTouchEvent.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTouchEvent.h index f433cfee1..807d879a6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTouchEvent.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTouchEvent.h @@ -1,16 +1,15 @@ // SDLOnTouchEvent.h // - - #import "SDLRPCNotification.h" -#import "SDLTouchType.h" +@class SDLTouchType; + @interface SDLOnTouchEvent : SDLRPCNotification {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLTouchType* type; @property(strong) NSMutableArray* event; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTouchEvent.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTouchEvent.m index 407aa3fe3..3e9ff5565 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTouchEvent.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnTouchEvent.m @@ -1,20 +1,21 @@ // SDLOnTouchEvent.m // - #import "SDLOnTouchEvent.h" #import "SDLNames.h" #import "SDLTouchEvent.h" +#import "SDLTouchType.h" + @implementation SDLOnTouchEvent --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnTouchEvent]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnVehicleData.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnVehicleData.h index 46830bcaf..73b322dad 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnVehicleData.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnVehicleData.h @@ -1,25 +1,24 @@ // SDLOnVehicleData.h // - - #import "SDLRPCNotification.h" -#import "SDLGPSData.h" -#import "SDLComponentVolumeStatus.h" -#import "SDLPRNDL.h" -#import "SDLTireStatus.h" -#import "SDLBeltStatus.h" -#import "SDLBodyInformation.h" -#import "SDLDeviceStatus.h" -#import "SDLVehicleDataEventStatus.h" -#import "SDLWiperStatus.h" -#import "SDLHeadLampStatus.h" -#import "SDLECallInfo.h" -#import "SDLAirbagStatus.h" -#import "SDLEmergencyEvent.h" -#import "SDLClusterModeStatus.h" -#import "SDLMyKey.h" +@class SDLAirbagStatus; +@class SDLBeltStatus; +@class SDLBodyInformation; +@class SDLClusterModeStatus; +@class SDLComponentVolumeStatus; +@class SDLDeviceStatus; +@class SDLECallInfo; +@class SDLEmergencyEvent; +@class SDLGPSData; +@class SDLHeadLampStatus; +@class SDLMyKey; +@class SDLPRNDL; +@class SDLTireStatus; +@class SDLVehicleDataEventStatus; +@class SDLWiperStatus; + /** * Request vehicle data. @@ -32,14 +31,14 @@ /** * @abstract Constructs a new SDLOnVehicleData object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLOnVehicleData object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract A SDLGPSData* value. See GPSData. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnVehicleData.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnVehicleData.m index 9c4280ebf..077c69eaf 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnVehicleData.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLOnVehicleData.m @@ -1,19 +1,34 @@ // SDLOnVehicleData.m // - #import "SDLOnVehicleData.h" +#import "SDLAirbagStatus.h" +#import "SDLBeltStatus.h" +#import "SDLBodyInformation.h" +#import "SDLClusterModeStatus.h" +#import "SDLComponentVolumeStatus.h" +#import "SDLDeviceStatus.h" +#import "SDLECallInfo.h" +#import "SDLEmergencyEvent.h" +#import "SDLGPSData.h" +#import "SDLHeadLampStatus.h" +#import "SDLMyKey.h" #import "SDLNames.h" +#import "SDLPRNDL.h" +#import "SDLTireStatus.h" +#import "SDLVehicleDataEventStatus.h" +#import "SDLWiperStatus.h" + @implementation SDLOnVehicleData --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_OnVehicleData]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPRNDL.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPRNDL.h index b307390d8..150a65b10 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPRNDL.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPRNDL.h @@ -22,7 +22,7 @@ @abstract declare an array to store all possible SDLPRNDL values @result return the array */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Parking diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPRNDL.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPRNDL.m index c9b817ed1..3b9a3d533 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPRNDL.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPRNDL.m @@ -21,7 +21,7 @@ SDLPRNDL* SDLPRNDL_EIGHTH = nil; SDLPRNDL* SDLPRNDL_UNKNOWN = nil; SDLPRNDL* SDLPRNDL_FAULT = nil; -NSMutableArray* SDLPRNDL_values = nil; +NSArray* SDLPRNDL_values = nil; @implementation SDLPRNDL @@ -34,9 +34,9 @@ NSMutableArray* SDLPRNDL_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLPRNDL_values == nil) { - SDLPRNDL_values = [[NSMutableArray alloc] initWithObjects: + SDLPRNDL_values = @[ SDLPRNDL.PARK, SDLPRNDL.REVERSE, SDLPRNDL.NEUTRAL, @@ -53,7 +53,7 @@ NSMutableArray* SDLPRNDL_values = nil; SDLPRNDL.EIGHTH, SDLPRNDL.UNKNOWN, SDLPRNDL.FAULT, - nil]; + ]; } return SDLPRNDL_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLParameterPermissions.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLParameterPermissions.h index b8e01fb38..cea3f09be 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLParameterPermissions.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLParameterPermissions.h @@ -47,12 +47,12 @@ /** *@abstract Constructs a newly allocated SDLParameterPermissions object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a newly allocated SDLParameterPermissions object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract A set of all parameters that are permitted for this given RPC. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLParameterPermissions.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLParameterPermissions.m index 635531193..1d313aceb 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLParameterPermissions.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLParameterPermissions.m @@ -8,12 +8,12 @@ @implementation SDLParameterPermissions --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThru.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThru.h index 77b69cf6d..e9db538f7 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThru.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThru.h @@ -1,13 +1,12 @@ // SDLPerformAudioPassThru.h // - - #import "SDLRPCRequest.h" -#import "SDLSamplingRate.h" -#import "SDLBitsPerSample.h" -#import "SDLAudioType.h" +@class SDLSamplingRate; +@class SDLBitsPerSample; +@class SDLAudioType; + /** * This will open an audio pass thru session. By doing so the app can receive @@ -26,12 +25,12 @@ /** * @abstract Constructs a new SDLPerformAudioPassThru object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLPerformAudioPassThru object indicated by the NSMutableDictionary * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract initial prompt which will be spoken before opening the audio pass diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThru.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThru.m index 607b98d6e..3845287f6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThru.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThru.m @@ -4,17 +4,21 @@ #import "SDLPerformAudioPassThru.h" +#import "SDLAudioType.h" +#import "SDLBitsPerSample.h" #import "SDLNames.h" +#import "SDLSamplingRate.h" #import "SDLTTSChunk.h" + @implementation SDLPerformAudioPassThru --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_PerformAudioPassThru]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThruResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThruResponse.h index 865a7292c..dc7b56500 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThruResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThruResponse.h @@ -15,11 +15,11 @@ /** * @abstract Constructs a new SDLPerformAudioPassThruResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLPerformAudioPassThruResponse object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThruResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThruResponse.m index 5648152be..e4edc35f1 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThruResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformAudioPassThruResponse.m @@ -8,12 +8,12 @@ @implementation SDLPerformAudioPassThruResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_PerformAudioPassThru]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteraction.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteraction.h index 907dcc993..d2b7eaf0b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteraction.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteraction.h @@ -5,8 +5,9 @@ #import "SDLRPCRequest.h" -#import "SDLInteractionMode.h" -#import "SDLLayoutMode.h" +@class SDLInteractionMode; +@class SDLLayoutMode; + /** * Performs an application-initiated interaction in which the user can select a @@ -28,12 +29,12 @@ /** * @abstract Constructs a new SDLPerformInteraction object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLPerformInteraction object indicated by the NSMutableDictionary * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract The Text that Displayed when the interaction begins. This text may diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteraction.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteraction.m index 2a6848a21..42dd66d0d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteraction.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteraction.m @@ -5,17 +5,19 @@ #import "SDLPerformInteraction.h" #import "SDLNames.h" +#import "SDLInteractionMode.h" +#import "SDLLayoutMode.h" #import "SDLTTSChunk.h" -#import "SDLVrHelpItem.h" +#import "SDLVRHelpItem.h" @implementation SDLPerformInteraction --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_PerformInteraction]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } @@ -146,12 +148,12 @@ -(NSMutableArray*) vrHelp { NSMutableArray* array = [parameters objectForKey:NAMES_vrHelp]; - if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLVrHelpItem.class]) { + if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLVRHelpItem.class]) { return array; } else { NSMutableArray* newList = [NSMutableArray arrayWithCapacity:[array count]]; for (NSDictionary* dict in array) { - [newList addObject:[[SDLVrHelpItem alloc] initWithDictionary:(NSMutableDictionary*)dict]]; + [newList addObject:[[SDLVRHelpItem alloc] initWithDictionary:(NSMutableDictionary*)dict]]; } return newList; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteractionResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteractionResponse.h index f0435b235..a971d9c43 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteractionResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteractionResponse.h @@ -5,7 +5,8 @@ #import "SDLRPCResponse.h" -#import "SDLTriggerSource.h" +@class SDLTriggerSource; + /** * PerformInteraction Response is sent, when SDLPerformInteraction has been called @@ -17,12 +18,12 @@ /** * @abstract Constructs a new SDLPerformInteractionResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLPerformInteractionResponse object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract The application-scoped identifier that uniquely identifies this choice. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteractionResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteractionResponse.m index 919b25d78..9c0cdab56 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteractionResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPerformInteractionResponse.m @@ -5,15 +5,17 @@ #import "SDLPerformInteractionResponse.h" #import "SDLNames.h" +#import "SDLTriggerSource.h" + @implementation SDLPerformInteractionResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_PerformInteraction]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionItem.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionItem.h index 1851a912c..4e3da6e4b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionItem.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionItem.h @@ -1,17 +1,16 @@ // SDLPermissionItem.h // - - #import "SDLRPCMessage.h" -#import "SDLHMIPermissions.h" -#import "SDLParameterPermissions.h" +@class SDLHMIPermissions; +@class SDLParameterPermissions; + @interface SDLPermissionItem : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSString* rpcName; @property(strong) SDLHMIPermissions* hmiPermissions; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionItem.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionItem.m index 37b777ebc..dfae14479 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionItem.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionItem.m @@ -1,19 +1,21 @@ // SDLPermissionItem.m // - #import "SDLPermissionItem.h" +#import "SDLHMIPermissions.h" #import "SDLNames.h" +#import "SDLParameterPermissions.h" + @implementation SDLPermissionItem --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionStatus.h index e776fdfcd..8435141b2 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionStatus.h @@ -22,7 +22,7 @@ @abstract declare an array to store all possible SDLPermissionStatus values @result return the array */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionStatus.m index 8a7612104..532fac2f2 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPermissionStatus.m @@ -9,7 +9,7 @@ SDLPermissionStatus* SDLPermissionStatus_DISALLOWED = nil; SDLPermissionStatus* SDLPermissionStatus_USER_DISALLOWED = nil; SDLPermissionStatus* SDLPermissionStatus_USER_CONSENT_PENDING = nil; -NSMutableArray* SDLPermissionStatus_values = nil; +NSArray* SDLPermissionStatus_values = nil; @implementation SDLPermissionStatus @@ -22,14 +22,14 @@ NSMutableArray* SDLPermissionStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLPermissionStatus_values == nil) { - SDLPermissionStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLPermissionStatus_values = @[ SDLPermissionStatus.ALLOWED, SDLPermissionStatus.DISALLOWED, SDLPermissionStatus.USER_DISALLOWED, SDLPermissionStatus.USER_CONSENT_PENDING, - nil]; + ]; } return SDLPermissionStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeQualificationStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeQualificationStatus.h index e50a3697b..fa1717915 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeQualificationStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeQualificationStatus.h @@ -8,7 +8,7 @@ @interface SDLPowerModeQualificationStatus : SDLEnum {} +(SDLPowerModeQualificationStatus*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; +(SDLPowerModeQualificationStatus*) POWER_MODE_UNDEFINED; +(SDLPowerModeQualificationStatus*) POWER_MODE_EVALUATION_IN_PROGRESS; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeQualificationStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeQualificationStatus.m index 75b36bf33..afb3ff8a3 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeQualificationStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeQualificationStatus.m @@ -9,7 +9,7 @@ SDLPowerModeQualificationStatus* SDLPowerModeQualificationStatus_POWER_MODE_EVAL SDLPowerModeQualificationStatus* SDLPowerModeQualificationStatus_NOT_DEFINED = nil; SDLPowerModeQualificationStatus* SDLPowerModeQualificationStatus_POWER_MODE_OK = nil; -NSMutableArray* SDLPowerModeQualificationStatus_values = nil; +NSArray* SDLPowerModeQualificationStatus_values = nil; @implementation SDLPowerModeQualificationStatus @@ -22,14 +22,14 @@ NSMutableArray* SDLPowerModeQualificationStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLPowerModeQualificationStatus_values == nil) { - SDLPowerModeQualificationStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLPowerModeQualificationStatus_values = @[ SDLPowerModeQualificationStatus.POWER_MODE_UNDEFINED, SDLPowerModeQualificationStatus.POWER_MODE_EVALUATION_IN_PROGRESS, SDLPowerModeQualificationStatus.NOT_DEFINED, SDLPowerModeQualificationStatus.POWER_MODE_OK, - nil]; + ]; } return SDLPowerModeQualificationStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeStatus.h index 00b889da2..0370cda33 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeStatus.h @@ -8,7 +8,7 @@ @interface SDLPowerModeStatus : SDLEnum {} +(SDLPowerModeStatus*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; +(SDLPowerModeStatus*) KEY_OUT; +(SDLPowerModeStatus*) KEY_RECENTLY_OUT; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeStatus.m index 93548f801..698b1163b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPowerModeStatus.m @@ -14,7 +14,7 @@ SDLPowerModeStatus* SDLPowerModeStatus_IGNITION_ON_2 = nil; SDLPowerModeStatus* SDLPowerModeStatus_RUNNING_2 = nil; SDLPowerModeStatus* SDLPowerModeStatus_CRANK_3 = nil; -NSMutableArray* SDLPowerModeStatus_values = nil; +NSArray* SDLPowerModeStatus_values = nil; @implementation SDLPowerModeStatus @@ -27,9 +27,9 @@ NSMutableArray* SDLPowerModeStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLPowerModeStatus_values == nil) { - SDLPowerModeStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLPowerModeStatus_values = @[ SDLPowerModeStatus.KEY_OUT, SDLPowerModeStatus.KEY_RECENTLY_OUT, SDLPowerModeStatus.KEY_APPROVED_0, @@ -39,7 +39,7 @@ NSMutableArray* SDLPowerModeStatus_values = nil; SDLPowerModeStatus.IGNITION_ON_2, SDLPowerModeStatus.RUNNING_2, SDLPowerModeStatus.CRANK_3, - nil]; + ]; } return SDLPowerModeStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPredefinedLayout.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPredefinedLayout.h index ec750b643..80ada66c1 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPredefinedLayout.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPredefinedLayout.h @@ -8,7 +8,7 @@ @interface SDLPredefinedLayout : SDLEnum {} +(SDLPredefinedLayout*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; +(SDLPredefinedLayout*) DEFAULT; +(SDLPredefinedLayout*) MEDIA; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPredefinedLayout.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPredefinedLayout.m index 41f2dcb13..34ecbf217 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPredefinedLayout.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPredefinedLayout.m @@ -25,7 +25,7 @@ SDLPredefinedLayout* SDLPredefinedLayout_LARGE_GRAPHIC_WITH_SOFTBUTTONS = nil; SDLPredefinedLayout* SDLPredefinedLayout_DOUBLE_GRAPHIC_WITH_SOFTBUTTONS = nil; SDLPredefinedLayout* SDLPredefinedLayout_LARGE_GRAPHIC_ONLY = nil; -NSMutableArray* SDLPredefinedLayout_values = nil; +NSArray* SDLPredefinedLayout_values = nil; @implementation SDLPredefinedLayout @@ -38,9 +38,9 @@ NSMutableArray* SDLPredefinedLayout_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLPredefinedLayout_values == nil) { - SDLPredefinedLayout_values = [[NSMutableArray alloc] initWithObjects: + SDLPredefinedLayout_values = @[ SDLPredefinedLayout.DEFAULT, SDLPredefinedLayout.MEDIA, SDLPredefinedLayout.NON_MEDIA, @@ -61,7 +61,7 @@ NSMutableArray* SDLPredefinedLayout_values = nil; SDLPredefinedLayout.LARGE_GRAPHIC_WITH_SOFTBUTTONS, SDLPredefinedLayout.DOUBLE_GRAPHIC_WITH_SOFTBUTTONS, SDLPredefinedLayout.LARGE_GRAPHIC_ONLY, - nil]; + ]; } return SDLPredefinedLayout_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrerecordedSpeech.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrerecordedSpeech.h index fa184dd51..de53d0cc0 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrerecordedSpeech.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrerecordedSpeech.h @@ -8,7 +8,7 @@ @interface SDLPrerecordedSpeech : SDLEnum {} +(SDLPrerecordedSpeech*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; +(SDLPrerecordedSpeech*) HELP_JINGLE; +(SDLPrerecordedSpeech*) INITIAL_JINGLE; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrerecordedSpeech.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrerecordedSpeech.m index d2704a69a..f47e8efa5 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrerecordedSpeech.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrerecordedSpeech.m @@ -10,7 +10,7 @@ SDLPrerecordedSpeech* SDLPrerecordedSpeech_LISTEN_JINGLE = nil; SDLPrerecordedSpeech* SDLPrerecordedSpeech_POSITIVE_JINGLE = nil; SDLPrerecordedSpeech* SDLPrerecordedSpeech_NEGATIVE_JINGLE = nil; -NSMutableArray* SDLPrerecordedSpeech_values = nil; +NSArray* SDLPrerecordedSpeech_values = nil; @implementation SDLPrerecordedSpeech @@ -23,15 +23,15 @@ NSMutableArray* SDLPrerecordedSpeech_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLPrerecordedSpeech_values == nil) { - SDLPrerecordedSpeech_values = [[NSMutableArray alloc] initWithObjects: + SDLPrerecordedSpeech_values = @[ SDLPrerecordedSpeech.HELP_JINGLE, SDLPrerecordedSpeech.INITIAL_JINGLE, SDLPrerecordedSpeech.LISTEN_JINGLE, SDLPrerecordedSpeech.POSITIVE_JINGLE, SDLPrerecordedSpeech.NEGATIVE_JINGLE, - nil]; + ]; } return SDLPrerecordedSpeech_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPresetBankCapabilities.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPresetBankCapabilities.h index 939cc765c..a83a332a1 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPresetBankCapabilities.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPresetBankCapabilities.h @@ -30,12 +30,12 @@ /** * @abstract Constructs a newly allocated SDLPresetBankCapabilities object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a newly allocated SDLPresetBankCapabilities object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract if Onscreen custom presets are available. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPresetBankCapabilities.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPresetBankCapabilities.m index 899f5ce40..7a16e8b95 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPresetBankCapabilities.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPresetBankCapabilities.m @@ -8,12 +8,12 @@ @implementation SDLPresetBankCapabilities --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrimaryAudioSource.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrimaryAudioSource.h index ce3f637a2..8fe83dad6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrimaryAudioSource.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrimaryAudioSource.h @@ -22,7 +22,7 @@ @abstract declare an array to store all possible SDLPrimaryAudioSource values @result return the array */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Currently no source selected diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrimaryAudioSource.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrimaryAudioSource.m index d070a7af7..f615afab8 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrimaryAudioSource.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrimaryAudioSource.m @@ -12,7 +12,7 @@ SDLPrimaryAudioSource* SDLPrimaryAudioSource_LINE_IN = nil; SDLPrimaryAudioSource* SDLPrimaryAudioSource_IPOD = nil; SDLPrimaryAudioSource* SDLPrimaryAudioSource_MOBILE_APP = nil; -NSMutableArray* SDLPrimaryAudioSource_values = nil; +NSArray* SDLPrimaryAudioSource_values = nil; @implementation SDLPrimaryAudioSource @@ -25,9 +25,9 @@ NSMutableArray* SDLPrimaryAudioSource_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLPrimaryAudioSource_values == nil) { - SDLPrimaryAudioSource_values = [[NSMutableArray alloc] initWithObjects: + SDLPrimaryAudioSource_values = @[ SDLPrimaryAudioSource.NO_SOURCE_SELECTED, SDLPrimaryAudioSource.USB, SDLPrimaryAudioSource.USB2, @@ -35,7 +35,7 @@ NSMutableArray* SDLPrimaryAudioSource_values = nil; SDLPrimaryAudioSource.LINE_IN, SDLPrimaryAudioSource.IPOD, SDLPrimaryAudioSource.MOBILE_APP, - nil]; + ]; } return SDLPrimaryAudioSource_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrioritizedObjectCollection.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrioritizedObjectCollection.h index b3f100e1e..90a7ddc15 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrioritizedObjectCollection.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrioritizedObjectCollection.h @@ -7,7 +7,21 @@ @interface SDLPrioritizedObjectCollection : NSObject +/** + * Add a new object to a push-pop collection. The object will be added in a location based on the priority passed in. + * + * A lower priority number is considered to be "higher". This is because this class is generally used with RPC service numbers, and lower services preempt higher ones. + * + * @param object The object to be added to the priority collection + * @param priority The priority to use when determining the location of the object in the collection. A lower number is considered a higher priority + */ - (void)addObject:(id)object withPriority:(NSInteger)priority; + +/** + * Retreive the highest priority object from the collection. This also removes the object. + * + * @return The highest priority object retrieved from the collection. + */ - (id)nextObject; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrioritizedObjectCollection.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrioritizedObjectCollection.m index f9398fd52..e93c4a396 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrioritizedObjectCollection.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPrioritizedObjectCollection.m @@ -5,7 +5,7 @@ #import "SDLPrioritizedObjectCollection.h" #import "SDLObjectWithPriority.h" -#import "SDLDebugTool.h"//fortesting + @interface SDLPrioritizedObjectCollection () { @@ -31,9 +31,7 @@ return; } - SDLObjectWithPriority *newWrapper = [SDLObjectWithPriority new]; - newWrapper.object = object; - newWrapper.priority = priority; + SDLObjectWithPriority *newWrapper = [SDLObjectWithPriority objectWithObject:object priority:priority]; @synchronized(privateArray) { @@ -57,7 +55,7 @@ } -- (id)nextObject +- (instancetype)nextObject { if (privateArray.count == 0) { return nil; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocol.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocol.m index 382632598..4e4a694c7 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocol.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocol.m @@ -1,4 +1,4 @@ -// SDLSmartDeviceLinkProtocol.m +// SDLProtocol.m // @@ -8,9 +8,10 @@ #import "SDLRPCRequest.h" #import "SDLProtocol.h" #import "SDLProtocolHeader.h" +#import "SDLProtocolMessage.h" #import "SDLV2ProtocolHeader.h" #import "SDLProtocolMessageDisassembler.h" -#import "SDLProtocolRecievedMessageRouter.h" +#import "SDLProtocolReceivedMessageRouter.h" #import "SDLRPCPayload.h" #import "SDLDebugTool.h" #import "SDLPrioritizedObjectCollection.h" @@ -21,7 +22,7 @@ const UInt8 MAX_VERSION_TO_SEND = 3; @interface SDLProtocol () { UInt32 _messageID; - dispatch_queue_t _recieveQueue; + dispatch_queue_t _receiveQueue; dispatch_queue_t _sendQueue; SDLPrioritizedObjectCollection *prioritizedCollection; } @@ -29,8 +30,8 @@ const UInt8 MAX_VERSION_TO_SEND = 3; @property (assign) UInt8 version; @property (assign) UInt8 maxVersionSupportedByHeadUnit; @property (assign) UInt8 sessionID; -@property (strong) NSMutableData *recieveBuffer; -@property (strong) SDLProtocolRecievedMessageRouter *messageRouter; +@property (strong) NSMutableData *receiveBuffer; +@property (strong) SDLProtocolReceivedMessageRouter *messageRouter; - (void)sendDataToTransport:(NSData *)data withPriority:(NSInteger)priority; - (void)logRPCSend:(SDLProtocolMessage *)message; @@ -40,16 +41,16 @@ const UInt8 MAX_VERSION_TO_SEND = 3; @implementation SDLProtocol -- (id)init { +- (instancetype)init { if (self = [super init]) { _version = 1; _messageID = 0; _sessionID = 0; - _recieveQueue = dispatch_queue_create("com.sdl.recieve", DISPATCH_QUEUE_SERIAL); + _receiveQueue = dispatch_queue_create("com.sdl.receive", DISPATCH_QUEUE_SERIAL); _sendQueue = dispatch_queue_create("com.sdl.send.defaultpriority", DISPATCH_QUEUE_SERIAL); prioritizedCollection = [SDLPrioritizedObjectCollection new]; - self.messageRouter = [[SDLProtocolRecievedMessageRouter alloc] init]; + self.messageRouter = [[SDLProtocolReceivedMessageRouter alloc] init]; self.messageRouter.delegate = self; } return self; @@ -73,7 +74,7 @@ const UInt8 MAX_VERSION_TO_SEND = 3; SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:self.version]; header.frameType = SDLFrameType_Control; header.serviceType = serviceType; - header.frameData = SDLFrameData_StartSession; + header.frameData = SDLFrameData_EndSession; header.sessionID = self.sessionID; SDLProtocolMessage *message = [SDLProtocolMessage messageWithHeader:header andPayload:nil]; @@ -168,21 +169,21 @@ const UInt8 MAX_VERSION_TO_SEND = 3; } // -// Turn recieved bytes into message objects. +// Turn received bytes into message objects. // -- (void)handleBytesFromTransport:(NSData *)recievedData { +- (void)handleBytesFromTransport:(NSData *)receivedData { NSMutableString *logMessage = [[NSMutableString alloc]init];// - [logMessage appendFormat:@"Received: %ld", (long)recievedData.length]; + [logMessage appendFormat:@"Received: %ld", (long)receivedData.length]; - // Initialize the recieve buffer which will contain bytes while messages are constructed. - if (self.recieveBuffer == nil) { - self.recieveBuffer = [NSMutableData dataWithCapacity:(4 * MAX_TRANSMISSION_SIZE)]; + // Initialize the receive buffer which will contain bytes while messages are constructed. + if (self.receiveBuffer == nil) { + self.receiveBuffer = [NSMutableData dataWithCapacity:(4 * MAX_TRANSMISSION_SIZE)]; } // Save the data - [self.recieveBuffer appendData:recievedData]; - [logMessage appendFormat:@"(%ld) ", (long)self.recieveBuffer.length]; + [self.receiveBuffer appendData:receivedData]; + [logMessage appendFormat:@"(%ld) ", (long)self.receiveBuffer.length]; [self processMessages]; } @@ -191,13 +192,13 @@ const UInt8 MAX_VERSION_TO_SEND = 3; NSMutableString *logMessage = [[NSMutableString alloc]init]; // Get the version - UInt8 incomingVersion = [SDLProtocolMessage determineVersion:self.recieveBuffer]; + UInt8 incomingVersion = [SDLProtocolMessage determineVersion:self.receiveBuffer]; // If we have enough bytes, create the header. SDLProtocolHeader* header = [SDLProtocolHeader headerForVersion:incomingVersion]; NSUInteger headerSize = header.size; - if (self.recieveBuffer.length >= headerSize) { - [header parse:self.recieveBuffer]; + if (self.receiveBuffer.length >= headerSize) { + [header parse:self.receiveBuffer]; } else { // Need to wait for more bytes. [logMessage appendString:@"header incomplete, waiting for more bytes."]; @@ -209,30 +210,30 @@ const UInt8 MAX_VERSION_TO_SEND = 3; SDLProtocolMessage *message = nil; NSUInteger payloadSize = header.bytesInPayload; NSUInteger messageSize = headerSize + payloadSize; - if (self.recieveBuffer.length >= messageSize) { + if (self.receiveBuffer.length >= messageSize) { NSUInteger payloadOffset = headerSize; NSUInteger payloadLength = payloadSize; - NSData *payload = [self.recieveBuffer subdataWithRange:NSMakeRange(payloadOffset, payloadLength)]; + NSData *payload = [self.receiveBuffer subdataWithRange:NSMakeRange(payloadOffset, payloadLength)]; message = [SDLProtocolMessage messageWithHeader:header andPayload:payload]; [logMessage appendFormat:@"message complete. %@", message]; [SDLDebugTool logInfo:logMessage withType:SDLDebugType_Protocol toOutput:SDLDebugOutput_File|SDLDebugOutput_DeviceConsole toGroup:self.debugConsoleGroupName]; } else { // Need to wait for more bytes. - [logMessage appendFormat:@"header complete. message incomplete, waiting for %ld more bytes. Header:%@", (long)(messageSize - self.recieveBuffer.length), header]; + [logMessage appendFormat:@"header complete. message incomplete, waiting for %ld more bytes. Header:%@", (long)(messageSize - self.receiveBuffer.length), header]; [SDLDebugTool logInfo:logMessage withType:SDLDebugType_Protocol toOutput:SDLDebugOutput_File|SDLDebugOutput_DeviceConsole toGroup:self.debugConsoleGroupName]; return; } - // Need to maintain the recieveBuffer, remove the bytes from it which we just processed. - self.recieveBuffer = [[self.recieveBuffer subdataWithRange:NSMakeRange(messageSize, self.recieveBuffer.length - messageSize)] mutableCopy]; + // Need to maintain the receiveBuffer, remove the bytes from it which we just processed. + self.receiveBuffer = [[self.receiveBuffer subdataWithRange:NSMakeRange(messageSize, self.receiveBuffer.length - messageSize)] mutableCopy]; // Pass on ultimate disposition of the message to the message router. - dispatch_async(_recieveQueue, ^{ - [self.messageRouter handleRecievedMessage:message]; + dispatch_async(_receiveQueue, ^{ + [self.messageRouter handleReceivedMessage:message]; }); // Call recursively until the buffer is empty or incomplete message is encountered - if (self.recieveBuffer.length > 0) + if (self.receiveBuffer.length > 0) [self processMessages]; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolHeader.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolHeader.h index a2ac1ae9e..9895a9b73 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolHeader.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolHeader.h @@ -1,7 +1,6 @@ -// SDLSmartDeviceLinkProtocolHeader.h +// SDLProtocolHeader.h // - @import Foundation; @@ -43,8 +42,8 @@ typedef NS_ENUM(UInt8, SDLFrameData) { @property (assign) UInt8 sessionID; @property (assign) UInt32 bytesInPayload; -- (id)init; -- (id)copyWithZone:(NSZone *)zone; +- (instancetype)init; +- (instancetype)copyWithZone:(NSZone *)zone; - (NSData *)data; - (void)parse:(NSData *)data; - (NSString *)description; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolHeader.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolHeader.m index fae9f51aa..cc6b1997c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolHeader.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolHeader.m @@ -1,4 +1,4 @@ -// SDLSmartDeviceLinkProtocolHeader.m +// SDLProtocolHeader.m // @@ -11,7 +11,7 @@ @synthesize version = _version; @synthesize size = _size; -- (id)init { +- (instancetype)init { if (self = [super init]) { _version = 0; _size = 0; @@ -19,7 +19,7 @@ return self; } -- (id)copyWithZone:(NSZone *)zone { +- (instancetype)copyWithZone:(NSZone *)zone { [self doesNotRecognizeSelector:_cmd]; return 0; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolListener.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolListener.h index b234cdb7b..10b9cd89e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolListener.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolListener.h @@ -1,13 +1,12 @@ // SDLProtocolListener.h // - - - #import "SDLProtocolHeader.h" + @class SDLProtocolMessage; -@protocol SDLProtocolListener + +@protocol SDLProtocolListener <NSObject> - (void)handleProtocolSessionStarted:(SDLServiceType)serviceType sessionID:(Byte)sessionID version:(Byte)version; - (void)onProtocolMessageReceived:(SDLProtocolMessage *)msg; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessage.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessage.h index e9c2bae7f..54859c7c8 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessage.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessage.h @@ -1,8 +1,8 @@ // SDLSmartDeviceLinkProtocolMessage.h // - -#import "SDLProtocolHeader.h" +@import Foundation; +@class SDLProtocolHeader; @interface SDLProtocolMessage : NSObject @@ -11,7 +11,7 @@ @property (strong) NSData *payload; @property (strong, readonly) NSData *data; -- (id)init; +- (instancetype)init; + (id)messageWithHeader:(SDLProtocolHeader*)header andPayload:(NSData *)payload; // Returns a V1 or V2 object - (NSUInteger)size; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessage.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessage.m index 0ad1a240f..a64255f27 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessage.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessage.m @@ -2,6 +2,7 @@ // +#import "SDLProtocolHeader.h" #import "SDLProtocolMessage.h" #import "SDLV1ProtocolMessage.h" #import "SDLV2ProtocolMessage.h" @@ -25,7 +26,7 @@ return version; } -- (id)init { +- (instancetype)init { if (self = [super init]) { } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageAssembler.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageAssembler.h index 1a19c1088..427d18b5f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageAssembler.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageAssembler.h @@ -1,9 +1,10 @@ // SDLSmartDeviceLinkProtocolMessageAssembler.h // +@import Foundation; +@class SDLProtocolMessage; -#import "SDLProtocolMessage.h" typedef void(^SDLMessageAssemblyCompletionHandler)(BOOL done, SDLProtocolMessage *assembledMessage); @@ -15,7 +16,7 @@ typedef void(^SDLMessageAssemblyCompletionHandler)(BOOL done, SDLProtocolMessage @property (assign) UInt32 expectedBytes; @property (strong) NSMutableDictionary *parts; -- (id)initWithSessionID:(UInt8)sessionID; +- (instancetype)initWithSessionID:(UInt8)sessionID; - (void)handleMessage:(SDLProtocolMessage *)message withCompletionHandler:(SDLMessageAssemblyCompletionHandler)completionHandler; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageAssembler.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageAssembler.m index fb2077909..38d9edf85 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageAssembler.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageAssembler.m @@ -1,13 +1,14 @@ // SDLSmartDeviceLinkProtocolMessageAssembler.m // - #import "SDLProtocolMessageAssembler.h" + #import "SDLProtocolHeader.h" +#import "SDLProtocolMessage.h" @implementation SDLProtocolMessageAssembler -- (id)initWithSessionID:(UInt8)sessionID { +- (instancetype)initWithSessionID:(UInt8)sessionID { if (self = [super init]) { _sessionID = sessionID; } @@ -83,13 +84,12 @@ // Done with this data, release it. self.parts = nil; + } else { + // Not done, let caller know + if (completionHandler != nil) { + completionHandler(NO, nil); + } } - - // Not done, let caller know - if (completionHandler != nil) { - completionHandler(NO, nil); - } - } @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageDisassembler.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageDisassembler.h index 853eaffbf..b510aa428 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageDisassembler.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageDisassembler.h @@ -1,9 +1,10 @@ // SDLSmartDeviceLinkProtocolMessageDisassembler.h // +@import Foundation; +@class SDLProtocolMessage; -#import "SDLProtocolMessage.h" @interface SDLProtocolMessageDisassembler : NSObject diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageDisassembler.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageDisassembler.m index dff0d66c6..eeea90054 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageDisassembler.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolMessageDisassembler.m @@ -1,9 +1,11 @@ // SDLProtocolMessageDisassembler.m // - +#import "SDLProtocolHeader.h" +#import "SDLProtocolMessage.h" #import "SDLProtocolMessageDisassembler.h" + @implementation SDLProtocolMessageDisassembler diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolReceivedMessageRouter.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolReceivedMessageRouter.h new file mode 100644 index 000000000..deb33722e --- /dev/null +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolReceivedMessageRouter.h @@ -0,0 +1,16 @@ +// SDLProtocolReceivedMessageRouter.h +// + + + +#import "SDLProtocolListener.h" +@class SDLProtocolMessage; + + +@interface SDLProtocolReceivedMessageRouter : NSObject + +@property (weak) id<SDLProtocolListener> delegate; + +- (void)handleReceivedMessage:(SDLProtocolMessage *)message; + +@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolRecievedMessageRouter.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolReceivedMessageRouter.m index 2d00f4919..e064c8f82 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolRecievedMessageRouter.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolReceivedMessageRouter.m @@ -1,18 +1,18 @@ -// SDLProtocolRecievedMessageRouter.m +// SDLProtocolReceivedMessageRouter.m // // -// This class gets handed the SDLProtocol messages as they are recieved +// This class gets handed the SDLProtocol messages as they are received // and decides what happens to them and where they are sent on to. -#import "SDLProtocolRecievedMessageRouter.h" +#import "SDLProtocolReceivedMessageRouter.h" #import "SDLProtocolMessage.h" #import "SDLProtocolMessageAssembler.h" #import "SDLDebugTool.h" -@interface SDLProtocolRecievedMessageRouter () +@interface SDLProtocolReceivedMessageRouter () @property (strong) NSMutableDictionary *messageAssemblers; @@ -23,16 +23,16 @@ @end -@implementation SDLProtocolRecievedMessageRouter +@implementation SDLProtocolReceivedMessageRouter -- (id)init { +- (instancetype)init { if (self = [super init]) { self.messageAssemblers = [NSMutableDictionary dictionaryWithCapacity:2]; } return self; } -- (void)handleRecievedMessage:(SDLProtocolMessage *)message { +- (void)handleReceivedMessage:(SDLProtocolMessage *)message { SDLFrameType frameType = message.header.frameType; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolRecievedMessageRouter.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolRecievedMessageRouter.h deleted file mode 100644 index ba71a2286..000000000 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProtocolRecievedMessageRouter.h +++ /dev/null @@ -1,16 +0,0 @@ -// SDLProtocolRecievedMessageRouter.h -// - - - -#import "SDLProtocolListener.h" -@class SDLProtocolMessage; - - -@interface SDLProtocolRecievedMessageRouter : NSObject - -@property (weak) id<SDLProtocolListener> delegate; - -- (void)handleRecievedMessage:(SDLProtocolMessage *)message; - -@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.h index 10985f467..3193a5d0f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.h @@ -1,14 +1,17 @@ // SDLProxy.h // -// Version: ##Version## +@class SDLProtocol; +@class SDLPutFile; +@class SDLRPCMessage; +@class SDLRPCRequestFactory; - -#import "SDLProtocol.h" +#import "SDLInterfaceProtocol.h" +#import "SDLProtocolListener.h" #import "SDLProxyListener.h" -#import "SDLRPCRequestFactory.h" #import "SDLTransport.h" + @interface SDLProxy : NSObject<SDLProtocolListener, NSStreamDelegate> { Byte _version; Byte rpcSessionID; @@ -24,7 +27,7 @@ @property (strong) NSTimer* handshakeTimer; @property (strong) NSString *debugConsoleGroupName; --(id) initWithTransport:(NSObject<SDLTransport>*) transport protocol:(NSObject<SDLInterfaceProtocol>*) protocol delegate:(NSObject<SDLProxyListener>*) delegate; +-(instancetype) initWithTransport:(NSObject<SDLTransport>*) transport protocol:(NSObject<SDLInterfaceProtocol>*) protocol delegate:(NSObject<SDLProxyListener>*) delegate; -(void) dispose; -(void) addDelegate:(NSObject<SDLProxyListener>*) delegate; @@ -51,7 +54,7 @@ * @param inputStream A stream containing the data to put to the module. * @param putFileRPCRequest A SDLPutFile object containing the parameters for the put(s) * @discussion The proxy will read from the stream up to 1024 bytes at a time and send them in individual putFile requests. - * This may result in multiple responses being recieved, one for each request. + * This may result in multiple responses being received, one for each request. * Note: the length parameter of the putFileRPCRequest will be ignored. The proxy will substitute the number of bytes read from the stream. */ - (void)putFileStream:(NSInputStream*)inputStream withRequest:(SDLPutFile*)putFileRPCRequest; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.m index 2ed74f0b0..f03b58f46 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.m @@ -1,23 +1,31 @@ // SDLProxy.m // +#import "SDLProxy.h" - -#import <ExternalAccessory/ExternalAccessory.h> +@import ExternalAccessory; #import <objc/runtime.h> #import "SDLDebugTool.h" #import "SDLEncodedSyncPData.h" +#import "SDLFileType.h" #import "SDLFunctionID.h" +#import "SDLHMILevel.h" #import "SDLJsonDecoder.h" #import "SDLJsonEncoder.h" #import "SDLLanguage.h" +#import "SDLLayoutMode.h" +#import "SDLLockScreenManager.h" #import "SDLNames.h" +#import "SDLOnSystemRequest.h" +#import "SDLPolicyDataParser.h" +#import "SDLProtocol.h" +#import "SDLProtocolMessage.h" +#import "SDLPutFile.h" +#import "SDLRequestType.h" +#import "SDLRPCPayload.h" +#import "SDLRPCRequestFactory.h" #import "SDLSiphonServer.h" -#import "SDLProxy.h" #import "SDLSystemRequest.h" -#import "SDLRPCPayload.h" -#import "SDLPolicyDataParser.h" -#import "SDLLockScreenManager.h" #define VERSION_STRING @"SmartDeviceLink-20140929-090241-LOCAL-iOS" @@ -47,7 +55,7 @@ const int POLICIES_CORRELATION_ID = 65535; #pragma mark - Object lifecycle -- (id)initWithTransport:(NSObject<SDLTransport> *)theTransport protocol:(NSObject<SDLInterfaceProtocol> *)theProtocol delegate:(NSObject<SDLProxyListener> *)theDelegate { +- (instancetype)initWithTransport:(NSObject<SDLTransport> *)theTransport protocol:(NSObject<SDLInterfaceProtocol> *)theProtocol delegate:(NSObject<SDLProxyListener> *)theDelegate { if (self = [super init]) { _debugConsoleGroupName = @"default"; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxyFactory.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxyFactory.h index a75aac8e3..2ee4bf6a7 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxyFactory.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxyFactory.h @@ -1,9 +1,12 @@ // SDLSyncProxyFactory.h // +@import Foundation; +#import "SDLProxyListener.h" + +@class SDLProxy; -#import "SDLProxy.h" @interface SDLProxyFactory : NSObject {} diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxyFactory.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxyFactory.m index b35326011..462225f2c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxyFactory.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxyFactory.m @@ -1,13 +1,14 @@ // SDLSyncProxyFactory.m // - #import "SDLProxyFactory.h" #import "SDLDebugTool.h" #import "SDLIAPTransport.h" #import "SDLTCPTransport.h" #import "SDLProtocol.h" +#import "SDLProxy.h" + @implementation SDLProxyFactory diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxyListener.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxyListener.h index 3bf83077e..e41d9fdc8 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxyListener.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxyListener.h @@ -1,66 +1,64 @@ // SDLProxyListener.h // +@class SDLAddCommandResponse; +@class SDLAddSubMenuResponse; +@class SDLAlertResponse; +@class SDLChangeRegistrationResponse; +@class SDLCreateInteractionChoiceSetResponse; +@class SDLDeleteCommandResponse; +@class SDLDeleteFileResponse; +@class SDLDeleteInteractionChoiceSetResponse; +@class SDLDeleteSubMenuResponse; +@class SDLDiagnosticMessageResponse; +@class SDLEncodedSyncPDataResponse; +@class SDLEndAudioPassThruResponse; +@class SDLGenericResponse; +@class SDLGetDTCsResponse; +@class SDLGetVehicleDataResponse; +@class SDLListFilesResponse; +@class SDLLockScreenStatus; +@class SDLOnAppInterfaceUnregistered; +@class SDLOnAudioPassThru; +@class SDLOnButtonEvent; +@class SDLOnButtonPress; +@class SDLOnCommand; +@class SDLOnDriverDistraction; +@class SDLOnEncodedSyncPData; +@class SDLOnHashChange; +@class SDLOnHMIStatus; +@class SDLOnLanguageChange; +@class SDLOnPermissionsChange; +@class SDLOnSyncPData; +@class SDLOnSystemRequest; +@class SDLOnVehicleData; +@class SDLOnTBTClientState; +@class SDLOnTouchEvent; +@class SDLOnVehicleData; +@class SDLPerformAudioPassThruResponse; +@class SDLPerformInteractionResponse; +@class SDLPutFileResponse; +@class SDLReadDIDResponse; +@class SDLRegisterAppInterfaceResponse; +@class SDLResetGlobalPropertiesResponse; +@class SDLScrollableMessageResponse; +@class SDLSetAppIconResponse; +@class SDLSetDisplayLayoutResponse; +@class SDLSetGlobalPropertiesResponse; +@class SDLSetMediaClockTimerResponse; +@class SDLShowConstantTBTResponse; +@class SDLShowResponse; +@class SDLSliderResponse; +@class SDLSpeakResponse; +@class SDLSubscribeButtonResponse; +@class SDLSubscribeVehicleDataResponse; +@class SDLSyncPDataResponse; +@class SDLUpdateTurnListResponse; +@class SDLUnregisterAppInterfaceResponse; +@class SDLUnsubscribeButtonResponse; +@class SDLUnsubscribeVehicleDataResponse; - -#import "SDLAddCommandResponse.h" -#import "SDLAddSubMenuResponse.h" -#import "SDLAlertResponse.h" -#import "SDLChangeRegistrationResponse.h" -#import "SDLCreateInteractionChoiceSetResponse.h" -#import "SDLDeleteCommandResponse.h" -#import "SDLDeleteFileResponse.h" -#import "SDLDeleteInteractionChoiceSetResponse.h" -#import "SDLDeleteSubMenuResponse.h" -#import "SDLDiagnosticMessageResponse.h" -#import "SDLEncodedSyncPDataResponse.h" -#import "SDLEndAudioPassThruResponse.h" -#import "SDLGenericResponse.h" -#import "SDLGetDTCsResponse.h" -#import "SDLGetVehicleDataResponse.h" -#import "SDLListFilesResponse.h" -#import "SDLLockScreenStatus.h" -#import "SDLOnAppInterfaceUnregistered.h" -#import "SDLOnAudioPassThru.h" -#import "SDLOnButtonEvent.h" -#import "SDLOnButtonPress.h" -#import "SDLOnCommand.h" -#import "SDLOnDriverDistraction.h" -#import "SDLOnEncodedSyncPData.h" -#import "SDLOnHashChange.h" -#import "SDLOnHMIStatus.h" -#import "SDLOnLanguageChange.h" -#import "SDLOnPermissionsChange.h" -#import "SDLOnSyncPData.h" -#import "SDLOnSystemRequest.h" -#import "SDLOnVehicleData.h" -#import "SDLOnTBTClientState.h" -#import "SDLOnTouchEvent.h" -#import "SDLOnVehicleData.h" -#import "SDLPerformAudioPassThruResponse.h" -#import "SDLPerformInteractionResponse.h" -#import "SDLPutFileResponse.h" -#import "SDLReadDIDResponse.h" -#import "SDLRegisterAppInterfaceResponse.h" -#import "SDLResetGlobalPropertiesResponse.h" -#import "SDLScrollableMessageResponse.h" -#import "SDLSetAppIconResponse.h" -#import "SDLSetDisplayLayoutResponse.h" -#import "SDLSetGlobalPropertiesResponse.h" -#import "SDLSetMediaClockTimerResponse.h" -#import "SDLShowConstantTBTResponse.h" -#import "SDLShowResponse.h" -#import "SDLSliderResponse.h" -#import "SDLSpeakResponse.h" -#import "SDLSubscribeButtonResponse.h" -#import "SDLSubscribeVehicleDataResponse.h" -#import "SDLSyncPDataResponse.h" -#import "SDLUpdateTurnListResponse.h" -#import "SDLUnregisterAppInterfaceResponse.h" -#import "SDLUnsubscribeButtonResponse.h" -#import "SDLUnsubscribeVehicleDataResponse.h" - -@protocol SDLProxyListener +@protocol SDLProxyListener <NSObject> -(void) onOnDriverDistraction:(SDLOnDriverDistraction*) notification; -(void) onOnHMIStatus:(SDLOnHMIStatus*) notification; @@ -79,7 +77,7 @@ -(void) onDeleteInteractionChoiceSetResponse:(SDLDeleteInteractionChoiceSetResponse*) response; -(void) onDeleteSubMenuResponse:(SDLDeleteSubMenuResponse*) response; -(void) onDiagnosticMessageResponse:(SDLDiagnosticMessageResponse*) response; --(void) onEncodedSyncPDataRespons:(SDLEncodedSyncPDataResponse*) response; +-(void) onEncodedSyncPDataResponse:(SDLEncodedSyncPDataResponse*) response; -(void) onEndAudioPassThruResponse:(SDLEndAudioPassThruResponse*) response; -(void) onError:(NSException*) e; -(void) onGenericResponse:(SDLGenericResponse*) response; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFile.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFile.h index 4e6862812..ceff9f87f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFile.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFile.h @@ -1,62 +1,79 @@ // SDLPutFile.h // - - #import "SDLRPCRequest.h" -#import "SDLFileType.h" +@class SDLFileType; /** - * @abstract Used to push a binary data onto the SDL module from a mobile device, such as + * Used to push a binary data onto the SDL module from a mobile device, such as * icons and album art - * <p> * - * Since SmartDeviceLink 2.0<br/> - * See DeleteFile ListFiles + * Since SmartDeviceLink 2.0 + * @see SDLDeleteFile + * @see SDLListFiles */ @interface SDLPutFile : SDLRPCRequest {} + /** - * @abstract Constructs a new SDLPutFile object + * Constructs a new SDLPutFile object */ --(id) init; +-(instancetype) init; + /** - * @abstract Constructs a new SDLPutFile object indicated by the NSMutableDictionary parameter + * Constructs a new SDLPutFile object indicated by the NSMutableDictionary parameter + * * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; + /** - * @abstract A file reference name - * <br/><b>Notes: </b>Maxlength=500 + * A file reference name + * + * Required, maxlength 255 characters */ @property(strong) NSString* syncFileName; + /** - * @abstract A FileType value representing a selected file type + * A FileType value representing a selected file type + * + * Required */ @property(strong) SDLFileType* fileType; + /** - * @abstract A value to indicates if the file is meant to persist between + * A value to indicates if the file is meant to persist between * sessions / ignition cycles. If set to TRUE, then the system will aim to * persist this file through session / cycles. While files with this * designation will have priority over others, they are subject to deletion * by the system at any time. In the event of automatic deletion by the * system, the app will receive a rejection and have to resend the file. If * omitted, the value will be set to false + * + * Boolean, Optional, default = NO */ @property(strong) NSNumber* persistentFile; + /** - * @abstract Indicates if the file is meant to be passed thru core to elsewhere on the system. - If set to TRUE, then the system will instead pass the data thru as it arrives to a predetermined area outside of core. - If omitted, the value will be set to false. + * Indicates if the file is meant to be passed through core to elsewhere on the system. If set to TRUE, then the system will instead pass the data thru as it arrives to a predetermined area outside of core. + * + * Boolean, Optional, default = NO */ @property(strong) NSNumber* systemFile; + /** - * @abstract Optional offset in bytes for resuming partial data chunks. + * Offset in bytes for resuming partial data chunks. + * + * Integer, Optional, 0 - 100,000,000,000 */ @property(strong) NSNumber* offset; + /** - * @abstract Optional length in bytes for resuming partial data chunks + * Length in bytes for resuming partial data chunks. If offset is set to 0, then length is the total length of the file to be downloaded + * + * Integer, Optional, 0 - 100,000,000,000 */ @property(strong) NSNumber* length; + @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFile.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFile.m index 9866c772e..2813a2d34 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFile.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFile.m @@ -1,19 +1,20 @@ // SDLPutFile.m // - #import "SDLPutFile.h" +#import "SDLFileType.h" #import "SDLNames.h" + @implementation SDLPutFile --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_PutFile]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFileResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFileResponse.h index c6258334e..c35931905 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFileResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFileResponse.h @@ -14,11 +14,11 @@ /** * @abstract Constructs a new SDLPutFileResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLPutFileResponse object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSNumber* spaceAvailable; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFileResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFileResponse.m index 0805058d6..aee753837 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFileResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLPutFileResponse.m @@ -8,12 +8,12 @@ @implementation SDLPutFileResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_PutFile]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessage.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessage.h index e51c3fe16..7fdfaf699 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessage.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessage.h @@ -1,20 +1,9 @@ // SDLRPCMessage.h // - - #import "SDLEnum.h" -@interface SDLRPCStruct : NSObject { - NSMutableDictionary* store; -} - --(id) initWithDictionary:(NSMutableDictionary*) dict; --(id) init; - --(NSMutableDictionary*) serializeAsDictionary:(Byte) version; - -@end +#import "SDLRPCStruct.h" @interface SDLRPCMessage : SDLRPCStruct { NSMutableDictionary* function; @@ -22,8 +11,8 @@ NSString* messageType; } --(id) initWithName:(NSString*) name; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithName:(NSString*) name; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; -(NSString*) getFunctionName; -(void) setFunctionName:(NSString*) functionName; -(NSObject*) getParameters:(NSString*) functionName; @@ -33,4 +22,4 @@ @property(strong, readonly) NSString* name; @property(strong, readonly) NSString* messageType; -@end
\ No newline at end of file +@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessage.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessage.m index 20a09cd8d..8b58c5718 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessage.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessage.m @@ -5,87 +5,13 @@ #import "SDLRPCMessage.h" #import "SDLNames.h" - -@implementation SDLRPCStruct - --(id) initWithDictionary:(NSMutableDictionary*) dict { - if (self = [super init]) { - store = dict; - } - return self; -} - --(id) init { - if (self = [super init]) { - store = [[NSMutableDictionary alloc] init]; - } - return self; -} - --(NSMutableDictionary*) serializeDictionary:(NSDictionary*) dict version:(Byte) version { - - NSMutableDictionary* ret = [NSMutableDictionary dictionaryWithCapacity:dict.count]; - for (NSString* key in [dict keyEnumerator]) { - NSObject* value = [dict objectForKey:key]; - if ([value isKindOfClass:SDLRPCStruct.class]) { - [ret setObject:[(SDLRPCStruct*)value serializeAsDictionary:version] forKey:key]; - } else if ([value isKindOfClass:NSDictionary.class]) { - [ret setObject:[self serializeDictionary:(NSDictionary*)value version:version] forKey:key]; - } else if ([value isKindOfClass:NSArray.class]) { - NSArray* arrayVal = (NSArray*) value; - - if (arrayVal.count > 0 - && ([[arrayVal objectAtIndex:0] isKindOfClass:SDLRPCStruct.class])) { - NSMutableArray* serializedList = [NSMutableArray arrayWithCapacity:arrayVal.count]; - for (SDLRPCStruct* serializeable in arrayVal) { - [serializedList addObject:[serializeable serializeAsDictionary:version]]; - } - [ret setObject:serializedList forKey:key]; - } else if (arrayVal.count > 0 - && ([[arrayVal objectAtIndex:0] isKindOfClass:SDLEnum.class])) { - NSMutableArray* serializedList = [NSMutableArray arrayWithCapacity:arrayVal.count]; - for (SDLEnum* anEnum in arrayVal) { - [serializedList addObject:anEnum.value]; - } - [ret setObject:serializedList forKey:key]; - } else { - [ret setObject:value forKey:key]; - } - } else if ([value isKindOfClass:SDLEnum.class]) { - [ret setObject:((SDLEnum*)value).value forKey:key]; - } else { - [ret setObject:value forKey:key]; - } - } - return ret; -} - --(NSMutableDictionary*) serializeAsDictionary:(Byte) version { - if (version == 2) { - NSString* messageType = [[store keyEnumerator] nextObject]; - NSMutableDictionary* function = [store objectForKey:messageType]; - if ([function isKindOfClass:NSMutableDictionary.class]) { - NSMutableDictionary* parameters = [function objectForKey:NAMES_parameters]; - return [self serializeDictionary:parameters version:version]; - } else { - return [self serializeDictionary:store version:version]; - } - } else { - return [self serializeDictionary:store version:version]; - } -} - --(void) dealloc { - store = nil; -} - -@end +#import "SDLEnum.h" @implementation SDLRPCMessage @synthesize messageType; --(id) initWithName:(NSString*) name { +-(instancetype) initWithName:(NSString*) name { if (self = [super init]) { function = [[NSMutableDictionary alloc] initWithCapacity:3]; parameters = [[NSMutableDictionary alloc] init]; @@ -97,7 +23,7 @@ return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) { NSEnumerator *enumerator = [store keyEnumerator]; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessageType.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessageType.h index 6cdcc77a5..d766e1321 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessageType.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessageType.h @@ -20,7 +20,7 @@ @abstract declare an array to store all possible values of Message Types @result return the array */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract SDLRPCMessageType : request diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessageType.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessageType.m index abd9e3080..62ecf795d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessageType.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCMessageType.m @@ -8,7 +8,7 @@ SDLRPCMessageType* SDLRPCMessageType_request = nil; SDLRPCMessageType* SDLRPCMessageType_response = nil; SDLRPCMessageType* SDLRPCMessageType_notification = nil; -NSMutableArray* SDLRPCMessageType_values = nil; +NSArray* SDLRPCMessageType_values = nil; @implementation SDLRPCMessageType +(SDLRPCMessageType*) valueOf:(NSString*) value { @@ -20,22 +20,22 @@ NSMutableArray* SDLRPCMessageType_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLRPCMessageType_values == nil) { - SDLRPCMessageType_values = [[NSMutableArray alloc] initWithObjects: - SDLRPCMessageType_request, - SDLRPCMessageType_response, - SDLRPCMessageType_notification, - nil]; + SDLRPCMessageType_values = @[ + [SDLRPCMessageType request], + [SDLRPCMessageType response], + [SDLRPCMessageType notification], + ]; } return SDLRPCMessageType_values; } +(SDLRPCMessageType*) request { - if (SDLRPCMessageType_request == nil) { - SDLRPCMessageType_request = [[SDLRPCMessageType alloc] initWithValue:@"request"]; - } - return SDLRPCMessageType_request; + if (SDLRPCMessageType_request == nil) { + SDLRPCMessageType_request = [[SDLRPCMessageType alloc] initWithValue:@"request"]; + } + return SDLRPCMessageType_request; } +(SDLRPCMessageType*) response { diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCPayload.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCPayload.m index 5302e673f..4f5e24a4f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCPayload.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCPayload.m @@ -8,14 +8,14 @@ const NSUInteger RPC_HEADER_SIZE = 12; @implementation SDLRPCPayload --(id) init { +-(instancetype) init { if (self = [super init]) { } return self; } --(id) initWithData:(NSData *)data { +-(instancetype) initWithData:(NSData *)data { unsigned long dataLength = data.length; if (data == nil || dataLength == 0) { diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCRequestFactory.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCRequestFactory.h index fb4fd2f84..5c695b2b4 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCRequestFactory.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCRequestFactory.h @@ -1,43 +1,56 @@ // SDLRPCRequestFactory.h // +@import Foundation; + +@class SDLAddCommand; +@class SDLAddSubMenu; +@class SDLAlert; +@class SDLAppHMIType; +@class SDLAudioType; +@class SDLBitsPerSample; +@class SDLButtonName; +@class SDLChangeRegistration; +@class SDLCreateInteractionChoiceSet; +@class SDLDeleteCommand; +@class SDLDeleteFile; +@class SDLDeleteInteractionChoiceSet; +@class SDLDeleteSubMenu; +@class SDLDialNumber; +@class SDLEndAudioPassThru; +@class SDLFileType; +@class SDLGetDTCs; +@class SDLGetVehicleData; +@class SDLImage; +@class SDLImageType; +@class SDLInteractionMode; +@class SDLLanguage; +@class SDLListFiles; +@class SDLPerformAudioPassThru; +@class SDLPerformInteraction; +@class SDLPutFile; +@class SDLReadDID; +@class SDLRegisterAppInterface; +@class SDLResetGlobalProperties; +@class SDLSamplingRate; +@class SDLScrollableMessage; +@class SDLSendLocation; +@class SDLSetAppIcon; +@class SDLSetDisplayLayout; +@class SDLSetGlobalProperties; +@class SDLSetMediaClockTimer; +@class SDLShow; +@class SDLSlider; +@class SDLSpeak; +@class SDLSubscribeButton; +@class SDLSubscribeVehicleData; +@class SDLTextAlignment; +@class SDLUnregisterAppInterface; +@class SDLUnsubscribeButton; +@class SDLUnsubscribeVehicleData; +@class SDLUpdateMode; - -#import "SDLAddCommand.h" -#import "SDLAddSubMenu.h" -#import "SDLAlert.h" -#import "SDLAppHMIType.h" -#import "SDLChangeRegistration.h" -#import "SDLCreateInteractionChoiceSet.h" -#import "SDLDeleteCommand.h" -#import "SDLDeleteFile.h" -#import "SDLDeleteInteractionChoiceSet.h" -#import "SDLDeleteSubMenu.h" -#import "SDLEndAudioPassThru.h" -#import "SDLGetDTCs.h" -#import "SDLGetVehicleData.h" -#import "SDLListFiles.h" -#import "SDLPerformAudioPassThru.h" -#import "SDLPerformInteraction.h" -#import "SDLPutFile.h" -#import "SDLReadDID.h" -#import "SDLRegisterAppInterface.h" -#import "SDLResetGlobalProperties.h" -#import "SDLScrollableMessage.h" -#import "SDLSetAppIcon.h" -#import "SDLSetDisplayLayout.h" -#import "SDLSetGlobalProperties.h" -#import "SDLSetMediaClockTimer.h" -#import "SDLShow.h" -#import "SDLSlider.h" -#import "SDLSpeak.h" -#import "SDLSubscribeButton.h" -#import "SDLSubscribeVehicleData.h" -#import "SDLUnregisterAppInterface.h" -#import "SDLUnsubscribeButton.h" -#import "SDLUnsubscribeVehicleData.h" - @interface SDLRPCRequestFactory : NSObject {} //***** AddCommand ***** @@ -86,6 +99,8 @@ correlationID; +(SDLDeleteFile*) buildDeleteFileWithName:(NSString*) syncFileName correlationID:(NSNumber*) correlationID; ++(SDLDialNumber*) buildDialNumberWithNumber:(NSString*)phoneNumber; + +(SDLListFiles*) buildListFilesWithCorrelationID:(NSNumber*) correlationID; +(SDLDeleteInteractionChoiceSet*) buildDeleteInteractionChoiceSetWithID:(NSNumber*)interactionChoiceSetID correlationID:(NSNumber*) correlationID; @@ -114,8 +129,8 @@ correlationID; +(SDLPerformInteraction*) buildPerformInteractionWithInitialPrompt:(NSString*)initialPrompt initialText:(NSString*)initialText interactionChoiceSetID:(NSNumber*) interactionChoiceSetID correlationID:(NSNumber*) correlationID; //***** - -+(SDLPutFile*) buildPutFileWithFileName:(NSString*) syncFileName fileType:(SDLFileType*) fileType persisistentFile:(NSNumber*) persistentFile correlationID:(NSNumber*) correlationID; ++(SDLPutFile*) buildPutFileWithFileName:(NSString*) fileName fileType:(SDLFileType*) fileType persistentFile:(NSNumber*) persistentFile correlationId:(NSNumber*) correlationID; ++(SDLPutFile*) buildPutFileWithFileName:(NSString*) syncFileName fileType:(SDLFileType*) fileType persisistentFile:(NSNumber*) persistentFile correlationID:(NSNumber*) correlationID __deprecated_msg("use buildPutFileWithFileName:fileType:persistentFile:correlationID: instead"); +(SDLReadDID*) buildReadDIDWithECUName:(NSNumber*) ecuName didLocation:(NSArray*) didLocation correlationID:(NSNumber*) correlationID; @@ -130,6 +145,8 @@ correlationID; +(SDLResetGlobalProperties*) buildResetGlobalPropertiesWithProperties:(NSArray*) properties correlationID:(NSNumber*) correlationID; ++(SDLSendLocation*) buildSendLocationWithLongitude:(NSNumber *)longitude latitude:(NSNumber *)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription address:(NSArray *)address phoneNumber:(NSString *)phoneNumber image:(SDLImage *)image; + +(SDLScrollableMessage*) buildScrollableMessage:(NSString*) scrollableMessageBody timeout:(NSNumber*) timeout softButtons:(NSArray*) softButtons correlationID:(NSNumber*) correlationID; +(SDLSetAppIcon*) buildSetAppIconWithFileName:(NSString*) syncFileName correlationID:(NSNumber*) correlationID; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCRequestFactory.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCRequestFactory.m index 7435a5a2d..a76b7beda 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCRequestFactory.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCRequestFactory.m @@ -1,11 +1,53 @@ // SDLRPCRequestFactory.m // - #import "SDLRPCRequestFactory.h" #import "SDLMenuParams.h" #import "SDLTTSChunkFactory.h" +#import "SDLAddCommand.h" +#import "SDLAddSubMenu.h" +#import "SDLAlert.h" +#import "SDLAppHMIType.h" +#import "SDLChangeRegistration.h" +#import "SDLCreateInteractionChoiceSet.h" +#import "SDLDeleteCommand.h" +#import "SDLDeleteFile.h" +#import "SDLDeleteInteractionChoiceSet.h" +#import "SDLDeleteSubMenu.h" +#import "SDLDialNumber.h" +#import "SDLEndAudioPassThru.h" +#import "SDLFileType.h" +#import "SDLGetDTCs.h" +#import "SDLGetVehicleData.h" +#import "SDLImage.h" +#import "SDLInteractionMode.h" +#import "SDLListFiles.h" +#import "SDLPerformAudioPassThru.h" +#import "SDLPerformInteraction.h" +#import "SDLPutFile.h" +#import "SDLReadDID.h" +#import "SDLRegisterAppInterface.h" +#import "SDLResetGlobalProperties.h" +#import "SDLScrollableMessage.h" +#import "SDLSendLocation.h" +#import "SDLSetAppIcon.h" +#import "SDLSetDisplayLayout.h" +#import "SDLSetGlobalProperties.h" +#import "SDLSetMediaClockTimer.h" +#import "SDLShow.h" +#import "SDLSlider.h" +#import "SDLSpeak.h" +#import "SDLSpeechCapabilities.h" +#import "SDLStartTime.h" +#import "SDLSubscribeButton.h" +#import "SDLSubscribeVehicleData.h" +#import "SDLSyncMsgVersion.h" +#import "SDLTTSChunk.h" +#import "SDLUnregisterAppInterface.h" +#import "SDLUnsubscribeButton.h" +#import "SDLUnsubscribeVehicleData.h" + @implementation SDLRPCRequestFactory @@ -160,6 +202,13 @@ correlationID{ return msg; } ++(SDLDialNumber*) buildDialNumberWithNumber:(NSString *)phoneNumber { + SDLDialNumber *msg = [[SDLDialNumber alloc] init]; + msg.number = phoneNumber; + + return msg; +} + +(SDLListFiles*) buildListFilesWithCorrelationID:(NSNumber*) correlationID { SDLListFiles* msg = [[SDLListFiles alloc] init]; @@ -244,6 +293,7 @@ correlationID{ msg.bitsPerSample = bitsPerSample; msg.audioType = audioType; msg.muteAudio = muteAudio; + msg.correlationID = correlationID; return msg; } @@ -295,23 +345,25 @@ correlationID{ } //***** - -+(SDLPutFile*) buildPutFileWithFileName:(NSString*) syncFileName fileType:(SDLFileType*) fileType persisistentFile:(NSNumber*) persistentFile correlationID:(NSNumber*) correlationID { - ++(SDLPutFile*) buildPutFileWithFileName:(NSString*) fileName fileType:(SDLFileType*) fileType persistentFile:(NSNumber*) persistentFile correlationId:(NSNumber*) correlationID { //TODO // +(FMPutFile*) buildPutFile:(NSString*) syncFileName fileType:(SDLFileType*) fileType persisistentFile:(NSNumber*) persistentFile fileData:(NSData*) fileData correlationID:(NSNumber*) correlationID { SDLPutFile* msg = [[SDLPutFile alloc] init]; - msg.syncFileName = syncFileName; + msg.syncFileName = fileName; - msg.fileType = [fileType mutableCopy]; + msg.fileType = fileType; msg.persistentFile = persistentFile; msg.correlationID = correlationID; return msg; } ++(SDLPutFile*) buildPutFileWithFileName:(NSString*) syncFileName fileType:(SDLFileType*) fileType persisistentFile:(NSNumber*) persistentFile correlationID:(NSNumber*) correlationID { + return [self buildPutFileWithFileName:syncFileName fileType:fileType persistentFile:persistentFile correlationId:correlationID]; +} + +(SDLReadDID*) buildReadDIDWithECUName:(NSNumber*) ecuName didLocation:(NSArray*) didLocation correlationID:(NSNumber*) correlationID { SDLReadDID* msg = [[SDLReadDID alloc] init]; @@ -323,7 +375,7 @@ correlationID{ } //***** RegisterAppInterface ***** -+(SDLRegisterAppInterface*) buildRegisterAppInterfaceWithAppName:(NSString*) appName ttsName:(NSMutableArray*) ttsName vrSynonyms:(NSMutableArray*) vrSynonyms isMediaApp:(NSNumber*) isMediaApp languageDesired:(SDLLanguage*) languageDesired hmiDisplayLanguageDesired:(SDLLanguage*) hmiDisplayLanguageDesired appID:(NSString*) appID { ++(SDLRegisterAppInterface*) buildRegisterAppInterfaceWithAppName:(NSString*) appName ttsName:(NSArray*) ttsName vrSynonyms:(NSArray*) vrSynonyms isMediaApp:(NSNumber*) isMediaApp languageDesired:(SDLLanguage*) languageDesired hmiDisplayLanguageDesired:(SDLLanguage*) hmiDisplayLanguageDesired appID:(NSString*) appID { SDLRegisterAppInterface* msg = [[SDLRegisterAppInterface alloc] init]; SDLSyncMsgVersion* version = [[SDLSyncMsgVersion alloc] init]; @@ -331,9 +383,9 @@ correlationID{ version.minorVersion = [NSNumber numberWithInt:0]; msg.syncMsgVersion = version; msg.appName = appName; - msg.ttsName = ttsName; + msg.ttsName = [ttsName mutableCopy]; msg.ngnMediaScreenAppName = appName; - msg.vrSynonyms = vrSynonyms; + msg.vrSynonyms = [vrSynonyms mutableCopy]; msg.isMediaApplication = isMediaApp; msg.languageDesired = languageDesired; msg.hmiDisplayLanguageDesired = hmiDisplayLanguageDesired; @@ -353,7 +405,7 @@ correlationID{ +(SDLRegisterAppInterface*) buildRegisterAppInterfaceWithAppName:(NSString*) appName languageDesired:(SDLLanguage*) languageDesired appID:(NSString*) appID{ - return [SDLRPCRequestFactory buildRegisterAppInterfaceWithAppName:appName isMediaApp:[NSNumber numberWithBool:NO] languageDesired:languageDesired appID: appID]; + return [SDLRPCRequestFactory buildRegisterAppInterfaceWithAppName:appName isMediaApp:@NO languageDesired:languageDesired appID: appID]; } //***** @@ -378,6 +430,19 @@ correlationID{ return msg; } ++(SDLSendLocation *) buildSendLocationWithLongitude:(NSNumber *)longitude latitude:(NSNumber *)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription address:(NSArray *)address phoneNumber:(NSString *)phoneNumber image:(SDLImage *)image { + SDLSendLocation *msg = [[SDLSendLocation alloc] init]; + msg.longitudeDegrees = longitude; + msg.latitudeDegrees = latitude; + msg.locationName = locationName; + msg.locationDescription = locationDescription; + msg.addressLines = address; + msg.phoneNumber = phoneNumber; + msg.locationImage = image; + + return msg; +} + +(SDLSetAppIcon*) buildSetAppIconWithFileName:(NSString*) syncFileName correlationID:(NSNumber*) correlationID { SDLSetAppIcon* msg = [[SDLSetAppIcon alloc] init]; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCResponse.h index 96ed729cf..c89fb87a4 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCResponse.h @@ -5,7 +5,7 @@ #import "SDLRPCMessage.h" -#import "SDLResult.h" +@class SDLResult; @interface SDLRPCResponse : SDLRPCMessage {} diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCResponse.m index 0e41cd6d8..6bc491899 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCResponse.m @@ -5,6 +5,7 @@ #import "SDLRPCResponse.h" #import "SDLNames.h" +#import "SDLResult.h" @implementation SDLRPCResponse diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCStruct.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCStruct.h new file mode 100644 index 000000000..fcecd0877 --- /dev/null +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCStruct.h @@ -0,0 +1,16 @@ +// +// SDLRPCStruct.h + + +@import Foundation; + +@interface SDLRPCStruct : NSObject { + NSMutableDictionary* store; +} + +-(id) initWithDictionary:(NSMutableDictionary*) dict; +-(id) init; + +-(NSMutableDictionary*) serializeAsDictionary:(Byte) version; + +@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCStruct.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCStruct.m new file mode 100644 index 000000000..5c3fe0184 --- /dev/null +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRPCStruct.m @@ -0,0 +1,84 @@ +// +// SDLRPCStruct.m + + +#import "SDLRPCStruct.h" + +#import "SDLEnum.h" +#import "SDLNames.h" + + +@implementation SDLRPCStruct + +-(id) initWithDictionary:(NSMutableDictionary*) dict { + if (self = [super init]) { + store = dict; + } + return self; +} + +-(id) init { + if (self = [super init]) { + store = [[NSMutableDictionary alloc] init]; + } + return self; +} + +-(NSMutableDictionary*) serializeDictionary:(NSDictionary*) dict version:(Byte) version { + + NSMutableDictionary* ret = [NSMutableDictionary dictionaryWithCapacity:dict.count]; + for (NSString* key in [dict keyEnumerator]) { + NSObject* value = [dict objectForKey:key]; + if ([value isKindOfClass:SDLRPCStruct.class]) { + [ret setObject:[(SDLRPCStruct*)value serializeAsDictionary:version] forKey:key]; + } else if ([value isKindOfClass:NSDictionary.class]) { + [ret setObject:[self serializeDictionary:(NSDictionary*)value version:version] forKey:key]; + } else if ([value isKindOfClass:NSArray.class]) { + NSArray* arrayVal = (NSArray*) value; + + if (arrayVal.count > 0 + && ([[arrayVal objectAtIndex:0] isKindOfClass:SDLRPCStruct.class])) { + NSMutableArray* serializedList = [NSMutableArray arrayWithCapacity:arrayVal.count]; + for (SDLRPCStruct* serializeable in arrayVal) { + [serializedList addObject:[serializeable serializeAsDictionary:version]]; + } + [ret setObject:serializedList forKey:key]; + } else if (arrayVal.count > 0 + && ([[arrayVal objectAtIndex:0] isKindOfClass:SDLEnum.class])) { + NSMutableArray* serializedList = [NSMutableArray arrayWithCapacity:arrayVal.count]; + for (SDLEnum* anEnum in arrayVal) { + [serializedList addObject:anEnum.value]; + } + [ret setObject:serializedList forKey:key]; + } else { + [ret setObject:value forKey:key]; + } + } else if ([value isKindOfClass:SDLEnum.class]) { + [ret setObject:((SDLEnum*)value).value forKey:key]; + } else { + [ret setObject:value forKey:key]; + } + } + return ret; +} + +-(NSMutableDictionary*) serializeAsDictionary:(Byte) version { + if (version == 2) { + NSString* messageType = [[store keyEnumerator] nextObject]; + NSMutableDictionary* function = [store objectForKey:messageType]; + if ([function isKindOfClass:NSMutableDictionary.class]) { + NSMutableDictionary* parameters = [function objectForKey:NAMES_parameters]; + return [self serializeDictionary:parameters version:version]; + } else { + return [self serializeDictionary:store version:version]; + } + } else { + return [self serializeDictionary:store version:version]; + } +} + +-(void) dealloc { + store = nil; +} + +@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDID.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDID.h index a5e4993d0..934ef814b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDID.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDID.h @@ -22,13 +22,13 @@ /** * @abstract Constructs a new SDLReadDID object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLReadDID object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract An ID of the vehicle module diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDID.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDID.m index bd19eab74..32e7fc5df 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDID.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDID.m @@ -8,12 +8,12 @@ @implementation SDLReadDID --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_ReadDID]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDIDResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDIDResponse.h index f168aca2b..82927e080 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDIDResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDIDResponse.h @@ -12,8 +12,8 @@ */ @interface SDLReadDIDResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSMutableArray* didResult; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDIDResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDIDResponse.m index 598b92650..6a82a40a1 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDIDResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLReadDIDResponse.m @@ -9,12 +9,12 @@ @implementation SDLReadDIDResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_ReadDID]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterface.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterface.h index ddbdf0c0e..e4c99cd41 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterface.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterface.h @@ -1,13 +1,12 @@ // SDLRegisterAppInterface.h // - - #import "SDLRPCRequest.h" -#import "SDLSyncMsgVersion.h" -#import "SDLLanguage.h" -#import "SDLDeviceInfo.h" +@class SDLDeviceInfo; +@class SDLLanguage; +@class SDLSyncMsgVersion; + /** * Registers the application's interface with SDL®, declaring properties of @@ -84,13 +83,13 @@ /** * @abstract Constructs a new SDLRegisterAppInterface object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLRegisterAppInterface object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract the version of the SDL® SmartDeviceLink interface diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterface.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterface.m index 82dffa212..7e46b8516 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterface.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterface.m @@ -4,18 +4,22 @@ #import "SDLRegisterAppInterface.h" +#import "SDLAppHMIType.h" +#import "SDLDeviceInfo.h" +#import "SDLLanguage.h" #import "SDLNames.h" #import "SDLTTSChunk.h" -#import "SDLAppHMIType.h" +#import "SDLSyncMsgVersion.h" + @implementation SDLRegisterAppInterface --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_RegisterAppInterface]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h index 1505f6987..407ba976a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h @@ -5,11 +5,12 @@ #import "SDLRPCResponse.h" -#import "SDLSyncMsgVersion.h" -#import "SDLLanguage.h" -#import "SDLDisplayCapabilities.h" -#import "SDLPresetBankCapabilities.h" -#import "SDLVehicleType.h" +@class SDLSyncMsgVersion; +@class SDLLanguage; +@class SDLDisplayCapabilities; +@class SDLPresetBankCapabilities; +@class SDLVehicleType; + /** * @abstract Register AppInterface Response is sent, when SDLRegisterAppInterface has been called @@ -21,13 +22,13 @@ /** * @abstract Constructs a new SDLRegisterAppInterfaceResponse object */ --(id) init; +-(instancetype) init; /** * Constructs a new SDLRegisterAppInterfaceResponse object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract The version of the SDL® SmartDeviceLink interface diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m index dfac86ff1..f85002c1c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m @@ -4,23 +4,29 @@ #import "SDLRegisterAppInterfaceResponse.h" -#import "SDLNames.h" +#import "SDLAudioPassThruCapabilities.h" #import "SDLButtonCapabilities.h" -#import "SDLSoftButtonCapabilities.h" +#import "SDLDisplayCapabilities.h" #import "SDLHmiZoneCapabilities.h" -#import "SDLSpeechCapabilities.h" +#import "SDLLanguage.h" +#import "SDLNames.h" #import "SDLPrerecordedSpeech.h" -#import "SDLVrCapabilities.h" -#import "SDLAudioPassThruCapabilities.h" +#import "SDLPresetBankCapabilities.h" +#import "SDLSoftButtonCapabilities.h" +#import "SDLSpeechCapabilities.h" +#import "SDLSyncMsgVersion.h" +#import "SDLVRCapabilities.h" +#import "SDLVehicleType.h" + @implementation SDLRegisterAppInterfaceResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_RegisterAppInterface]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } @@ -162,12 +168,12 @@ -(NSMutableArray*) hmiZoneCapabilities { NSMutableArray* array = [parameters objectForKey:NAMES_hmiZoneCapabilities]; - if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLHmiZoneCapabilities.class]) { + if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLHMIZoneCapabilities.class]) { return array; } else { NSMutableArray* newList = [NSMutableArray arrayWithCapacity:[array count]]; for (NSString* enumString in array) { - [newList addObject:[SDLHmiZoneCapabilities valueOf:enumString]]; + [newList addObject:[SDLHMIZoneCapabilities valueOf:enumString]]; } return newList; } @@ -225,12 +231,12 @@ -(NSMutableArray*) vrCapabilities { NSMutableArray* array = [parameters objectForKey:NAMES_vrCapabilities]; - if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLVrCapabilities.class]) { + if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLVRCapabilities.class]) { return array; } else { NSMutableArray* newList = [NSMutableArray arrayWithCapacity:[array count]]; for (NSString* enumString in array) { - [newList addObject:[SDLVrCapabilities valueOf:enumString]]; + [newList addObject:[SDLVRCapabilities valueOf:enumString]]; } return newList; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRequestType.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRequestType.h index 8c5e63142..08bff4792 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRequestType.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRequestType.h @@ -8,7 +8,7 @@ @interface SDLRequestType : SDLEnum {} +(SDLRequestType*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; +(SDLRequestType*) HTTP; +(SDLRequestType*) FILE_RESUME; @@ -16,5 +16,19 @@ +(SDLRequestType*) AUTH_CHALLENGE; +(SDLRequestType*) AUTH_ACK; +(SDLRequestType*) PROPRIETARY; ++(SDLRequestType*) QUERY_APPS; ++(SDLRequestType*) LAUNCH_APP; ++(SDLRequestType*) LOCK_SCREEN_ICON_URL; ++(SDLRequestType*) TRAFFIC_MESSAGE_CHANNEL; ++(SDLRequestType*) DRIVER_PROFILE; ++(SDLRequestType*) VOICE_SEARCH; ++(SDLRequestType*) NAVIGATION; ++(SDLRequestType*) PHONE; ++(SDLRequestType*) CLIMATE; ++(SDLRequestType*) SETTINGS; ++(SDLRequestType*) VEHICLE_DIAGNOSTICS; ++(SDLRequestType*) EMERGENCY; ++(SDLRequestType*) MEDIA; ++(SDLRequestType*) FOTA; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRequestType.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRequestType.m index 2f449d0fa..a7be571e6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLRequestType.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLRequestType.m @@ -10,8 +10,23 @@ SDLRequestType* SDLRequestType_AUTH_REQUEST = nil; SDLRequestType* SDLRequestType_AUTH_CHALLENGE = nil; SDLRequestType* SDLRequestType_AUTH_ACK = nil; SDLRequestType* SDLRequestType_PROPRIETARY = nil; +SDLRequestType* SDLRequestType_QUERY_APPS = nil; +SDLRequestType* SDLRequestType_LAUNCH_APP = nil; +SDLRequestType* SDLRequestType_LOCK_SCREEN_ICON_URL = nil; +SDLRequestType* SDLRequestType_TRAFFIC_MESSAGE_CHANNEL = nil; +SDLRequestType* SDLRequestType_DRIVER_PROFILE = nil; +SDLRequestType* SDLRequestType_VOICE_SEARCH = nil; +SDLRequestType* SDLRequestType_NAVIGATION = nil; +SDLRequestType* SDLRequestType_PHONE = nil; +SDLRequestType* SDLRequestType_CLIMATE = nil; +SDLRequestType* SDLRequestType_SETTINGS = nil; +SDLRequestType* SDLRequestType_VEHICLE_DIAGNOSTICS = nil; +SDLRequestType* SDLRequestType_EMERGENCY = nil; +SDLRequestType* SDLRequestType_MEDIA = nil; +SDLRequestType* SDLRequestType_FOTA = nil; + +NSArray* SDLRequestType_values = nil; -NSMutableArray* SDLRequestType_values = nil; @implementation SDLRequestType @@ -24,16 +39,30 @@ NSMutableArray* SDLRequestType_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLRequestType_values == nil) { - SDLRequestType_values = [[NSMutableArray alloc] initWithObjects: - SDLRequestType.HTTP, - SDLRequestType.FILE_RESUME, - SDLRequestType.AUTH_REQUEST, - SDLRequestType.AUTH_CHALLENGE, - SDLRequestType.AUTH_ACK, - SDLRequestType.PROPRIETARY, - nil]; + SDLRequestType_values = @[ + [SDLRequestType HTTP], + [SDLRequestType FILE_RESUME], + [SDLRequestType AUTH_REQUEST], + [SDLRequestType AUTH_CHALLENGE], + [SDLRequestType AUTH_ACK], + [SDLRequestType PROPRIETARY], + [SDLRequestType QUERY_APPS], + [SDLRequestType LAUNCH_APP], + [SDLRequestType LOCK_SCREEN_ICON_URL], + [SDLRequestType TRAFFIC_MESSAGE_CHANNEL], + [SDLRequestType DRIVER_PROFILE], + [SDLRequestType VOICE_SEARCH], + [SDLRequestType NAVIGATION], + [SDLRequestType PHONE], + [SDLRequestType CLIMATE], + [SDLRequestType SETTINGS], + [SDLRequestType VEHICLE_DIAGNOSTICS], + [SDLRequestType EMERGENCY], + [SDLRequestType MEDIA], + [SDLRequestType FOTA], + ]; } return SDLRequestType_values; } @@ -80,4 +109,102 @@ NSMutableArray* SDLRequestType_values = nil; return SDLRequestType_PROPRIETARY; } ++(SDLRequestType*) QUERY_APPS { + if (SDLRequestType_QUERY_APPS == nil) { + SDLRequestType_QUERY_APPS = [[SDLRequestType alloc] initWithValue:@"QUERY_APPS"]; + } + return SDLRequestType_QUERY_APPS; +} + ++(SDLRequestType*) LAUNCH_APP { + if (SDLRequestType_LAUNCH_APP == nil) { + SDLRequestType_LAUNCH_APP = [[SDLRequestType alloc] initWithValue:@"LAUNCH_APP"]; + } + return SDLRequestType_LAUNCH_APP; +} + ++(SDLRequestType*) LOCK_SCREEN_ICON_URL { + if (SDLRequestType_LOCK_SCREEN_ICON_URL == nil) { + SDLRequestType_LOCK_SCREEN_ICON_URL = [[SDLRequestType alloc] initWithValue:@"LOCK_SCREEN_ICON_URL"]; + } + return SDLRequestType_LOCK_SCREEN_ICON_URL; +} + ++(SDLRequestType*) TRAFFIC_MESSAGE_CHANNEL { + if (SDLRequestType_TRAFFIC_MESSAGE_CHANNEL == nil) { + SDLRequestType_TRAFFIC_MESSAGE_CHANNEL = [[SDLRequestType alloc] initWithValue:@"TRAFFIC_MESSAGE_CHANNEL"]; + } + return SDLRequestType_TRAFFIC_MESSAGE_CHANNEL; +} + ++(SDLRequestType*) DRIVER_PROFILE { + if (SDLRequestType_DRIVER_PROFILE == nil) { + SDLRequestType_DRIVER_PROFILE = [[SDLRequestType alloc] initWithValue:@"DRIVER_PROFILE"]; + } + return SDLRequestType_DRIVER_PROFILE; +} + ++(SDLRequestType*) VOICE_SEARCH { + if (SDLRequestType_VOICE_SEARCH == nil) { + SDLRequestType_VOICE_SEARCH = [[SDLRequestType alloc] initWithValue:@"VOICE_SEARCH"]; + } + return SDLRequestType_VOICE_SEARCH; +} + ++(SDLRequestType*) NAVIGATION { + if (SDLRequestType_NAVIGATION == nil) { + SDLRequestType_NAVIGATION = [[SDLRequestType alloc] initWithValue:@"NAVIGATION"]; + } + return SDLRequestType_NAVIGATION; +} + ++(SDLRequestType*) PHONE { + if (SDLRequestType_PHONE == nil) { + SDLRequestType_PHONE = [[SDLRequestType alloc] initWithValue:@"PHONE"]; + } + return SDLRequestType_PHONE; +} + ++(SDLRequestType*) CLIMATE { + if (SDLRequestType_CLIMATE == nil) { + SDLRequestType_CLIMATE = [[SDLRequestType alloc] initWithValue:@"CLIMATE"]; + } + return SDLRequestType_CLIMATE; +} + ++(SDLRequestType*) SETTINGS { + if (SDLRequestType_SETTINGS == nil) { + SDLRequestType_SETTINGS = [[SDLRequestType alloc] initWithValue:@"SETTINGS"]; + } + return SDLRequestType_SETTINGS; +} + ++(SDLRequestType*) VEHICLE_DIAGNOSTICS { + if (SDLRequestType_VEHICLE_DIAGNOSTICS == nil) { + SDLRequestType_VEHICLE_DIAGNOSTICS = [[SDLRequestType alloc] initWithValue:@"VEHICLE_DIAGNOSTICS"]; + } + return SDLRequestType_VEHICLE_DIAGNOSTICS; +} + ++(SDLRequestType*) EMERGENCY { + if (SDLRequestType_EMERGENCY == nil) { + SDLRequestType_EMERGENCY = [[SDLRequestType alloc] initWithValue:@"EMERGENCY"]; + } + return SDLRequestType_EMERGENCY; +} + ++(SDLRequestType*) MEDIA { + if (SDLRequestType_MEDIA == nil) { + SDLRequestType_MEDIA = [[SDLRequestType alloc] initWithValue:@"MEDIA"]; + } + return SDLRequestType_MEDIA; +} + ++(SDLRequestType*) FOTA { + if (SDLRequestType_FOTA == nil) { + SDLRequestType_FOTA = [[SDLRequestType alloc] initWithValue:@"FOTA"]; + } + return SDLRequestType_FOTA; +} + @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalProperties.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalProperties.h index 9ef286e77..857ae18b7 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalProperties.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalProperties.h @@ -26,13 +26,13 @@ /** * @abstract Constructs a new SDLResetGlobalProperties object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLResetGlobalProperties object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract An array of one or more GlobalProperty enumeration elements diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalProperties.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalProperties.m index 07ff6fae7..4dca924e7 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalProperties.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalProperties.m @@ -9,12 +9,12 @@ @implementation SDLResetGlobalProperties --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_ResetGlobalProperties]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalPropertiesResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalPropertiesResponse.h index 72e1bc914..17baaf7ff 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalPropertiesResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalPropertiesResponse.h @@ -15,12 +15,12 @@ /** * @abstract Constructs a new SDLResetGlobalPropertiesResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLResetGlobalPropertiesResponse object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalPropertiesResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalPropertiesResponse.m index 65d8b1fe0..9d421d484 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalPropertiesResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLResetGlobalPropertiesResponse.m @@ -8,12 +8,12 @@ @implementation SDLResetGlobalPropertiesResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_ResetGlobalProperties]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLResult.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLResult.h index b75324044..083798706 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLResult.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLResult.h @@ -20,17 +20,18 @@ @result SDLResult object */ +(SDLResult*) valueOf:(NSString*) value; + /*! @abstract declare an array to store all possible SDLResult values @result return the array */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract The request succeeded - * @result return the result code of <font color=gray><i> SUCCESS </i></font> */ +(SDLResult*) SUCCESS; + /** * @abstract Result code : Invalid Data * @discussion The data sent is invalid. For example:<br/> @@ -42,26 +43,26 @@ * <li>Invalid characters</li> * <li>Empty string</li> * </ul> - * @result return the result code of <font color=gray><i> INVALID_DATA </i></font> */ +(SDLResult*) INVALID_DATA; + /** * @abstract The request is not supported by SDL - * @result return the result code of <font color=gray><i> UNSUPPORTED_REQUEST </i></font> */ +(SDLResult*) UNSUPPORTED_REQUEST; + /** * @abstract The system could not process the request because the necessary memory * couldn't be allocated - * @result return the result code of <font color=gray><i> OUT_OF_MEMORY </i></font> */ +(SDLResult*) OUT_OF_MEMORY; + /** * @abstract There are too many requests pending (means that the response has not been * delivered yet). There is a limit of 1000 pending requests at a time - * @result return the result code of <font color=gray><i> TOO_MANY_PENDING_REQUESTS </i></font> */ +(SDLResult*) TOO_MANY_PENDING_REQUESTS; + /** * @abstract One of the provided IDs is not valid. * @discussion For example:<br/> @@ -70,129 +71,137 @@ * <li>CommandID</li> * <li>MenuID</li> * </ul> - * @result return the result code of <font color=gray><i> INVALID_ID </i></font> */ +(SDLResult*) INVALID_ID; + /** - * @abstract The provided name or synonym is a duplicate of some already-defined name - * or synonym. - * @result return the result code of <font color=gray><i> DUPLICATE_NAME </i></font> + * @abstract The provided name or synonym is a duplicate of some already-defined name or synonym. */ +(SDLResult*) DUPLICATE_NAME; + /** - * @abstract Specified application name is already associated with an active interface - * registration. Attempts at doing a second <i> - * RegisterAppInterface</i> on a - * given protocol session will also cause this result. - * @result return the result code of <font color=gray><i> TOO_MANY_APPLICATIONS </i></font> + * There are already too many registered applications */ +(SDLResult*) TOO_MANY_APPLICATIONS; + /** - * @abstract SDL does not support the interface version requested by the mobile - * application. - * @result return the result code of <font color=gray><i> APPLICATION_REGISTERED_ALREADY </i></font> + * RegisterApplication has been called again, after a RegisterApplication was successful before */ +(SDLResult*) APPLICATION_REGISTERED_ALREADY; + /** - * @abstract The requested language is currently not supported. Might be because of a - * mismatch of the currently active language. - * @result return the result code of <font color=gray><i> UNSUPPORTED_VERSION </i></font> + * The Head Unit doesn't support the protocol that is requested by the mobile application */ +(SDLResult*) UNSUPPORTED_VERSION; + /** - * @abstract The request cannot be executed because no application interface has been - * registered via - * <i>RegisterAppInterface</i> - * @result return the result code of <font color=gray><i> WRONG_LANGUAGE </i></font> + * The requested language is currently not supported. Might be because of a mismatch of the currently active language on Sync and the requested language */ +(SDLResult*) WRONG_LANGUAGE; + /** - * @abstract The request cannot be executed because no application interface has been - * registered via <i> - * RegisterAppInterface</i> - * @result return the result code of <font color=gray><i> APPLICATION_NOT_REGISTERED </i></font> + * A command can not be executed because no application has been registered with RegisterApplication */ +(SDLResult*) APPLICATION_NOT_REGISTERED; + /** - * @abstract The data may not be changed, because it is currently in use. For example, - * when trying to delete a Choice Set that is currently involved in an - * interaction. - * @result return the result code of <font color=gray><i> IN_USE </i></font> + * The data may not be changed, because it is currently in use. For example when trying to delete a command set that is currently involved in an interaction. */ +(SDLResult*) IN_USE; + /** - * @abstract There is already an existing subscription for this item. - * @result return the result code of <font color=gray><i> VEHICLE_DATA_NOT_ALLOWED </i></font> + * The user has turned off access to vehicle data, and it is globally unavailable to mobile applications */ +(SDLResult*) VEHICLE_DATA_NOT_ALLOWED; -/*! - @result return the result code of <font color=gray><i> VEHICLE_DATA_NOT_AVAILABLE </i></font> + +/** + * The requested vehicle data is not available on this vehicle or is not published */ +(SDLResult*) VEHICLE_DATA_NOT_AVAILABLE; + /** - * @abstract The requested operation was rejected. No attempt was made to perform the - * operation. - * @result return the result code of <font color=gray><i> REJECTED </i></font> + * The requested command was rejected, e.g. because mobile app is in background and cannot perform any HMI commands. Or an HMI command (e.g. Speak) is rejected because a higher priority HMI command (e.g. Alert) is playing. */ +(SDLResult*) REJECTED; -/*! - @abstract The requested operation was aborted due to some pre-empting event (e.g. button push, <i>Alert</i>, pre-empts <i>Speak</i>, etc.) - @result return the result code of <font color=gray><i> ABORTED </i></font> +/** + * A command was aborted, for example due to user interaction (e.g. user pressed button). Or an HMI command (e.g. Speak) is aborted because a higher priority HMI command (e.g. Alert) was requested. */ +(SDLResult*) ABORTED; + /** - * @abstract The requested operation was ignored because it was determined to be - * redundant (e.g. pause media clock when already paused). - * @result return the result code of <font color=gray><i> IGNORED </i></font> + * A command was ignored, because the intended result is already in effect. For example, SetMediaClockTimer was used to pause the media clock although the clock is paused already. */ +(SDLResult*) IGNORED; + /** - * @abstract A button that was requested for subscription is not supported on the - * currently connected SDL platform. See DisplayCapabilities for further - * information on supported buttons on the currently connected SDL platform - * @result return the result code of <font color=gray><i> UNSUPPORTED_RESOURCE </i></font> + * A button that was requested for subscription is not supported under the current system. */ +(SDLResult*) UNSUPPORTED_RESOURCE; -/*! - @result return the result code of <font color=gray><i> FILE_NOT_FOUND </i></font> + +/** + * A specified file could not be found on the head unit */ +(SDLResult*) FILE_NOT_FOUND; -/*! - @result return the result code of <font color=gray><i> GENERIC_ERROR </i></font> + +/** + * Provided data is valid but something went wrong in the lower layers */ +(SDLResult*) GENERIC_ERROR; -/*! - @result return the result code of <font color=gray><i> DISALLOWED </i></font> + +/** + * RPC is not authorized in local policy table */ +(SDLResult*) DISALLOWED; -/*! - @result return the result code of <font color=gray><i> USER_DISALLOWED </i></font> + +/** + * RPC is included in a functional group explicitly blocked by the user */ +(SDLResult*) USER_DISALLOWED; -/*! - @result return the result code of <font color=gray><i> TIMED_OUT </i></font> + +/** + * Overlay reached the maximum timeout and closed */ +(SDLResult*) TIMED_OUT; -/*! - @result return the result code of <font color=gray><i> CANCEL_ROUTE </i></font> + +/** + * User selected to Cancel Route */ +(SDLResult*) CANCEL_ROUTE; -/*! - @result return the result code of <font color=gray><i> TRUNCATED_DATA </i></font> + +/** + * The RPC (e.g. ReadDID) executed successfully but the data exceeded the platform maximum threshold and thus, only part of the data is available */ +(SDLResult*) TRUNCATED_DATA; -/*! - @result return the result code of <font color=gray><i> RETRY </i></font> + +/** + * The user interrupted the RPC (e.g. PerformAudioPassThru) and indicated to start over. Note, the app must issue the new RPC */ +(SDLResult*) RETRY; -/*! - @result return the result code of <font color=gray><i> WARNINGS </i></font> + +/** + * The RPC (e.g. SubscribeVehicleData) executed successfully but one or more items have a warning or failure. */ +(SDLResult*) WARNINGS; + +/** + * The RPC (e.g. Slider) executed successfully and the user elected to save the current position / value + */ +(SDLResult*) SAVED; + +/** + * The certificate provided during authentication is invalid + */ +(SDLResult*) INVALID_CERT; + +/** + * The certificate provided during authentication is expired + */ +(SDLResult*) EXPIRED_CERT; + +/** + * The provided hash ID does not match the hash of the current set of registered data or the core could not resume the previous data. + */ +(SDLResult*) RESUME_FAILED; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLResult.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLResult.m index 225ae9503..1533dd684 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLResult.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLResult.m @@ -37,7 +37,7 @@ SDLResult* SDLResult_INVALID_CERT = nil; SDLResult* SDLResult_EXPIRED_CERT = nil; SDLResult* SDLResult_RESUME_FAILED = nil; -NSMutableArray* SDLResult_values = nil; +NSArray* SDLResult_values = nil; @implementation SDLResult @@ -50,9 +50,9 @@ NSMutableArray* SDLResult_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLResult_values == nil) { - SDLResult_values = [[NSMutableArray alloc] initWithObjects: + SDLResult_values = @[ SDLResult.SUCCESS, SDLResult.INVALID_DATA, SDLResult.UNSUPPORTED_REQUEST, @@ -85,7 +85,7 @@ NSMutableArray* SDLResult_values = nil; SDLResult.INVALID_CERT, SDLResult.EXPIRED_CERT, SDLResult.RESUME_FAILED, - nil]; + ]; } return SDLResult_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSamplingRate.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSamplingRate.h index 043cd1642..148797532 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSamplingRate.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSamplingRate.h @@ -21,7 +21,7 @@ @abstract declare an array to store all possible SDLSamplingRate values @result return the array */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Sampling rate of 8 kHz diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSamplingRate.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSamplingRate.m index bf44bf456..9e102be63 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSamplingRate.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSamplingRate.m @@ -9,7 +9,7 @@ SDLSamplingRate* SDLSamplingRate_16KHZ = nil; SDLSamplingRate* SDLSamplingRate_22KHZ = nil; SDLSamplingRate* SDLSamplingRate_44KHZ = nil; -NSMutableArray* SDLSamplingRate_values = nil; +NSArray* SDLSamplingRate_values = nil; @implementation SDLSamplingRate @@ -22,14 +22,14 @@ NSMutableArray* SDLSamplingRate_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLSamplingRate_values == nil) { - SDLSamplingRate_values = [[NSMutableArray alloc] initWithObjects: + SDLSamplingRate_values = @[ SDLSamplingRate._8KHZ, SDLSamplingRate._16KHZ, SDLSamplingRate._22KHZ, SDLSamplingRate._44KHZ, - nil]; + ]; } return SDLSamplingRate_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLScreenParams.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLScreenParams.h index be5d1b425..d416398fc 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLScreenParams.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLScreenParams.h @@ -1,17 +1,16 @@ // SDLScreenParams.h // - - #import "SDLRPCMessage.h" -#import "SDLImageResolution.h" -#import "SDLTouchEventCapabilities.h" +@class SDLImageResolution; +@class SDLTouchEventCapabilities; + @interface SDLScreenParams : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLImageResolution* resolution; @property(strong) SDLTouchEventCapabilities* touchEventAvailable; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLScreenParams.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLScreenParams.m index 89b9209b0..396b323c3 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLScreenParams.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLScreenParams.m @@ -1,19 +1,21 @@ // SDLScreenParams.m // - #import "SDLScreenParams.h" +#import "SDLImageResolution.h" #import "SDLNames.h" +#import "SDLTouchEventCapabilities.h" + @implementation SDLScreenParams --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessage.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessage.h index 4a717b62c..670865e2e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessage.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessage.h @@ -19,13 +19,13 @@ /** * @abstract Constructs a new SDLScrollableMessage object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLScrollableMessage object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract A Body of text that can include newlines and tabs diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessage.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessage.m index 13f72f218..3b7752613 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessage.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessage.m @@ -9,12 +9,12 @@ @implementation SDLScrollableMessage --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_ScrollableMessage]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessageResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessageResponse.h index 908d2518b..52193d6d8 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessageResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessageResponse.h @@ -15,12 +15,12 @@ /** * @abstract Constructs a new SDLScrollableMessageResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLScrollableMessageResponse object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessageResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessageResponse.m index fa7fecc69..44f2c1151 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessageResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLScrollableMessageResponse.m @@ -8,12 +8,12 @@ @implementation SDLScrollableMessageResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_ScrollableMessage]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocation.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocation.h new file mode 100644 index 000000000..ccebcdecd --- /dev/null +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocation.h @@ -0,0 +1,65 @@ +// +// SDLSendLocation.h +// SmartDeviceLink + +@import Foundation; + +#import "SDLImage.h" +#import "SDLRPCRequest.h" + + +@interface SDLSendLocation : SDLRPCRequest + +- (instancetype)init; +- (instancetype)initWithDictionary:(NSMutableDictionary *)dict; + +/** + * The longitudinal coordinate of the location. + * + * Float, Required, -180.0 - 180.0 + */ +@property (copy, nonatomic) NSNumber *longitudeDegrees; + +/** + * The latitudinal coordinate of the location. + * + * Float, Required, -90.0 - 90.0 + */ +@property (copy, nonatomic) NSNumber *latitudeDegrees; + +/** + * Name / title of intended location + * + * Optional, Maxlength = 500 char + */ +@property (copy, nonatomic) NSString *locationName; + +/** + * Description of the intended location / establishment + * + * Optional, MaxLength = 500 char + */ +@property (copy, nonatomic) NSString *locationDescription; + +/** + * Array of lines for the location address + * + * Contains String, Optional, Max Array Length = 4, Max String Length = 500 + */ +@property (copy, nonatomic) NSArray *addressLines; + +/** + * Phone number of intended location / establishment + * + * Optional, Max Length = 500 + */ +@property (copy, nonatomic) NSString *phoneNumber; + +/** + * Image / icon of intended location + * + * Optional + */ +@property (strong, nonatomic) SDLImage *locationImage; + +@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocation.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocation.m new file mode 100644 index 000000000..c19195f23 --- /dev/null +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocation.m @@ -0,0 +1,107 @@ +// +// SDLSendLocation.m +// SmartDeviceLink + +#import "SDLSendLocation.h" + +#import "SDLNames.h" + + +@implementation SDLSendLocation + +- (instancetype)init { + self = [super initWithName:NAMES_SendLocation]; + if (!self) { + return nil; + } + + return self; +} + +- (instancetype)initWithDictionary:(NSMutableDictionary *)dict { + self = [super initWithDictionary:dict]; + if (!self) { + return nil; + } + + return self; +} + +- (void)setLongitudeDegrees:(NSNumber *)longitudeDegrees { + if (longitudeDegrees != nil) { + parameters[NAMES_longitudeDegrees] = longitudeDegrees; + } else { + [parameters removeObjectForKey:NAMES_longitudeDegrees]; + } +} + +- (NSNumber *)longitudeDegrees { + return parameters[NAMES_longitudeDegrees]; +} + +- (void)setLatitudeDegrees:(NSNumber *)latitudeDegrees { + if (latitudeDegrees != nil) { + parameters[NAMES_latitudeDegrees] = latitudeDegrees; + } else { + [parameters removeObjectForKey:NAMES_latitudeDegrees]; + } +} + +- (NSNumber *)latitudeDegrees { + return parameters[NAMES_latitudeDegrees]; +} + +- (void)setLocationName:(NSString *)locationName { + if (locationName != nil) { + parameters[NAMES_locationName] = locationName; + } else { + [parameters removeObjectForKey:NAMES_locationName]; + } +} + +- (NSString *)locationName { + return parameters[NAMES_locationName]; +} + +- (void)setAddressLines:(NSArray *)addressLines { + if (addressLines != nil) { + parameters[NAMES_addressLines] = addressLines; + } else { + [parameters removeObjectForKey:NAMES_addressLines]; + } +} + +- (NSArray *)addressLines { + return parameters[NAMES_addressLines]; +} + +- (void)setPhoneNumber:(NSString *)phoneNumber { + if (phoneNumber != nil) { + parameters[NAMES_phoneNumber] = phoneNumber; + } else { + [parameters removeObjectForKey:NAMES_phoneNumber]; + } +} + +- (NSString *)phoneNumber { + return parameters[NAMES_phoneNumber]; +} + +- (void)setLocationImage:(SDLImage *)locationImage { + if (locationImage != nil) { + parameters[NAMES_locationImage] = locationImage; + } else { + [parameters removeObjectForKey:NAMES_locationImage]; + } +} + +- (SDLImage *)locationImage { + id obj = parameters[NAMES_locationImage]; + if ([obj isKindOfClass:[SDLImage class]]) { + return (SDLImage *)obj; + } else { + return [[SDLImage alloc] initWithDictionary:obj]; + } +} + +@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocationResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocationResponse.h new file mode 100644 index 000000000..81bf6ce21 --- /dev/null +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocationResponse.h @@ -0,0 +1,16 @@ +// +// SDLSendLocationResponse.h +// SmartDeviceLink-iOS +// +// Created by Joel Fischer on 4/2/15. +// Copyright (c) 2015 smartdevicelink. All rights reserved. +// + +#import <SmartDeviceLink/SmartDeviceLink.h> + +@interface SDLSendLocationResponse : SDLRPCResponse + +- (instancetype)init; +- (instancetype)initWithDictionary:(NSMutableDictionary *)dict; + +@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocationResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocationResponse.m new file mode 100644 index 000000000..13c914c49 --- /dev/null +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSendLocationResponse.m @@ -0,0 +1,34 @@ +// +// SDLSendLocationResponse.m +// SmartDeviceLink-iOS +// +// Created by Joel Fischer on 4/2/15. +// Copyright (c) 2015 smartdevicelink. All rights reserved. +// + +#import "SDLSendLocationResponse.h" + +#import "SDLNames.h" + + +@implementation SDLSendLocationResponse + +- (instancetype)init { + self = [super initWithName:NAMES_SendLocation]; + if (!self) { + return nil; + } + + return self; +} + +- (instancetype)initWithDictionary:(NSMutableDictionary *)dict { + self = [super initWithDictionary:dict]; + if (!self) { + return nil; + } + + return self; +} + +@end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIcon.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIcon.h index 1fcd6e1dc..594e9fc1d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIcon.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIcon.h @@ -17,12 +17,12 @@ /** * @abstract Constructs a new SDLSetAppIcon object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLSetAppIcon object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract A file reference name diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIcon.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIcon.m index ba287c1f5..d8f9f7a63 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIcon.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIcon.m @@ -8,12 +8,12 @@ @implementation SDLSetAppIcon --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SetAppIcon]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIconResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIconResponse.h index 2366c65fe..90c1c1fc3 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIconResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIconResponse.h @@ -10,7 +10,7 @@ */ @interface SDLSetAppIconResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIconResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIconResponse.m index cfd817574..674127dc5 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIconResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetAppIconResponse.m @@ -8,12 +8,12 @@ @implementation SDLSetAppIconResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SetAppIcon]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayout.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayout.h index 705ffb09d..1beb27a3d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayout.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayout.h @@ -16,13 +16,13 @@ /** * @abstract Constructs a new SDLSetDisplayLayout object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLSetDisplayLayout object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract A display layout. Predefined or dynamically created screen layout. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayout.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayout.m index 2a53fbc78..f13ca1dad 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayout.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayout.m @@ -8,12 +8,12 @@ @implementation SDLSetDisplayLayout --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SetDisplayLayout]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayoutResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayoutResponse.h index edaa41d9b..c1fe8c5bf 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayoutResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayoutResponse.h @@ -1,12 +1,11 @@ // SDLSetDisplayLayoutResponse.h // - - #import "SDLRPCResponse.h" -#import "SDLDisplayCapabilities.h" -#import "SDLPresetBankCapabilities.h" +@class SDLDisplayCapabilities; +@class SDLPresetBankCapabilities; + /** * Set Display Layout Response is sent, when SetDisplayLayout has been called @@ -18,8 +17,8 @@ /** * @abstract Constructs a new SDLSetDisplayLayoutResponse object */ --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLDisplayCapabilities* displayCapabilities; @property(strong) NSMutableArray* buttonCapabilities; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayoutResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayoutResponse.m index cf52abe58..760a6cf9e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayoutResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetDisplayLayoutResponse.m @@ -4,18 +4,21 @@ #import "SDLSetDisplayLayoutResponse.h" -#import "SDLNames.h" #import "SDLButtonCapabilities.h" +#import "SDLDisplayCapabilities.h" +#import "SDLNames.h" +#import "SDLPresetBankCapabilities.h" #import "SDLSoftButtonCapabilities.h" + @implementation SDLSetDisplayLayoutResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SetDisplayLayout]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalProperties.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalProperties.h index 660100dfe..84e0b0b47 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalProperties.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalProperties.h @@ -1,12 +1,11 @@ // SDLSetGlobalProperties.h // - - #import "SDLRPCRequest.h" -#import "SDLImage.h" -#import "SDLKeyboardProperties.h" +@class SDLImage; +@class SDLKeyboardProperties; + /** * Sets value(s) for the specified global property(ies) @@ -23,13 +22,13 @@ /** * @abstract Constructs a new SDLSetGlobalProperties object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLSetGlobalProperties object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract Sets a Vector<TTSChunk> for Help Prompt that Array of one or more diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalProperties.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalProperties.m index 2d2d47454..2aa816ad1 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalProperties.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalProperties.m @@ -4,18 +4,21 @@ #import "SDLSetGlobalProperties.h" +#import "SDLImage.h" +#import "SDLKeyboardProperties.h" #import "SDLNames.h" #import "SDLTTSChunk.h" -#import "SDLVrHelpItem.h" +#import "SDLVRHelpItem.h" + @implementation SDLSetGlobalProperties --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SetGlobalProperties]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } @@ -84,12 +87,12 @@ -(NSMutableArray*) vrHelp { NSMutableArray* array = [parameters objectForKey:NAMES_vrHelp]; - if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLVrHelpItem.class]) { + if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLVRHelpItem.class]) { return array; } else { NSMutableArray* newList = [NSMutableArray arrayWithCapacity:[array count]]; for (NSDictionary* dict in array) { - [newList addObject:[[SDLVrHelpItem alloc] initWithDictionary:(NSMutableDictionary*)dict]]; + [newList addObject:[[SDLVRHelpItem alloc] initWithDictionary:(NSMutableDictionary*)dict]]; } return newList; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalPropertiesResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalPropertiesResponse.h index 06438af9e..8e63d24a9 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalPropertiesResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalPropertiesResponse.h @@ -15,12 +15,12 @@ /** * @abstract Constructs a new SDLSetGlobalPropertiesResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLSetGlobalPropertiesResponse object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalPropertiesResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalPropertiesResponse.m index 96171c7f0..ef60ac45c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalPropertiesResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetGlobalPropertiesResponse.m @@ -8,12 +8,12 @@ @implementation SDLSetGlobalPropertiesResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SetGlobalProperties]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimer.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimer.h index 04bcd298b..be53ac204 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimer.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimer.h @@ -1,12 +1,11 @@ // SDLSetMediaClockTimer.h // - - #import "SDLRPCRequest.h" -#import "SDLStartTime.h" -#import "SDLUpdateMode.h" +@class SDLStartTime; +@class SDLUpdateMode; + /** * Sets the media clock/timer value and the update method (e.g.count-up, @@ -23,13 +22,13 @@ /** * @abstract Constructs a new SDLSetMediaClockTimer object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLSetMediaClockTimer object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract A Start Time with specifying hour, minute, second values diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimer.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimer.m index be32759fc..f45cf90db 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimer.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimer.m @@ -5,15 +5,18 @@ #import "SDLSetMediaClockTimer.h" #import "SDLNames.h" +#import "SDLStartTime.h" +#import "SDLUpdateMode.h" + @implementation SDLSetMediaClockTimer --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SetMediaClockTimer]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimerResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimerResponse.h index 85124d9ca..100fb5da5 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimerResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimerResponse.h @@ -15,7 +15,7 @@ /** * @abstract Constructs a new SDLSetMediaClockTimerResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLSetMediaClockTimerResponse object indicated by the NSMutableDictionary * parameter @@ -23,6 +23,6 @@ * * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimerResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimerResponse.m index 63c937c53..0ec2a9d97 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimerResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSetMediaClockTimerResponse.m @@ -8,12 +8,12 @@ @implementation SDLSetMediaClockTimerResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SetMediaClockTimer]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShow.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShow.h index a68dc6878..9f2600bae 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShow.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShow.h @@ -1,12 +1,11 @@ // SDLShow.h // - - #import "SDLRPCRequest.h" -#import "SDLTextAlignment.h" -#import "SDLImage.h" +@class SDLImage; +@class SDLTextAlignment; + /** * Updates the application's display text area, regardless of whether or not @@ -35,12 +34,12 @@ /** * @abstract Constructs a new SDLShow object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLShow object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract The text displayed in a single-line display, or in the upper display diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShow.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShow.m index a9c0a499a..15242b05c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShow.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShow.m @@ -4,17 +4,20 @@ #import "SDLShow.h" +#import "SDLImage.h" #import "SDLNames.h" #import "SDLSoftButton.h" +#import "SDLTextAlignment.h" + @implementation SDLShow --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_Show]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBT.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBT.h index 5eed2bed4..ddd510af8 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBT.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBT.h @@ -1,11 +1,10 @@ // SDLShowConstantTBT.h // - - #import "SDLRPCRequest.h" -#import "SDLImage.h" +@class SDLImage; + /** This RPC is used to update the user with navigation information<br> * for the constantly shown screen (base screen),but also for the<br> @@ -15,8 +14,8 @@ */ @interface SDLShowConstantTBT : SDLRPCRequest {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSString* navigationText1; @property(strong) NSString* navigationText2; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBT.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBT.m index 8bc0a258f..ab880cb6f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBT.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBT.m @@ -4,17 +4,19 @@ #import "SDLShowConstantTBT.h" +#import "SDLImage.h" #import "SDLNames.h" #import "SDLSoftButton.h" + @implementation SDLShowConstantTBT --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_ShowConstantTBT]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBTResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBTResponse.h index 3e399bcd5..b20e7e18e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBTResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBTResponse.h @@ -10,7 +10,7 @@ */ @interface SDLShowConstantTBTResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBTResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBTResponse.m index 87a8153be..dc10cc585 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBTResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowConstantTBTResponse.m @@ -8,12 +8,12 @@ @implementation SDLShowConstantTBTResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_ShowConstantTBT]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowResponse.h index 58e7e80a4..44f40df0c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowResponse.h @@ -15,12 +15,12 @@ /** * @abstract Constructs a new SDLShowResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLShowResponse object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowResponse.m index 7db77048f..71fab35f8 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLShowResponse.m @@ -8,12 +8,12 @@ @implementation SDLShowResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_Show]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSingleTireStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSingleTireStatus.h index ee60e5a03..240f613f2 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSingleTireStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSingleTireStatus.h @@ -1,11 +1,10 @@ // SDLSingleTireStatus.h // - - #import "SDLRPCMessage.h" -#import "SDLComponentVolumeStatus.h" +@class SDLComponentVolumeStatus; + /** * Tire pressure status of a single tire. @@ -33,13 +32,13 @@ /** * @abstract Constructs a newly allocated SDLSingleTireStatus object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a newly allocated SDLSingleTireStatus object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract The volume status of a single tire diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSingleTireStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSingleTireStatus.m index afbdf5640..b24a60f97 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSingleTireStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSingleTireStatus.m @@ -1,19 +1,20 @@ // SDLSingleTireStatus.m // - #import "SDLSingleTireStatus.h" +#import "SDLComponentVolumeStatus.h" #import "SDLNames.h" + @implementation SDLSingleTireStatus --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSiphonServer.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSiphonServer.m index c97e60195..227b40259 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSiphonServer.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSiphonServer.m @@ -46,6 +46,7 @@ bool _sendSiphonData(const void* dataBytes, int dataBytesLength, SiphonDataType void _startServerOnPort(int port); void _stopServer(NSString *reason); + @implementation SDLSiphonServer // Model currently counts on init being called before any apps call _siphonNSLogData() diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSlider.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSlider.h index dbd61ebeb..97568f285 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSlider.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSlider.h @@ -22,12 +22,12 @@ /** * @abstract Constructs a new SDLSlider object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLSlider object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract A number of selectable items on a horizontal axis diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSlider.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSlider.m index a27f254e3..8afa6589c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSlider.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSlider.m @@ -8,12 +8,12 @@ @implementation SDLSlider --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_Slider]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSliderResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSliderResponse.h index 7abed2048..26fe1f9e2 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSliderResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSliderResponse.h @@ -15,13 +15,13 @@ /** * @abstract Constructs a new SDLSliderResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLSliderResponse object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract The selected position of the slider. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSliderResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSliderResponse.m index 484ffaf92..756b6dbd4 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSliderResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSliderResponse.m @@ -8,12 +8,12 @@ @implementation SDLSliderResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_Slider]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButton.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButton.h index 5f00d8742..d893ef748 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButton.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButton.h @@ -1,18 +1,17 @@ // SDLSoftButton.h // - - #import "SDLRPCMessage.h" -#import "SDLSoftButtonType.h" -#import "SDLImage.h" -#import "SDLSystemAction.h" +@class SDLImage; +@class SDLSoftButtonType; +@class SDLSystemAction; + @interface SDLSoftButton : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLSoftButtonType* type; @property(strong) NSString* text; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButton.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButton.m index b459b36f6..41ac09618 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButton.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButton.m @@ -1,19 +1,22 @@ // SDLSoftButton.m // - #import "SDLSoftButton.h" +#import "SDLImage.h" #import "SDLNames.h" +#import "SDLSoftButtonType.h" +#import "SDLSystemAction.h" + @implementation SDLSoftButton --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonCapabilities.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonCapabilities.h index 32deeac6f..d1c603acc 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonCapabilities.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonCapabilities.h @@ -54,12 +54,12 @@ /** * @abstract Constructs a newly allocated SDLSoftButtonCapabilities object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a newly allocated SDLSoftButtonCapabilities object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract The button supports a short press. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonCapabilities.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonCapabilities.m index 0bd77a59f..b7de33b86 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonCapabilities.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonCapabilities.m @@ -8,12 +8,12 @@ @implementation SDLSoftButtonCapabilities --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonType.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonType.h index c7962bb0b..7028064a4 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonType.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonType.h @@ -20,7 +20,7 @@ @abstract declare an array to store all possible SDLSoftButtonType values @result return the array */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract Text kind Softbutton diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonType.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonType.m index 9526e282e..7117fceda 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonType.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSoftButtonType.m @@ -8,7 +8,7 @@ SDLSoftButtonType* SDLSoftButtonType_TEXT = nil; SDLSoftButtonType* SDLSoftButtonType_IMAGE = nil; SDLSoftButtonType* SDLSoftButtonType_BOTH = nil; -NSMutableArray* SDLSoftButtonType_values = nil; +NSArray* SDLSoftButtonType_values = nil; @implementation SDLSoftButtonType @@ -21,13 +21,13 @@ NSMutableArray* SDLSoftButtonType_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLSoftButtonType_values == nil) { - SDLSoftButtonType_values = [[NSMutableArray alloc] initWithObjects: + SDLSoftButtonType_values = @[ SDLSoftButtonType.TEXT, SDLSoftButtonType.IMAGE, SDLSoftButtonType.BOTH, - nil]; + ]; } return SDLSoftButtonType_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeak.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeak.h index 6d8096b15..2c0e3b349 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeak.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeak.h @@ -79,12 +79,12 @@ /** * @abstract Constructs a new SDLSpeak object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLSpeak object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract A Vector<TTSChunk> representing an array of 1-100 TTSChunk structs diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeak.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeak.m index 2f0b311e7..f70091aa4 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeak.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeak.m @@ -9,12 +9,12 @@ @implementation SDLSpeak --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_Speak]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeakResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeakResponse.h index 264e14703..33aed322e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeakResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeakResponse.h @@ -15,13 +15,13 @@ /** * @abstract Constructs a new SDLSpeakResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLSpeakResponse object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeakResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeakResponse.m index 5c551aa78..0dfd23e44 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeakResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeakResponse.m @@ -8,12 +8,12 @@ @implementation SDLSpeakResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_Speak]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeechCapabilities.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeechCapabilities.h index 57f49945b..293a695da 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeechCapabilities.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeechCapabilities.h @@ -22,7 +22,7 @@ @abstract declare an array to store all possible SDLSpeechCapabilities values @result return the array */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract The SDL platform can speak text phrases. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeechCapabilities.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeechCapabilities.m index 2ec942515..bb7896df9 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeechCapabilities.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSpeechCapabilities.m @@ -10,7 +10,7 @@ SDLSpeechCapabilities* SDLSpeechCapabilities_LHPLUS_PHONEMES = nil; SDLSpeechCapabilities* SDLSpeechCapabilities_PRE_RECORDED = nil; SDLSpeechCapabilities* SDLSpeechCapabilities_SILENCE = nil; -NSMutableArray* SDLSpeechCapabilities_values = nil; +NSArray* SDLSpeechCapabilities_values = nil; @implementation SDLSpeechCapabilities @@ -23,15 +23,15 @@ NSMutableArray* SDLSpeechCapabilities_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLSpeechCapabilities_values == nil) { - SDLSpeechCapabilities_values = [[NSMutableArray alloc] initWithObjects: + SDLSpeechCapabilities_values = @[ SDLSpeechCapabilities.TEXT, SDLSpeechCapabilities.SAPI_PHONEMES, SDLSpeechCapabilities.LHPLUS_PHONEMES, SDLSpeechCapabilities.PRE_RECORDED, SDLSpeechCapabilities.SILENCE, - nil]; + ]; } return SDLSpeechCapabilities_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLStartTime.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLStartTime.h index e693d7374..0c2889902 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLStartTime.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLStartTime.h @@ -43,12 +43,12 @@ /** * @abstract Constructs a newly allocated SDLStartTime object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a newly allocated SDLStartTime object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract The hour. Minvalue="0", maxvalue="59" diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLStartTime.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLStartTime.m index f742e8608..c433f1b5c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLStartTime.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLStartTime.m @@ -8,12 +8,12 @@ @implementation SDLStartTime --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButton.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButton.h index 1acc9841d..2cccd4faf 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButton.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButton.h @@ -5,7 +5,8 @@ #import "SDLRPCRequest.h" -#import "SDLButtonName.h" +@class SDLButtonName; + /** * Establishes a subscription to button notifications for HMI buttons. Buttons @@ -62,13 +63,13 @@ /** * @abstract Constructs a new SDLSubscribeButton object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLSubscribeButton object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract The name of the button to subscribe to diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButton.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButton.m index fb8572e3d..5b361ec9b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButton.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButton.m @@ -4,16 +4,18 @@ #import "SDLSubscribeButton.h" +#import "SDLButtonName.h" #import "SDLNames.h" + @implementation SDLSubscribeButton --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SubscribeButton]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButtonResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButtonResponse.h index b9273d6c2..46b9c6dd2 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButtonResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButtonResponse.h @@ -15,12 +15,12 @@ /** * @abstract Constructs a new SDLSubscribeButtonResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLSubscribeButtonResponse object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButtonResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButtonResponse.m index c1793bcf0..49bbf8aa4 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButtonResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeButtonResponse.m @@ -8,12 +8,12 @@ @implementation SDLSubscribeButtonResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SubscribeButton]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleData.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleData.h index 83ac14d5d..608bd6d66 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleData.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleData.h @@ -25,14 +25,14 @@ /** * @abstract Constructs a new SDLSubscribeVehicleData object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLSubscribeVehicleData object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract A boolean value. If true, subscribes Gps data diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleData.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleData.m index e29737360..64abfe14f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleData.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleData.m @@ -8,12 +8,12 @@ @implementation SDLSubscribeVehicleData --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SubscribeVehicleData]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h index 5631e7321..c308f7082 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h @@ -1,11 +1,10 @@ // SDLSubscribeVehicleDataResponse.h // - - #import "SDLRPCResponse.h" -#import "SDLVehicleDataResult.h" +@class SDLVehicleDataResult; + /** * Subscribe Vehicle Data Response is sent, when SDLSubscribeVehicleData has been called @@ -17,14 +16,14 @@ /** * @abstract Constructs a new SDLSubscribeVehicleDataResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLSubscribeVehicleDataResponse object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m index 2dbfe81fc..a95641132 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m @@ -5,15 +5,17 @@ #import "SDLSubscribeVehicleDataResponse.h" #import "SDLNames.h" +#import "SDLVehicleDataResult.h" + @implementation SDLSubscribeVehicleDataResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SubscribeVehicleData]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncMsgVersion.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncMsgVersion.h index fdebd4d9a..64f70fbe7 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncMsgVersion.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncMsgVersion.h @@ -45,12 +45,12 @@ /** * @abstract Constructs a newly allocated SDLSyncMsgVersion object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a newly allocated SDLSyncMsgVersion object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract Major version diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncMsgVersion.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncMsgVersion.m index b1729611d..afe87509c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncMsgVersion.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncMsgVersion.m @@ -8,12 +8,12 @@ @implementation SDLSyncMsgVersion --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPData.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPData.h index a4dbdaa60..1601499b6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPData.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPData.h @@ -7,7 +7,7 @@ @interface SDLSyncPData : SDLRPCRequest {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPData.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPData.m index f8f0b362e..bceec8e3a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPData.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPData.m @@ -8,12 +8,12 @@ @implementation SDLSyncPData --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SyncPData]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPDataResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPDataResponse.h index 159ca5167..7884d4bd9 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPDataResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPDataResponse.h @@ -7,7 +7,7 @@ @interface SDLSyncPDataResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPDataResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPDataResponse.m index 6c001a650..bcde041db 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPDataResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSyncPDataResponse.m @@ -8,12 +8,12 @@ @implementation SDLSyncPDataResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SyncPData]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemAction.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemAction.h index 0622e7be3..0a9c0b106 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemAction.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemAction.h @@ -21,7 +21,7 @@ @abstract Store the enumeration of all possible SDLSystemAction @result return an array that store all possible SDLSystemAction */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract Default_Action diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemAction.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemAction.m index fd31ef5f9..59558cce8 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemAction.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemAction.m @@ -8,7 +8,7 @@ SDLSystemAction* SDLSystemAction_DEFAULT_ACTION = nil; SDLSystemAction* SDLSystemAction_STEAL_FOCUS = nil; SDLSystemAction* SDLSystemAction_KEEP_CONTEXT = nil; -NSMutableArray* SDLSystemAction_values = nil; +NSArray* SDLSystemAction_values = nil; @implementation SDLSystemAction @@ -21,13 +21,13 @@ NSMutableArray* SDLSystemAction_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLSystemAction_values == nil) { - SDLSystemAction_values = [[NSMutableArray alloc] initWithObjects: + SDLSystemAction_values = @[ SDLSystemAction.DEFAULT_ACTION, SDLSystemAction.STEAL_FOCUS, SDLSystemAction.KEEP_CONTEXT, - nil]; + ]; } return SDLSystemAction_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemContext.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemContext.h index cd800ad85..fe3b60543 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemContext.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemContext.h @@ -23,7 +23,7 @@ @abstract Store the enumeration of all possible SDLSystemContext @result return an array that store all possible SDLSystemContext */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract No user interaction (user-initiated or app-initiated) is in progress. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemContext.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemContext.m index c222923fa..0b2c25d33 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemContext.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemContext.m @@ -10,7 +10,7 @@ SDLSystemContext* SDLSystemContext_MENU = nil; SDLSystemContext* SDLSystemContext_HMI_OBSCURED = nil; SDLSystemContext* SDLSystemContext_ALERT = nil; -NSMutableArray* SDLSystemContext_values = nil; +NSArray* SDLSystemContext_values = nil; @implementation SDLSystemContext @@ -23,15 +23,15 @@ NSMutableArray* SDLSystemContext_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLSystemContext_values == nil) { - SDLSystemContext_values = [[NSMutableArray alloc] initWithObjects: + SDLSystemContext_values = @[ SDLSystemContext.MAIN, SDLSystemContext.VRSESSION, SDLSystemContext.MENU, SDLSystemContext.HMI_OBSCURED, SDLSystemContext.ALERT, - nil]; + ]; } return SDLSystemContext_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequest.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequest.h index 6b7fa9040..9d672f10b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequest.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequest.h @@ -1,11 +1,9 @@ // SDLSystemRequest.h // - - #import "SDLRPCRequest.h" -#import "SDLRequestType.h" +@class SDLRequestType; /** An asynchronous request from the device; binary data can be included in hybrid part of message for some requests<br> (such as HTTP, Proprietary, or Authentication requests) @@ -15,8 +13,8 @@ */ @interface SDLSystemRequest : SDLRPCRequest {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLRequestType* requestType; @property(strong) NSString* fileName; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequest.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequest.m index 0907911a0..8e4749ac9 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequest.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequest.m @@ -5,15 +5,17 @@ #import "SDLSystemRequest.h" #import "SDLNames.h" +#import "SDLRequestType.h" + @implementation SDLSystemRequest --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SystemRequest]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequestResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequestResponse.h index a11943aea..ea951b51c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequestResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequestResponse.h @@ -10,7 +10,7 @@ */ @interface SDLSystemRequestResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequestResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequestResponse.m index 0db5df2ef..367911585 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequestResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLSystemRequestResponse.m @@ -8,12 +8,12 @@ @implementation SDLSystemRequestResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_SystemRequest]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTBTState.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTBTState.h index f10771b45..ea3115230 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTBTState.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTBTState.h @@ -8,7 +8,7 @@ @interface SDLTBTState : SDLEnum {} +(SDLTBTState*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; +(SDLTBTState*) ROUTE_UPDATE_REQUEST; +(SDLTBTState*) ROUTE_ACCEPTED; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTBTState.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTBTState.m index a22fb5164..5b0f6769c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTBTState.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTBTState.m @@ -15,7 +15,7 @@ SDLTBTState* SDLTBTState_ROUTE_SUMMARY_REQUEST = nil; SDLTBTState* SDLTBTState_TRIP_STATUS_REQUEST = nil; SDLTBTState* SDLTBTState_ROUTE_UPDATE_REQUEST_TIMEOUT = nil; -NSMutableArray* SDLTBTState_values = nil; +NSArray* SDLTBTState_values = nil; @implementation SDLTBTState @@ -28,9 +28,9 @@ NSMutableArray* SDLTBTState_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLTBTState_values == nil) { - SDLTBTState_values = [[NSMutableArray alloc] initWithObjects: + SDLTBTState_values = @[ SDLTBTState.ROUTE_UPDATE_REQUEST, SDLTBTState.ROUTE_ACCEPTED, SDLTBTState.ROUTE_REFUSED, @@ -41,7 +41,7 @@ NSMutableArray* SDLTBTState_values = nil; SDLTBTState.ROUTE_SUMMARY_REQUEST, SDLTBTState.TRIP_STATUS_REQUEST, SDLTBTState.ROUTE_UPDATE_REQUEST_TIMEOUT, - nil]; + ]; } return SDLTBTState_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.h index a516d55b3..52b836711 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.h @@ -1,8 +1,6 @@ // SDLTCPTransport.h // - - #import "SDLAbstractTransport.h" @interface SDLTCPTransport : SDLAbstractTransport { diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m index 220b0f6a0..265934883 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m @@ -15,6 +15,7 @@ #import <netinet/in.h> #import <netdb.h> + int call_socket(const char* hostname, const char* port) { int status, sock; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunk.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunk.h index 15c67e2b4..f86b6bcff 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunk.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunk.h @@ -1,11 +1,10 @@ // SDLTTSChunk.h // - - #import "SDLRPCMessage.h" -#import "SDLSpeechCapabilities.h" +@class SDLSpeechCapabilities; + /** * Specifies what is to be spoken. This can be simply a text phrase, which SDL will speak according to its own rules. @@ -44,12 +43,12 @@ /** * @abstract Constructs a newly allocated SDLTTSChunk object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a newly allocated SDLTTSChunk object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract Text to be spoken, or a phoneme specification, or the name of a pre-recorded sound. The contents of this field are indicated by the "type" field. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunk.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunk.m index 144ae1fd5..8f5d068d8 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunk.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunk.m @@ -1,19 +1,20 @@ // SDLTTSChunk.m // - #import "SDLTTSChunk.h" #import "SDLNames.h" +#import "SDLSpeechCapabilities.h" + @implementation SDLTTSChunk --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunkFactory.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunkFactory.h index 2644cb95e..d52509bc4 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunkFactory.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunkFactory.h @@ -1,12 +1,12 @@ // SDLTTSChunkFactory.h // +@import Foundation; +@class SDLTTSChunk; +@class SDLSpeechCapabilities; -#import "SDLJingle.h" -#import "SDLTTSChunk.h" - @interface SDLTTSChunkFactory : NSObject {} +(SDLTTSChunk*) buildTTSChunkForString:(NSString*) text type:(SDLSpeechCapabilities*)type; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunkFactory.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunkFactory.m index ba4799266..25d32d4b6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunkFactory.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTTSChunkFactory.m @@ -1,9 +1,12 @@ // SDLTTSChunkFactory.m // - #import "SDLTTSChunkFactory.h" +#import "SDLSpeechCapabilities.h" +#import "SDLTTSChunk.h" + + @implementation SDLTTSChunkFactory + (SDLTTSChunk *)buildTTSChunkForString:(NSString *)text type:(SDLSpeechCapabilities *)type { diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextAlignment.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextAlignment.h index 669692eff..b5dc140d3 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextAlignment.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextAlignment.h @@ -22,7 +22,7 @@ @abstract Store the enumeration of all possible SDLTextAlignment @result return an array that store all possible SDLTextAlignment */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Text aligned left. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextAlignment.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextAlignment.m index e09e06e82..369ceeb63 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextAlignment.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextAlignment.m @@ -8,7 +8,7 @@ SDLTextAlignment* SDLTextAlignment_LEFT_ALIGNED = nil; SDLTextAlignment* SDLTextAlignment_RIGHT_ALIGNED = nil; SDLTextAlignment* SDLTextAlignment_CENTERED = nil; -NSMutableArray* SDLTextAlignment_values = nil; +NSArray* SDLTextAlignment_values = nil; @implementation SDLTextAlignment @@ -21,13 +21,13 @@ NSMutableArray* SDLTextAlignment_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLTextAlignment_values == nil) { - SDLTextAlignment_values = [[NSMutableArray alloc] initWithObjects: + SDLTextAlignment_values = @[ SDLTextAlignment.LEFT_ALIGNED, SDLTextAlignment.RIGHT_ALIGNED, SDLTextAlignment.CENTERED, - nil]; + ]; } return SDLTextAlignment_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextField.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextField.h index 4bcb5a606..383b98e74 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextField.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextField.h @@ -1,11 +1,11 @@ // SDLTextField.h // - #import "SDLRPCMessage.h" -#import "SDLTextFieldName.h" -#import "SDLCharacterSet.h" +@class SDLCharacterSet; +@class SDLTextFieldName; + /** * Struct defining the characteristics of a displayed field on the HMI. @@ -59,12 +59,12 @@ /** * @abstract Constructs a newly allocated SDLTextField object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a newly allocated SDLTextField object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract The enumeration identifying the field. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextField.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextField.m index b8732ea40..26f02c389 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextField.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextField.m @@ -1,19 +1,21 @@ // SDLTextField.m // - #import "SDLTextField.h" +#import "SDLCharacterSet.h" #import "SDLNames.h" +#import "SDLTextFieldName.h" + @implementation SDLTextField --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextFieldName.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextFieldName.h index 604181540..ef81105d0 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextFieldName.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextFieldName.h @@ -22,7 +22,7 @@ @abstract Store the enumeration of all possible SDLTextFieldName @result return an array that store all possible SDLTextFieldName */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract The first line of the first set of main fields of the persistent display. Applies to <i>Show</i>. @@ -140,10 +140,50 @@ * @since <font color=red><b> SmartDeviceLink 2.0 </b></font> */ +(SDLTextFieldName*) sliderFooter; + +/** + * Primary text for Choice + */ +(SDLTextFieldName*) menuName; + +/** + * Secondary text for Choice + */ +(SDLTextFieldName*) secondaryText; + +/** + * Tertiary text for Choice + */ +(SDLTextFieldName*) tertiaryText; + +/** + * Optional text to label an app menu button (for certain touchscreen platforms) + */ +(SDLTextFieldName*) menuTitle; +/** + * Optional name / title of intended location for SendLocation + * @since SDL 4.0 + */ ++(SDLTextFieldName*) locationName; + +/** + * Optional description of intended location / establishment (if applicable) for SendLocation + * @since SDL 4.0 + */ ++(SDLTextFieldName*) locationDescription; + +/** + * Optional location address (if applicable) for SendLocation + * @since SDL 4.0 + */ ++(SDLTextFieldName*) addressLines; + +/** + * Optional hone number of intended location / establishment (if applicable) for SendLocation + * @since SDL 4.0 + */ ++(SDLTextFieldName*) phoneNumber; + @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextFieldName.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextFieldName.m index 5eb489386..2ee079906 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextFieldName.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTextFieldName.m @@ -28,8 +28,12 @@ SDLTextFieldName* SDLTextFieldName_menuName = nil; SDLTextFieldName* SDLTextFieldName_secondaryText = nil; SDLTextFieldName* SDLTextFieldName_tertiaryText = nil; SDLTextFieldName* SDLTextFieldName_menuTitle = nil; +SDLTextFieldName* SDLTextFieldName_locationName = nil; +SDLTextFieldName* SDLTextFieldName_locationDescription = nil; +SDLTextFieldName* SDLTextFieldName_addressLines = nil; +SDLTextFieldName* SDLTextFieldName_phoneNumber = nil; -NSMutableArray* SDLTextFieldName_values = nil; +NSArray* SDLTextFieldName_values = nil; @implementation SDLTextFieldName @@ -42,9 +46,9 @@ NSMutableArray* SDLTextFieldName_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLTextFieldName_values == nil) { - SDLTextFieldName_values = [[NSMutableArray alloc] initWithObjects: + SDLTextFieldName_values = @[ SDLTextFieldName.mainField1, SDLTextFieldName.mainField2, SDLTextFieldName.mainField3, @@ -69,7 +73,11 @@ NSMutableArray* SDLTextFieldName_values = nil; SDLTextFieldName.secondaryText, SDLTextFieldName.tertiaryText, SDLTextFieldName.menuTitle, - nil]; + SDLTextFieldName.locationName, + SDLTextFieldName.locationDescription, + SDLTextFieldName.addressLines, + SDLTextFieldName.phoneNumber, + ]; } return SDLTextFieldName_values; } @@ -242,4 +250,32 @@ NSMutableArray* SDLTextFieldName_values = nil; return SDLTextFieldName_menuTitle; } ++(SDLTextFieldName*) locationName { + if (SDLTextFieldName_locationName == nil) { + SDLTextFieldName_locationName = [[SDLTextFieldName alloc] initWithValue:@"locationName"]; + } + return SDLTextFieldName_locationName; +} + ++(SDLTextFieldName*) locationDescription { + if (SDLTextFieldName_locationDescription == nil) { + SDLTextFieldName_locationDescription = [[SDLTextFieldName alloc] initWithValue:@"locationDescription"]; + } + return SDLTextFieldName_locationDescription; +} + ++(SDLTextFieldName*) addressLines { + if (SDLTextFieldName_addressLines == nil) { + SDLTextFieldName_addressLines = [[SDLTextFieldName alloc] initWithValue:@"addressLines"]; + } + return SDLTextFieldName_addressLines; +} + ++(SDLTextFieldName*) phoneNumber { + if (SDLTextFieldName_phoneNumber == nil) { + SDLTextFieldName_phoneNumber = [[SDLTextFieldName alloc] initWithValue:@"phoneNumber"]; + } + return SDLTextFieldName_phoneNumber; +} + @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTimerMode.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTimerMode.h index 3ddcebebc..21a1f368e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTimerMode.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTimerMode.h @@ -8,7 +8,7 @@ @interface SDLTimerMode : SDLEnum {} +(SDLTimerMode*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; +(SDLTimerMode*) UP; +(SDLTimerMode*) DOWN; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTimerMode.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTimerMode.m index 566b5ed9d..082459f30 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTimerMode.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTimerMode.m @@ -8,7 +8,7 @@ SDLTimerMode* SDLTimerMode_UP = nil; SDLTimerMode* SDLTimerMode_DOWN = nil; SDLTimerMode* SDLTimerMode_NONE = nil; -NSMutableArray* SDLTimerMode_values = nil; +NSArray* SDLTimerMode_values = nil; @implementation SDLTimerMode @@ -21,13 +21,13 @@ NSMutableArray* SDLTimerMode_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLTimerMode_values == nil) { - SDLTimerMode_values = [[NSMutableArray alloc] initWithObjects: + SDLTimerMode_values = @[ SDLTimerMode.UP, SDLTimerMode.DOWN, SDLTimerMode.NONE, - nil]; + ]; } return SDLTimerMode_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTireStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTireStatus.h index ced4eeafe..78245d622 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTireStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTireStatus.h @@ -1,17 +1,16 @@ // SDLTireStatus.h // - - #import "SDLRPCMessage.h" -#import "SDLWarningLightStatus.h" -#import "SDLSingleTireStatus.h" +@class SDLSingleTireStatus; +@class SDLWarningLightStatus; + @interface SDLTireStatus : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLWarningLightStatus* pressureTelltale; @property(strong) SDLSingleTireStatus* leftFront; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTireStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTireStatus.m index 88ca36917..788e5282e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTireStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTireStatus.m @@ -1,19 +1,21 @@ // SDLTireStatus.m // - #import "SDLTireStatus.h" #import "SDLNames.h" +#import "SDLSingleTireStatus.h" +#import "SDLWarningLightStatus.h" + @implementation SDLTireStatus --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchCoord.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchCoord.h index 87b607aa0..30f638af0 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchCoord.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchCoord.h @@ -7,8 +7,8 @@ @interface SDLTouchCoord : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSNumber* x; @property(strong) NSNumber* y; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchCoord.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchCoord.m index f7dba9edb..f9de201a0 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchCoord.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchCoord.m @@ -8,12 +8,12 @@ @implementation SDLTouchCoord --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEvent.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEvent.h index 624843466..f9a4a76e0 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEvent.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEvent.h @@ -7,11 +7,34 @@ @interface SDLTouchEvent : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; +/** + A touch's unique identifier. The application can track the current touch events by id. + If a touch event has type begin, the id should be added to the set of touches. + If a touch event has type end, the id should be removed from the set of touches. + + Mandatory, 0-9 + */ @property(strong) NSNumber* touchEventId; + +/** + The time that the touch was recorded. This number can the time since the beginning of the session or something else as long as the units are in milliseconds. + + The timestamp is used to determined the rate of change of position of a touch. + + The application also uses the time to verify whether two touches, with different ids, are part of a single action by the user. + + If there is only a single timestamp in this array, it is the same for every coordinate in the coordinates array. + + Mandatory, array size 1-1000, contains <NSNumber> size 0-5000000000 + */ @property(strong) NSMutableArray* timeStamp; + +/** + * Mandatory, array size 1-1000, contains SDLTouchCoord + */ @property(strong) NSMutableArray* coord; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEvent.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEvent.m index bcb26d138..f3da9035a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEvent.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEvent.m @@ -9,12 +9,12 @@ @implementation SDLTouchEvent --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEventCapabilities.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEventCapabilities.h index ce2c9c7d4..31426f11a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEventCapabilities.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEventCapabilities.h @@ -7,8 +7,8 @@ @interface SDLTouchEventCapabilities : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSNumber* pressAvailable; @property(strong) NSNumber* multiTouchAvailable; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEventCapabilities.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEventCapabilities.m index 1d03ceb63..e8a2d872d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEventCapabilities.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchEventCapabilities.m @@ -8,12 +8,12 @@ @implementation SDLTouchEventCapabilities --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchType.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchType.h index 37aacbbb0..9cafd1d5b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchType.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchType.h @@ -8,7 +8,7 @@ @interface SDLTouchType : SDLEnum {} +(SDLTouchType*) valueOf:(NSString*) value; -+(NSMutableArray*) values; ++(NSArray*) values; +(SDLTouchType*) BEGIN; +(SDLTouchType*) MOVE; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchType.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchType.m index 4247a2f4c..4012f02ae 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchType.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTouchType.m @@ -8,7 +8,7 @@ SDLTouchType* SDLTouchType_BEGIN = nil; SDLTouchType* SDLTouchType_MOVE = nil; SDLTouchType* SDLTouchType_END = nil; -NSMutableArray* SDLTouchType_values = nil; +NSArray* SDLTouchType_values = nil; @implementation SDLTouchType @@ -21,13 +21,13 @@ NSMutableArray* SDLTouchType_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLTouchType_values == nil) { - SDLTouchType_values = [[NSMutableArray alloc] initWithObjects: + SDLTouchType_values = @[ SDLTouchType.BEGIN, SDLTouchType.MOVE, SDLTouchType.END, - nil]; + ]; } return SDLTouchType_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTransport.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTransport.h index 491b89c90..b3aeb70f3 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTransport.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTransport.h @@ -1,12 +1,12 @@ // SDLTransport.h // - @import Foundation; #import "SDLTransportDelegate.h" -@protocol SDLTransport + +@protocol SDLTransport <NSObject> @property (weak) id<SDLTransportDelegate> delegate; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTransportDelegate.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTransportDelegate.h index 53dc1a19e..4f4abe33f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTransportDelegate.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTransportDelegate.h @@ -1,10 +1,7 @@ // SDLTransportDelegate.h // - - - -@protocol SDLTransportDelegate +@protocol SDLTransportDelegate <NSObject> - (void)onTransportConnected; - (void)onTransportDisconnected; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTriggerSource.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTriggerSource.h index ef290c01b..64897381c 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTriggerSource.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTriggerSource.h @@ -24,7 +24,7 @@ @abstract Store the enumeration of all possible SDLTriggerSource @result return an array that store all possible SDLTriggerSource */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract Selection made via menu (i.e. using SEEKRIGHT/SEEKLEFT, TUNEUP, TUNEDOWN diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTriggerSource.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTriggerSource.m index 606c0a824..9e94e7a93 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTriggerSource.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTriggerSource.m @@ -8,7 +8,7 @@ SDLTriggerSource* SDLTriggerSource_MENU = nil; SDLTriggerSource* SDLTriggerSource_VR = nil; SDLTriggerSource* SDLTriggerSource_KEYBOARD = nil; -NSMutableArray* SDLTriggerSource_values = nil; +NSArray* SDLTriggerSource_values = nil; @implementation SDLTriggerSource @@ -21,13 +21,13 @@ NSMutableArray* SDLTriggerSource_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLTriggerSource_values == nil) { - SDLTriggerSource_values = [[NSMutableArray alloc] initWithObjects: + SDLTriggerSource_values = @[ SDLTriggerSource.MENU, SDLTriggerSource.VR, SDLTriggerSource.KEYBOARD, - nil]; + ]; } return SDLTriggerSource_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTurn.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTurn.h index a45dede39..c1c475c8f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTurn.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTurn.h @@ -1,16 +1,15 @@ // SDLTurn.h // - - #import "SDLRPCMessage.h" -#import "SDLImage.h" +@class SDLImage; + @interface SDLTurn : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSString* navigationText; @property(strong) SDLImage* turnIcon; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTurn.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTurn.m index e2357dafe..466b31e24 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTurn.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTurn.m @@ -1,19 +1,20 @@ // SDLTurn.m // - #import "SDLTurn.h" +#import "SDLImage.h" #import "SDLNames.h" + @implementation SDLTurn --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterface.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterface.h index efa6703fb..b4b441122 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterface.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterface.h @@ -25,13 +25,13 @@ /** * @abstract Constructs a new SDLUnregisterAppInterface object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLUnregisterAppInterface object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterface.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterface.m index 4912811d4..86c23196b 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterface.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterface.m @@ -8,12 +8,12 @@ @implementation SDLUnregisterAppInterface --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_UnregisterAppInterface]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterfaceResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterfaceResponse.h index 90f0147da..44451cb8a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterfaceResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterfaceResponse.h @@ -15,12 +15,12 @@ /** * @abstract Constructs a new SDLUnregisterAppInterfaceResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLUnregisterAppInterfaceResponse object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterfaceResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterfaceResponse.m index 7dc504049..9c6acab7f 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterfaceResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnregisterAppInterfaceResponse.m @@ -8,12 +8,12 @@ @implementation SDLUnregisterAppInterfaceResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_UnregisterAppInterface]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButton.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButton.h index 76ee00002..e252d1914 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButton.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButton.h @@ -1,11 +1,10 @@ // SDLUnsubscribeButton.h // - - #import "SDLRPCRequest.h" -#import "SDLButtonName.h" +@class SDLButtonName; + /** * Deletes a subscription to button notifications for the specified button. For @@ -25,13 +24,13 @@ /** * @abstract Constructs a new SDLUnsubscribeButton object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLUnsubscribeButton object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract A name of the button to unsubscribe from diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButton.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButton.m index f2dbd1837..b00e0fedb 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButton.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButton.m @@ -4,16 +4,18 @@ #import "SDLUnsubscribeButton.h" +#import "SDLButtonName.h" #import "SDLNames.h" + @implementation SDLUnsubscribeButton --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_UnsubscribeButton]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButtonResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButtonResponse.h index 1b832b533..ed09458bd 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButtonResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButtonResponse.h @@ -15,12 +15,12 @@ /** * @abstract Constructs a new SDLUnsubscribeButtonResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLUnsubscribeButtonResponse object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButtonResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButtonResponse.m index 43fc19fad..63ed033cc 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButtonResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeButtonResponse.m @@ -8,12 +8,12 @@ @implementation SDLUnsubscribeButtonResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_UnsubscribeButton]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleData.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleData.h index be8785bf1..cf8bf021e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleData.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleData.h @@ -23,14 +23,14 @@ /** * @abstract Constructs a new SDLUnsubscribeVehicleData object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLUnsubscribeVehicleData object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract A boolean value. If true, unsubscribes Gps data diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleData.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleData.m index ece608362..335ba5a44 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleData.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleData.m @@ -8,12 +8,12 @@ @implementation SDLUnsubscribeVehicleData --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_UnsubscribeVehicleData]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h index 21e906d98..ff2e5b564 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h @@ -1,11 +1,10 @@ // SDLUnsubscribeVehicleDataResponse.h // - - #import "SDLRPCResponse.h" -#import "SDLVehicleDataResult.h" +@class SDLVehicleDataResult; + /** * Unsubscribe Vehicle Data Response is sent, when UnsubscribeVehicleData has been called @@ -17,14 +16,14 @@ /** * @abstract Constructs a new SDLUnsubscribeVehicleDataResponse object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a new SDLUnsubscribeVehicleDataResponse object indicated by the NSMutableDictionary * parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract A SDLVehicleDataResult* value. See GPSData. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m index bdc3fb792..675932cae 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m @@ -5,15 +5,17 @@ #import "SDLUnsubscribeVehicleDataResponse.h" #import "SDLNames.h" +#import "SDLVehicleDataResult.h" + @implementation SDLUnsubscribeVehicleDataResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_UnsubscribeVehicleData]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateMode.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateMode.h index 8d46eaabb..cd549d7a0 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateMode.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateMode.h @@ -22,7 +22,7 @@ @abstract Store the enumeration of all possible SDLUpdateMode @result return an array that store all possible SDLUpdateMode */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract Starts the media clock timer counting upward, in increments of 1 second. diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateMode.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateMode.m index 66b7099d9..875a91b3e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateMode.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateMode.m @@ -10,7 +10,7 @@ SDLUpdateMode* SDLUpdateMode_PAUSE = nil; SDLUpdateMode* SDLUpdateMode_RESUME = nil; SDLUpdateMode* SDLUpdateMode_CLEAR = nil; -NSMutableArray* SDLUpdateMode_values = nil; +NSArray* SDLUpdateMode_values = nil; @implementation SDLUpdateMode @@ -23,15 +23,15 @@ NSMutableArray* SDLUpdateMode_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLUpdateMode_values == nil) { - SDLUpdateMode_values = [[NSMutableArray alloc] initWithObjects: + SDLUpdateMode_values = @[ SDLUpdateMode.COUNTUP, SDLUpdateMode.COUNTDOWN, SDLUpdateMode.PAUSE, SDLUpdateMode.RESUME, SDLUpdateMode.CLEAR, - nil]; + ]; } return SDLUpdateMode_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnList.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnList.h index d10cd5ef7..2456d2324 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnList.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnList.h @@ -12,8 +12,8 @@ */ @interface SDLUpdateTurnList : SDLRPCRequest {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSMutableArray* turnList; @property(strong) NSMutableArray* softButtons; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnList.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnList.m index d8ffea3f3..aaffbe2a5 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnList.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnList.m @@ -10,12 +10,12 @@ @implementation SDLUpdateTurnList --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_UpdateTurnList]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnListResponse.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnListResponse.h index 22dc2ef50..c16686d66 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnListResponse.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnListResponse.h @@ -1,8 +1,6 @@ // SDLUpdateTurnListResponse.h // - - #import "SDLRPCResponse.h" @@ -11,7 +9,7 @@ */ @interface SDLUpdateTurnListResponse : SDLRPCResponse {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnListResponse.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnListResponse.m index d13f475b4..41b15803a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnListResponse.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLUpdateTurnListResponse.m @@ -8,12 +8,12 @@ @implementation SDLUpdateTurnListResponse --(id) init { +-(instancetype) init { if (self = [super initWithName:NAMES_UpdateTurnList]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolHeader.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolHeader.h index f24a6113b..164e21196 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolHeader.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolHeader.h @@ -6,9 +6,9 @@ @interface SDLV1ProtocolHeader : SDLProtocolHeader -- (id)init; +- (instancetype)init; - (NSData *)data; -- (id)copyWithZone:(NSZone *)zone; +- (instancetype)copyWithZone:(NSZone *)zone; - (void)parse:(NSData *)data; - (NSString *)description; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolHeader.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolHeader.m index 0b8e06d7a..c3bbdf837 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolHeader.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolHeader.m @@ -8,7 +8,7 @@ const int V1PROTOCOL_HEADERSIZE = 8; @implementation SDLV1ProtocolHeader -- (id)init { +- (instancetype)init { if (self = [super init]) { _version = 1; _size = V1PROTOCOL_HEADERSIZE; @@ -21,7 +21,7 @@ const int V1PROTOCOL_HEADERSIZE = 8; Byte headerBytes[V1PROTOCOL_HEADERSIZE] = {0}; Byte version = (self.version & 0xF) << 4; // first 4 bits - Byte compressed = self.compressed?1:0 << 3; // next 1 bit + Byte compressed = (self.compressed?1:0) << 3; // next 1 bit Byte frameType = (self.frameType & 0x7); // last 3 bits headerBytes[0] = version | compressed | frameType; @@ -39,14 +39,14 @@ const int V1PROTOCOL_HEADERSIZE = 8; return dataOut; } -- (id)copyWithZone:(NSZone *)zone +- (instancetype)copyWithZone:(NSZone *)zone { SDLV1ProtocolHeader *newHeader = [[SDLV1ProtocolHeader allocWithZone: zone] init]; newHeader.compressed = self.compressed; newHeader.frameType = self.frameType; newHeader.serviceType = self.serviceType; newHeader.frameData = self.frameData; - newHeader.compressed = self.compressed; + newHeader.bytesInPayload = self.bytesInPayload; newHeader.sessionID = self.sessionID; return newHeader; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolMessage.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolMessage.h index a07b4348a..a3501e8cb 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolMessage.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolMessage.h @@ -1,12 +1,14 @@ -// SDLSmartDeviceLinkV1ProtocolMessage.h +// SDLV1ProtocolMessage.h // - #import "SDLProtocolMessage.h" +@class SDLProtocolHeader; + + @interface SDLV1ProtocolMessage : SDLProtocolMessage -- (id)initWithHeader:(SDLProtocolHeader*)header andPayload:(NSData *)payload; +- (instancetype)initWithHeader:(SDLProtocolHeader*)header andPayload:(NSData *)payload; - (NSDictionary *)rpcDictionary; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolMessage.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolMessage.m index 7ed6df2d6..664bad6f0 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolMessage.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV1ProtocolMessage.m @@ -1,14 +1,14 @@ -// SDLSmartDeviceLinkV1ProtocolMessage.m +// SDLV1ProtocolMessage.m // - - -#import "SDLV1ProtocolMessage.h" #import "SDLJsonDecoder.h" +#import "SDLProtocolHeader.h" +#import "SDLV1ProtocolMessage.h" + @implementation SDLV1ProtocolMessage -- (id)initWithHeader:(SDLProtocolHeader*)header andPayload:(NSData *)payload { +- (instancetype)initWithHeader:(SDLProtocolHeader*)header andPayload:(NSData *)payload { if (self = [self init]) { self.header = header; self.payload = payload; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolHeader.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolHeader.h index a801f18e9..6368e4755 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolHeader.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolHeader.h @@ -8,8 +8,8 @@ @property (assign) UInt32 messageID; -- (id)init; -- (id)copyWithZone:(NSZone *)zone; +- (instancetype)init; +- (instancetype)copyWithZone:(NSZone *)zone; - (NSData *)data; - (void)parse:(NSData *)data; - (NSString *)description; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolHeader.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolHeader.m index b2b00ed46..0a4f48d2a 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolHeader.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolHeader.m @@ -8,7 +8,7 @@ const int V2PROTOCOL_HEADERSIZE = 12; @implementation SDLV2ProtocolHeader -- (id)init { +- (instancetype)init { if (self = [super init]) { _version = 2; _size = V2PROTOCOL_HEADERSIZE; @@ -21,7 +21,7 @@ const int V2PROTOCOL_HEADERSIZE = 12; Byte headerBytes[V2PROTOCOL_HEADERSIZE] = {0}; Byte version = (self.version & 0xF) << 4; // first 4 bits - Byte compressed = self.compressed?1:0 << 3; // next 1 bit + Byte compressed = (self.compressed?1:0) << 3; // next 1 bit Byte frameType = (self.frameType & 0x7); // last 3 bits headerBytes[0] = version | compressed | frameType; @@ -42,14 +42,14 @@ const int V2PROTOCOL_HEADERSIZE = 12; return dataOut; } -- (id)copyWithZone:(NSZone *)zone +- (instancetype)copyWithZone:(NSZone *)zone { SDLV2ProtocolHeader *newHeader = [[SDLV2ProtocolHeader allocWithZone: zone] init]; newHeader.compressed = self.compressed; newHeader.frameType = self.frameType; newHeader.serviceType = self.serviceType; newHeader.frameData = self.frameData; - newHeader.compressed = self.compressed; + newHeader.bytesInPayload = self.bytesInPayload; newHeader.sessionID = self.sessionID; newHeader.messageID = self.messageID; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolMessage.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolMessage.h index d31a163ee..c8c1b2660 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolMessage.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolMessage.h @@ -4,9 +4,12 @@ #import "SDLProtocolMessage.h" +@class SDLProtocolHeader; + + @interface SDLV2ProtocolMessage : SDLProtocolMessage -- (id)initWithHeader:(SDLProtocolHeader*)header andPayload:(NSData *)payload; +- (instancetype)initWithHeader:(SDLProtocolHeader*)header andPayload:(NSData *)payload; - (NSDictionary *)rpcDictionary; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolMessage.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolMessage.m index 28d50f470..2e0596c4e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolMessage.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLV2ProtocolMessage.m @@ -1,17 +1,17 @@ // SDLSmartDeviceLinkV2ProtocolMessage.m // - -#import "SDLV2ProtocolMessage.h" -#import "SDLRPCPayload.h" -#import "SDLJsonDecoder.h" #import "SDLFunctionID.h" +#import "SDLJsonDecoder.h" #import "SDLNames.h" +#import "SDLProtocolHeader.h" +#import "SDLRPCPayload.h" +#import "SDLV2ProtocolMessage.h" @implementation SDLV2ProtocolMessage -- (id)initWithHeader:(SDLProtocolHeader*)header andPayload:(NSData *)payload { +- (instancetype)initWithHeader:(SDLProtocolHeader*)header andPayload:(NSData *)payload { if (self = [self init]) { self.header = header; self.payload = payload; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataActiveStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataActiveStatus.h index 3282f0f66..35285d8bb 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataActiveStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataActiveStatus.h @@ -20,7 +20,7 @@ /*! @abstract return the array that store all possible SDLVehicleDataActiveStatus values */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract SDLVehicleDataActiveStatus : Inactive not confirmed diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataActiveStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataActiveStatus.m index 3bf102280..56ed04643 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataActiveStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataActiveStatus.m @@ -10,7 +10,7 @@ SDLVehicleDataActiveStatus* SDLVehicleDataActiveStatus_ACTIVE_NOT_CONFIRMED = ni SDLVehicleDataActiveStatus* SDLVehicleDataActiveStatus_ACTIVE_CONFIRMED = nil; SDLVehicleDataActiveStatus* SDLVehicleDataActiveStatus_FAULT = nil; -NSMutableArray* SDLVehicleDataActiveStatus_values = nil; +NSArray* SDLVehicleDataActiveStatus_values = nil; @implementation SDLVehicleDataActiveStatus @@ -23,15 +23,15 @@ NSMutableArray* SDLVehicleDataActiveStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLVehicleDataActiveStatus_values == nil) { - SDLVehicleDataActiveStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLVehicleDataActiveStatus_values = @[ SDLVehicleDataActiveStatus.INACTIVE_NOT_CONFIRMED, SDLVehicleDataActiveStatus.INACTIVE_CONFIRMED, SDLVehicleDataActiveStatus.ACTIVE_NOT_CONFIRMED, SDLVehicleDataActiveStatus.ACTIVE_CONFIRMED, SDLVehicleDataActiveStatus.FAULT, - nil]; + ]; } return SDLVehicleDataActiveStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataEventStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataEventStatus.h index bade87278..5b1a73df5 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataEventStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataEventStatus.h @@ -22,7 +22,7 @@ @abstract Store the enumeration of all possible SDLVehicleDataEventStatus @result return an array that store all possible SDLVehicleDataEventStatus */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract No event avaliable diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataEventStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataEventStatus.m index 9f5087ae4..ea73a42cd 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataEventStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataEventStatus.m @@ -10,7 +10,7 @@ SDLVehicleDataEventStatus* SDLVehicleDataEventStatus_YES = nil; SDLVehicleDataEventStatus* SDLVehicleDataEventStatus_NOT_SUPPORTED = nil; SDLVehicleDataEventStatus* SDLVehicleDataEventStatus_FAULT = nil; -NSMutableArray* SDLVehicleDataEventStatus_values = nil; +NSArray* SDLVehicleDataEventStatus_values = nil; @implementation SDLVehicleDataEventStatus @@ -23,15 +23,15 @@ NSMutableArray* SDLVehicleDataEventStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLVehicleDataEventStatus_values == nil) { - SDLVehicleDataEventStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLVehicleDataEventStatus_values = @[ SDLVehicleDataEventStatus.NO_EVENT, SDLVehicleDataEventStatus._NO, SDLVehicleDataEventStatus._YES, SDLVehicleDataEventStatus.NOT_SUPPORTED, SDLVehicleDataEventStatus.FAULT, - nil]; + ]; } return SDLVehicleDataEventStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataNotificationStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataNotificationStatus.h index 19a50dd42..73386aa67 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataNotificationStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataNotificationStatus.h @@ -22,7 +22,7 @@ @abstract Store the enumeration of all possible SDLVehicleDataNotificationStatus @result return an array that store all possible SDLVehicleDataNotificationStatus */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract SDLVehicleDataNotificationStatus : <font color=gray><i> NOT_SUPPORTED </i></font> diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataNotificationStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataNotificationStatus.m index ad8e5d0d9..3c69fc908 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataNotificationStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataNotificationStatus.m @@ -9,7 +9,7 @@ SDLVehicleDataNotificationStatus* SDLVehicleDataNotificationStatus_NORMAL = nil; SDLVehicleDataNotificationStatus* SDLVehicleDataNotificationStatus_ACTIVE = nil; SDLVehicleDataNotificationStatus* SDLVehicleDataNotificationStatus_NOT_USED = nil; -NSMutableArray* SDLVehicleDataNotificationStatus_values = nil; +NSArray* SDLVehicleDataNotificationStatus_values = nil; @implementation SDLVehicleDataNotificationStatus @@ -22,14 +22,14 @@ NSMutableArray* SDLVehicleDataNotificationStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLVehicleDataNotificationStatus_values == nil) { - SDLVehicleDataNotificationStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLVehicleDataNotificationStatus_values = @[ SDLVehicleDataNotificationStatus.NOT_SUPPORTED, SDLVehicleDataNotificationStatus.NORMAL, SDLVehicleDataNotificationStatus.ACTIVE, SDLVehicleDataNotificationStatus.NOT_USED, - nil]; + ]; } return SDLVehicleDataNotificationStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResult.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResult.h index 6f28448a0..a775fc570 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResult.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResult.h @@ -1,17 +1,16 @@ // SDLVehicleDataResult.h // - - #import "SDLRPCMessage.h" -#import "SDLVehicleDataType.h" -#import "SDLVehicleDataResultCode.h" +@class SDLVehicleDataType; +@class SDLVehicleDataResultCode; + @interface SDLVehicleDataResult : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) SDLVehicleDataType* dataType; @property(strong) SDLVehicleDataResultCode* resultCode; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResult.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResult.m index ae8e829f4..3ae590fb0 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResult.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResult.m @@ -1,19 +1,21 @@ // SDLVehicleDataResult.m // - #import "SDLVehicleDataResult.h" #import "SDLNames.h" +#import "SDLVehicleDataType.h" +#import "SDLVehicleDataResultCode.h" + @implementation SDLVehicleDataResult --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResultCode.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResultCode.h index b12b3461b..acab85972 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResultCode.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResultCode.h @@ -16,43 +16,55 @@ * @return SDLVehicleDataResultCode */ +(SDLVehicleDataResultCode*) valueOf:(NSString*) value; + /*! @abstract Store the enumeration of all possible SDLVehicleDataResultCode @result return an array that store all possible SDLVehicleDataResultCode */ -+(NSMutableArray*) values; ++(NSArray*) values; -/*! - @abstract return SDLVehicleDataResultCode : <font color=gray><i> SUCCESS </i></font> +/** + * Individual vehicle data item / DTC / DID request or subscription successful */ +(SDLVehicleDataResultCode*) SUCCESS; + +/** + * DTC / DID request successful, however, not all active DTCs or full contents of DID location available + */ +(SDLVehicleDataResultCode*) TRUNCATED_DATA; -/*! - @abstract return SDLVehicleDataResultCode : <font color=gray><i> DISALLOWED </i></font> + +/** + * This vehicle data item is not allowed for this app by SDL */ +(SDLVehicleDataResultCode*) DISALLOWED; -/*! - @abstract return SDLVehicleDataResultCode : <font color=gray><i> USER_DISALLOWED </i></font> + +/** + * The user has not granted access to this type of vehicle data item at this time */ +(SDLVehicleDataResultCode*) USER_DISALLOWED; -/*! - @abstract return SDLVehicleDataResultCode : <font color=gray><i> INVALID_ID </i></font> + +/** + * The ECU ID referenced is not a valid ID on the bus / system */ +(SDLVehicleDataResultCode*) INVALID_ID; -/*! - @abstract return SDLVehicleDataResultCode : <font color=gray><i> VEHICLE_DATA_NOT_AVAILABLE </i></font> + +/** + * The requested vehicle data item / DTC / DID is not currently available or responding on the bus / system */ +(SDLVehicleDataResultCode*) VEHICLE_DATA_NOT_AVAILABLE; -/*! - @abstract return SDLVehicleDataResultCode : <font color=gray><i> DATA_ALREADY_SUBSCRIBED </i></font> + +/** + * The vehicle data item is already subscribed */ +(SDLVehicleDataResultCode*) DATA_ALREADY_SUBSCRIBED; -/*! - @abstract return SDLVehicleDataResultCode : <font color=gray><i> DATA_NOT_SUBSCRIBED </i></font> + +/** + * The vehicle data item cannot be unsubscribed because it is not currently subscribed */ +(SDLVehicleDataResultCode*) DATA_NOT_SUBSCRIBED; -/*! - @abstract return SDLVehicleDataResultCode : <font color=gray><i> IGNORED </i></font> + +/** + * The request for this item is ignored because it is already in progress */ +(SDLVehicleDataResultCode*) IGNORED; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResultCode.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResultCode.m index 48db6773f..293d3d1cd 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResultCode.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataResultCode.m @@ -14,7 +14,7 @@ SDLVehicleDataResultCode* SDLVehicleDataResultCode_DATA_ALREADY_SUBSCRIBED = nil SDLVehicleDataResultCode* SDLVehicleDataResultCode_DATA_NOT_SUBSCRIBED = nil; SDLVehicleDataResultCode* SDLVehicleDataResultCode_IGNORED = nil; -NSMutableArray* SDLVehicleDataResultCode_values = nil; +NSArray* SDLVehicleDataResultCode_values = nil; @implementation SDLVehicleDataResultCode @@ -27,9 +27,9 @@ NSMutableArray* SDLVehicleDataResultCode_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLVehicleDataResultCode_values == nil) { - SDLVehicleDataResultCode_values = [[NSMutableArray alloc] initWithObjects: + SDLVehicleDataResultCode_values = @[ SDLVehicleDataResultCode.SUCCESS, SDLVehicleDataResultCode.TRUNCATED_DATA, SDLVehicleDataResultCode.DISALLOWED, @@ -39,7 +39,7 @@ NSMutableArray* SDLVehicleDataResultCode_values = nil; SDLVehicleDataResultCode.DATA_ALREADY_SUBSCRIBED, SDLVehicleDataResultCode.DATA_NOT_SUBSCRIBED, SDLVehicleDataResultCode.IGNORED, - nil]; + ]; } return SDLVehicleDataResultCode_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataStatus.h index 1284e2ab2..3eede21b6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataStatus.h @@ -22,7 +22,7 @@ @abstract Store the enumeration of all possible SDLVehicleDataStatus @result return an array that store all possible SDLVehicleDataStatus */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract No data avaliable diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataStatus.m index 0e6fb148a..db3593877 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataStatus.m @@ -8,7 +8,7 @@ SDLVehicleDataStatus* SDLVehicleDataStatus_NO_DATA_EXISTS = nil; SDLVehicleDataStatus* SDLVehicleDataStatus_OFF = nil; SDLVehicleDataStatus* SDLVehicleDataStatus_ON = nil; -NSMutableArray* SDLVehicleDataStatus_values = nil; +NSArray* SDLVehicleDataStatus_values = nil; @implementation SDLVehicleDataStatus @@ -21,13 +21,13 @@ NSMutableArray* SDLVehicleDataStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLVehicleDataStatus_values == nil) { - SDLVehicleDataStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLVehicleDataStatus_values = @[ SDLVehicleDataStatus.NO_DATA_EXISTS, SDLVehicleDataStatus.OFF, SDLVehicleDataStatus.ON, - nil]; + ]; } return SDLVehicleDataStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataType.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataType.h index 37ebab024..3c35047dc 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataType.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataType.h @@ -21,7 +21,7 @@ @abstract Store the enumeration of all possible SDLVehicleDataType @result return an array that store all possible SDLVehicleDataType */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract SDLVehicleDataType : <font color=gray><i> VEHICLEDATA_GPS </i></font> diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataType.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataType.m index 7a1c7eceb..557c6324e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataType.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleDataType.m @@ -31,7 +31,7 @@ SDLVehicleDataType* SDLVehicleDataType_VEHICLEDATA_ENGINETORQUE = nil; SDLVehicleDataType* SDLVehicleDataType_VEHICLEDATA_ACCPEDAL = nil; SDLVehicleDataType* SDLVehicleDataType_VEHICLEDATA_STEERINGWHEEL = nil; -NSMutableArray* SDLVehicleDataType_values = nil; +NSArray* SDLVehicleDataType_values = nil; @implementation SDLVehicleDataType @@ -44,9 +44,9 @@ NSMutableArray* SDLVehicleDataType_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLVehicleDataType_values == nil) { - SDLVehicleDataType_values = [[NSMutableArray alloc] initWithObjects: + SDLVehicleDataType_values = @[ SDLVehicleDataType.VEHICLEDATA_GPS, SDLVehicleDataType.VEHICLEDATA_SPEED, SDLVehicleDataType.VEHICLEDATA_RPM, @@ -73,7 +73,7 @@ NSMutableArray* SDLVehicleDataType_values = nil; SDLVehicleDataType.VEHICLEDATA_ENGINETORQUE, SDLVehicleDataType.VEHICLEDATA_ACCPEDAL, SDLVehicleDataType.VEHICLEDATA_STEERINGWHEEL, - nil]; + ]; } return SDLVehicleDataType_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleType.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleType.h index 6c7dbb811..6ce4bb2e8 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleType.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleType.h @@ -63,13 +63,13 @@ /** * @abstract Constructs a newly allocated SDLVehicleType object */ --(id) init; +-(instancetype) init; /** * @abstract Constructs a newly allocated SDLVehicleType object indicated by the NSMutableDictionary parameter * @param dict The NSMutableDictionary to use */ --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; /** * @abstract The make of the vehicle diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleType.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleType.m index cb7e1f8c0..e8f9286a2 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleType.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVehicleType.m @@ -8,12 +8,12 @@ @implementation SDLVehicleType --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrCapabilities.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrCapabilities.h index 7fea8655b..9267c65c6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrCapabilities.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrCapabilities.h @@ -1,4 +1,4 @@ -// SDLVrCapabilities.h +// SDLVRCapabilities.h // @@ -9,26 +9,26 @@ * The VR capabilities of the connected SDL platform. * */ -@interface SDLVrCapabilities : SDLEnum {} +@interface SDLVRCapabilities : SDLEnum {} /** - * Convert String to SDLVrCapabilities + * Convert String to SDLVRCapabilities * @param value String - * @return SDLVrCapabilities + * @return SDLVRCapabilities */ -+(SDLVrCapabilities*) valueOf:(NSString*) value; ++(SDLVRCapabilities*) valueOf:(NSString*) value; /*! - @abstract Store the enumeration of all possible SDLVrCapabilities - @result return an array that store all possible SDLVrCapabilities + @abstract Store the enumeration of all possible SDLVRCapabilities + @result return an array that store all possible SDLVRCapabilities */ -+(NSMutableArray*) values; ++(NSArray*) values; /** * @abstract The SDL platform is capable of recognizing spoken text in the current * language. - * @result return an SDLVrCapabilities instance pointer with value of <font color=gray><i> TEXT </i></font> + * @result return an SDLVRCapabilities instance pointer with value of <font color=gray><i> TEXT </i></font> * @since <font color=red><b> SmartDeviceLink 1.0 </b></font> */ -+(SDLVrCapabilities*) TEXT; ++(SDLVRCapabilities*) TEXT; @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrCapabilities.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrCapabilities.m index db2c0e1c7..afca3f23e 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrCapabilities.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrCapabilities.m @@ -1,17 +1,17 @@ -// SDLVrCapabilities.m +// SDLVRCapabilities.m // -#import "SDLVrCapabilities.h" +#import "SDLVRCapabilities.h" -SDLVrCapabilities* SDLVrCapabilities_TEXT = nil; +SDLVRCapabilities* SDLVRCapabilities_TEXT = nil; -NSMutableArray* SDLVrCapabilities_values = nil; +NSArray* SDLVRCapabilities_values = nil; -@implementation SDLVrCapabilities +@implementation SDLVRCapabilities -+(SDLVrCapabilities*) valueOf:(NSString*) value { - for (SDLVrCapabilities* item in SDLVrCapabilities.values) { ++(SDLVRCapabilities*) valueOf:(NSString*) value { + for (SDLVRCapabilities* item in SDLVRCapabilities.values) { //NOTE: This was added for Sync Module Compatability, V1 module resturns "Text" and a // Gen 1.1 module returns "TEXT", the new if statement makes a case insensitive // check instead to accept both @@ -23,20 +23,20 @@ NSMutableArray* SDLVrCapabilities_values = nil; return nil; } -+(NSMutableArray*) values { - if (SDLVrCapabilities_values == nil) { - SDLVrCapabilities_values = [[NSMutableArray alloc] initWithObjects: - SDLVrCapabilities.TEXT, - nil]; ++(NSArray*) values { + if (SDLVRCapabilities_values == nil) { + SDLVRCapabilities_values = @[ + SDLVRCapabilities.TEXT, + ]; } - return SDLVrCapabilities_values; + return SDLVRCapabilities_values; } -+(SDLVrCapabilities*) TEXT { - if (SDLVrCapabilities_TEXT == nil) { - SDLVrCapabilities_TEXT = [[SDLVrCapabilities alloc] initWithValue:@"TEXT"]; ++(SDLVRCapabilities*) TEXT { + if (SDLVRCapabilities_TEXT == nil) { + SDLVRCapabilities_TEXT = [[SDLVRCapabilities alloc] initWithValue:@"TEXT"]; } - return SDLVrCapabilities_TEXT; + return SDLVRCapabilities_TEXT; } @end diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrHelpItem.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrHelpItem.h index d3f79c175..ab1539e79 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrHelpItem.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrHelpItem.h @@ -1,16 +1,15 @@ -// SDLVrHelpItem.h +// SDLVRHelpItem.h // - - #import "SDLRPCMessage.h" -#import "SDLImage.h" +@class SDLImage; + -@interface SDLVrHelpItem : SDLRPCStruct {} +@interface SDLVRHelpItem : SDLRPCStruct {} --(id) init; --(id) initWithDictionary:(NSMutableDictionary*) dict; +-(instancetype) init; +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict; @property(strong) NSString* text; @property(strong) SDLImage* image; diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrHelpItem.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrHelpItem.m index 22d50ffae..6a2d6b63d 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrHelpItem.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLVrHelpItem.m @@ -1,19 +1,20 @@ -// SDLVrHelpItem.m +// SDLVRHelpItem.m // -#import "SDLVrHelpItem.h" +#import "SDLVRHelpItem.h" +#import "SDLImage.h" #import "SDLNames.h" -@implementation SDLVrHelpItem +@implementation SDLVRHelpItem --(id) init { +-(instancetype) init { if (self = [super init]) {} return self; } --(id) initWithDictionary:(NSMutableDictionary*) dict { +-(instancetype) initWithDictionary:(NSMutableDictionary*) dict { if (self = [super initWithDictionary:dict]) {} return self; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLWarningLightStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLWarningLightStatus.h index 09741e820..6320fc5f2 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLWarningLightStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLWarningLightStatus.h @@ -22,7 +22,7 @@ @abstract Store the enumeration of all possible SDLWarningLightStatus @result return an array that store all possible SDLWarningLightStatus */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract Warninglight Off diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLWarningLightStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLWarningLightStatus.m index 37c741caf..2d7edcaa4 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLWarningLightStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLWarningLightStatus.m @@ -9,7 +9,7 @@ SDLWarningLightStatus* SDLWarningLightStatus_ON = nil; SDLWarningLightStatus* SDLWarningLightStatus_FLASH = nil; SDLWarningLightStatus* SDLWarningLightStatus_NOT_USED = nil; -NSMutableArray* SDLWarningLightStatus_values = nil; +NSArray* SDLWarningLightStatus_values = nil; @implementation SDLWarningLightStatus @@ -22,14 +22,14 @@ NSMutableArray* SDLWarningLightStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLWarningLightStatus_values == nil) { - SDLWarningLightStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLWarningLightStatus_values = @[ SDLWarningLightStatus.OFF, SDLWarningLightStatus.ON, SDLWarningLightStatus.FLASH, SDLWarningLightStatus.NOT_USED, - nil]; + ]; } return SDLWarningLightStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLWiperStatus.h b/SmartDeviceLink-iOS/SmartDeviceLink/SDLWiperStatus.h index 65912f3d6..a3369f0a6 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLWiperStatus.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLWiperStatus.h @@ -20,7 +20,7 @@ @abstract Store the enumeration of all possible SDLWiperStatus @result return an array that store all possible SDLWiperStatus */ -+(NSMutableArray*) values; ++(NSArray*) values; /*! @abstract SDLWiperStatus : <font color=gray><i> OFF </i></font> diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLWiperStatus.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLWiperStatus.m index d29931d0e..10de1eada 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLWiperStatus.m +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLWiperStatus.m @@ -20,7 +20,7 @@ SDLWiperStatus* SDLWiperStatus_AUTO_ADJUST = nil; SDLWiperStatus* SDLWiperStatus_STALLED = nil; SDLWiperStatus* SDLWiperStatus_NO_DATA_EXISTS = nil; -NSMutableArray* SDLWiperStatus_values = nil; +NSArray* SDLWiperStatus_values = nil; @implementation SDLWiperStatus @@ -33,9 +33,9 @@ NSMutableArray* SDLWiperStatus_values = nil; return nil; } -+(NSMutableArray*) values { ++(NSArray*) values { if (SDLWiperStatus_values == nil) { - SDLWiperStatus_values = [[NSMutableArray alloc] initWithObjects: + SDLWiperStatus_values = @[ SDLWiperStatus.OFF, SDLWiperStatus.AUTO_OFF, SDLWiperStatus.OFF_MOVING, @@ -51,7 +51,7 @@ NSMutableArray* SDLWiperStatus_values = nil; SDLWiperStatus.AUTO_ADJUST, SDLWiperStatus.STALLED, SDLWiperStatus.NO_DATA_EXISTS, - nil]; + ]; } return SDLWiperStatus_values; } diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SmartDeviceLink.h b/SmartDeviceLink-iOS/SmartDeviceLink/SmartDeviceLink.h index ce6a0ff28..0f22240c0 100644 --- a/SmartDeviceLink-iOS/SmartDeviceLink/SmartDeviceLink.h +++ b/SmartDeviceLink-iOS/SmartDeviceLink/SmartDeviceLink.h @@ -15,259 +15,266 @@ FOUNDATION_EXPORT double SmartDeviceLinkVersionNumber; FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[]; /**** Utilities *****/ -#import <SmartDeviceLink/SDLJingle.h> +#import "SDLJingle.h" /***** Proxy *****/ -#import <SmartDeviceLink/SDLProxy.h> -#import <SmartDeviceLink/SDLProxyListener.h> -#import <SmartDeviceLink/SDLProxyFactory.h> -#import <SmartDeviceLink/SDLTTSChunkFactory.h> +#import "SDLProxy.h" +#import "SDLProxyListener.h" +#import "SDLProxyFactory.h" +#import "SDLTTSChunkFactory.h" /***** Debug *****/ -#import <SmartDeviceLink/SDLConsoleController.h> -#import <SmartDeviceLink/SDLDebugTool.h> -#import <SmartDeviceLink/SDLSiphonServer.h> +#import "SDLConsoleController.h" +#import "SDLDebugTool.h" +#import "SDLDebugToolConsole.h" +#import "SDLSiphonServer.h" /***** Transport *****/ -#import <SmartDeviceLink/SDLAbstractTransport.h> -#import <SmartDeviceLink/SDLIAPTransport.h> -#import <SmartDeviceLink/SDLTCPTransport.h> -#import <SmartDeviceLink/SDLTransport.h> -#import <SmartDeviceLink/SDLTransportDelegate.h> -#import <SmartDeviceLink/SDLInterfaceProtocol.h> +#import "SDLAbstractTransport.h" +#import "SDLIAPTransport.h" +#import "SDLTCPTransport.h" +#import "SDLTransport.h" +#import "SDLTransportDelegate.h" +#import "SDLInterfaceProtocol.h" /***** Protocol *****/ -#import <SmartDeviceLink/SDLProtocolListener.h> -#import <SmartDeviceLink/SDLAbstractProtocol.h> -#import <SmartDeviceLink/SDLProtocol.h> +#import "SDLProtocolListener.h" +#import "SDLAbstractProtocol.h" +#import "SDLProtocol.h" // Header -#import <SmartDeviceLink/SDLProtocolHeader.h> +#import "SDLProtocolHeader.h" // Message -#import <SmartDeviceLink/SDLProtocolMessage.h> +#import "SDLProtocolMessage.h" /***** RPCs *****/ // Superclasses -#import <SmartDeviceLink/SDLEnum.h> -#import <SmartDeviceLink/SDLRPCMessage.h> -#import <SmartDeviceLink/SDLRPCNotification.h> -#import <SmartDeviceLink/SDLRPCRequest.h> -#import <SmartDeviceLink/SDLRPCResponse.h> +#import "SDLEnum.h" +#import "SDLRPCMessage.h" +#import "SDLRPCStruct.h" +#import "SDLRPCNotification.h" +#import "SDLRPCRequest.h" +#import "SDLRPCResponse.h" // Factories -#import <SmartDeviceLink/SDLRPCRequestFactory.h> +#import "SDLRPCRequestFactory.h" // Requests -#import <SmartDeviceLink/SDLAddCommand.h> -#import <SmartDeviceLink/SDLAddSubMenu.h> -#import <SmartDeviceLink/SDLAlert.h> -#import <SmartDeviceLink/SDLAlertManeuver.h> -#import <SmartDeviceLink/SDLChangeRegistration.h> -#import <SmartDeviceLink/SDLCreateInteractionChoiceSet.h> -#import <SmartDeviceLink/SDLDeleteCommand.h> -#import <SmartDeviceLink/SDLDeleteFile.h> -#import <SmartDeviceLink/SDLDeleteInteractionChoiceSet.h> -#import <SmartDeviceLink/SDLDeleteSubMenu.h> -#import <SmartDeviceLink/SDLDiagnosticMessage.h> -#import <SmartDeviceLink/SDLEncodedSyncPData.h> -#import <SmartDeviceLink/SDLEndAudioPassThru.h> -#import <SmartDeviceLink/SDLGetDTCs.h> -#import <SmartDeviceLink/SDLGetVehicleData.h> -#import <SmartDeviceLink/SDLListFiles.h> -#import <SmartDeviceLink/SDLPerformAudioPassThru.h> -#import <SmartDeviceLink/SDLPerformInteraction.h> -#import <SmartDeviceLink/SDLPutFile.h> -#import <SmartDeviceLink/SDLReadDID.h> -#import <SmartDeviceLink/SDLRegisterAppInterface.h> -#import <SmartDeviceLink/SDLResetGlobalProperties.h> -#import <SmartDeviceLink/SDLScrollableMessage.h> -#import <SmartDeviceLink/SDLSetAppIcon.h> -#import <SmartDeviceLink/SDLSetDisplayLayout.h> -#import <SmartDeviceLink/SDLSetGlobalProperties.h> -#import <SmartDeviceLink/SDLSetMediaClockTimer.h> -#import <SmartDeviceLink/SDLShow.h> -#import <SmartDeviceLink/SDLShowConstantTBT.h> -#import <SmartDeviceLink/SDLSlider.h> -#import <SmartDeviceLink/SDLSpeak.h> -#import <SmartDeviceLink/SDLSubscribeButton.h> -#import <SmartDeviceLink/SDLSubscribeVehicleData.h> -#import <SmartDeviceLink/SDLSyncPData.h> -#import <SmartDeviceLink/SDLUnregisterAppInterface.h> -#import <SmartDeviceLink/SDLUnsubscribeButton.h> -#import <SmartDeviceLink/SDLUnsubscribeVehicleData.h> -#import <SmartDeviceLink/SDLUpdateTurnList.h> +#import "SDLAddCommand.h" +#import "SDLAddSubMenu.h" +#import "SDLAlert.h" +#import "SDLAlertManeuver.h" +#import "SDLChangeRegistration.h" +#import "SDLCreateInteractionChoiceSet.h" +#import "SDLDeleteCommand.h" +#import "SDLDeleteFile.h" +#import "SDLDeleteInteractionChoiceSet.h" +#import "SDLDeleteSubMenu.h" +#import "SDLDiagnosticMessage.h" +#import "SDLDialNumber.h" +#import "SDLEncodedSyncPData.h" +#import "SDLEndAudioPassThru.h" +#import "SDLGetDTCs.h" +#import "SDLGetVehicleData.h" +#import "SDLListFiles.h" +#import "SDLPerformAudioPassThru.h" +#import "SDLPerformInteraction.h" +#import "SDLPutFile.h" +#import "SDLReadDID.h" +#import "SDLRegisterAppInterface.h" +#import "SDLResetGlobalProperties.h" +#import "SDLScrollableMessage.h" +#import "SDLSendLocation.h" +#import "SDLSetAppIcon.h" +#import "SDLSetDisplayLayout.h" +#import "SDLSetGlobalProperties.h" +#import "SDLSetMediaClockTimer.h" +#import "SDLShow.h" +#import "SDLShowConstantTBT.h" +#import "SDLSlider.h" +#import "SDLSpeak.h" +#import "SDLSubscribeButton.h" +#import "SDLSubscribeVehicleData.h" +#import "SDLSyncPData.h" +#import "SDLUnregisterAppInterface.h" +#import "SDLUnsubscribeButton.h" +#import "SDLUnsubscribeVehicleData.h" +#import "SDLUpdateTurnList.h" // Responses -#import <SmartDeviceLink/SDLAddCommandResponse.h> -#import <SmartDeviceLink/SDLAddSubMenuResponse.h> -#import <SmartDeviceLink/SDLAlertManeuverResponse.h> -#import <SmartDeviceLink/SDLAlertResponse.h> -#import <SmartDeviceLink/SDLChangeRegistrationResponse.h> -#import <SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.h> -#import <SmartDeviceLink/SDLDeleteCommandResponse.h> -#import <SmartDeviceLink/SDLDeleteFileResponse.h> -#import <SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.h> -#import <SmartDeviceLink/SDLDeleteSubMenuResponse.h> -#import <SmartDeviceLink/SDLDiagnosticMessageResponse.h> -#import <SmartDeviceLink/SDLEncodedSyncPDataResponse.h> -#import <SmartDeviceLink/SDLEndAudioPassThruResponse.h> -#import <SmartDeviceLink/SDLGenericResponse.h> -#import <SmartDeviceLink/SDLGetDTCsResponse.h> -#import <SmartDeviceLink/SDLGetVehicleDataResponse.h> -#import <SmartDeviceLink/SDLListFilesResponse.h> -#import <SmartDeviceLink/SDLPerformAudioPassThruResponse.h> -#import <SmartDeviceLink/SDLPerformInteractionResponse.h> -#import <SmartDeviceLink/SDLPutFileResponse.h> -#import <SmartDeviceLink/SDLReadDIDResponse.h> -#import <SmartDeviceLink/SDLRegisterAppInterfaceResponse.h> -#import <SmartDeviceLink/SDLResetGlobalPropertiesResponse.h> -#import <SmartDeviceLink/SDLScrollableMessageResponse.h> -#import <SmartDeviceLink/SDLSetAppIconResponse.h> -#import <SmartDeviceLink/SDLSetDisplayLayoutResponse.h> -#import <SmartDeviceLink/SDLSetGlobalPropertiesResponse.h> -#import <SmartDeviceLink/SDLSetMediaClockTimerResponse.h> -#import <SmartDeviceLink/SDLShowConstantTBTResponse.h> -#import <SmartDeviceLink/SDLShowResponse.h> -#import <SmartDeviceLink/SDLSliderResponse.h> -#import <SmartDeviceLink/SDLSpeakResponse.h> -#import <SmartDeviceLink/SDLSubscribeButtonResponse.h> -#import <SmartDeviceLink/SDLSubscribeVehicleDataResponse.h> -#import <SmartDeviceLink/SDLSyncPDataResponse.h> -#import <SmartDeviceLink/SDLUnregisterAppInterfaceResponse.h> -#import <SmartDeviceLink/SDLUnsubscribeButtonResponse.h> -#import <SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h> -#import <SmartDeviceLink/SDLUpdateTurnListResponse.h> +#import "SDLAddCommandResponse.h" +#import "SDLAddSubMenuResponse.h" +#import "SDLAlertManeuverResponse.h" +#import "SDLAlertResponse.h" +#import "SDLChangeRegistrationResponse.h" +#import "SDLCreateInteractionChoiceSetResponse.h" +#import "SDLDeleteCommandResponse.h" +#import "SDLDeleteFileResponse.h" +#import "SDLDeleteInteractionChoiceSetResponse.h" +#import "SDLDeleteSubMenuResponse.h" +#import "SDLDiagnosticMessageResponse.h" +#import "SDLDialNumberResponse.h" +#import "SDLEncodedSyncPDataResponse.h" +#import "SDLEndAudioPassThruResponse.h" +#import "SDLGenericResponse.h" +#import "SDLGetDTCsResponse.h" +#import "SDLGetVehicleDataResponse.h" +#import "SDLListFilesResponse.h" +#import "SDLPerformAudioPassThruResponse.h" +#import "SDLPerformInteractionResponse.h" +#import "SDLPutFileResponse.h" +#import "SDLReadDIDResponse.h" +#import "SDLRegisterAppInterfaceResponse.h" +#import "SDLResetGlobalPropertiesResponse.h" +#import "SDLScrollableMessageResponse.h" +#import "SDLSendLocationResponse.h" +#import "SDLSetAppIconResponse.h" +#import "SDLSetDisplayLayoutResponse.h" +#import "SDLSetGlobalPropertiesResponse.h" +#import "SDLSetMediaClockTimerResponse.h" +#import "SDLShowConstantTBTResponse.h" +#import "SDLShowResponse.h" +#import "SDLSliderResponse.h" +#import "SDLSpeakResponse.h" +#import "SDLSubscribeButtonResponse.h" +#import "SDLSubscribeVehicleDataResponse.h" +#import "SDLSyncPDataResponse.h" +#import "SDLUnregisterAppInterfaceResponse.h" +#import "SDLUnsubscribeButtonResponse.h" +#import "SDLUnsubscribeVehicleDataResponse.h" +#import "SDLUpdateTurnListResponse.h" // Notifications -#import <SmartDeviceLink/SDLOnAppInterfaceUnregistered.h> -#import <SmartDeviceLink/SDLOnAudioPassThru.h> -#import <SmartDeviceLink/SDLOnButtonEvent.h> -#import <SmartDeviceLink/SDLOnButtonPress.h> -#import <SmartDeviceLink/SDLOnCommand.h> -#import <SmartDeviceLink/SDLOnDriverDistraction.h> -#import <SmartDeviceLink/SDLOnEncodedSyncPData.h> -#import <SmartDeviceLink/SDLOnHashChange.h> -#import <SmartDeviceLink/SDLOnHMIStatus.h> -#import <SmartDeviceLink/SDLOnKeyboardInput.h> -#import <SmartDeviceLink/SDLOnLanguageChange.h> -#import <SmartDeviceLink/SDLOnLockScreenStatus.h> -#import <SmartDeviceLink/SDLOnPermissionsChange.h> -#import <SmartDeviceLink/SDLOnSyncPData.h> -#import <SmartDeviceLink/SDLOnSystemRequest.h> -#import <SmartDeviceLink/SDLOnTBTClientState.h> -#import <SmartDeviceLink/SDLOnTouchEvent.h> -#import <SmartDeviceLink/SDLOnVehicleData.h> +#import "SDLOnAppInterfaceUnregistered.h" +#import "SDLOnAudioPassThru.h" +#import "SDLOnButtonEvent.h" +#import "SDLOnButtonPress.h" +#import "SDLOnCommand.h" +#import "SDLOnDriverDistraction.h" +#import "SDLOnEncodedSyncPData.h" +#import "SDLOnHashChange.h" +#import "SDLOnHMIStatus.h" +#import "SDLOnKeyboardInput.h" +#import "SDLOnLanguageChange.h" +#import "SDLOnLockScreenStatus.h" +#import "SDLOnPermissionsChange.h" +#import "SDLOnSyncPData.h" +#import "SDLOnSystemRequest.h" +#import "SDLOnTBTClientState.h" +#import "SDLOnTouchEvent.h" +#import "SDLOnVehicleData.h" // Structs -#import <SmartDeviceLink/SDLAirbagStatus.h> -#import <SmartDeviceLink/SDLAudioPassThruCapabilities.h> -#import <SmartDeviceLink/SDLBeltStatus.h> -#import <SmartDeviceLink/SDLBodyInformation.h> -#import <SmartDeviceLink/SDLButtonCapabilities.h> -#import <SmartDeviceLink/SDLChoice.h> -#import <SmartDeviceLink/SDLClusterModeStatus.h> -#import <SmartDeviceLink/SDLDeviceInfo.h> -#import <SmartDeviceLink/SDLDeviceStatus.h> -#import <SmartDeviceLink/SDLDIDResult.h> -#import <SmartDeviceLink/SDLDisplayCapabilities.h> -#import <SmartDeviceLink/SDLECallInfo.h> -#import <SmartDeviceLink/SDLEmergencyEvent.h> -#import <SmartDeviceLink/SDLGPSData.h> -#import <SmartDeviceLink/SDLHeadLampStatus.h> -#import <SmartDeviceLink/SDLHMIPermissions.h> -#import <SmartDeviceLink/SDLImage.h> -#import <SmartDeviceLink/SDLImageField.h> -#import <SmartDeviceLink/SDLImageResolution.h> -#import <SmartDeviceLink/SDLKeyboardProperties.h> -#import <SmartDeviceLink/SDLMenuParams.h> -#import <SmartDeviceLink/SDLMyKey.h> -#import <SmartDeviceLink/SDLParameterPermissions.h> -#import <SmartDeviceLink/SDLPermissionItem.h> -#import <SmartDeviceLink/SDLPresetBankCapabilities.h> -#import <SmartDeviceLink/SDLScreenParams.h> -#import <SmartDeviceLink/SDLSingleTireStatus.h> -#import <SmartDeviceLink/SDLSoftButton.h> -#import <SmartDeviceLink/SDLSoftButtonCapabilities.h> -#import <SmartDeviceLink/SDLStartTime.h> -#import <SmartDeviceLink/SDLSyncMsgVersion.h> -#import <SmartDeviceLink/SDLTextField.h> -#import <SmartDeviceLink/SDLTireStatus.h> -#import <SmartDeviceLink/SDLTouchCoord.h> -#import <SmartDeviceLink/SDLTouchEvent.h> -#import <SmartDeviceLink/SDLTouchEventCapabilities.h> -#import <SmartDeviceLink/SDLTTSChunk.h> -#import <SmartDeviceLink/SDLTurn.h> -#import <SmartDeviceLink/SDLVehicleDataResult.h> -#import <SmartDeviceLink/SDLVehicleType.h> -#import <SmartDeviceLink/SDLVrHelpItem.h> +#import "SDLAirbagStatus.h" +#import "SDLAudioPassThruCapabilities.h" +#import "SDLBeltStatus.h" +#import "SDLBodyInformation.h" +#import "SDLButtonCapabilities.h" +#import "SDLChoice.h" +#import "SDLClusterModeStatus.h" +#import "SDLDeviceInfo.h" +#import "SDLDeviceStatus.h" +#import "SDLDIDResult.h" +#import "SDLDisplayCapabilities.h" +#import "SDLECallInfo.h" +#import "SDLEmergencyEvent.h" +#import "SDLGPSData.h" +#import "SDLHeadLampStatus.h" +#import "SDLHMICapabilities.h" +#import "SDLHMIPermissions.h" +#import "SDLImage.h" +#import "SDLImageField.h" +#import "SDLImageResolution.h" +#import "SDLKeyboardProperties.h" +#import "SDLMenuParams.h" +#import "SDLMyKey.h" +#import "SDLParameterPermissions.h" +#import "SDLPermissionItem.h" +#import "SDLPresetBankCapabilities.h" +#import "SDLScreenParams.h" +#import "SDLSingleTireStatus.h" +#import "SDLSoftButton.h" +#import "SDLSoftButtonCapabilities.h" +#import "SDLStartTime.h" +#import "SDLSyncMsgVersion.h" +#import "SDLTextField.h" +#import "SDLTireStatus.h" +#import "SDLTouchCoord.h" +#import "SDLTouchEvent.h" +#import "SDLTouchEventCapabilities.h" +#import "SDLTTSChunk.h" +#import "SDLTurn.h" +#import "SDLVehicleDataResult.h" +#import "SDLVehicleType.h" +#import "SDLVRHelpItem.h" // Enums -#import <SmartDeviceLink/SDLAmbientLightStatus.h> -#import <SmartDeviceLink/SDLAppHMIType.h> -#import <SmartDeviceLink/SDLAppInterfaceUnregisteredReason.h> -#import <SmartDeviceLink/SDLAudioStreamingState.h> -#import <SmartDeviceLink/SDLAudioType.h> -#import <SmartDeviceLink/SDLBitsPerSample.h> -#import <SmartDeviceLink/SDLButtonEventMode.h> -#import <SmartDeviceLink/SDLButtonName.h> -#import <SmartDeviceLink/SDLButtonPressMode.h> -#import <SmartDeviceLink/SDLCarModeStatus.h> -#import <SmartDeviceLink/SDLCharacterSet.h> -#import <SmartDeviceLink/SDLCompassDirection.h> -#import <SmartDeviceLink/SDLComponentVolumeStatus.h> -#import <SmartDeviceLink/SDLDeviceLevelStatus.h> -#import <SmartDeviceLink/SDLDimension.h> -#import <SmartDeviceLink/SDLDisplayType.h> -#import <SmartDeviceLink/SDLDriverDistractionState.h> -#import <SmartDeviceLink/SDLECallConfirmationStatus.h> -#import <SmartDeviceLink/SDLEmergencyEventType.h> -#import <SmartDeviceLink/SDLFileType.h> -#import <SmartDeviceLink/SDLFuelCutoffStatus.h> -#import <SmartDeviceLink/SDLGlobalProperty.h> -#import <SmartDeviceLink/SDLHMILevel.h> -#import <SmartDeviceLink/SDLHMIZoneCapabilities.h> -#import <SmartDeviceLink/SDLIgnitionStableStatus.h> -#import <SmartDeviceLink/SDLIgnitionStatus.h> -#import <SmartDeviceLink/SDLImageFieldName.h> -#import <SmartDeviceLink/SDLImageType.h> -#import <SmartDeviceLink/SDLInteractionMode.h> -#import <SmartDeviceLink/SDLKeyboardEvent.h> -#import <SmartDeviceLink/SDLKeyboardLayout.h> -#import <SmartDeviceLink/SDLKeypressMode.h> -#import <SmartDeviceLink/SDLLanguage.h> -#import <SmartDeviceLink/SDLLayoutMode.h> -#import <SmartDeviceLink/SDLLockScreenStatus.h> -#import <SmartDeviceLink/SDLMaintenanceModeStatus.h> -#import <SmartDeviceLink/SDLMediaClockFormat.h> -#import <SmartDeviceLink/SDLPermissionStatus.h> -#import <SmartDeviceLink/SDLPowerModeQualificationStatus.h> -#import <SmartDeviceLink/SDLPowerModeStatus.h> -#import <SmartDeviceLink/SDLPredefinedLayout.h> -#import <SmartDeviceLink/SDLPrerecordedSpeech.h> -#import <SmartDeviceLink/SDLPrimaryAudioSource.h> -#import <SmartDeviceLink/SDLPRNDL.h> -#import <SmartDeviceLink/SDLRequestType.h> -#import <SmartDeviceLink/SDLResult.h> -#import <SmartDeviceLink/SDLRPCMessageType.h> -#import <SmartDeviceLink/SDLSamplingRate.h> -#import <SmartDeviceLink/SDLSoftButtonType.h> -#import <SmartDeviceLink/SDLSpeechCapabilities.h> -#import <SmartDeviceLink/SDLSystemAction.h> -#import <SmartDeviceLink/SDLSystemContext.h> -#import <SmartDeviceLink/SDLTBTState.h> -#import <SmartDeviceLink/SDLTextAlignment.h> -#import <SmartDeviceLink/SDLTextFieldName.h> -#import <SmartDeviceLink/SDLTimerMode.h> -#import <SmartDeviceLink/SDLTouchType.h> -#import <SmartDeviceLink/SDLTriggerSource.h> -#import <SmartDeviceLink/SDLUpdateMode.h> -#import <SmartDeviceLink/SDLVehicleDataActiveStatus.h> -#import <SmartDeviceLink/SDLVehicleDataEventStatus.h> -#import <SmartDeviceLink/SDLVehicleDataNotificationStatus.h> -#import <SmartDeviceLink/SDLVehicleDataResultCode.h> -#import <SmartDeviceLink/SDLVehicleDataStatus.h> -#import <SmartDeviceLink/SDLVehicleDataType.h> -#import <SmartDeviceLink/SDLVrCapabilities.h> -#import <SmartDeviceLink/SDLWarningLightStatus.h> -#import <SmartDeviceLink/SDLWiperStatus.h> +#import "SDLAmbientLightStatus.h" +#import "SDLAppHMIType.h" +#import "SDLAppInterfaceUnregisteredReason.h" +#import "SDLAudioStreamingState.h" +#import "SDLAudioType.h" +#import "SDLBitsPerSample.h" +#import "SDLButtonEventMode.h" +#import "SDLButtonName.h" +#import "SDLButtonPressMode.h" +#import "SDLCarModeStatus.h" +#import "SDLCharacterSet.h" +#import "SDLCompassDirection.h" +#import "SDLComponentVolumeStatus.h" +#import "SDLDeviceLevelStatus.h" +#import "SDLDimension.h" +#import "SDLDisplayType.h" +#import "SDLDriverDistractionState.h" +#import "SDLECallConfirmationStatus.h" +#import "SDLEmergencyEventType.h" +#import "SDLFileType.h" +#import "SDLFuelCutoffStatus.h" +#import "SDLGlobalProperty.h" +#import "SDLHMILevel.h" +#import "SDLHMIZoneCapabilities.h" +#import "SDLIgnitionStableStatus.h" +#import "SDLIgnitionStatus.h" +#import "SDLImageFieldName.h" +#import "SDLImageType.h" +#import "SDLInteractionMode.h" +#import "SDLKeyboardEvent.h" +#import "SDLKeyboardLayout.h" +#import "SDLKeypressMode.h" +#import "SDLLanguage.h" +#import "SDLLayoutMode.h" +#import "SDLLockScreenStatus.h" +#import "SDLMaintenanceModeStatus.h" +#import "SDLMediaClockFormat.h" +#import "SDLPermissionStatus.h" +#import "SDLPowerModeQualificationStatus.h" +#import "SDLPowerModeStatus.h" +#import "SDLPredefinedLayout.h" +#import "SDLPrerecordedSpeech.h" +#import "SDLPrimaryAudioSource.h" +#import "SDLPRNDL.h" +#import "SDLRequestType.h" +#import "SDLResult.h" +#import "SDLRPCMessageType.h" +#import "SDLSamplingRate.h" +#import "SDLSoftButtonType.h" +#import "SDLSpeechCapabilities.h" +#import "SDLSystemAction.h" +#import "SDLSystemContext.h" +#import "SDLTBTState.h" +#import "SDLTextAlignment.h" +#import "SDLTextFieldName.h" +#import "SDLTimerMode.h" +#import "SDLTouchType.h" +#import "SDLTriggerSource.h" +#import "SDLUpdateMode.h" +#import "SDLVehicleDataActiveStatus.h" +#import "SDLVehicleDataEventStatus.h" +#import "SDLVehicleDataNotificationStatus.h" +#import "SDLVehicleDataResultCode.h" +#import "SDLVehicleDataStatus.h" +#import "SDLVehicleDataType.h" +#import "SDLVRCapabilities.h" +#import "SDLWarningLightStatus.h" +#import "SDLWiperStatus.h" |
