summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2017-08-03 15:45:47 -0400
committerJoel Fischer <joeljfischer@gmail.com>2017-08-03 15:45:47 -0400
commit8fb6b6e25c530a55d2ae206718d53a865814f514 (patch)
tree329ce2e11fdfb347f3fdaa58d0b3ad0794cf717b
parent10534de8d4d2b041af9b6e4ae470a02a35082203 (diff)
parent1100710e66c3acc73a6311a86a479f8830a881f5 (diff)
downloadsdl_ios-8fb6b6e25c530a55d2ae206718d53a865814f514.tar.gz
Merge branch 'develop' into feature/616_constructed_payloads
-rw-r--r--README.md1
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj48
-rw-r--r--SmartDeviceLink/SDLAppHMIType.h7
-rw-r--r--SmartDeviceLink/SDLAppHMIType.m9
-rw-r--r--SmartDeviceLink/SDLGlobals.h1
-rw-r--r--SmartDeviceLink/SDLHMICapabilities.h7
-rw-r--r--SmartDeviceLink/SDLHMICapabilities.m12
-rw-r--r--SmartDeviceLink/SDLIAPSession.m3
-rw-r--r--SmartDeviceLink/SDLIAPTransport.m48
-rw-r--r--SmartDeviceLink/SDLLanguage.h74
-rw-r--r--SmartDeviceLink/SDLLanguage.m134
-rw-r--r--SmartDeviceLink/SDLNames.h8
-rw-r--r--SmartDeviceLink/SDLProxy.m30
-rw-r--r--SmartDeviceLink/SDLRegisterAppInterface.m2
-rw-r--r--SmartDeviceLink/SDLResponseDispatcher.m2
-rw-r--r--SmartDeviceLink/SDLSyncMsgVersion.h10
-rw-r--r--SmartDeviceLink/SDLSyncMsgVersion.m28
-rw-r--r--SmartDeviceLink/SDLSystemCapability.h5
-rw-r--r--SmartDeviceLink/SDLSystemCapability.m30
-rw-r--r--SmartDeviceLink/SDLSystemCapabilityType.h5
-rw-r--r--SmartDeviceLink/SDLSystemCapabilityType.m11
-rw-r--r--SmartDeviceLink/SDLTouchType.h1
-rw-r--r--SmartDeviceLink/SDLTouchType.m9
-rw-r--r--SmartDeviceLink/SDLVideoStreamingCapability.h45
-rw-r--r--SmartDeviceLink/SDLVideoStreamingCapability.m93
-rw-r--r--SmartDeviceLink/SDLVideoStreamingCodec.h58
-rw-r--r--SmartDeviceLink/SDLVideoStreamingCodec.m78
-rw-r--r--SmartDeviceLink/SDLVideoStreamingFormat.h37
-rw-r--r--SmartDeviceLink/SDLVideoStreamingFormat.m62
-rw-r--r--SmartDeviceLink/SDLVideoStreamingProtocol.h58
-rw-r--r--SmartDeviceLink/SDLVideoStreamingProtocol.m78
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLAppHMITypeSpec.m5
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLLanguageSpec.m49
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLSystemCapabilityTypeSpec.m5
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTouchTypeSpec.m17
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVideoStreamingCodecSpec.m67
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVideoStreamingProtocolSpec.m67
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMICapabilitiesSpec.m17
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSyncMsgVersionSpec.m9
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m42
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLVideoStreamingCapabilitySpec.m88
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLVideoStreamingFormatSpec.m39
-rw-r--r--SmartDeviceLink_Example/Classes/ProxyManager.m7
-rw-r--r--SmartDeviceLink_Example/Info.plist1
44 files changed, 1358 insertions, 49 deletions
diff --git a/README.md b/README.md
index 145abd9ed..49102a35f 100644
--- a/README.md
+++ b/README.md
@@ -110,6 +110,7 @@ Your application must support a set of smartdevicelink protocol strings in order
<string>com.smartdevicelink.prot1</string>
<string>com.smartdevicelink.prot0</string>
<string>com.ford.sync.prot0</string>
+<string>com.smartdevicelink.multisession</string>
</array>
```
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index 086f20f23..b7509f745 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -934,6 +934,18 @@
5DEE55C01B8509CB004F0D0F /* SDLURLRequestTaskSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DEE55BF1B8509CB004F0D0F /* SDLURLRequestTaskSpec.m */; };
5DF2BB9D1B94E38A00CE5994 /* SDLURLSessionSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DF2BB9C1B94E38A00CE5994 /* SDLURLSessionSpec.m */; };
5DFFB9151BD7C89700DB3F04 /* SDLConnectionManagerType.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DFFB9141BD7C89700DB3F04 /* SDLConnectionManagerType.h */; };
+ 8BD729A61F2A2CF30029AC93 /* SDLVideoStreamingCodec.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BD729A41F2A2CF30029AC93 /* SDLVideoStreamingCodec.h */; };
+ 8BD729A71F2A2CF30029AC93 /* SDLVideoStreamingCodec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BD729A51F2A2CF30029AC93 /* SDLVideoStreamingCodec.m */; };
+ 8BD729AA1F2A41F40029AC93 /* SDLVideoStreamingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BD729A81F2A41F40029AC93 /* SDLVideoStreamingProtocol.h */; };
+ 8BD729AB1F2A41F40029AC93 /* SDLVideoStreamingProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BD729A91F2A41F40029AC93 /* SDLVideoStreamingProtocol.m */; };
+ 8BD729AE1F2A5AA10029AC93 /* SDLVideoStreamingFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BD729AC1F2A5AA10029AC93 /* SDLVideoStreamingFormat.h */; };
+ 8BD729AF1F2A5AA10029AC93 /* SDLVideoStreamingFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BD729AD1F2A5AA10029AC93 /* SDLVideoStreamingFormat.m */; };
+ 8BD729B21F2A61DF0029AC93 /* SDLVideoStreamingCapability.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BD729B01F2A61DF0029AC93 /* SDLVideoStreamingCapability.h */; };
+ 8BD729B31F2A61DF0029AC93 /* SDLVideoStreamingCapability.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BD729B11F2A61DF0029AC93 /* SDLVideoStreamingCapability.m */; };
+ 8BD729B51F2A711D0029AC93 /* SDLVideoStreamingCodecSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BD729B41F2A711D0029AC93 /* SDLVideoStreamingCodecSpec.m */; };
+ 8BD729B71F2A75FD0029AC93 /* SDLVideoStreamingProtocolSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BD729B61F2A75FD0029AC93 /* SDLVideoStreamingProtocolSpec.m */; };
+ 8BF9DE071F2BAEEE004FFCBB /* SDLVideoStreamingFormatSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BF9DE061F2BAEEE004FFCBB /* SDLVideoStreamingFormatSpec.m */; };
+ 8BF9DE091F2BAF0C004FFCBB /* SDLVideoStreamingCapabilitySpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BF9DE081F2BAF0C004FFCBB /* SDLVideoStreamingCapabilitySpec.m */; };
97E26DEC1E807AD70074A3C7 /* SDLMutableDataQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 97E26DEA1E807AD70074A3C7 /* SDLMutableDataQueue.h */; };
97E26DED1E807AD70074A3C7 /* SDLMutableDataQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 97E26DEB1E807AD70074A3C7 /* SDLMutableDataQueue.m */; };
DA4353DF1D271FD10099B8C4 /* CGPointUtilSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DA4353DE1D271FD10099B8C4 /* CGPointUtilSpec.m */; };
@@ -2025,6 +2037,18 @@
5DEE55BF1B8509CB004F0D0F /* SDLURLRequestTaskSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLURLRequestTaskSpec.m; path = "UtilitiesSpecs/HTTP Connection/SDLURLRequestTaskSpec.m"; sourceTree = "<group>"; };
5DF2BB9C1B94E38A00CE5994 /* SDLURLSessionSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLURLSessionSpec.m; path = "UtilitiesSpecs/HTTP Connection/SDLURLSessionSpec.m"; sourceTree = "<group>"; };
5DFFB9141BD7C89700DB3F04 /* SDLConnectionManagerType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLConnectionManagerType.h; sourceTree = "<group>"; };
+ 8BD729A41F2A2CF30029AC93 /* SDLVideoStreamingCodec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLVideoStreamingCodec.h; sourceTree = "<group>"; };
+ 8BD729A51F2A2CF30029AC93 /* SDLVideoStreamingCodec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLVideoStreamingCodec.m; sourceTree = "<group>"; };
+ 8BD729A81F2A41F40029AC93 /* SDLVideoStreamingProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLVideoStreamingProtocol.h; sourceTree = "<group>"; };
+ 8BD729A91F2A41F40029AC93 /* SDLVideoStreamingProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLVideoStreamingProtocol.m; sourceTree = "<group>"; };
+ 8BD729AC1F2A5AA10029AC93 /* SDLVideoStreamingFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLVideoStreamingFormat.h; sourceTree = "<group>"; };
+ 8BD729AD1F2A5AA10029AC93 /* SDLVideoStreamingFormat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLVideoStreamingFormat.m; sourceTree = "<group>"; };
+ 8BD729B01F2A61DF0029AC93 /* SDLVideoStreamingCapability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLVideoStreamingCapability.h; sourceTree = "<group>"; };
+ 8BD729B11F2A61DF0029AC93 /* SDLVideoStreamingCapability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLVideoStreamingCapability.m; sourceTree = "<group>"; };
+ 8BD729B41F2A711D0029AC93 /* SDLVideoStreamingCodecSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLVideoStreamingCodecSpec.m; sourceTree = "<group>"; };
+ 8BD729B61F2A75FD0029AC93 /* SDLVideoStreamingProtocolSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLVideoStreamingProtocolSpec.m; sourceTree = "<group>"; };
+ 8BF9DE061F2BAEEE004FFCBB /* SDLVideoStreamingFormatSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLVideoStreamingFormatSpec.m; sourceTree = "<group>"; };
+ 8BF9DE081F2BAF0C004FFCBB /* SDLVideoStreamingCapabilitySpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLVideoStreamingCapabilitySpec.m; sourceTree = "<group>"; };
97E26DEA1E807AD70074A3C7 /* SDLMutableDataQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLMutableDataQueue.h; sourceTree = "<group>"; };
97E26DEB1E807AD70074A3C7 /* SDLMutableDataQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLMutableDataQueue.m; sourceTree = "<group>"; };
DA4353DE1D271FD10099B8C4 /* CGPointUtilSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CGPointUtilSpec.m; path = UtilitiesSpecs/Touches/CGPointUtilSpec.m; sourceTree = "<group>"; };
@@ -2236,6 +2260,8 @@
162E82241A9BDE8A00906325 /* SDLWarningLightStatusSpec.m */,
DA9F7E9D1DCC05B900ACAE48 /* SDLWaypointTypeSpec.m */,
162E82251A9BDE8A00906325 /* SDLWiperStatusSpec.m */,
+ 8BD729B41F2A711D0029AC93 /* SDLVideoStreamingCodecSpec.m */,
+ 8BD729B61F2A75FD0029AC93 /* SDLVideoStreamingProtocolSpec.m */,
);
path = EnumSpecs;
sourceTree = "<group>";
@@ -2439,6 +2465,8 @@
162E82B41A9BDE8A00906325 /* SDLVehicleDataResultSpec.m */,
162E82B51A9BDE8A00906325 /* SDLVehicleTypeSpec.m */,
162E82B61A9BDE8A00906325 /* SDLVrHelpItemSpec.m */,
+ 8BF9DE061F2BAEEE004FFCBB /* SDLVideoStreamingFormatSpec.m */,
+ 8BF9DE081F2BAF0C004FFCBB /* SDLVideoStreamingCapabilitySpec.m */,
);
path = StructSpecs;
sourceTree = "<group>";
@@ -3075,6 +3103,10 @@
5D61FC1F1A84238C00846EE7 /* SDLVehicleType.m */,
5D61FC221A84238C00846EE7 /* SDLVrHelpItem.h */,
5D61FC231A84238C00846EE7 /* SDLVrHelpItem.m */,
+ 8BD729AC1F2A5AA10029AC93 /* SDLVideoStreamingFormat.h */,
+ 8BD729AD1F2A5AA10029AC93 /* SDLVideoStreamingFormat.m */,
+ 8BD729B01F2A61DF0029AC93 /* SDLVideoStreamingCapability.h */,
+ 8BD729B11F2A61DF0029AC93 /* SDLVideoStreamingCapability.m */,
);
name = Structs;
sourceTree = "<group>";
@@ -3223,6 +3255,10 @@
DA9F7E821DCC047200ACAE48 /* SDLWaypointType.m */,
5D61FC261A84238C00846EE7 /* SDLWiperStatus.h */,
5D61FC271A84238C00846EE7 /* SDLWiperStatus.m */,
+ 8BD729A41F2A2CF30029AC93 /* SDLVideoStreamingCodec.h */,
+ 8BD729A51F2A2CF30029AC93 /* SDLVideoStreamingCodec.m */,
+ 8BD729A81F2A41F40029AC93 /* SDLVideoStreamingProtocol.h */,
+ 8BD729A91F2A41F40029AC93 /* SDLVideoStreamingProtocol.m */,
);
name = Enums;
sourceTree = "<group>";
@@ -4357,6 +4393,7 @@
5D4D67B01D2FE2F900468B4A /* SDLResponseDispatcher.h in Headers */,
5D61FCF21A84238C00846EE7 /* SDLLockScreenStatus.h in Headers */,
5D00AC771F15283E004000D9 /* SDLNavigationCapability.h in Headers */,
+ 8BD729AE1F2A5AA10029AC93 /* SDLVideoStreamingFormat.h in Headers */,
5D61FCD31A84238C00846EE7 /* SDLImageResolution.h in Headers */,
5D61FD541A84238C00846EE7 /* SDLProxyListener.h in Headers */,
5D61FD731A84238C00846EE7 /* SDLRPCRequestFactory.h in Headers */,
@@ -4422,6 +4459,7 @@
5D61FD911A84238C00846EE7 /* SDLShowConstantTBT.h in Headers */,
5D61FC331A84238C00846EE7 /* SDLAddSubMenuResponse.h in Headers */,
5D61FD5D1A84238C00846EE7 /* SDLRegisterAppInterface.h in Headers */,
+ 8BD729A61F2A2CF30029AC93 /* SDLVideoStreamingCodec.h in Headers */,
5D61FC9A1A84238C00846EE7 /* SDLEmergencyEvent.h in Headers */,
5D61FC651A84238C00846EE7 /* SDLCompassDirection.h in Headers */,
5D61FC8E1A84238C00846EE7 /* SDLDimension.h in Headers */,
@@ -4440,6 +4478,7 @@
5D61FCA31A84238C00846EE7 /* SDLEndAudioPassThru.h in Headers */,
5D61FCB11A84238C00846EE7 /* SDLGetDTCs.h in Headers */,
5D61FDFF1A84238C00846EE7 /* SDLVehicleDataEventStatus.h in Headers */,
+ 8BD729AA1F2A41F40029AC93 /* SDLVideoStreamingProtocol.h in Headers */,
5D61FC5B1A84238C00846EE7 /* SDLChangeRegistration.h in Headers */,
5D61FD5B1A84238C00846EE7 /* SDLReadDIDResponse.h in Headers */,
5D61FDEF1A84238C00846EE7 /* SDLUpdateMode.h in Headers */,
@@ -4496,6 +4535,7 @@
5D61FD6F1A84238C00846EE7 /* SDLRPCPayload.h in Headers */,
5D61FCF01A84238C00846EE7 /* SDLLockScreenStatusManager.h in Headers */,
5D61FD311A84238C00846EE7 /* SDLPolicyDataParser.h in Headers */,
+ 8BD729B21F2A61DF0029AC93 /* SDLVideoStreamingCapability.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -4690,6 +4730,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 8BD729AB1F2A41F40029AC93 /* SDLVideoStreamingProtocol.m in Sources */,
332A914F1CED9CC60043824C /* SDLAppInfo.m in Sources */,
5DCC19A51B822804004FFAD9 /* SDLURLRequestTask.m in Sources */,
DA9F7E841DCC047200ACAE48 /* SDLWaypointType.m in Sources */,
@@ -4866,6 +4907,7 @@
5D61FCC61A84238C00846EE7 /* SDLHMIZoneCapabilities.m in Sources */,
5D61FD161A84238C00846EE7 /* SDLOnLockScreenStatus.m in Sources */,
5D61FDAE1A84238C00846EE7 /* SDLSubscribeButton.m in Sources */,
+ 8BD729AF1F2A5AA10029AC93 /* SDLVideoStreamingFormat.m in Sources */,
DA9F7E6C1DCBFB0700ACAE48 /* SDLDeliveryMode.m in Sources */,
5D61FC581A84238C00846EE7 /* SDLButtonPressMode.m in Sources */,
5D00AC781F15283E004000D9 /* SDLNavigationCapability.m in Sources */,
@@ -4883,6 +4925,7 @@
5D61FDD01A84238C00846EE7 /* SDLTireStatus.m in Sources */,
5D61FC321A84238C00846EE7 /* SDLAddSubMenu.m in Sources */,
5D61FDF61A84238C00846EE7 /* SDLV1ProtocolHeader.m in Sources */,
+ 8BD729B31F2A61DF0029AC93 /* SDLVideoStreamingCapability.m in Sources */,
5D61FDAA1A84238C00846EE7 /* SDLSpeechCapabilities.m in Sources */,
5D61FDB41A84238C00846EE7 /* SDLSubscribeVehicleDataResponse.m in Sources */,
5D61FD121A84238C00846EE7 /* SDLOnKeyboardInput.m in Sources */,
@@ -4897,6 +4940,7 @@
5D61FC7F1A84238C00846EE7 /* SDLDeleteSubMenu.m in Sources */,
5D61FCE91A84238C00846EE7 /* SDLLanguage.m in Sources */,
5D61FC3E1A84238C00846EE7 /* SDLAlertResponse.m in Sources */,
+ 8BD729A71F2A2CF30029AC93 /* SDLVideoStreamingCodec.m in Sources */,
5D61FD8C1A84238C00846EE7 /* SDLSetMediaClockTimer.m in Sources */,
5D2996EA1BFCC0E3006106BF /* (null) in Sources */,
5D61FE121A84238C00846EE7 /* SDLWarningLightStatus.m in Sources */,
@@ -5046,6 +5090,7 @@
5DCF76FE1ACDDB5A00BB647B /* SDLSendLocationResponseSpec.m in Sources */,
162E837D1A9BDE8B00906325 /* SDLEmergencyEventSpec.m in Sources */,
162E82D31A9BDE8A00906325 /* SDLCarModeStatusSpec.m in Sources */,
+ 8BD729B71F2A75FD0029AC93 /* SDLVideoStreamingProtocolSpec.m in Sources */,
162E82EA1A9BDE8B00906325 /* SDLLanguageSpec.m in Sources */,
5D76E3291D3D0A8800647CFA /* SDLFakeViewControllerPresenter.m in Sources */,
162E83331A9BDE8B00906325 /* SDLPerformInteractionSpec.m in Sources */,
@@ -5217,6 +5262,7 @@
162E83031A9BDE8B00906325 /* SDLTriggerSource.m in Sources */,
162E82D61A9BDE8A00906325 /* SDLComponentVolumeStatusSpec.m in Sources */,
162E835C1A9BDE8B00906325 /* SDLPutFileResponseSpec.m in Sources */,
+ 8BD729B51F2A711D0029AC93 /* SDLVideoStreamingCodecSpec.m in Sources */,
DA9F7EAA1DCC061A00ACAE48 /* SDLSubscribeWaypointsResponseSpec.m in Sources */,
162E835F1A9BDE8B00906325 /* SDLResetGlobalPropertiesResponseSpec.m in Sources */,
162E835E1A9BDE8B00906325 /* SDLRegisterAppInterfaceResponseSpec.m in Sources */,
@@ -5243,6 +5289,7 @@
162E83311A9BDE8B00906325 /* SDLListFilesSpec.m in Sources */,
DA9F7EB01DCC063400ACAE48 /* SDLLocationDetailsSpec.m in Sources */,
5DC978261B7A38640012C2F1 /* SDLGlobalsSpec.m in Sources */,
+ 8BF9DE071F2BAEEE004FFCBB /* SDLVideoStreamingFormatSpec.m in Sources */,
162E82FF1A9BDE8B00906325 /* SDLTextAlignmentSpec.m in Sources */,
162E831F1A9BDE8B00906325 /* SDLOnTouchEventSpec.m in Sources */,
162E83921A9BDE8B00906325 /* SDLTouchEventCapabilitiesSpec.m in Sources */,
@@ -5255,6 +5302,7 @@
162E831D1A9BDE8B00906325 /* SDLOnSystemRequestSpec.m in Sources */,
162E835D1A9BDE8B00906325 /* SDLReadDIDResponseSpec.m in Sources */,
162E82D41A9BDE8A00906325 /* SDLCharacterSetSpec.m in Sources */,
+ 8BF9DE091F2BAF0C004FFCBB /* SDLVideoStreamingCapabilitySpec.m in Sources */,
162E830F1A9BDE8B00906325 /* SDLOnAppInterfaceUnregisteredSpec.m in Sources */,
162E83971A9BDE8B00906325 /* SDLVehicleTypeSpec.m in Sources */,
1680B1131A9CD7AD00DBD79E /* SDLProtocolHeaderSpec.m in Sources */,
diff --git a/SmartDeviceLink/SDLAppHMIType.h b/SmartDeviceLink/SDLAppHMIType.h
index 3aaa45170..235ea7694 100644
--- a/SmartDeviceLink/SDLAppHMIType.h
+++ b/SmartDeviceLink/SDLAppHMIType.h
@@ -77,6 +77,13 @@
*/
+ (SDLAppHMIType *)SOCIAL;
+/**
+ * @abstract App dealing with Mobile Projection applications
+ *
+ * @return SDLAppHMIType with value *PROJECTION*
+ */
++ (SDLAppHMIType *)PROJECTION;
+
+ (SDLAppHMIType *)BACKGROUND_PROCESS;
/**
diff --git a/SmartDeviceLink/SDLAppHMIType.m b/SmartDeviceLink/SDLAppHMIType.m
index f09f3af44..73a4c0ea3 100644
--- a/SmartDeviceLink/SDLAppHMIType.m
+++ b/SmartDeviceLink/SDLAppHMIType.m
@@ -11,6 +11,7 @@ SDLAppHMIType *SDLAppHMIType_MESSAGING = nil;
SDLAppHMIType *SDLAppHMIType_NAVIGATION = nil;
SDLAppHMIType *SDLAppHMIType_INFORMATION = nil;
SDLAppHMIType *SDLAppHMIType_SOCIAL = nil;
+SDLAppHMIType *SDLAppHMIType_PROJECTION = nil;
SDLAppHMIType *SDLAppHMIType_BACKGROUND_PROCESS = nil;
SDLAppHMIType *SDLAppHMIType_TESTING = nil;
SDLAppHMIType *SDLAppHMIType_SYSTEM = nil;
@@ -38,6 +39,7 @@ NSArray *SDLAppHMIType_values = nil;
SDLAppHMIType.NAVIGATION,
SDLAppHMIType.INFORMATION,
SDLAppHMIType.SOCIAL,
+ SDLAppHMIType.PROJECTION,
SDLAppHMIType.BACKGROUND_PROCESS,
SDLAppHMIType.TESTING,
SDLAppHMIType.SYSTEM,
@@ -95,6 +97,13 @@ NSArray *SDLAppHMIType_values = nil;
return SDLAppHMIType_SOCIAL;
}
++ (SDLAppHMIType *)PROJECTION {
+ if (SDLAppHMIType_PROJECTION == nil) {
+ SDLAppHMIType_PROJECTION = [[SDLAppHMIType alloc] initWithValue:@"PROJECTION"];
+ }
+ return SDLAppHMIType_PROJECTION;
+}
+
+ (SDLAppHMIType *)BACKGROUND_PROCESS {
if (SDLAppHMIType_BACKGROUND_PROCESS == nil) {
SDLAppHMIType_BACKGROUND_PROCESS = [[SDLAppHMIType alloc] initWithValue:@"BACKGROUND_PROCESS"];
diff --git a/SmartDeviceLink/SDLGlobals.h b/SmartDeviceLink/SDLGlobals.h
index 4dc025dc4..f52f82574 100644
--- a/SmartDeviceLink/SDLGlobals.h
+++ b/SmartDeviceLink/SDLGlobals.h
@@ -11,6 +11,7 @@
#import "SDLProtocolHeader.h"
#define SDL_SYSTEM_VERSION_LESS_THAN(version) ([[[UIDevice currentDevice] systemVersion] compare:version options:NSNumericSearch] == NSOrderedAscending)
+#define SDL_SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(version) ([[[UIDevice currentDevice] systemVersion] compare:version options:NSNumericSearch] != NSOrderedAscending)
#define BLOCK_RETURN return
extern NSString *const SDLMaxProxyProtocolVersion;
diff --git a/SmartDeviceLink/SDLHMICapabilities.h b/SmartDeviceLink/SDLHMICapabilities.h
index 6a84cec2c..3b3c16ca3 100644
--- a/SmartDeviceLink/SDLHMICapabilities.h
+++ b/SmartDeviceLink/SDLHMICapabilities.h
@@ -23,4 +23,11 @@
*/
@property (copy, nonatomic) NSNumber *phoneCall;
+/**
+ Availability of build in video streaming. True: Available, False: Not Available
+
+ Boolean value. Optional.
+ */
+@property (copy, nonatomic) NSNumber *videoStreaming;
+
@end
diff --git a/SmartDeviceLink/SDLHMICapabilities.m b/SmartDeviceLink/SDLHMICapabilities.m
index 24b35be25..375cfe1d1 100644
--- a/SmartDeviceLink/SDLHMICapabilities.m
+++ b/SmartDeviceLink/SDLHMICapabilities.m
@@ -51,4 +51,16 @@
return store[NAMES_phoneCall];
}
+- (void)setVideoStreaming:(NSNumber *)videoStreaming {
+ if (videoStreaming != nil) {
+ store[NAMES_videoStreaming] = videoStreaming;
+ } else {
+ [store removeObjectForKey:NAMES_videoStreaming];
+ }
+}
+
+- (NSNumber *)videoStreaming {
+ return store[NAMES_videoStreaming];
+}
+
@end
diff --git a/SmartDeviceLink/SDLIAPSession.m b/SmartDeviceLink/SDLIAPSession.m
index b561a1017..61cfa4833 100644
--- a/SmartDeviceLink/SDLIAPSession.m
+++ b/SmartDeviceLink/SDLIAPSession.m
@@ -84,6 +84,9 @@ NSTimeInterval const streamThreadWaitSecs = 1.0;
}
- (void)stop {
+ // This method must be called on the main thread
+ NSAssert([NSThread isMainThread], @"stop must be called on the main thread");
+
if (self.isDataSession) {
[self.ioStreamThread cancel];
diff --git a/SmartDeviceLink/SDLIAPTransport.m b/SmartDeviceLink/SDLIAPTransport.m
index 6dd55e3a2..964f586ab 100644
--- a/SmartDeviceLink/SDLIAPTransport.m
+++ b/SmartDeviceLink/SDLIAPTransport.m
@@ -20,6 +20,7 @@
NSString *const legacyProtocolString = @"com.ford.sync.prot0";
NSString *const controlProtocolString = @"com.smartdevicelink.prot0";
NSString *const indexedProtocolStringPrefix = @"com.smartdevicelink.prot";
+NSString *const multiSessionProtocolString = @"com.smartdevicelink.multisession";
NSString *const backgroundTaskName = @"com.sdl.transport.iap.backgroundTask";
int const createSessionRetries = 1;
@@ -171,9 +172,13 @@ int const streamOpenTimeoutSeconds = 2;
// Stop event listening here so that even if the transport is disconnected by the proxy
// we unregister for accessory local notifications
[self sdl_stopEventListening];
- // Only disconnect the data session, the control session does not stay open and is handled separately
- if (self.session != nil) {
+ if (self.controlSession != nil) {
+ [self.controlSession stop];
+ self.controlSession.streamDelegate = nil;
+ self.controlSession = nil;
+ } else if (self.session != nil) {
[self.session stop];
+ self.session.streamDelegate = nil;
self.session = nil;
}
}
@@ -183,15 +188,18 @@ int const streamOpenTimeoutSeconds = 2;
- (BOOL)sdl_connectAccessory:(EAAccessory *)accessory {
BOOL connecting = NO;
-
- if ([accessory supportsProtocol:controlProtocolString]) {
+
+ if ([accessory supportsProtocol:multiSessionProtocolString] && SDL_SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"9")) {
+ [self sdl_createIAPDataSessionWithAccessory:accessory forProtocol:multiSessionProtocolString];
+ connecting = YES;
+ } else if ([accessory supportsProtocol:controlProtocolString]) {
[self sdl_createIAPControlSessionWithAccessory:accessory];
connecting = YES;
} else if ([accessory supportsProtocol:legacyProtocolString]) {
[self sdl_createIAPDataSessionWithAccessory:accessory forProtocol:legacyProtocolString];
connecting = YES;
}
-
+
return connecting;
}
@@ -208,7 +216,9 @@ int const streamOpenTimeoutSeconds = 2;
}
// Determine if we can start a multi-app session or a legacy (single-app) session
- if ((sdlAccessory = [EAAccessoryManager findAccessoryForProtocol:controlProtocolString])) {
+ if ((sdlAccessory = [EAAccessoryManager findAccessoryForProtocol:multiSessionProtocolString]) && SDL_SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"9")) {
+ [self sdl_createIAPDataSessionWithAccessory:sdlAccessory forProtocol:multiSessionProtocolString];
+ } else if ((sdlAccessory = [EAAccessoryManager findAccessoryForProtocol:controlProtocolString])) {
[self sdl_createIAPControlSessionWithAccessory:sdlAccessory];
} else if ((sdlAccessory = [EAAccessoryManager findAccessoryForProtocol:legacyProtocolString])) {
[self sdl_createIAPDataSessionWithAccessory:sdlAccessory forProtocol:legacyProtocolString];
@@ -423,16 +433,18 @@ int const streamOpenTimeoutSeconds = 2;
return ^(NSStream *stream) {
__strong typeof(weakSelf) strongSelf = weakSelf;
-
+
[SDLDebugTool logInfo:@"Data Stream Event End"];
- [strongSelf.session stop];
- strongSelf.session.streamDelegate = nil;
-
- if (![legacyProtocolString isEqualToString:strongSelf.session.protocol]) {
- [strongSelf sdl_retryEstablishSession];
+ if (strongSelf.session != nil) {
+ // The handler will be called on the IO thread, but the session stop method must be called on the main thread and we need to wait for the session to stop before nil'ing it out. To do this, we use dispatch_sync() on the main thread.
+ dispatch_sync(dispatch_get_main_queue(), ^{
+ [strongSelf.session stop];
+ });
+ strongSelf.session.streamDelegate = nil;
+ strongSelf.session = nil;
}
-
- strongSelf.session = nil;
+
+ // We don't call sdl_retryEstablishSession here because the stream end event usually fires when the accessory is disconnected
};
}
@@ -465,14 +477,14 @@ int const streamOpenTimeoutSeconds = 2;
__strong typeof(weakSelf) strongSelf = weakSelf;
[SDLDebugTool logInfo:@"Data Stream Error"];
- [strongSelf.session stop];
+ dispatch_sync(dispatch_get_main_queue(), ^{
+ [strongSelf.session stop];
+ });
strongSelf.session.streamDelegate = nil;
-
+ strongSelf.session = nil;
if (![legacyProtocolString isEqualToString:strongSelf.session.protocol]) {
[strongSelf sdl_retryEstablishSession];
}
-
- strongSelf.session = nil;
};
}
diff --git a/SmartDeviceLink/SDLLanguage.h b/SmartDeviceLink/SDLLanguage.h
index 38d63746b..f1eef4909 100644
--- a/SmartDeviceLink/SDLLanguage.h
+++ b/SmartDeviceLink/SDLLanguage.h
@@ -28,10 +28,84 @@
*/
+ (NSArray *)values;
/*!
+ @abstract English_SA
+ */
++ (SDLLanguage *)EN_SA;
+
+/*!
+ @abstract Hebrew_IL
+ */
++ (SDLLanguage *)HE_IL;
+
+/*!
+ @abstract Romanian_RO
+ */
++ (SDLLanguage *)RO_RO;
+
+/*!
+ @abstract Ukrainian_UA
+ */
++ (SDLLanguage *)UK_UA;
+
+/*!
+ @abstract Indonesian_ID
+ */
++ (SDLLanguage *)ID_ID;
+
+/*!
+ @abstract Vietnamese_VN
+ */
++ (SDLLanguage *)VI_VN;
+
+/*!
+ @abstract Malay_MY
+ */
++ (SDLLanguage *)MS_MY;
+
+/*!
+ @abstract Hindi_IN
+ */
++ (SDLLanguage *)HI_IN;
+
+/*!
+ @abstract Dutch_BE
+ */
++ (SDLLanguage *)NL_BE;
+
+/*!
+ @abstract Greek_GR
+ */
++ (SDLLanguage *)EL_GR;
+
+/*!
+ @abstract Hungarian_HU
+ */
++ (SDLLanguage *)HU_HU;
+
+/*!
+ @abstract Finnish_FI
+ */
++ (SDLLanguage *)FI_FI;
+
+/*!
+ @abstract Slovak_SK
+ */
++ (SDLLanguage *)SK_SK;
+
+/*!
@abstract English_US
*/
+ (SDLLanguage *)EN_US;
+/*!
+ @abstract English_IN
+ */
++ (SDLLanguage *)EN_IN;
+
+/*!
+ @abstract Thai_TH
+ */
++ (SDLLanguage *)TH_TH;
/**
@abstract Spanish - Mexico
*/
diff --git a/SmartDeviceLink/SDLLanguage.m b/SmartDeviceLink/SDLLanguage.m
index df43adf4c..3fb564513 100644
--- a/SmartDeviceLink/SDLLanguage.m
+++ b/SmartDeviceLink/SDLLanguage.m
@@ -4,7 +4,22 @@
#import "SDLLanguage.h"
+SDLLanguage *SDLLanguage_EN_SA = nil;
+SDLLanguage *SDLLanguage_HE_IL = nil;
+SDLLanguage *SDLLanguage_RO_RO = nil;
+SDLLanguage *SDLLanguage_UK_UA = nil;
+SDLLanguage *SDLLanguage_ID_ID = nil;
+SDLLanguage *SDLLanguage_VI_VN = nil;
+SDLLanguage *SDLLanguage_MS_MY = nil;
+SDLLanguage *SDLLanguage_HI_IN = nil;
+SDLLanguage *SDLLanguage_NL_BE = nil;
+SDLLanguage *SDLLanguage_EL_GR = nil;
+SDLLanguage *SDLLanguage_HU_HU = nil;
+SDLLanguage *SDLLanguage_FI_FI = nil;
+SDLLanguage *SDLLanguage_SK_SK = nil;
SDLLanguage *SDLLanguage_EN_US = nil;
+SDLLanguage *SDLLanguage_EN_IN = nil;
+SDLLanguage *SDLLanguage_TH_TH = nil;
SDLLanguage *SDLLanguage_ES_MX = nil;
SDLLanguage *SDLLanguage_FR_CA = nil;
SDLLanguage *SDLLanguage_DE_DE = nil;
@@ -45,7 +60,22 @@ NSArray *SDLLanguage_values = nil;
+ (NSArray *)values {
if (SDLLanguage_values == nil) {
SDLLanguage_values = @[
+ SDLLanguage.EN_SA,
+ SDLLanguage.HE_IL,
+ SDLLanguage.RO_RO,
+ SDLLanguage.UK_UA,
+ SDLLanguage.ID_ID,
+ SDLLanguage.VI_VN,
+ SDLLanguage.MS_MY,
+ SDLLanguage.HI_IN,
+ SDLLanguage.NL_BE,
+ SDLLanguage.EL_GR,
+ SDLLanguage.HU_HU,
+ SDLLanguage.FI_FI,
+ SDLLanguage.SK_SK,
SDLLanguage.EN_US,
+ SDLLanguage.EN_IN,
+ SDLLanguage.TH_TH,
SDLLanguage.ES_MX,
SDLLanguage.FR_CA,
SDLLanguage.DE_DE,
@@ -73,6 +103,96 @@ NSArray *SDLLanguage_values = nil;
}
return SDLLanguage_values;
}
++ (SDLLanguage *)EN_SA {
+ if (SDLLanguage_EN_SA == nil) {
+ SDLLanguage_EN_SA = [[SDLLanguage alloc] initWithValue:@"EN-SA"];
+ }
+ return SDLLanguage_EN_SA;
+}
+
++ (SDLLanguage *)HE_IL {
+ if (SDLLanguage_HE_IL == nil) {
+ SDLLanguage_HE_IL = [[SDLLanguage alloc] initWithValue:@"HE-IL"];
+ }
+ return SDLLanguage_HE_IL;
+}
+
++ (SDLLanguage *)RO_RO {
+ if (SDLLanguage_RO_RO == nil) {
+ SDLLanguage_RO_RO = [[SDLLanguage alloc] initWithValue:@"RO-RO"];
+ }
+ return SDLLanguage_RO_RO;
+}
+
++ (SDLLanguage *)UK_UA {
+ if (SDLLanguage_UK_UA == nil) {
+ SDLLanguage_UK_UA = [[SDLLanguage alloc] initWithValue:@"UK-UA"];
+ }
+ return SDLLanguage_UK_UA;
+}
+
++ (SDLLanguage *)ID_ID {
+ if (SDLLanguage_ID_ID == nil) {
+ SDLLanguage_ID_ID = [[SDLLanguage alloc] initWithValue:@"ID-ID"];
+ }
+ return SDLLanguage_ID_ID;
+}
+
++ (SDLLanguage *)VI_VN {
+ if (SDLLanguage_VI_VN == nil) {
+ SDLLanguage_VI_VN = [[SDLLanguage alloc] initWithValue:@"VI-VN"];
+ }
+ return SDLLanguage_VI_VN;
+}
+
++ (SDLLanguage *)MS_MY {
+ if (SDLLanguage_MS_MY == nil) {
+ SDLLanguage_MS_MY = [[SDLLanguage alloc] initWithValue:@"MS-MY"];
+ }
+ return SDLLanguage_MS_MY;
+}
+
++ (SDLLanguage *)HI_IN {
+ if (SDLLanguage_HI_IN == nil) {
+ SDLLanguage_HI_IN = [[SDLLanguage alloc] initWithValue:@"HI-IN"];
+ }
+ return SDLLanguage_HI_IN;
+}
+
++ (SDLLanguage *)NL_BE {
+ if (SDLLanguage_NL_BE == nil) {
+ SDLLanguage_NL_BE = [[SDLLanguage alloc] initWithValue:@"NL-BE"];
+ }
+ return SDLLanguage_NL_BE;
+}
+
++ (SDLLanguage *)EL_GR {
+ if (SDLLanguage_EL_GR == nil) {
+ SDLLanguage_EL_GR = [[SDLLanguage alloc] initWithValue:@"EL-GR"];
+ }
+ return SDLLanguage_EL_GR;
+}
+
++ (SDLLanguage *)HU_HU {
+ if (SDLLanguage_HU_HU == nil) {
+ SDLLanguage_HU_HU = [[SDLLanguage alloc] initWithValue:@"HU-HU"];
+ }
+ return SDLLanguage_HU_HU;
+}
+
++ (SDLLanguage *)FI_FI {
+ if (SDLLanguage_FI_FI == nil) {
+ SDLLanguage_FI_FI = [[SDLLanguage alloc] initWithValue:@"FI-FI"];
+ }
+ return SDLLanguage_FI_FI;
+}
+
++ (SDLLanguage *)SK_SK {
+ if (SDLLanguage_SK_SK == nil) {
+ SDLLanguage_SK_SK = [[SDLLanguage alloc] initWithValue:@"SK-SK"];
+ }
+ return SDLLanguage_SK_SK;
+}
+ (SDLLanguage *)EN_US {
if (SDLLanguage_EN_US == nil) {
@@ -81,6 +201,20 @@ NSArray *SDLLanguage_values = nil;
return SDLLanguage_EN_US;
}
++ (SDLLanguage *)EN_IN {
+ if (SDLLanguage_EN_IN == nil) {
+ SDLLanguage_EN_IN = [[SDLLanguage alloc] initWithValue:@"EN-IN"];
+ }
+ return SDLLanguage_EN_IN;
+}
+
++ (SDLLanguage *)TH_TH {
+ if (SDLLanguage_TH_TH == nil) {
+ SDLLanguage_TH_TH = [[SDLLanguage alloc] initWithValue:@"TH-TH"];
+ }
+ return SDLLanguage_TH_TH;
+}
+
+ (SDLLanguage *)ES_MX {
if (SDLLanguage_ES_MX == nil) {
SDLLanguage_ES_MX = [[SDLLanguage alloc] initWithValue:@"ES-MX"];
diff --git a/SmartDeviceLink/SDLNames.h b/SmartDeviceLink/SDLNames.h
index 61bc53a06..effb5855d 100644
--- a/SmartDeviceLink/SDLNames.h
+++ b/SmartDeviceLink/SDLNames.h
@@ -197,6 +197,7 @@
#define NAMES_make @"make"
#define NAMES_maneuverComplete @"maneuverComplete"
#define NAMES_manualTextEntry @"manualTextEntry"
+#define NAMES_maxBitrate @"maxBitrate"
#define NAMES_maxDuration @"maxDuration"
#define NAMES_maximumChangeVelocity @"maximumChangeVelocity"
#define NAMES_maxNumberRFCOMMPorts @"maxNumberRFCOMMPorts"
@@ -275,6 +276,7 @@
#define NAMES_passengerDoorAjar @"passengerDoorAjar"
#define NAMES_passengerKneeAirbagDeployed @"passengerKneeAirbagDeployed"
#define NAMES_passengerSideAirbagDeployed @"passengerSideAirbagDeployed"
+#define NAMES_patchVersion @"patchVersion"
#define NAMES_pdop @"pdop"
#define NAMES_PerformAudioPassThru @"PerformAudioPassThru"
#define NAMES_PerformInteraction @"PerformInteraction"
@@ -290,6 +292,7 @@
#define NAMES_powerModeActive @"powerModeActive"
#define NAMES_powerModeQualificationStatus @"powerModeQualificationStatus"
#define NAMES_powerModeStatus @"powerModeStatus"
+#define NAMES_preferredResolution @"preferredResolution"
#define NAMES_prerecordedSpeech @"prerecordedSpeech"
#define NAMES_presetBankCapabilities @"presetBankCapabilities"
#define NAMES_pressAvailable @"pressAvailable"
@@ -374,6 +377,7 @@
#define NAMES_subThoroughfare @"subThoroughfare"
#define NAMES_success @"success"
#define NAMES_supportedDiagModes @"supportedDiagModes"
+#define NAMES_supportedFormats @"supportedFormats"
#define NAMES_syncFileName @"syncFileName"
#define NAMES_syncMsgVersion @"syncMsgVersion"
#define NAMES_SyncPData @"SyncPData"
@@ -431,6 +435,10 @@
#define NAMES_value @"value"
#define NAMES_vdop @"vdop"
#define NAMES_vehicleType @"vehicleType"
+#define NAMES_videoCodec @"videoCodec"
+#define NAMES_videoProtocol @"videoProtocol"
+#define NAMES_videoStreaming @"videoStreaming"
+#define NAMES_videoStreamingCapability @"videoStreamingCapability"
#define NAMES_vin @"vin"
#define NAMES_voiceRecOn @"voiceRecOn"
#define NAMES_vrCapabilities @"vrCapabilities"
diff --git a/SmartDeviceLink/SDLProxy.m b/SmartDeviceLink/SDLProxy.m
index c3b8efb24..6e5140a81 100644
--- a/SmartDeviceLink/SDLProxy.m
+++ b/SmartDeviceLink/SDLProxy.m
@@ -485,9 +485,11 @@ const int POLICIES_CORRELATION_ID = 65535;
}
// Send the HTTP Request
+ __weak typeof(self) weakSelf = self;
[self uploadForBodyDataDictionary:JSONDictionary
URLString:request.url
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
+ __strong typeof(weakSelf) strongSelf = weakSelf;
NSString *logMessage = nil;
if (error) {
@@ -497,12 +499,12 @@ const int POLICIES_CORRELATION_ID = 65535;
}
if (data == nil || data.length == 0) {
- [SDLDebugTool logInfo:@"OnSystemRequest (HTTP response) failure: no data returned" withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
+ [SDLDebugTool logInfo:@"OnSystemRequest (HTTP response) failure: no data returned" withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:strongSelf.debugConsoleGroupName];
return;
}
// Show the HTTP response
- [SDLDebugTool logInfo:@"OnSystemRequest (HTTP response)" withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
+ [SDLDebugTool logInfo:@"OnSystemRequest (HTTP response)" withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:strongSelf.debugConsoleGroupName];
// Create the SystemRequest RPC to send to module.
SDLSystemRequest *request = [[SDLSystemRequest alloc] init];
@@ -516,19 +518,21 @@ const int POLICIES_CORRELATION_ID = 65535;
if (policyData) {
[pdp parsePolicyData:policyData];
logMessage = [NSString stringWithFormat:@"Policy Data from Cloud\n%@", pdp];
- [SDLDebugTool logInfo:logMessage withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
+ [SDLDebugTool logInfo:logMessage withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:strongSelf.debugConsoleGroupName];
}
// Send and log RPC Request
logMessage = [NSString stringWithFormat:@"SystemRequest (request)\n%@\nData length=%lu", [request serializeAsDictionary:2], (unsigned long)data.length];
- [SDLDebugTool logInfo:logMessage withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
- [self sendRPC:request];
+ [SDLDebugTool logInfo:logMessage withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:strongSelf.debugConsoleGroupName];
+ [strongSelf sendRPC:request];
}];
}
- (void)handleSystemRequestLockScreenIconURL:(SDLOnSystemRequest *)request {
+ __weak typeof(self) weakSelf = self;
[[SDLURLSession defaultSession] dataFromURL:[NSURL URLWithString:request.url]
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
+ __strong typeof(weakSelf) strongSelf = weakSelf;
if (error != nil) {
NSString *logMessage = [NSString stringWithFormat:@"OnSystemRequest failure (HTTP response), download task failed: %@", error.localizedDescription];
[SDLDebugTool logInfo:logMessage withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
@@ -536,7 +540,7 @@ const int POLICIES_CORRELATION_ID = 65535;
}
UIImage *icon = [UIImage imageWithData:data];
- [self invokeMethodOnDelegates:@selector(onReceivedLockScreenIcon:) withObject:icon];
+ [strongSelf invokeMethodOnDelegates:@selector(onReceivedLockScreenIcon:) withObject:icon];
}];
}
@@ -546,24 +550,26 @@ const int POLICIES_CORRELATION_ID = 65535;
return;
}
+ __weak typeof(self) weakSelf = self;
[self sdl_uploadData:request.bulkData
toURLString:request.url
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
+ __strong typeof(weakSelf) strongSelf = weakSelf;
NSString *logMessage = nil;
if (error != nil) {
logMessage = [NSString stringWithFormat:@"OnSystemRequest (HTTP response) = ERROR: %@", error.localizedDescription];
- [SDLDebugTool logInfo:logMessage withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
+ [SDLDebugTool logInfo:logMessage withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:strongSelf.debugConsoleGroupName];
return;
}
if (data.length == 0) {
- [SDLDebugTool logInfo:@"OnSystemRequest (HTTP response) failure: no data returned" withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
+ [SDLDebugTool logInfo:@"OnSystemRequest (HTTP response) failure: no data returned" withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:strongSelf.debugConsoleGroupName];
return;
}
// Show the HTTP response
NSString *responseLogString = [NSString stringWithFormat:@"OnSystemRequest (HTTP) response: %@", response];
- [SDLDebugTool logInfo:responseLogString withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
+ [SDLDebugTool logInfo:responseLogString withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:strongSelf.debugConsoleGroupName];
// Create the SystemRequest RPC to send to module.
SDLPutFile *putFile = [[SDLPutFile alloc] init];
@@ -575,7 +581,7 @@ const int POLICIES_CORRELATION_ID = 65535;
// Send and log RPC Request
logMessage = [NSString stringWithFormat:@"SystemRequest (request)\n%@\nData length=%lu", [request serializeAsDictionary:2], (unsigned long)data.length];
[SDLDebugTool logInfo:logMessage withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
- [self sendRPC:putFile];
+ [strongSelf sendRPC:putFile];
}];
}
@@ -722,10 +728,12 @@ const int POLICIES_CORRELATION_ID = 65535;
}
// Send the HTTP Request
+ __weak typeof(self) weakSelf = self;
[[SDLURLSession defaultSession] uploadWithURLRequest:request
data:data
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
- [self syncPDataNetworkRequestCompleteWithData:data response:response error:error];
+ __strong typeof(self) strongSelf = weakSelf;
+ [strongSelf syncPDataNetworkRequestCompleteWithData:data response:response error:error];
}];
[SDLDebugTool logInfo:@"OnEncodedSyncPData (HTTP request)" withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
diff --git a/SmartDeviceLink/SDLRegisterAppInterface.m b/SmartDeviceLink/SDLRegisterAppInterface.m
index d454f4355..c9e6850d7 100644
--- a/SmartDeviceLink/SDLRegisterAppInterface.m
+++ b/SmartDeviceLink/SDLRegisterAppInterface.m
@@ -59,7 +59,7 @@
self.isMediaApplication = @(isMediaApp);
self.ttsName = [ttsName copy];
self.vrSynonyms = [vrSynonyms copy];
- self.syncMsgVersion = [[SDLSyncMsgVersion alloc] initWithMajorVersion:1 minorVersion:0];
+ self.syncMsgVersion = [[SDLSyncMsgVersion alloc] initWithMajorVersion:1 minorVersion:0 patchVersion:0];
self.appInfo = [SDLAppInfo currentAppInfo];
self.deviceInfo = [SDLDeviceInfo currentDevice];
self.hashID = resumeHash;
diff --git a/SmartDeviceLink/SDLResponseDispatcher.m b/SmartDeviceLink/SDLResponseDispatcher.m
index b9fcf4095..b5bd9f915 100644
--- a/SmartDeviceLink/SDLResponseDispatcher.m
+++ b/SmartDeviceLink/SDLResponseDispatcher.m
@@ -109,7 +109,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)clear {
// When we get disconnected we have to delete all existing responseHandlers as they are not valid anymore
- for (SDLRPCCorrelationId *correlationID in self.rpcResponseHandlerMap) {
+ for (SDLRPCCorrelationId *correlationID in self.rpcResponseHandlerMap.dictionaryRepresentation) {
SDLResponseHandler responseHandler = self.rpcResponseHandlerMap[correlationID];
responseHandler(self.rpcRequestDictionary[correlationID], nil, [NSError sdl_lifecycle_notConnectedError]);
}
diff --git a/SmartDeviceLink/SDLSyncMsgVersion.h b/SmartDeviceLink/SDLSyncMsgVersion.h
index 8ad8d89ed..65f9f608a 100644
--- a/SmartDeviceLink/SDLSyncMsgVersion.h
+++ b/SmartDeviceLink/SDLSyncMsgVersion.h
@@ -24,7 +24,9 @@
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
// TODO: (Alex M.)[2016-12-1] Change from NSInteger to UInt8
-- (instancetype)initWithMajorVersion:(NSInteger)majorVersion minorVersion:(NSInteger)minorVersion;
+- (instancetype)initWithMajorVersion:(NSInteger)majorVersion minorVersion:(NSInteger)minorVersion __deprecated_msg("Use initWithMajorVersion:minorVersion:patchVersion: instead");
+
+- (instancetype)initWithMajorVersion:(NSInteger)majorVersion minorVersion:(NSInteger)minorVersion patchVersion:(NSInteger)patchVersion;
/**
* @abstract The major version indicates versions that is not-compatible to previous versions
@@ -39,4 +41,10 @@
*/
@property (strong) NSNumber *minorVersion;
+/**
+ * @abstract Optional, allows backward-compatible fixes to the API without increasing the minor version of the interface
+ *
+ */
+@property (strong) NSNumber *patchVersion;
+
@end
diff --git a/SmartDeviceLink/SDLSyncMsgVersion.m b/SmartDeviceLink/SDLSyncMsgVersion.m
index 704ec7e7e..8ef8b7cd3 100644
--- a/SmartDeviceLink/SDLSyncMsgVersion.m
+++ b/SmartDeviceLink/SDLSyncMsgVersion.m
@@ -28,6 +28,20 @@
self.majorVersion = @(majorVersion);
self.minorVersion = @(minorVersion);
+ self.patchVersion = @(0);
+
+ return self;
+}
+
+- (instancetype)initWithMajorVersion:(NSInteger)majorVersion minorVersion:(NSInteger)minorVersion patchVersion:(NSInteger)patchVersion {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.majorVersion = @(majorVersion);
+ self.minorVersion = @(minorVersion);
+ self.patchVersion = @(patchVersion);
return self;
}
@@ -56,7 +70,19 @@
return [store objectForKey:NAMES_minorVersion];
}
+- (void)setPatchVersion:(NSNumber *)patchVersion {
+ if (patchVersion != nil) {
+ [store setObject:patchVersion forKey:NAMES_patchVersion];
+ } else {
+ [store removeObjectForKey:NAMES_patchVersion];
+ }
+}
+
+- (NSNumber *)patchVersion {
+ return [store objectForKey:NAMES_patchVersion];
+}
+
- (NSString *)description {
- return [NSString stringWithFormat:@"%@.%@", self.majorVersion, self.minorVersion];
+ return [NSString stringWithFormat:@"%@.%@.%@", self.majorVersion, self.minorVersion, self.patchVersion];
}
@end
diff --git a/SmartDeviceLink/SDLSystemCapability.h b/SmartDeviceLink/SDLSystemCapability.h
index 0c5b8ed2d..b0232bf00 100644
--- a/SmartDeviceLink/SDLSystemCapability.h
+++ b/SmartDeviceLink/SDLSystemCapability.h
@@ -13,6 +13,7 @@
@class SDLPhoneCapability;
@class SDLNavigationCapability;
@class SDLSystemCapabilityType;
+@class SDLVideoStreamingCapability;
/**
The systemCapabilityType indicates which type of data should be changed and identifies which data object exists in this struct. For example, if the SystemCapability Type is NAVIGATION then a "navigationCapability" should exist.
@@ -35,10 +36,14 @@
- (instancetype)initWithPhoneCapability:(SDLPhoneCapability *)capability;
+- (instancetype)initWithVideoStreamingCapability:(SDLVideoStreamingCapability *)capability;
+
@property (strong, nonatomic) SDLSystemCapabilityType *systemCapabilityType;
@property (strong, nonatomic) SDLNavigationCapability *navigationCapability;
@property (strong, nonatomic) SDLPhoneCapability *phoneCapability;
+@property (strong, nonatomic) SDLVideoStreamingCapability *videoStreamingCapability;
+
@end
diff --git a/SmartDeviceLink/SDLSystemCapability.m b/SmartDeviceLink/SDLSystemCapability.m
index 45c614320..09f68f2cf 100644
--- a/SmartDeviceLink/SDLSystemCapability.m
+++ b/SmartDeviceLink/SDLSystemCapability.m
@@ -12,6 +12,7 @@
#import "SDLNavigationCapability.h"
#import "SDLPhoneCapability.h"
#import "SDLSystemCapabilityType.h"
+#import "SDLVideoStreamingCapability.h"
@implementation SDLSystemCapability
@@ -51,6 +52,18 @@
return self;
}
+- (instancetype)initWithVideoStreamingCapability:(SDLVideoStreamingCapability *)capability {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.systemCapabilityType = [SDLSystemCapabilityType VIDEO_STREAMING];
+ self.videoStreamingCapability = capability;
+
+ return self;
+}
+
- (void)setSystemCapabilityType:(SDLSystemCapabilityType *)type {
if (type != nil) {
[store setObject:type forKey:NAMES_systemCapabilityType];
@@ -104,4 +117,21 @@
}
}
+- (void)setVideoStreamingCapability:(SDLVideoStreamingCapability *)videoStreamingCapability {
+ if (videoStreamingCapability != nil) {
+ store[NAMES_videoStreamingCapability] = videoStreamingCapability;
+ } else {
+ [store removeObjectForKey:NAMES_videoStreamingCapability];
+ }
+}
+
+- (SDLVideoStreamingCapability *)videoStreamingCapability {
+ NSObject *obj = store[NAMES_videoStreamingCapability];
+ if (obj == nil || [obj isKindOfClass:SDLVideoStreamingCapability.class]) {
+ return (SDLVideoStreamingCapability *)obj;
+ } else {
+ return [[SDLVideoStreamingCapability alloc] initWithDictionary:(NSMutableDictionary *)obj];
+ }
+}
+
@end
diff --git a/SmartDeviceLink/SDLSystemCapabilityType.h b/SmartDeviceLink/SDLSystemCapabilityType.h
index d79f44180..1f207520f 100644
--- a/SmartDeviceLink/SDLSystemCapabilityType.h
+++ b/SmartDeviceLink/SDLSystemCapabilityType.h
@@ -38,4 +38,9 @@
*/
+ (SDLSystemCapabilityType *)PHONE_CALL;
+/**
+ @abstract VIDEO_STREAMING
+ */
++ (SDLSystemCapabilityType *)VIDEO_STREAMING;
+
@end
diff --git a/SmartDeviceLink/SDLSystemCapabilityType.m b/SmartDeviceLink/SDLSystemCapabilityType.m
index 888701bea..b17fa5155 100644
--- a/SmartDeviceLink/SDLSystemCapabilityType.m
+++ b/SmartDeviceLink/SDLSystemCapabilityType.m
@@ -10,6 +10,7 @@
SDLSystemCapabilityType *SDLSystemCapabilityType_NAVIGATION = nil;
SDLSystemCapabilityType *SDLSystemCapabilityType_PHONE_CALL = nil;
+SDLSystemCapabilityType *SDLSystemCapabilityType_VIDEO_STREAMING = nil;
NSArray *SDLSystemCapabilityType_values = nil;
@@ -28,7 +29,8 @@ NSArray *SDLSystemCapabilityType_values = nil;
if (SDLSystemCapabilityType_values == nil) {
SDLSystemCapabilityType_values = @[
SDLSystemCapabilityType.NAVIGATION,
- SDLSystemCapabilityType.PHONE_CALL
+ SDLSystemCapabilityType.PHONE_CALL,
+ SDLSystemCapabilityType.VIDEO_STREAMING
];
}
return SDLSystemCapabilityType_values;
@@ -48,4 +50,11 @@ NSArray *SDLSystemCapabilityType_values = nil;
return SDLSystemCapabilityType_PHONE_CALL;
}
++ (SDLSystemCapabilityType *)VIDEO_STREAMING {
+ if (SDLSystemCapabilityType_VIDEO_STREAMING == nil) {
+ SDLSystemCapabilityType_VIDEO_STREAMING = [[SDLSystemCapabilityType alloc] initWithValue:@"VIDEO_STREAMING"];
+ }
+ return SDLSystemCapabilityType_VIDEO_STREAMING;
+}
+
@end
diff --git a/SmartDeviceLink/SDLTouchType.h b/SmartDeviceLink/SDLTouchType.h
index bfbb91fd4..9c808b19f 100644
--- a/SmartDeviceLink/SDLTouchType.h
+++ b/SmartDeviceLink/SDLTouchType.h
@@ -13,5 +13,6 @@
+ (SDLTouchType *)BEGIN;
+ (SDLTouchType *)MOVE;
+ (SDLTouchType *)END;
++ (SDLTouchType *)CANCEL;
@end
diff --git a/SmartDeviceLink/SDLTouchType.m b/SmartDeviceLink/SDLTouchType.m
index d834d012d..54e813060 100644
--- a/SmartDeviceLink/SDLTouchType.m
+++ b/SmartDeviceLink/SDLTouchType.m
@@ -7,6 +7,7 @@
SDLTouchType *SDLTouchType_BEGIN = nil;
SDLTouchType *SDLTouchType_MOVE = nil;
SDLTouchType *SDLTouchType_END = nil;
+SDLTouchType *SDLTouchType_CANCEL = nil;
NSArray *SDLTouchType_values = nil;
@@ -27,6 +28,7 @@ NSArray *SDLTouchType_values = nil;
SDLTouchType.BEGIN,
SDLTouchType.MOVE,
SDLTouchType.END,
+ SDLTouchType.CANCEL,
];
}
return SDLTouchType_values;
@@ -53,4 +55,11 @@ NSArray *SDLTouchType_values = nil;
return SDLTouchType_END;
}
++ (SDLTouchType *)CANCEL {
+ if (SDLTouchType_CANCEL == nil) {
+ SDLTouchType_CANCEL = [[SDLTouchType alloc] initWithValue:@"CANCEL"];
+ }
+ return SDLTouchType_CANCEL;
+}
+
@end
diff --git a/SmartDeviceLink/SDLVideoStreamingCapability.h b/SmartDeviceLink/SDLVideoStreamingCapability.h
new file mode 100644
index 000000000..b14d49946
--- /dev/null
+++ b/SmartDeviceLink/SDLVideoStreamingCapability.h
@@ -0,0 +1,45 @@
+//
+// SDLVideoStreamingCapability.h
+// SmartDeviceLink-iOS
+//
+// Created by Brett McIsaac on 7/27/17.
+// Copyright © 2017 smartdevicelink. All rights reserved.
+//
+
+#import "SDLRPCMessage.h"
+
+@class SDLImageResolution;
+@class SDLVideoStreamingFormat;
+
+@interface SDLVideoStreamingCapability : SDLRPCStruct
+
+/**
+ * @abstract Constructs a newly allocated SDLVideoStreamingCapability object
+ */
+- (instancetype)init;
+
+/**
+ * @abstract Constructs a newly allocated SDLVideoStreamingCapability object indicated by the dictionary parameter
+ * @param dict The dictionary to use
+ */
+- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
+
+- (instancetype)initWithVideoStreaming:(SDLImageResolution *)preferredResolution maxBitrate:(NSNumber *)maxBitrate supportedFormats:(NSArray<SDLVideoStreamingFormat *> *)supportedFormats;
+/**
+ * @abstract The preferred resolution of a video stream for decoding and rendering on HMI, optional
+ */
+@property (strong, nonatomic) SDLImageResolution *preferredResolution;
+
+/**
+ * @abstract The maximum bitrate of video stream that is supported, in kbps, optional
+ * minvalue= 0
+ * maxvalue= 2147483647
+ */
+@property (strong, nonatomic) NSNumber *maxBitrate;
+
+/**
+ * @abstract Detailed information on each format supported by this system, in its preferred order, optional
+ */
+@property (strong, nonatomic) NSMutableArray<SDLVideoStreamingFormat *> *supportedFormats;
+
+@end
diff --git a/SmartDeviceLink/SDLVideoStreamingCapability.m b/SmartDeviceLink/SDLVideoStreamingCapability.m
new file mode 100644
index 000000000..112d0c42a
--- /dev/null
+++ b/SmartDeviceLink/SDLVideoStreamingCapability.m
@@ -0,0 +1,93 @@
+//
+// SDLVideoStreamingCapability.m
+// SmartDeviceLink-iOS
+//
+// Created by Brett McIsaac on 7/27/17.
+// Copyright © 2017 smartdevicelink. All rights reserved.
+//
+
+#import "SDLImageResolution.h"
+#import "SDLNames.h"
+#import "SDLVideoStreamingFormat.h"
+#import "SDLVideoStreamingCapability.h"
+
+@implementation SDLVideoStreamingCapability
+
+- (instancetype)init {
+ if (self = [super init]) {
+ }
+ return self;
+}
+
+- (instancetype)initWithDictionary:(NSMutableDictionary *)dict {
+ if (self = [super initWithDictionary:dict]) {
+ }
+ return self;
+}
+
+- (instancetype)initWithVideoStreaming:(SDLImageResolution *)preferredResolution maxBitrate:(NSNumber *)maxBitrate supportedFormats:(NSArray<SDLVideoStreamingFormat *> *)supportedFormats {
+ self = [self init];
+ if (!self) {
+ return self;
+ }
+
+ self.maxBitrate = maxBitrate;
+ self.preferredResolution = preferredResolution;
+ self.supportedFormats = [supportedFormats mutableCopy];
+
+ return self;
+}
+
+- (void)setPreferredResolution:(SDLImageResolution *)preferredResolution {
+ if (preferredResolution != nil) {
+ [store setObject:preferredResolution forKey:NAMES_preferredResolution];
+ } else {
+ [store removeObjectForKey:NAMES_preferredResolution];
+ }
+}
+
+- (SDLImageResolution *)preferredResolution {
+ NSObject *obj = [store objectForKey:NAMES_preferredResolution];
+ if (obj == nil || [obj isKindOfClass:SDLImageResolution.class]) {
+ return (SDLImageResolution *)obj;
+ } else {
+ return [[SDLImageResolution alloc] initWithDictionary:(NSMutableDictionary *)obj];
+ }
+}
+
+- (void)setMaxBitrate:(NSNumber *)maxBitrate {
+ if (maxBitrate != nil) {
+ [store setObject:maxBitrate forKey:NAMES_maxBitrate];
+ } else {
+ [store removeObjectForKey:NAMES_maxBitrate];
+ }
+}
+
+- (NSNumber *)maxBitrate {
+ return [store objectForKey:NAMES_maxBitrate];
+}
+
+- (void)setSupportedFormats:(NSMutableArray *)supportedFormats {
+ if (supportedFormats != nil) {
+ [store setObject:supportedFormats forKey:NAMES_supportedFormats];
+ } else {
+ [store removeObjectForKey:NAMES_supportedFormats];
+ }
+}
+
+- (NSMutableArray *)supportedFormats {
+ NSMutableArray *array = [store objectForKey:NAMES_supportedFormats];
+ if ([array isEqual:[NSNull null]]) {
+ return [NSMutableArray array];
+ } else if (array.count < 1 || [array.firstObject isKindOfClass:SDLVideoStreamingFormat.class]) {
+ return array;
+ } else {
+ NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]];
+ for (NSDictionary *dict in array) {
+ [newList addObject:[[SDLVideoStreamingFormat alloc] initWithDictionary:(NSMutableDictionary *)dict]];
+ }
+ return newList;
+ }
+}
+
+@end
diff --git a/SmartDeviceLink/SDLVideoStreamingCodec.h b/SmartDeviceLink/SDLVideoStreamingCodec.h
new file mode 100644
index 000000000..0bfeb90f0
--- /dev/null
+++ b/SmartDeviceLink/SDLVideoStreamingCodec.h
@@ -0,0 +1,58 @@
+//
+// SDLVideoStreamingCodec.h
+// SmartDeviceLink-iOS
+//
+// Created by Brett McIsaac on 7/27/17.
+// Copyright © 2017 smartdevicelink. All rights reserved.
+//
+
+#import "SDLEnum.h"
+
+/**
+ * Enum for each type of video streaming codec
+ *
+ * @since SDL 4.7
+ */
+@interface SDLVideoStreamingCodec : SDLEnum
+
+/**
+ * Convert String to SDLVideoStreamingCodec
+ *
+ * @param value String value to retrieve the object for
+ *
+ * @return SDLVideoStreamingCodec
+ */
++ (SDLVideoStreamingCodec *)valueOf:(NSString *)value;
+
+/**
+ @abstract Store the enumeration of all possible SDLVideoStreamingCodec
+ @return an array that store all possible SDLVideoStreamingCodec
+ */
++ (NSArray *)values;
+
+/**
+ @abstract SDLVideoStreamingCodec : H264
+ */
++ (SDLVideoStreamingCodec *)H264;
+
+/**
+ @abstract SDLVideoStreamingCodec : H265
+ */
++ (SDLVideoStreamingCodec *)H265;
+
+/**
+ @abstract SDLVideoStreamingCodec : Theora
+ */
++ (SDLVideoStreamingCodec *)THEORA;
+
+/**
+ @abstract SDLVideoStreamingCodec : VP8
+ */
++ (SDLVideoStreamingCodec *)VP8;
+
+/**
+ @abstract SDLVideoStreamingCodec : VP9
+ */
++ (SDLVideoStreamingCodec *)VP9;
+
+@end
diff --git a/SmartDeviceLink/SDLVideoStreamingCodec.m b/SmartDeviceLink/SDLVideoStreamingCodec.m
new file mode 100644
index 000000000..e15ecdf54
--- /dev/null
+++ b/SmartDeviceLink/SDLVideoStreamingCodec.m
@@ -0,0 +1,78 @@
+//
+// SDLVideoStreamingCodec.m
+// SmartDeviceLink-iOS
+//
+// Created by Brett McIsaac on 7/27/17.
+// Copyright © 2017 smartdevicelink. All rights reserved.
+//
+
+#import "SDLVideoStreamingCodec.h"
+
+SDLVideoStreamingCodec *SDLVideoStreamingCodec_H264 = nil;
+SDLVideoStreamingCodec *SDLVideoStreamingCodec_H265 = nil;
+SDLVideoStreamingCodec *SDLVideoStreamingCodec_THEORA = nil;
+SDLVideoStreamingCodec *SDLVideoStreamingCodec_VP8 = nil;
+SDLVideoStreamingCodec *SDLVideoStreamingCodec_VP9 = nil;
+
+NSArray *SDLVideoStreamingCodec_values = nil;
+
+@implementation SDLVideoStreamingCodec
+
++ (SDLVideoStreamingCodec *)valueOf:(NSString *)value {
+ for (SDLVideoStreamingCodec *item in SDLVideoStreamingCodec.values) {
+ if ([item.value isEqualToString:value]) {
+ return item;
+ }
+ }
+ return nil;
+}
+
++ (NSArray *)values {
+ if (SDLVideoStreamingCodec_values == nil) {
+ SDLVideoStreamingCodec_values = @[
+ SDLVideoStreamingCodec.H264,
+ SDLVideoStreamingCodec.H265,
+ SDLVideoStreamingCodec.THEORA,
+ SDLVideoStreamingCodec.VP8,
+ SDLVideoStreamingCodec.VP9
+ ];
+ }
+ return SDLVideoStreamingCodec_values;
+}
+
++ (SDLVideoStreamingCodec *)H264 {
+ if (SDLVideoStreamingCodec_H264 == nil) {
+ SDLVideoStreamingCodec_H264 = [[SDLVideoStreamingCodec alloc] initWithValue:@"H264"];
+ }
+ return SDLVideoStreamingCodec_H264;
+}
+
++ (SDLVideoStreamingCodec *)H265 {
+ if (SDLVideoStreamingCodec_H265 == nil) {
+ SDLVideoStreamingCodec_H265 = [[SDLVideoStreamingCodec alloc] initWithValue:@"H265"];
+ }
+ return SDLVideoStreamingCodec_H265;
+}
+
++ (SDLVideoStreamingCodec *)THEORA {
+ if (SDLVideoStreamingCodec_THEORA == nil) {
+ SDLVideoStreamingCodec_THEORA = [[SDLVideoStreamingCodec alloc] initWithValue:@"THEORA"];
+ }
+ return SDLVideoStreamingCodec_THEORA;
+}
+
++ (SDLVideoStreamingCodec *)VP8 {
+ if (SDLVideoStreamingCodec_VP8 == nil) {
+ SDLVideoStreamingCodec_VP8 = [[SDLVideoStreamingCodec alloc] initWithValue:@"VP8"];
+ }
+ return SDLVideoStreamingCodec_VP8;
+}
+
++ (SDLVideoStreamingCodec *)VP9 {
+ if (SDLVideoStreamingCodec_VP9 == nil) {
+ SDLVideoStreamingCodec_VP9 = [[SDLVideoStreamingCodec alloc] initWithValue:@"VP9"];
+ }
+ return SDLVideoStreamingCodec_VP9;
+}
+
+@end
diff --git a/SmartDeviceLink/SDLVideoStreamingFormat.h b/SmartDeviceLink/SDLVideoStreamingFormat.h
new file mode 100644
index 000000000..3f1b5829f
--- /dev/null
+++ b/SmartDeviceLink/SDLVideoStreamingFormat.h
@@ -0,0 +1,37 @@
+//
+// SDLVideoStreamingFormat.h
+// SmartDeviceLink-iOS
+//
+// Created by Brett McIsaac on 7/27/17.
+// Copyright © 2017 smartdevicelink. All rights reserved.
+//
+
+#import "SDLRPCMessage.h"
+
+@class SDLVideoStreamingCodec;
+@class SDLVideoStreamingProtocol;
+
+@interface SDLVideoStreamingFormat : SDLRPCStruct
+
+/**
+ * @abstract Constructs a newly allocated SDLVideoStreamingFormat object
+ */
+- (instancetype)init;
+
+/**
+ * @abstract Constructs a newly allocated SDLVideoStreamingFormat object indicated by the dictionary parameter
+ * @param dict The dictionary to use
+ */
+- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
+
+/**
+ * @abstract Protocol type, see VideoStreamingProtocol, mandatory
+ */
+@property (strong, nonatomic) SDLVideoStreamingProtocol *protocol;
+
+/**
+ * @abstract Codec type, see VideoStreamingCodec, mandatory
+ */
+@property (strong, nonatomic) SDLVideoStreamingCodec *codec;
+
+@end
diff --git a/SmartDeviceLink/SDLVideoStreamingFormat.m b/SmartDeviceLink/SDLVideoStreamingFormat.m
new file mode 100644
index 000000000..49f7a650c
--- /dev/null
+++ b/SmartDeviceLink/SDLVideoStreamingFormat.m
@@ -0,0 +1,62 @@
+//
+// SDLVideoStreamingFormat.m
+// SmartDeviceLink-iOS
+//
+// Created by Brett McIsaac on 7/27/17.
+// Copyright © 2017 smartdevicelink. All rights reserved.
+//
+
+#import "SDLNames.h"
+#import "SDLVideoStreamingCodec.h"
+#import "SDLVideoStreamingFormat.h"
+#import "SDLVideoStreamingProtocol.h"
+
+@implementation SDLVideoStreamingFormat
+
+- (instancetype)init {
+ if (self = [super init]) {
+ }
+ return self;
+}
+
+- (instancetype)initWithDictionary:(NSMutableDictionary *)dict {
+ if (self = [super initWithDictionary:dict]) {
+ }
+ return self;
+}
+
+- (void)setVideoStreamingProtocol:(SDLVideoStreamingProtocol *)protocol {
+ if (protocol != nil) {
+ [store setObject:protocol forKey:NAMES_videoProtocol];
+ } else {
+ [store removeObjectForKey:NAMES_videoProtocol];
+ }
+}
+
+- (SDLVideoStreamingProtocol *)protocol {
+ NSObject *obj = [store objectForKey:NAMES_videoProtocol];
+ if (obj == nil || [obj isKindOfClass:SDLVideoStreamingProtocol.class]) {
+ return (SDLVideoStreamingProtocol *)obj;
+ } else {
+ return [SDLVideoStreamingProtocol valueOf:(NSString *)obj];
+ }
+}
+
+- (void)setVideoStreamingCodec:(SDLVideoStreamingCodec *)codec {
+ if (codec != nil) {
+ [store setObject:codec forKey:NAMES_videoCodec];
+ } else {
+ [store removeObjectForKey:NAMES_videoCodec];
+ }
+}
+
+- (SDLVideoStreamingCodec *)codec {
+ NSObject *obj = [store objectForKey:NAMES_videoCodec];
+ if (obj == nil || [obj isKindOfClass:SDLVideoStreamingCodec.class]) {
+ return (SDLVideoStreamingCodec *)obj;
+ } else {
+ return [SDLVideoStreamingCodec valueOf:(NSString *)obj];
+ }
+}
+
+@end
diff --git a/SmartDeviceLink/SDLVideoStreamingProtocol.h b/SmartDeviceLink/SDLVideoStreamingProtocol.h
new file mode 100644
index 000000000..d36f969ec
--- /dev/null
+++ b/SmartDeviceLink/SDLVideoStreamingProtocol.h
@@ -0,0 +1,58 @@
+//
+// SDLVideoStreamingProtocol.h
+// SmartDeviceLink-iOS
+//
+// Created by Brett McIsaac on 7/27/17.
+// Copyright © 2017 smartdevicelink. All rights reserved.
+//
+
+#import "SDLEnum.h"
+
+/**
+ * Enum for each type of video streaming protocol
+ *
+ * @since SDL 4.7
+ */
+@interface SDLVideoStreamingProtocol : SDLEnum
+
+/**
+ * Convert String to SDLVideoStreamingProtocol
+ *
+ * @param value String value to retrieve the object for
+ *
+ * @return SDLVideoStreamingProtocol
+ */
++ (SDLVideoStreamingProtocol *)valueOf:(NSString *)value;
+
+/**
+ @abstract Store the enumeration of all possible SDLVideoStreamingProtocol
+ @return an array that store all possible SDLVideoStreamingProtocol
+ */
++ (NSArray *)values;
+
+/**
+ @abstract SDLVideoStreamingProtocol : RAW
+ */
++ (SDLVideoStreamingProtocol *)RAW;
+
+/**
+ @abstract SDLVideoStreamingProtocol : RTP
+ */
++ (SDLVideoStreamingProtocol *)RTP;
+
+/**
+ @abstract SDLVideoStreamingProtocol : RTSP
+ */
++ (SDLVideoStreamingProtocol *)RTSP;
+
+/**
+ @abstract SDLVideoStreamingProtocol : RTMP
+ */
++ (SDLVideoStreamingProtocol *)RTMP;
+
+/**
+ @abstract SDLVideoStreamingProtocol : WEBM
+ */
++ (SDLVideoStreamingProtocol *)WEBM;
+
+@end
diff --git a/SmartDeviceLink/SDLVideoStreamingProtocol.m b/SmartDeviceLink/SDLVideoStreamingProtocol.m
new file mode 100644
index 000000000..0509be0cc
--- /dev/null
+++ b/SmartDeviceLink/SDLVideoStreamingProtocol.m
@@ -0,0 +1,78 @@
+//
+// SDLVideoStreamingProtocol.m
+// SmartDeviceLink-iOS
+//
+// Created by Brett McIsaac on 7/27/17.
+// Copyright © 2017 smartdevicelink. All rights reserved.
+//
+
+#import "SDLVideoStreamingProtocol.h"
+
+SDLVideoStreamingProtocol *SDLVideoStreamingProtocol_RAW = nil;
+SDLVideoStreamingProtocol *SDLVideoStreamingProtocol_RTP = nil;
+SDLVideoStreamingProtocol *SDLVideoStreamingProtocol_RTSP = nil;
+SDLVideoStreamingProtocol *SDLVideoStreamingProtocol_RTMP = nil;
+SDLVideoStreamingProtocol *SDLVideoStreamingProtocol_WEBM = nil;
+
+NSArray *SDLVideoStreamingProtocol_values = nil;
+
+@implementation SDLVideoStreamingProtocol
+
++ (SDLVideoStreamingProtocol *)valueOf:(NSString *)value {
+ for (SDLVideoStreamingProtocol *item in SDLVideoStreamingProtocol.values) {
+ if ([item.value isEqualToString:value]) {
+ return item;
+ }
+ }
+ return nil;
+}
+
++ (NSArray *)values {
+ if (SDLVideoStreamingProtocol_values == nil) {
+ SDLVideoStreamingProtocol_values = @[
+ SDLVideoStreamingProtocol.RAW,
+ SDLVideoStreamingProtocol.RTP,
+ SDLVideoStreamingProtocol.RTSP,
+ SDLVideoStreamingProtocol.RTMP,
+ SDLVideoStreamingProtocol.WEBM
+ ];
+ }
+ return SDLVideoStreamingProtocol_values;
+}
+
++ (SDLVideoStreamingProtocol *)RAW {
+ if (SDLVideoStreamingProtocol_RAW == nil) {
+ SDLVideoStreamingProtocol_RAW = [[SDLVideoStreamingProtocol alloc] initWithValue:@"RAW"];
+ }
+ return SDLVideoStreamingProtocol_RAW;
+}
+
++ (SDLVideoStreamingProtocol *)RTP {
+ if (SDLVideoStreamingProtocol_RTP == nil) {
+ SDLVideoStreamingProtocol_RTP = [[SDLVideoStreamingProtocol alloc] initWithValue:@"RTP"];
+ }
+ return SDLVideoStreamingProtocol_RTP;
+}
+
++ (SDLVideoStreamingProtocol *)RTSP {
+ if (SDLVideoStreamingProtocol_RTSP == nil) {
+ SDLVideoStreamingProtocol_RTSP = [[SDLVideoStreamingProtocol alloc] initWithValue:@"RTSP"];
+ }
+ return SDLVideoStreamingProtocol_RTSP;
+}
+
++ (SDLVideoStreamingProtocol *)RTMP {
+ if (SDLVideoStreamingProtocol_RTMP == nil) {
+ SDLVideoStreamingProtocol_RTMP = [[SDLVideoStreamingProtocol alloc] initWithValue:@"RTMP"];
+ }
+ return SDLVideoStreamingProtocol_RTMP;
+}
+
++ (SDLVideoStreamingProtocol *)WEBM {
+ if (SDLVideoStreamingProtocol_WEBM == nil) {
+ SDLVideoStreamingProtocol_WEBM = [[SDLVideoStreamingProtocol alloc] initWithValue:@"WEBM"];
+ }
+ return SDLVideoStreamingProtocol_WEBM;
+}
+
+@end
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLAppHMITypeSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLAppHMITypeSpec.m
index 4e55a1543..149fdf201 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLAppHMITypeSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLAppHMITypeSpec.m
@@ -21,6 +21,7 @@ describe(@"Individual Enum Value Tests", ^ {
expect([SDLAppHMIType NAVIGATION].value).to(equal(@"NAVIGATION"));
expect([SDLAppHMIType INFORMATION].value).to(equal(@"INFORMATION"));
expect([SDLAppHMIType SOCIAL].value).to(equal(@"SOCIAL"));
+ expect([SDLAppHMIType PROJECTION].value).to(equal(@"PROJECTION"));
expect([SDLAppHMIType BACKGROUND_PROCESS].value).to(equal(@"BACKGROUND_PROCESS"));
expect([SDLAppHMIType TESTING].value).to(equal(@"TESTING"));
expect([SDLAppHMIType SYSTEM].value).to(equal(@"SYSTEM"));
@@ -35,6 +36,7 @@ describe(@"ValueOf Tests", ^ {
expect([SDLAppHMIType valueOf:@"NAVIGATION"]).to(equal([SDLAppHMIType NAVIGATION]));
expect([SDLAppHMIType valueOf:@"INFORMATION"]).to(equal([SDLAppHMIType INFORMATION]));
expect([SDLAppHMIType valueOf:@"SOCIAL"]).to(equal([SDLAppHMIType SOCIAL]));
+ expect([SDLAppHMIType valueOf:@"PROJECTION"]).to(equal([SDLAppHMIType PROJECTION]));
expect([SDLAppHMIType valueOf:@"BACKGROUND_PROCESS"]).to(equal([SDLAppHMIType BACKGROUND_PROCESS]));
expect([SDLAppHMIType valueOf:@"TESTING"]).to(equal([SDLAppHMIType TESTING]));
expect([SDLAppHMIType valueOf:@"SYSTEM"]).to(equal([SDLAppHMIType SYSTEM]));
@@ -56,6 +58,7 @@ describe(@"Value List Tests", ^ {
[SDLAppHMIType NAVIGATION],
[SDLAppHMIType INFORMATION],
[SDLAppHMIType SOCIAL],
+ [SDLAppHMIType PROJECTION],
[SDLAppHMIType BACKGROUND_PROCESS],
[SDLAppHMIType TESTING],
[SDLAppHMIType SYSTEM]] copy];
@@ -74,4 +77,4 @@ describe(@"Value List Tests", ^ {
});
});
-QuickSpecEnd \ No newline at end of file
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLLanguageSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLLanguageSpec.m
index 1c3ec06e0..1290710d7 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLLanguageSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLLanguageSpec.m
@@ -14,7 +14,22 @@ QuickSpecBegin(SDLLanguageSpec)
describe(@"Individual Enum Value Tests", ^ {
it(@"Should match internal values", ^ {
+ expect([SDLLanguage EN_SA].value).to(equal(@"EN-SA"));
+ expect([SDLLanguage HE_IL].value).to(equal(@"HE-IL"));
+ expect([SDLLanguage RO_RO].value).to(equal(@"RO-RO"));
+ expect([SDLLanguage UK_UA].value).to(equal(@"UK-UA"));
+ expect([SDLLanguage ID_ID].value).to(equal(@"ID-ID"));
+ expect([SDLLanguage VI_VN].value).to(equal(@"VI-VN"));
+ expect([SDLLanguage MS_MY].value).to(equal(@"MS-MY"));
+ expect([SDLLanguage HI_IN].value).to(equal(@"HI-IN"));
+ expect([SDLLanguage NL_BE].value).to(equal(@"NL-BE"));
+ expect([SDLLanguage EL_GR].value).to(equal(@"EL-GR"));
+ expect([SDLLanguage HU_HU].value).to(equal(@"HU-HU"));
+ expect([SDLLanguage FI_FI].value).to(equal(@"FI-FI"));
+ expect([SDLLanguage SK_SK].value).to(equal(@"SK-SK"));
expect([SDLLanguage EN_US].value).to(equal(@"EN-US"));
+ expect([SDLLanguage EN_IN].value).to(equal(@"EN-IN"));
+ expect([SDLLanguage TH_TH].value).to(equal(@"TH-TH"));
expect([SDLLanguage ES_MX].value).to(equal(@"ES-MX"));
expect([SDLLanguage FR_CA].value).to(equal(@"FR-CA"));
expect([SDLLanguage DE_DE].value).to(equal(@"DE-DE"));
@@ -42,7 +57,22 @@ describe(@"Individual Enum Value Tests", ^ {
});
describe(@"ValueOf Tests", ^ {
it(@"Should return correct values when valid", ^ {
+ expect([SDLLanguage valueOf:@"EN-SA"]).to(equal([SDLLanguage EN_SA]));
+ expect([SDLLanguage valueOf:@"HE-IL"]).to(equal([SDLLanguage HE_IL]));
+ expect([SDLLanguage valueOf:@"RO-RO"]).to(equal([SDLLanguage RO_RO]));
+ expect([SDLLanguage valueOf:@"UK-UA"]).to(equal([SDLLanguage UK_UA]));
+ expect([SDLLanguage valueOf:@"ID-ID"]).to(equal([SDLLanguage ID_ID]));
+ expect([SDLLanguage valueOf:@"VI-VN"]).to(equal([SDLLanguage VI_VN]));
+ expect([SDLLanguage valueOf:@"MS-MY"]).to(equal([SDLLanguage MS_MY]));
+ expect([SDLLanguage valueOf:@"HI-IN"]).to(equal([SDLLanguage HI_IN]));
+ expect([SDLLanguage valueOf:@"NL-BE"]).to(equal([SDLLanguage NL_BE]));
+ expect([SDLLanguage valueOf:@"EL-GR"]).to(equal([SDLLanguage EL_GR]));
+ expect([SDLLanguage valueOf:@"HU-HU"]).to(equal([SDLLanguage HU_HU]));
+ expect([SDLLanguage valueOf:@"FI-FI"]).to(equal([SDLLanguage FI_FI]));
+ expect([SDLLanguage valueOf:@"SK-SK"]).to(equal([SDLLanguage SK_SK]));
expect([SDLLanguage valueOf:@"EN-US"]).to(equal([SDLLanguage EN_US]));
+ expect([SDLLanguage valueOf:@"EN-IN"]).to(equal([SDLLanguage EN_IN]));
+ expect([SDLLanguage valueOf:@"TH-TH"]).to(equal([SDLLanguage TH_TH]));
expect([SDLLanguage valueOf:@"ES-MX"]).to(equal([SDLLanguage ES_MX]));
expect([SDLLanguage valueOf:@"FR-CA"]).to(equal([SDLLanguage FR_CA]));
expect([SDLLanguage valueOf:@"DE-DE"]).to(equal([SDLLanguage DE_DE]));
@@ -77,7 +107,22 @@ describe(@"Value List Tests", ^ {
NSArray* storedValues = [SDLLanguage values];
__block NSArray* definedValues;
beforeSuite(^ {
- definedValues = [@[[SDLLanguage EN_US],
+ definedValues = [@[[SDLLanguage EN_SA],
+ [SDLLanguage HE_IL],
+ [SDLLanguage RO_RO],
+ [SDLLanguage UK_UA],
+ [SDLLanguage ID_ID],
+ [SDLLanguage VI_VN],
+ [SDLLanguage MS_MY],
+ [SDLLanguage HI_IN],
+ [SDLLanguage NL_BE],
+ [SDLLanguage EL_GR],
+ [SDLLanguage HU_HU],
+ [SDLLanguage FI_FI],
+ [SDLLanguage SK_SK],
+ [SDLLanguage EN_US],
+ [SDLLanguage EN_IN],
+ [SDLLanguage TH_TH],
[SDLLanguage ES_MX],
[SDLLanguage FR_CA],
[SDLLanguage DE_DE],
@@ -116,4 +161,4 @@ describe(@"Value List Tests", ^ {
});
});
-QuickSpecEnd \ No newline at end of file
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLSystemCapabilityTypeSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLSystemCapabilityTypeSpec.m
index f979b28aa..1fee82b62 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLSystemCapabilityTypeSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLSystemCapabilityTypeSpec.m
@@ -12,12 +12,14 @@ describe(@"Individual Enum Value Tests", ^ {
it(@"Should match internal values", ^ {
expect([SDLSystemCapabilityType NAVIGATION].value).to(equal(@"NAVIGATION"));
expect([SDLSystemCapabilityType PHONE_CALL].value).to(equal(@"PHONE_CALL"));
+ expect([SDLSystemCapabilityType VIDEO_STREAMING].value).to(equal(@"VIDEO_STREAMING"));
});
});
describe(@"ValueOf Tests", ^ {
it(@"Should return correct values when valid", ^ {
expect([SDLSystemCapabilityType valueOf:@"NAVIGATION"]).to(equal([SDLSystemCapabilityType NAVIGATION]));
expect([SDLSystemCapabilityType valueOf:@"PHONE_CALL"]).to(equal([SDLSystemCapabilityType PHONE_CALL]));
+ expect([SDLSystemCapabilityType valueOf:@"VIDEO_STREAMING"]).to(equal([SDLSystemCapabilityType VIDEO_STREAMING]));
});
it(@"Should return nil when invalid", ^ {
@@ -30,7 +32,8 @@ describe(@"Value List Tests", ^ {
__block NSArray* definedValues;
beforeSuite(^ {
definedValues = [@[[SDLSystemCapabilityType NAVIGATION],
- [SDLSystemCapabilityType PHONE_CALL]] copy];
+ [SDLSystemCapabilityType PHONE_CALL],
+ [SDLSystemCapabilityType VIDEO_STREAMING]] copy];
});
it(@"Should contain all defined enum values", ^ {
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTouchTypeSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTouchTypeSpec.m
index dc72c74b2..5042a6466 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTouchTypeSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLTouchTypeSpec.m
@@ -17,8 +17,10 @@ describe(@"Individual Enum Value Tests", ^ {
expect([SDLTouchType BEGIN].value).to(equal(@"BEGIN"));
expect([SDLTouchType MOVE].value).to(equal(@"MOVE"));
expect([SDLTouchType END].value).to(equal(@"END"));
+ expect([SDLTouchType CANCEL].value).to(equal(@"CANCEL"));
});
});
+
describe(@"ValueOf Tests", ^ {
it(@"Should return correct values when valid", ^ {
expect([SDLTouchType valueOf:@"BEGIN"]).to(equal([SDLTouchType BEGIN]));
@@ -31,14 +33,13 @@ describe(@"ValueOf Tests", ^ {
expect([SDLTouchType valueOf:@"JKUYTFHYTHJGFRFGYTR"]).to(beNil());
});
});
+
describe(@"Value List Tests", ^ {
- NSArray* storedValues = [SDLTouchType values];
- __block NSArray* definedValues;
- beforeSuite(^ {
- definedValues = [@[[SDLTouchType BEGIN],
- [SDLTouchType MOVE],
- [SDLTouchType END]] copy];
- });
+ __block NSArray* storedValues = [SDLTouchType values];
+ __block NSArray* definedValues = [@[[SDLTouchType BEGIN],
+ [SDLTouchType MOVE],
+ [SDLTouchType END],
+ [SDLTouchType CANCEL]] copy];
it(@"Should contain all defined enum values", ^ {
for (int i = 0; i < definedValues.count; i++) {
@@ -53,4 +54,4 @@ describe(@"Value List Tests", ^ {
});
});
-QuickSpecEnd \ No newline at end of file
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVideoStreamingCodecSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVideoStreamingCodecSpec.m
new file mode 100644
index 000000000..023133bd3
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVideoStreamingCodecSpec.m
@@ -0,0 +1,67 @@
+//
+// SDLVideoStreamingCodecSpec.m
+// SmartDeviceLink-iOS
+//
+// Created by Brett McIsaac on 7/27/17.
+// Copyright © 2017 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLVideoStreamingCodec.h"
+
+QuickSpecBegin(SDLVideoStreamingCodecSpec)
+
+describe(@"Individual Enum Value Tests", ^ {
+ it(@"Should match internal values", ^ {
+ expect([SDLVideoStreamingCodec H264].value).to(equal(@"H264"));
+ expect([SDLVideoStreamingCodec H265].value).to(equal(@"H265"));
+ expect([SDLVideoStreamingCodec THEORA].value).to(equal(@"THEORA"));
+ expect([SDLVideoStreamingCodec VP8].value).to(equal(@"VP8"));
+ expect([SDLVideoStreamingCodec VP9].value).to(equal(@"VP9"));
+ });
+});
+
+describe(@"ValueOf Tests", ^ {
+ it(@"Should return correct values when valid", ^ {
+ expect([SDLVideoStreamingCodec valueOf:@"H264"]).to(equal([SDLVideoStreamingCodec H264]));
+ expect([SDLVideoStreamingCodec valueOf:@"H265"]).to(equal([SDLVideoStreamingCodec H265]));
+ expect([SDLVideoStreamingCodec valueOf:@"THEORA"]).to(equal([SDLVideoStreamingCodec THEORA]));
+ expect([SDLVideoStreamingCodec valueOf:@"VP8"]).to(equal([SDLVideoStreamingCodec VP8]));
+ expect([SDLVideoStreamingCodec valueOf:@"VP9"]).to(equal([SDLVideoStreamingCodec VP9]));
+ });
+
+ it(@"Should return nil when invalid", ^ {
+ expect([SDLVideoStreamingCodec valueOf:nil]).to(beNil());
+ expect([SDLVideoStreamingCodec valueOf:@"JKUYTFHYTHJGFRFGYTR"]).to(beNil());
+ });
+});
+
+describe(@"Value List Tests", ^ {
+ NSArray* storedValues = [SDLVideoStreamingCodec values];
+ __block NSArray* definedValues;
+ beforeSuite(^ {
+ definedValues = [@[[SDLVideoStreamingCodec H264],
+ [SDLVideoStreamingCodec H265],
+ [SDLVideoStreamingCodec THEORA],
+ [SDLVideoStreamingCodec VP8],
+ [SDLVideoStreamingCodec VP9]] copy];
+ });
+
+ it(@"Should contain all defined enum values", ^ {
+ for (int i = 0; i < definedValues.count; i++) {
+ expect(storedValues).to(contain(definedValues[i]));
+ }
+ });
+
+ it(@"Should contain only defined enum values", ^ {
+ for (int i = 0; i < storedValues.count; i++) {
+ expect(definedValues).to(contain(storedValues[i]));
+ }
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVideoStreamingProtocolSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVideoStreamingProtocolSpec.m
new file mode 100644
index 000000000..d3503786b
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVideoStreamingProtocolSpec.m
@@ -0,0 +1,67 @@
+//
+// SDLVideoStreamingProtocolSpec.m
+// SmartDeviceLink-iOS
+//
+// Created by Brett McIsaac on 7/27/17.
+// Copyright © 2017 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLVideoStreamingProtocol.h"
+
+QuickSpecBegin(SDLVideoStreamingProtocolSpec)
+
+describe(@"Individual Enum Value Tests", ^ {
+ it(@"Should match internal values", ^ {
+ expect([SDLVideoStreamingProtocol RAW].value).to(equal(@"RAW"));
+ expect([SDLVideoStreamingProtocol RTP].value).to(equal(@"RTP"));
+ expect([SDLVideoStreamingProtocol RTSP].value).to(equal(@"RTSP"));
+ expect([SDLVideoStreamingProtocol RTMP].value).to(equal(@"RTMP"));
+ expect([SDLVideoStreamingProtocol WEBM].value).to(equal(@"WEBM"));
+ });
+});
+
+describe(@"ValueOf Tests", ^ {
+ it(@"Should return correct values when valid", ^ {
+ expect([SDLVideoStreamingProtocol valueOf:@"RAW"]).to(equal([SDLVideoStreamingProtocol RAW]));
+ expect([SDLVideoStreamingProtocol valueOf:@"RTP"]).to(equal([SDLVideoStreamingProtocol RTP]));
+ expect([SDLVideoStreamingProtocol valueOf:@"RTSP"]).to(equal([SDLVideoStreamingProtocol RTSP]));
+ expect([SDLVideoStreamingProtocol valueOf:@"RTMP"]).to(equal([SDLVideoStreamingProtocol RTMP]));
+ expect([SDLVideoStreamingProtocol valueOf:@"WEBM"]).to(equal([SDLVideoStreamingProtocol WEBM]));
+ });
+
+ it(@"Should return nil when invalid", ^ {
+ expect([SDLVideoStreamingProtocol valueOf:nil]).to(beNil());
+ expect([SDLVideoStreamingProtocol valueOf:@"JKUYTFHYTHJGFRFGYTR"]).to(beNil());
+ });
+});
+
+describe(@"Value List Tests", ^ {
+ NSArray* storedValues = [SDLVideoStreamingProtocol values];
+ __block NSArray* definedValues;
+ beforeSuite(^ {
+ definedValues = [@[[SDLVideoStreamingProtocol RAW],
+ [SDLVideoStreamingProtocol RTP],
+ [SDLVideoStreamingProtocol RTSP],
+ [SDLVideoStreamingProtocol RTMP],
+ [SDLVideoStreamingProtocol WEBM]] copy];
+ });
+
+ it(@"Should contain all defined enum values", ^ {
+ for (int i = 0; i < definedValues.count; i++) {
+ expect(storedValues).to(contain(definedValues[i]));
+ }
+ });
+
+ it(@"Should contain only defined enum values", ^ {
+ for (int i = 0; i < storedValues.count; i++) {
+ expect(definedValues).to(contain(storedValues[i]));
+ }
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMICapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMICapabilitiesSpec.m
index e9935bedf..ba452bb7e 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMICapabilitiesSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMICapabilitiesSpec.m
@@ -16,12 +16,14 @@ describe(@"SDLHMICapabilities struct", ^{
__block SDLHMICapabilities *testStruct = nil;
__block NSNumber *somePhoneCallState = @NO;
__block NSNumber *someNavigationState = @YES;
+ __block NSNumber *someVideoStreamState = @NO;
context(@"When initialized with properties", ^{
beforeEach(^{
testStruct = [[SDLHMICapabilities alloc] init];
testStruct.phoneCall = somePhoneCallState;
testStruct.navigation = someNavigationState;
+ testStruct.videoStreaming = someVideoStreamState;
});
it(@"should properly set phone call", ^{
@@ -31,13 +33,18 @@ describe(@"SDLHMICapabilities struct", ^{
it(@"should properly set navigation", ^{
expect(testStruct.navigation).to(equal(someNavigationState));
});
+
+ it(@"should properly set video streaming", ^{
+ expect(testStruct.videoStreaming).to(equal(someVideoStreamState));
+ });
});
context(@"When initialized with a dictionary", ^{
beforeEach(^{
NSDictionary *structInitDict = @{
NAMES_navigation: someNavigationState,
- NAMES_phoneCall: somePhoneCallState
+ NAMES_phoneCall: somePhoneCallState,
+ NAMES_videoStreaming: someVideoStreamState
};
testStruct = [[SDLHMICapabilities alloc] initWithDictionary:[structInitDict mutableCopy]];
});
@@ -49,6 +56,10 @@ describe(@"SDLHMICapabilities struct", ^{
it(@"should properly set navigation", ^{
expect(testStruct.navigation).to(equal(someNavigationState));
});
+
+ it(@"should properly set video streaming", ^{
+ expect(testStruct.videoStreaming).to(equal(someVideoStreamState));
+ });
});
context(@"When not initialized", ^{
@@ -63,6 +74,10 @@ describe(@"SDLHMICapabilities struct", ^{
it(@"navigation should be nil", ^{
expect(testStruct.navigation).to(beNil());
});
+
+ it(@"video streaming should be nil", ^{
+ expect(testStruct.videoStreaming).to(beNil());
+ });
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSyncMsgVersionSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSyncMsgVersionSpec.m
index 56c74cd18..180a52842 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSyncMsgVersionSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSyncMsgVersionSpec.m
@@ -19,18 +19,22 @@ describe(@"Getter/Setter Tests", ^ {
testStruct.majorVersion = @4;
testStruct.minorVersion = @532;
+ testStruct.patchVersion = @12;
expect(testStruct.majorVersion).to(equal(@4));
expect(testStruct.minorVersion).to(equal(@532));
+ expect(testStruct.patchVersion).to(equal(@12));
});
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary* dict = [@{NAMES_majorVersion:@4,
- NAMES_minorVersion:@532} mutableCopy];
+ NAMES_minorVersion:@532,
+ NAMES_patchVersion:@12} mutableCopy];
SDLSyncMsgVersion* testStruct = [[SDLSyncMsgVersion alloc] initWithDictionary:dict];
expect(testStruct.majorVersion).to(equal(@4));
expect(testStruct.minorVersion).to(equal(@532));
+ expect(testStruct.patchVersion).to(equal(@12));
});
it(@"Should return nil if not set", ^ {
@@ -38,7 +42,8 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.majorVersion).to(beNil());
expect(testStruct.minorVersion).to(beNil());
+ expect(testStruct.patchVersion).to(beNil());
});
});
-QuickSpecEnd \ No newline at end of file
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m
index 9a2909128..a081cc366 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m
@@ -5,9 +5,15 @@
#import "SDLSystemCapability.h"
+#import "SDLImageResolution.h"
#import "SDLNavigationCapability.h"
#import "SDLPhoneCapability.h"
#import "SDLSystemCapabilityType.h"
+#import "SDLVideoStreamingCapability.h"
+#import "SDLVideoStreamingCodec.h"
+#import "SDLVideoStreamingFormat.h"
+#import "SDLVideoStreamingProtocol.h"
+
#import "SDLNames.h"
QuickSpecBegin(SDLSystemCapabilitySpec)
@@ -24,6 +30,11 @@ describe(@"Getter/Setter Tests", ^ {
expect(testStruct.navigationCapability.sendLocationEnabled).to(equal(YES));
expect(testStruct.navigationCapability.getWayPointsEnabled).to(equal(NO));
expect(testStruct.phoneCapability.dialNumberEnabled).to(equal(YES));
+
+ testStruct.systemCapabilityType = [SDLSystemCapabilityType VIDEO_STREAMING];
+
+ expect(testStruct.systemCapabilityType).to(equal([SDLSystemCapabilityType VIDEO_STREAMING]));
+
});
});
@@ -47,6 +58,7 @@ describe(@"Initialization tests", ^{
expect(testStruct.systemCapabilityType).to(beNil());
expect(testStruct.navigationCapability).to(beNil());
expect(testStruct.phoneCapability).to(beNil());
+ expect(testStruct.videoStreamingCapability).to(beNil());
});
it(@"should initialize correctly with initWithPhoneCapability:", ^{
@@ -56,6 +68,7 @@ describe(@"Initialization tests", ^{
expect(testStruct.systemCapabilityType).to(equal([SDLSystemCapabilityType PHONE_CALL]));
expect(testStruct.phoneCapability.dialNumberEnabled).to(equal(YES));
expect(testStruct.navigationCapability).to(beNil());
+ expect(testStruct.videoStreamingCapability).to(beNil());
});
it(@"should initialize correctly with initWithNavigationCapability:", ^{
@@ -66,6 +79,35 @@ describe(@"Initialization tests", ^{
expect(testStruct.navigationCapability.sendLocationEnabled).to(equal(YES));
expect(testStruct.navigationCapability.getWayPointsEnabled).to(equal(YES));
expect(testStruct.phoneCapability).to(beNil());
+ expect(testStruct.videoStreamingCapability).to(beNil());
+ });
+
+ it(@"should initialize correctly with initWithVideoStreamingCapability:", ^{
+
+ SDLImageResolution* resolution = [[SDLImageResolution alloc] init];
+ resolution.resolutionWidth = @600;
+ resolution.resolutionHeight = @500;
+
+ NSNumber *maxBitrate = @100;
+
+ SDLVideoStreamingFormat *format1 = [[SDLVideoStreamingFormat alloc] init];
+ format1.codec = [SDLVideoStreamingCodec H264];
+ format1.protocol = [SDLVideoStreamingProtocol RTP];
+
+ SDLVideoStreamingFormat *format2 = [[SDLVideoStreamingFormat alloc] init];
+ format2.codec = [SDLVideoStreamingCodec H265];
+ format2.protocol = [SDLVideoStreamingProtocol RTSP];
+
+ NSArray<SDLVideoStreamingFormat *> *formatArray = @[format1, format2];
+
+ SDLVideoStreamingCapability *testVidStruct = [[SDLVideoStreamingCapability alloc] initWithVideoStreaming:resolution maxBitrate:maxBitrate supportedFormats:formatArray];
+ SDLSystemCapability *testStruct = [[SDLSystemCapability alloc] initWithVideoStreamingCapability:testVidStruct];
+
+ expect(testStruct.systemCapabilityType).to(equal([SDLSystemCapabilityType VIDEO_STREAMING]));
+ expect(testStruct.navigationCapability.sendLocationEnabled).to(beNil());
+ expect(testStruct.navigationCapability.getWayPointsEnabled).to(beNil());
+ expect(testStruct.phoneCapability).to(beNil());
+
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLVideoStreamingCapabilitySpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLVideoStreamingCapabilitySpec.m
new file mode 100644
index 000000000..b4aecf238
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLVideoStreamingCapabilitySpec.m
@@ -0,0 +1,88 @@
+//
+// SDLVideoStreamingCapabilitySpec.m
+// SmartDeviceLink-iOS
+//
+// Created by Brett McIsaac on 7/28/17.
+// Copyright © 2017 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLNames.h"
+#import "SDLImageResolution.h"
+#import "SDLVideoStreamingCapability.h"
+#import "SDLVideoStreamingCodec.h"
+#import "SDLVideoStreamingFormat.h"
+#import "SDLVideoStreamingProtocol.h"
+
+QuickSpecBegin(SDLVideoStreamingCapabilitySpec)
+
+describe(@"Initialization tests", ^{
+ it(@"Should get correctly when initialized with a dictionary", ^ {
+
+ SDLImageResolution* resolution = [[SDLImageResolution alloc] init];
+ resolution.resolutionWidth = @600;
+ resolution.resolutionHeight = @500;
+
+ NSNumber *maxBitrate = @100;
+
+ SDLVideoStreamingFormat *format1 = [[SDLVideoStreamingFormat alloc] init];
+ format1.codec = [SDLVideoStreamingCodec H264];
+ format1.protocol = [SDLVideoStreamingProtocol RTP];
+
+ SDLVideoStreamingFormat *format2 = [[SDLVideoStreamingFormat alloc] init];
+ format2.codec = [SDLVideoStreamingCodec H265];
+ format2.protocol = [SDLVideoStreamingProtocol RTSP];
+
+ NSArray<SDLVideoStreamingFormat *> *formatArray = @[format1, format2];
+
+ NSMutableDictionary* dict = [@{NAMES_preferredResolution: resolution,
+ NAMES_maxBitrate: maxBitrate,
+ NAMES_supportedFormats: formatArray} mutableCopy];
+
+ SDLVideoStreamingCapability* testStruct = [[SDLVideoStreamingCapability alloc] initWithDictionary:dict];
+
+ expect(testStruct.preferredResolution).to(equal(resolution));
+ expect(testStruct.maxBitrate).to(equal(maxBitrate));
+ expect(testStruct.supportedFormats).to(equal(formatArray));
+ });
+
+ it(@"Should return nil if not set", ^ {
+ SDLVideoStreamingCapability* testStruct = [[SDLVideoStreamingCapability alloc] init];
+
+ expect(testStruct.preferredResolution).to(beNil());
+ expect(testStruct.maxBitrate).to(beNil());
+ expect(testStruct.supportedFormats).to(beNil());
+ });
+
+ it(@"Should initialize correctly with initWithVideoStreaming:(SDLImageResolution *)preferredResolution (NSNumber *)maxBitrate (NSArray<SDLVideoStreamingFormat *> *)suportedFormats", ^ {
+
+ SDLImageResolution* resolution = [[SDLImageResolution alloc] init];
+ resolution.resolutionWidth = @600;
+ resolution.resolutionHeight = @500;
+
+ NSNumber *maxBitrate = @100;
+
+ SDLVideoStreamingFormat *format1 = [[SDLVideoStreamingFormat alloc] init];
+ format1.codec = [SDLVideoStreamingCodec H264];
+ format1.protocol = [SDLVideoStreamingProtocol RTP];
+
+ SDLVideoStreamingFormat *format2 = [[SDLVideoStreamingFormat alloc] init];
+ format2.codec = [SDLVideoStreamingCodec H265];
+ format2.protocol = [SDLVideoStreamingProtocol RTSP];
+
+ NSArray<SDLVideoStreamingFormat *> *formatArray = @[format1, format2];
+
+ SDLVideoStreamingCapability *testStruct = [[SDLVideoStreamingCapability alloc] initWithVideoStreaming:resolution maxBitrate:maxBitrate supportedFormats:formatArray];
+
+ expect(testStruct.preferredResolution).to(equal(resolution));
+ expect(testStruct.maxBitrate).to(equal(maxBitrate));
+ expect(testStruct.supportedFormats).to(equal(formatArray));
+ });
+
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLVideoStreamingFormatSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLVideoStreamingFormatSpec.m
new file mode 100644
index 000000000..b1f0a4e16
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLVideoStreamingFormatSpec.m
@@ -0,0 +1,39 @@
+//
+// SDLVideoStreamingFormatSpec.m
+// SmartDeviceLink-iOS
+//
+// Created by Brett McIsaac on 7/28/17.
+// Copyright © 2017 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLNames.h"
+#import "SDLVideoStreamingCodec.h"
+#import "SDLVideoStreamingFormat.h"
+#import "SDLVideoStreamingProtocol.h"
+
+QuickSpecBegin(SDLVideoStreamingFormatSpec)
+
+describe(@"Initialization tests", ^{
+ it(@"Should get correctly when initialized with a dictionary", ^ {
+ NSMutableDictionary* dict = [@{NAMES_videoProtocol: [SDLVideoStreamingProtocol RAW],
+ NAMES_videoCodec: [SDLVideoStreamingCodec H264]} mutableCopy];
+ SDLVideoStreamingFormat* testStruct = [[SDLVideoStreamingFormat alloc] initWithDictionary:dict];
+
+ expect(testStruct.protocol).to(equal([SDLVideoStreamingProtocol RAW]));
+ expect(testStruct.codec).to(equal([SDLVideoStreamingCodec H264]));
+ });
+
+ it(@"Should return nil if not set", ^ {
+ SDLVideoStreamingFormat* testStruct = [[SDLVideoStreamingFormat alloc] init];
+
+ expect(testStruct.protocol).to(beNil());
+ expect(testStruct.codec).to(beNil());
+ });
+});
+
+QuickSpecEnd
diff --git a/SmartDeviceLink_Example/Classes/ProxyManager.m b/SmartDeviceLink_Example/Classes/ProxyManager.m
index b4ddacea9..ada8d9e7b 100644
--- a/SmartDeviceLink_Example/Classes/ProxyManager.m
+++ b/SmartDeviceLink_Example/Classes/ProxyManager.m
@@ -143,6 +143,13 @@ NS_ASSUME_NONNULL_BEGIN
"Response: %@"
"Error: %@", request, response, error);
}];
+ SDLGetSystemCapability *getVideoStreamingCapability = [[SDLGetSystemCapability alloc] initWithType:[SDLSystemCapabilityType VIDEO_STREAMING]];
+ [self.sdlManager sendRequest:getVideoStreamingCapability withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) {
+ NSLog(@"Video Streaming Capability:\n"
+ "Request: %@"
+ "Response: %@"
+ "Error: %@", request, response, error);
+ }];
SDLSetDisplayLayout *displayLayout = [[SDLSetDisplayLayout alloc] initWithLayout:[[SDLPredefinedLayout NON_MEDIA] value]];
[self.sdlManager sendRequest:displayLayout];
diff --git a/SmartDeviceLink_Example/Info.plist b/SmartDeviceLink_Example/Info.plist
index 0e9876c4c..6060605cc 100644
--- a/SmartDeviceLink_Example/Info.plist
+++ b/SmartDeviceLink_Example/Info.plist
@@ -82,6 +82,7 @@
<string>com.smartdevicelink.prot1</string>
<string>com.smartdevicelink.prot0</string>
<string>com.ford.sync.prot0</string>
+ <string>com.smartdevicelink.multisession</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>