diff options
author | Kujtim Shala <kshala@ford.com> | 2019-09-06 11:32:26 +0200 |
---|---|---|
committer | Kujtim Shala <kshala@ford.com> | 2019-09-06 11:32:26 +0200 |
commit | 5af489c8823de930df19b0949eff11f178245a7b (patch) | |
tree | 4ee4bd15ca6aefade7c6139f1000b300777b5514 | |
parent | 7e33cfd49d28f916c26c563284899361231b783f (diff) | |
parent | 8b783865896daa67a55b78d2ce9ff4127d21b0f8 (diff) | |
download | sdl_ios-5af489c8823de930df19b0949eff11f178245a7b.tar.gz |
Merge commit '8b783865896daa67a55b78d2ce9ff4127d21b0f8' into feature/issue_1386_manager_update_display_capability
# Conflicts:
# SmartDeviceLink/SDLSystemCapability.h
# SmartDeviceLink/SDLSystemCapability.m
83 files changed, 2167 insertions, 32 deletions
diff --git a/Example Apps/Example ObjC/VehicleDataManager.m b/Example Apps/Example ObjC/VehicleDataManager.m index 54ff9642f..d4e9a1066 100644 --- a/Example Apps/Example ObjC/VehicleDataManager.m +++ b/Example Apps/Example ObjC/VehicleDataManager.m @@ -142,7 +142,11 @@ NS_ASSUME_NONNULL_BEGIN } SDLLogD(@"App has permission to access vehicle data. Requesting vehicle data..."); + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLGetVehicleData *getAllVehicleData = [[SDLGetVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES electronicParkBrakeStatus:YES emergencyEvent:YES engineOilLife:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES fuelRange:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES turnSignal:YES vin:YES wiperStatus:YES]; +#pragma clang diagnostic pop [manager sendRequest:getAllVehicleData withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) { if (error || ![response isKindOfClass:SDLGetVehicleDataResponse.class]) { diff --git a/SmartDeviceLink-iOS.podspec b/SmartDeviceLink-iOS.podspec index 8de91538d..bedd57cc4 100644 --- a/SmartDeviceLink-iOS.podspec +++ b/SmartDeviceLink-iOS.podspec @@ -140,6 +140,8 @@ ss.public_header_files = [ 'SmartDeviceLink/SDLGetFile.h', 'SmartDeviceLink/SDLGetFileResponse.h', 'SmartDeviceLink/SDLGetInteriorVehicleData.h', +'SmartDeviceLink/SDLGetInteriorVehicleDataConsent.h', +'SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h', 'SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h', 'SmartDeviceLink/SDLGetSystemCapability.h', 'SmartDeviceLink/SDLGetSystemCapabilityResponse.h', @@ -149,6 +151,7 @@ ss.public_header_files = [ 'SmartDeviceLink/SDLGetWaypointsResponse.h', 'SmartDeviceLink/SDLGlobalProperty.h', 'SmartDeviceLink/SDLGPSData.h', +'SmartDeviceLink/SDLGrid.h', 'SmartDeviceLink/SDLHapticRect.h', 'SmartDeviceLink/SDLHeadLampStatus.h', 'SmartDeviceLink/SDLHMICapabilities.h', @@ -217,6 +220,7 @@ ss.public_header_files = [ 'SmartDeviceLink/SDLMetadataTags.h', 'SmartDeviceLink/SDLMetadataType.h', 'SmartDeviceLink/SDLModuleData.h', +'SmartDeviceLink/SDLModuleInfo.h', 'SmartDeviceLink/SDLModuleType.h', 'SmartDeviceLink/SDLMyKey.h', 'SmartDeviceLink/SDLNavigationAction.h', @@ -287,6 +291,8 @@ ss.public_header_files = [ 'SmartDeviceLink/SDLRegisterAppInterface.h', 'SmartDeviceLink/SDLRegisterAppInterfaceResponse.h', 'SmartDeviceLink/SDLRemoteControlCapabilities.h', +'SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.h', +'SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.h', 'SmartDeviceLink/SDLRequestType.h', 'SmartDeviceLink/SDLResetGlobalProperties.h', 'SmartDeviceLink/SDLResetGlobalPropertiesResponse.h', @@ -309,6 +315,8 @@ ss.public_header_files = [ 'SmartDeviceLink/SDLScrollableMessageResponse.h', 'SmartDeviceLink/SDLSeatControlCapabilities.h', 'SmartDeviceLink/SDLSeatControlData.h', +'SmartDeviceLink/SDLSeatLocation.h', +'SmartDeviceLink/SDLSeatLocationCapability.h', 'SmartDeviceLink/SDLSeatMemoryAction.h', 'SmartDeviceLink/SDLSeatMemoryActionType.h', 'SmartDeviceLink/SDLSupportedSeat.h', diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj index 84d6bfe81..3c9c81413 100644 --- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj +++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj @@ -7,6 +7,28 @@ objects = { /* Begin PBXBuildFile section */ + 000DD56C22EEF8E4005AB7A7 /* SDLSeatLocationCapabilitySpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 000DD56B22EEF8E4005AB7A7 /* SDLSeatLocationCapabilitySpec.m */; }; + 000DD56E22EF01FC005AB7A7 /* SDLSeatLocationSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 000DD56D22EF01FC005AB7A7 /* SDLSeatLocationSpec.m */; }; + 000DD57022EF038C005AB7A7 /* SDLGetInteriorVehicleDataConsentSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 000DD56F22EF038C005AB7A7 /* SDLGetInteriorVehicleDataConsentSpec.m */; }; + 000DD57222EF063F005AB7A7 /* SDLGetInteriorVehicleDataConsentResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 000DD57122EF063F005AB7A7 /* SDLGetInteriorVehicleDataConsentResponseSpec.m */; }; + 000DD57422EF0957005AB7A7 /* SDLReleaseInteriorVehicleDataModuleSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 000DD57322EF0957005AB7A7 /* SDLReleaseInteriorVehicleDataModuleSpec.m */; }; + 000DD57622EF0971005AB7A7 /* SDLReleaseInteriorVehicleDataModuleResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 000DD57522EF0971005AB7A7 /* SDLReleaseInteriorVehicleDataModuleResponseSpec.m */; }; + 0055412622D40DAB003194D3 /* SDLModuleInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0055412422D40DAB003194D3 /* SDLModuleInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0055412722D40DAB003194D3 /* SDLModuleInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 0055412522D40DAB003194D3 /* SDLModuleInfo.m */; }; + 0055412A22D5DC0B003194D3 /* SDLGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = 0055412822D5DC0B003194D3 /* SDLGrid.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0055412B22D5DC0B003194D3 /* SDLGrid.m in Sources */ = {isa = PBXBuildFile; fileRef = 0055412922D5DC0B003194D3 /* SDLGrid.m */; }; + 0055412E22D759BD003194D3 /* SDLSeatLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0055412C22D759BC003194D3 /* SDLSeatLocation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0055412F22D759BD003194D3 /* SDLSeatLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0055412D22D759BC003194D3 /* SDLSeatLocation.m */; }; + 0055413222D75A7B003194D3 /* SDLSeatLocationCapability.h in Headers */ = {isa = PBXBuildFile; fileRef = 0055413022D75A7A003194D3 /* SDLSeatLocationCapability.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0055413322D75A7B003194D3 /* SDLSeatLocationCapability.m in Sources */ = {isa = PBXBuildFile; fileRef = 0055413122D75A7B003194D3 /* SDLSeatLocationCapability.m */; }; + 008DB36122EA7482003F458C /* SDLGetInteriorVehicleDataConsent.h in Headers */ = {isa = PBXBuildFile; fileRef = 008DB35F22EA7481003F458C /* SDLGetInteriorVehicleDataConsent.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 008DB36222EA7482003F458C /* SDLGetInteriorVehicleDataConsent.m in Sources */ = {isa = PBXBuildFile; fileRef = 008DB36022EA7481003F458C /* SDLGetInteriorVehicleDataConsent.m */; }; + 008DB36522EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 008DB36322EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 008DB36622EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 008DB36422EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.m */; }; + 008DB36922EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 008DB36722EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 008DB36A22EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 008DB36822EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.m */; }; + 008DB36D22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 008DB36B22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 008DB36E22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 008DB36C22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.m */; }; 162E82CA1A9BDE8A00906325 /* SDLAmbientLightStatusSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E81E21A9BDE8A00906325 /* SDLAmbientLightStatusSpec.m */; }; 162E82CB1A9BDE8A00906325 /* SDLAppHMITypeSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E81E31A9BDE8A00906325 /* SDLAppHMITypeSpec.m */; }; 162E82CC1A9BDE8A00906325 /* SDLAppInterfaceUnregisteredReasonSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 162E81E41A9BDE8A00906325 /* SDLAppInterfaceUnregisteredReasonSpec.m */; }; @@ -1666,6 +1688,28 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 000DD56B22EEF8E4005AB7A7 /* SDLSeatLocationCapabilitySpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLSeatLocationCapabilitySpec.m; sourceTree = "<group>"; }; + 000DD56D22EF01FC005AB7A7 /* SDLSeatLocationSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLSeatLocationSpec.m; sourceTree = "<group>"; }; + 000DD56F22EF038C005AB7A7 /* SDLGetInteriorVehicleDataConsentSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGetInteriorVehicleDataConsentSpec.m; sourceTree = "<group>"; }; + 000DD57122EF063F005AB7A7 /* SDLGetInteriorVehicleDataConsentResponseSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGetInteriorVehicleDataConsentResponseSpec.m; sourceTree = "<group>"; }; + 000DD57322EF0957005AB7A7 /* SDLReleaseInteriorVehicleDataModuleSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLReleaseInteriorVehicleDataModuleSpec.m; sourceTree = "<group>"; }; + 000DD57522EF0971005AB7A7 /* SDLReleaseInteriorVehicleDataModuleResponseSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLReleaseInteriorVehicleDataModuleResponseSpec.m; sourceTree = "<group>"; }; + 0055412422D40DAB003194D3 /* SDLModuleInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLModuleInfo.h; sourceTree = "<group>"; }; + 0055412522D40DAB003194D3 /* SDLModuleInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLModuleInfo.m; sourceTree = "<group>"; }; + 0055412822D5DC0B003194D3 /* SDLGrid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLGrid.h; sourceTree = "<group>"; }; + 0055412922D5DC0B003194D3 /* SDLGrid.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGrid.m; sourceTree = "<group>"; }; + 0055412C22D759BC003194D3 /* SDLSeatLocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLSeatLocation.h; sourceTree = "<group>"; }; + 0055412D22D759BC003194D3 /* SDLSeatLocation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLSeatLocation.m; sourceTree = "<group>"; }; + 0055413022D75A7A003194D3 /* SDLSeatLocationCapability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLSeatLocationCapability.h; sourceTree = "<group>"; }; + 0055413122D75A7B003194D3 /* SDLSeatLocationCapability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLSeatLocationCapability.m; sourceTree = "<group>"; }; + 008DB35F22EA7481003F458C /* SDLGetInteriorVehicleDataConsent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLGetInteriorVehicleDataConsent.h; sourceTree = "<group>"; }; + 008DB36022EA7481003F458C /* SDLGetInteriorVehicleDataConsent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGetInteriorVehicleDataConsent.m; sourceTree = "<group>"; }; + 008DB36322EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLGetInteriorVehicleDataConsentResponse.h; sourceTree = "<group>"; }; + 008DB36422EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGetInteriorVehicleDataConsentResponse.m; sourceTree = "<group>"; }; + 008DB36722EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLReleaseInteriorVehicleDataModule.h; sourceTree = "<group>"; }; + 008DB36822EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLReleaseInteriorVehicleDataModule.m; sourceTree = "<group>"; }; + 008DB36B22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLReleaseInteriorVehicleDataModuleResponse.h; sourceTree = "<group>"; }; + 008DB36C22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLReleaseInteriorVehicleDataModuleResponse.m; sourceTree = "<group>"; }; 162E81E21A9BDE8A00906325 /* SDLAmbientLightStatusSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLAmbientLightStatusSpec.m; sourceTree = "<group>"; }; 162E81E31A9BDE8A00906325 /* SDLAppHMITypeSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLAppHMITypeSpec.m; sourceTree = "<group>"; }; 162E81E41A9BDE8A00906325 /* SDLAppInterfaceUnregisteredReasonSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLAppInterfaceUnregisteredReasonSpec.m; sourceTree = "<group>"; }; @@ -3553,6 +3597,8 @@ 9FA0D00822DF0B47009CF344 /* SDLCreateWindowSpec.m */, 9FA0D00E22DF0B90009CF344 /* SDLDeleteWindowSpec.m */, 8B05F88822DD011300666CD8 /* SDLUnpublishAppServiceSpec.m */, + 000DD56F22EF038C005AB7A7 /* SDLGetInteriorVehicleDataConsentSpec.m */, + 000DD57322EF0957005AB7A7 /* SDLReleaseInteriorVehicleDataModuleSpec.m */, ); path = RequestSpecs; sourceTree = "<group>"; @@ -3621,6 +3667,8 @@ 162E828D1A9BDE8A00906325 /* SDLUpdateTurnListResponseSpec.m */, 8877F5F01F34AA2D00DC128A /* SDLSendHapticDataResponseSpec.m */, 8BA12B1722DCF59700371E82 /* SDLUnpublishAppServiceResponseSpec.m */, + 000DD57122EF063F005AB7A7 /* SDLGetInteriorVehicleDataConsentResponseSpec.m */, + 000DD57522EF0971005AB7A7 /* SDLReleaseInteriorVehicleDataModuleResponseSpec.m */, ); path = ResponseSpecs; sourceTree = "<group>"; @@ -3727,6 +3775,8 @@ 8855F9DF220C93B700A5C897 /* SDLWeatherDataSpec.m */, 880D2679220DDD1000B3F496 /* SDLWeatherServiceDataSpec.m */, 880D267F220E038800B3F496 /* SDLWeatherServiceManifestSpec.m */, + 000DD56B22EEF8E4005AB7A7 /* SDLSeatLocationCapabilitySpec.m */, + 000DD56D22EF01FC005AB7A7 /* SDLSeatLocationSpec.m */, 9FA0CFFF22DF06A0009CF344 /* SDLWindowCapabilitySpec.m */, 9FA0D00222DF06B9009CF344 /* SDLWindowTypeCapabilitiesSpec.m */, ); @@ -4355,6 +4405,10 @@ 5D61FC051A84238C00846EE7 /* SDLUpdateTurnList.m */, 8BA12B0F22DCCE1F00371E82 /* SDLUnpublishAppService.h */, 8BA12B1022DCCE1F00371E82 /* SDLUnpublishAppService.m */, + 008DB35F22EA7481003F458C /* SDLGetInteriorVehicleDataConsent.h */, + 008DB36022EA7481003F458C /* SDLGetInteriorVehicleDataConsent.m */, + 008DB36722EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.h */, + 008DB36822EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.m */, ); name = Requests; sourceTree = "<group>"; @@ -4484,6 +4538,10 @@ 5D61FC071A84238C00846EE7 /* SDLUpdateTurnListResponse.m */, 8BA12B1322DCEACB00371E82 /* SDLUnpublishAppServiceResponse.h */, 8BA12B1422DCEACB00371E82 /* SDLUnpublishAppServiceResponse.m */, + 008DB36322EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.h */, + 008DB36422EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.m */, + 008DB36B22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.h */, + 008DB36C22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.m */, ); name = Responses; sourceTree = "<group>"; @@ -4691,6 +4749,14 @@ 88D5EB36220CD95000EC3782 /* SDLWeatherServiceData.m */, 880D267B220DE5DF00B3F496 /* SDLWeatherServiceManifest.h */, 880D267C220DE5DF00B3F496 /* SDLWeatherServiceManifest.m */, + 0055412422D40DAB003194D3 /* SDLModuleInfo.h */, + 0055412522D40DAB003194D3 /* SDLModuleInfo.m */, + 0055412822D5DC0B003194D3 /* SDLGrid.h */, + 0055412922D5DC0B003194D3 /* SDLGrid.m */, + 0055412C22D759BC003194D3 /* SDLSeatLocation.h */, + 0055412D22D759BC003194D3 /* SDLSeatLocation.m */, + 0055413022D75A7A003194D3 /* SDLSeatLocationCapability.h */, + 0055413122D75A7B003194D3 /* SDLSeatLocationCapability.m */, 9F425AD022DD980200BE3245 /* SDLWindowCapability.h */, 9F425AD122DD980200BE3245 /* SDLWindowCapability.m */, 9F425AD422DD981E00BE3245 /* SDLWindowTypeCapabilities.h */, @@ -6344,6 +6410,7 @@ 1EB59CBF202DA26000343A61 /* SDLSeatControlData.h in Headers */, 1EB59CB3202D9B5F00343A61 /* SDLSeatMemoryActionType.h in Headers */, 88665B73220B80F400D9DA77 /* SDLWeatherAlert.h in Headers */, + 008DB36122EA7482003F458C /* SDLGetInteriorVehicleDataConsent.h in Headers */, 1EB59CC3202DB40400343A61 /* SDLSeatControlCapabilities.h in Headers */, 1EB59CB7202D9C8100343A61 /* SDLSeatMemoryAction.h in Headers */, 1EB59CBB202DA1B400343A61 /* SDLSupportedSeat.h in Headers */, @@ -6355,6 +6422,7 @@ 1EB59CAF202D97AC00343A61 /* SDLMassageCushionFirmness.h in Headers */, 1EAA470B2032BAE5000FE74B /* SDLOnRCStatus.h in Headers */, 2BF2F84F20ED004000A26EF2 /* SDLAudioStreamingIndicator.h in Headers */, + 0055412E22D759BD003194D3 /* SDLSeatLocation.h in Headers */, 1EAA475120356CD2000FE74B /* SDLDistanceUnit.h in Headers */, 1EAA4755203583BC000FE74B /* SDLHMISettingsControlData.h in Headers */, 1EAA4731203442C0000FE74B /* SDLLightName.h in Headers */, @@ -6365,6 +6433,7 @@ 1EAA4749203567FA000FE74B /* SDLHMISettingsControlCapabilities.h in Headers */, 1EAA47452035623B000FE74B /* SDLLightControlData.h in Headers */, 1EAA474120355FF3000FE74B /* SDLLightControlCapabilities.h in Headers */, + 008DB36522EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.h in Headers */, 1EAA473920345B7A000FE74B /* SDLLightCapabilities.h in Headers */, 1EAA4725203416D3000FE74B /* SDLEqualizerSettings.h in Headers */, 1EAA47112033FE80000FE74B /* SDLStationIDNumber.h in Headers */, @@ -6441,6 +6510,7 @@ 5D4D67B41D30161600468B4A /* SDLLockScreenManager.h in Headers */, 5D00AC7B1F15287E004000D9 /* SDLPhoneCapability.h in Headers */, 5D61FE111A84238C00846EE7 /* SDLWarningLightStatus.h in Headers */, + 008DB36922EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.h in Headers */, 5D61FC7A1A84238C00846EE7 /* SDLDeleteInteractionChoiceSet.h in Headers */, 5D61FC3B1A84238C00846EE7 /* SDLAlertManeuverResponse.h in Headers */, 5DB9964E1F26886C002D8795 /* SDLControlFramePayloadEndService.h in Headers */, @@ -6463,6 +6533,7 @@ 5D61FD791A84238C00846EE7 /* SDLScreenParams.h in Headers */, 5D61FDCF1A84238C00846EE7 /* SDLTireStatus.h in Headers */, 5D61FDFD1A84238C00846EE7 /* SDLVehicleDataActiveStatus.h in Headers */, + 0055412622D40DAB003194D3 /* SDLModuleInfo.h in Headers */, 5D61FD811A84238C00846EE7 /* SDLSetAppIconResponse.h in Headers */, 5D61FC551A84238C00846EE7 /* SDLButtonName.h in Headers */, 5D616B531D59044400553F6B /* SDLErrorConstants.h in Headers */, @@ -6507,6 +6578,7 @@ 5D61FC451A84238C00846EE7 /* SDLAudioPassThruCapabilities.h in Headers */, 5D61FDC71A84238C00846EE7 /* SDLTextAlignment.h in Headers */, 5D61FD051A84238C00846EE7 /* SDLOnButtonPress.h in Headers */, + 0055413222D75A7B003194D3 /* SDLSeatLocationCapability.h in Headers */, 5DA150C72271FDC20032928D /* SDLSoftButtonTransitionOperation.h in Headers */, 5D61FCC51A84238C00846EE7 /* SDLHMIZoneCapabilities.h in Headers */, 884AF94F220B488900E22928 /* SDLOnSystemCapabilityUpdated.h in Headers */, @@ -6698,6 +6770,7 @@ 5D61FD0B1A84238C00846EE7 /* SDLOnEncodedSyncPData.h in Headers */, 5D61FC631A84238C00846EE7 /* SDLClusterModeStatus.h in Headers */, 5D61FD371A84238C00846EE7 /* SDLPredefinedLayout.h in Headers */, + 008DB36D22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.h in Headers */, 5D61FDE31A84238C00846EE7 /* SDLUnregisterAppInterface.h in Headers */, 5D61FD331A84238C00846EE7 /* SDLPowerModeQualificationStatus.h in Headers */, 5D92937020B5E0E500FCC775 /* SDLDeleteChoicesOperation.h in Headers */, @@ -6752,6 +6825,7 @@ 5DA102A41D4122C700C15826 /* NSMutableDictionary+SafeRemove.h in Headers */, 5DBF062A1E64A92C00A5CF03 /* SDLLogTarget.h in Headers */, 5DA49CE51F1EA83300E65FC5 /* SDLControlFramePayloadRPCStartService.h in Headers */, + 0055412A22D5DC0B003194D3 /* SDLGrid.h in Headers */, 5D61FE031A84238C00846EE7 /* SDLVehicleDataResult.h in Headers */, 5D61FD911A84238C00846EE7 /* SDLShowConstantTBT.h in Headers */, 5D92937C20B70A3E00FCC775 /* SDLPresentKeyboardOperation.h in Headers */, @@ -7187,6 +7261,7 @@ 5D61FDD21A84238C00846EE7 /* SDLTouchCoord.m in Sources */, 5D61FCEF1A84238C00846EE7 /* SDLListFilesResponse.m in Sources */, 5D3E420B20EAAD6500D8C622 /* SDLTPMS.m in Sources */, + 008DB36E22EA83E4003F458C /* SDLReleaseInteriorVehicleDataModuleResponse.m in Sources */, 5DD67CB11E65DDB7009CD394 /* SDLLogTargetAppleSystemLog.m in Sources */, 5D92935420B2F76500FCC775 /* SDLTemplateColorScheme.m in Sources */, 88D5EB38220CD95000EC3782 /* SDLWeatherServiceData.m in Sources */, @@ -7273,6 +7348,7 @@ 5D61FDE21A84238C00846EE7 /* SDLTurn.m in Sources */, 5D61FC5A1A84238C00846EE7 /* SDLCarModeStatus.m in Sources */, 5D82041B1BCD80BA00D0A41B /* SDLLockScreenConfiguration.m in Sources */, + 0055412B22D5DC0B003194D3 /* SDLGrid.m in Sources */, 8815D0F122330781000F24E6 /* SDLRPCRequestNotification.m in Sources */, 5D3E48CC1D7722FE0000BFEF /* NSBundle+SDLBundle.m in Sources */, 5D61FCBC1A84238C00846EE7 /* SDLGPSData.m in Sources */, @@ -7311,12 +7387,14 @@ 5D61FC731A84238C00846EE7 /* SDLDeleteCommand.m in Sources */, 5D61FD2A1A84238C00846EE7 /* SDLPerformInteraction.m in Sources */, 5D61FC541A84238C00846EE7 /* SDLButtonEventMode.m in Sources */, + 008DB36622EA7F6F003F458C /* SDLGetInteriorVehicleDataConsentResponse.m in Sources */, 5D61FC8D1A84238C00846EE7 /* SDLDIDResult.m in Sources */, 5D61FC601A84238C00846EE7 /* SDLCharacterSet.m in Sources */, 5D07C02E2044AC9100D1ECDC /* SDLSequentialRPCRequestOperation.m in Sources */, 5DD67CB91E661C4A009CD394 /* SDLLogTargetFile.m in Sources */, 5D61FCBE1A84238C00846EE7 /* SDLHeadLampStatus.m in Sources */, 5D61FD921A84238C00846EE7 /* SDLShowConstantTBT.m in Sources */, + 008DB36A22EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.m in Sources */, 88E6F1A8220E1588006156F9 /* SDLMediaType.m in Sources */, 5D61FC4E1A84238C00846EE7 /* SDLBitsPerSample.m in Sources */, 5D00AC701F1511B9004000D9 /* SDLGetSystemCapability.m in Sources */, @@ -7435,6 +7513,7 @@ 5D61FD841A84238C00846EE7 /* SDLSetDisplayLayout.m in Sources */, DA9F7E701DCBFFDB00ACAE48 /* SDLGetWayPoints.m in Sources */, 1EAA4756203583BC000FE74B /* SDLHMISettingsControlData.m in Sources */, + 008DB36222EA7482003F458C /* SDLGetInteriorVehicleDataConsent.m in Sources */, 5D00AC741F151CFE004000D9 /* SDLGetSystemCapabilityResponse.m in Sources */, 5D61FE001A84238C00846EE7 /* SDLVehicleDataEventStatus.m in Sources */, 5D61FDC41A84238C00846EE7 /* SDLTBTState.m in Sources */, @@ -7446,6 +7525,7 @@ 5D61FDDE1A84238C00846EE7 /* SDLTTSChunk.m in Sources */, 5D61FD9E1A84238C00846EE7 /* SDLSliderResponse.m in Sources */, 1EAA47462035623B000FE74B /* SDLLightControlData.m in Sources */, + 0055412F22D759BD003194D3 /* SDLSeatLocation.m in Sources */, 5D61FC5C1A84238C00846EE7 /* SDLChangeRegistration.m in Sources */, 5D1665C91CF8CA3D00CC4CA1 /* SDLPermissionFilter.m in Sources */, 5D61FDBA1A84238C00846EE7 /* SDLSyncPDataResponse.m in Sources */, @@ -7525,6 +7605,7 @@ E9C32B9F1AB20C5900F283AF /* EAAccessoryManager+SDLProtocols.m in Sources */, 756C62772289F11F008B57A2 /* SDLDynamicMenuUpdateRunScore.m in Sources */, 5D61FDA81A84238C00846EE7 /* SDLSpeakResponse.m in Sources */, + 0055413322D75A7B003194D3 /* SDLSeatLocationCapability.m in Sources */, 5DB92D331AC9C8BA00C15BB0 /* SDLRPCStruct.m in Sources */, 1EAA474220355FF3000FE74B /* SDLLightControlCapabilities.m in Sources */, 8B7B31A31F2F7FEA00BDC38D /* SDLVideoStreamingFormat.m in Sources */, @@ -7552,6 +7633,7 @@ 5D60088B1BE3ED540094A505 /* SDLStateMachine.m in Sources */, 8877F5EF1F34A72200DC128A /* SDLSendHapticDataResponse.m in Sources */, 5D61FD181A84238C00846EE7 /* SDLOnPermissionsChange.m in Sources */, + 0055412722D40DAB003194D3 /* SDLModuleInfo.m in Sources */, 8881AFAD2225D61900EA870B /* SDLSetCloudAppProperties.m in Sources */, 1EB59CAC202D96A200343A61 /* SDLMassageCushion.m in Sources */, 5D61FD3E1A84238C00846EE7 /* SDLPrimaryAudioSource.m in Sources */, @@ -7633,6 +7715,7 @@ 162E82EE1A9BDE8B00906325 /* SDLMediaClockFormatSpec.m in Sources */, 5DA026901AD44EE700019F86 /* SDLDialNumberResponseSpec.m in Sources */, 162E83901A9BDE8B00906325 /* SDLTireStatusSpec.m in Sources */, + 000DD57622EF0971005AB7A7 /* SDLReleaseInteriorVehicleDataModuleResponseSpec.m in Sources */, 162E82E01A9BDE8B00906325 /* SDLHMILevelSpec.m in Sources */, 88F65133220C6DC300CAF321 /* SDLWeatherAlertSpec.m in Sources */, 5DC09EDA1F2F7FEC00F4AB1D /* SDLControlFramePayloadNakSpec.m in Sources */, @@ -7666,6 +7749,7 @@ 5D76E3291D3D0A8800647CFA /* SDLFakeViewControllerPresenter.m in Sources */, 9FA0D00622DF06D3009CF344 /* SDLDisplayCapabilitySpec.m in Sources */, 5DB2022A1F5F38B60061D189 /* SDLFakeStreamingManagerDataSource.m in Sources */, + 000DD56C22EEF8E4005AB7A7 /* SDLSeatLocationCapabilitySpec.m in Sources */, 5D92935020AF526200FCC775 /* SDLRGBColorSpec.m in Sources */, 162E83331A9BDE8B00906325 /* SDLPerformInteractionSpec.m in Sources */, 1EAA47622035B1AE000FE74B /* SDLDistanceUnitSpec.m in Sources */, @@ -7676,6 +7760,7 @@ 5DE35E4720CB0AB90034BE5A /* SDLChoiceSetSpec.m in Sources */, 162E83101A9BDE8B00906325 /* SDLOnAudioPassThruSpec.m in Sources */, DABB62171E4A900C0034C567 /* SDLH264VideoEncoderSpec.m in Sources */, + 000DD57022EF038C005AB7A7 /* SDLGetInteriorVehicleDataConsentSpec.m in Sources */, 5DBEFA581F436132009EE295 /* SDLFakeSecurityManager.m in Sources */, 9FA0D00022DF06A0009CF344 /* SDLWindowCapabilitySpec.m in Sources */, 162E82D91A9BDE8A00906325 /* SDLDisplayTypeSpec.m in Sources */, @@ -7905,6 +7990,7 @@ 88A4A0FA22242AB400C6F01D /* SDLNavigationServiceDataSpec.m in Sources */, 8831FA3D220207DA00B8FFB7 /* SDLServiceUpdateReasonSpec.m in Sources */, 162E831A1A9BDE8B00906325 /* SDLOnLockScreenStatusSpec.m in Sources */, + 000DD57422EF0957005AB7A7 /* SDLReleaseInteriorVehicleDataModuleSpec.m in Sources */, 162E83431A9BDE8B00906325 /* SDLSyncPDataSpec.m in Sources */, 167ED9461A9BCE5D00797BE5 /* SwiftSpec.swift in Sources */, 162E838B1A9BDE8B00906325 /* SDLSoftButtonCapabilitiesSpec.m in Sources */, @@ -7986,6 +8072,7 @@ 8816772922208B82001FACFF /* SDLNavigationInstructionSpec.m in Sources */, 5DC978261B7A38640012C2F1 /* SDLGlobalsSpec.m in Sources */, 162E82FF1A9BDE8B00906325 /* SDLTextAlignmentSpec.m in Sources */, + 000DD57222EF063F005AB7A7 /* SDLGetInteriorVehicleDataConsentResponseSpec.m in Sources */, 162E831F1A9BDE8B00906325 /* SDLOnTouchEventSpec.m in Sources */, 162E83921A9BDE8B00906325 /* SDLTouchEventCapabilitiesSpec.m in Sources */, 162E837F1A9BDE8B00906325 /* SDLHeadLampStatusSpec.m in Sources */, @@ -8076,6 +8163,7 @@ 162E83731A9BDE8B00906325 /* SDLBeltStatusSpec.m in Sources */, 162E83551A9BDE8B00906325 /* SDLEndAudioPassThruResponseSpec.m in Sources */, 8881AFC12225EB9300EA870B /* SDLGetCloudAppPropertiesResponseSpec.m in Sources */, + 000DD56E22EF01FC005AB7A7 /* SDLSeatLocationSpec.m in Sources */, 162E83251A9BDE8B00906325 /* SDLAlertSpec.m in Sources */, 2BF2F85220ED068200A26EF2 /* SDLAudioStreamingIndicatorSpec.m in Sources */, 5D6035D2202CD46200A429C9 /* SDLSpecUtilities.m in Sources */, diff --git a/SmartDeviceLink.podspec b/SmartDeviceLink.podspec index 6ffc1f5e0..bc327557e 100644 --- a/SmartDeviceLink.podspec +++ b/SmartDeviceLink.podspec @@ -141,6 +141,8 @@ sdefault.public_header_files = [ 'SmartDeviceLink/SDLGetFile.h', 'SmartDeviceLink/SDLGetFileResponse.h', 'SmartDeviceLink/SDLGetInteriorVehicleData.h', +'SmartDeviceLink/SDLGetInteriorVehicleDataConsent.h', +'SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h', 'SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h', 'SmartDeviceLink/SDLGetSystemCapability.h', 'SmartDeviceLink/SDLGetSystemCapabilityResponse.h', @@ -150,6 +152,7 @@ sdefault.public_header_files = [ 'SmartDeviceLink/SDLGetWaypointsResponse.h', 'SmartDeviceLink/SDLGlobalProperty.h', 'SmartDeviceLink/SDLGPSData.h', +'SmartDeviceLink/SDLGrid.h', 'SmartDeviceLink/SDLHapticRect.h', 'SmartDeviceLink/SDLHeadLampStatus.h', 'SmartDeviceLink/SDLHMICapabilities.h', @@ -218,6 +221,7 @@ sdefault.public_header_files = [ 'SmartDeviceLink/SDLMetadataTags.h', 'SmartDeviceLink/SDLMetadataType.h', 'SmartDeviceLink/SDLModuleData.h', +'SmartDeviceLink/SDLModuleInfo.h', 'SmartDeviceLink/SDLModuleType.h', 'SmartDeviceLink/SDLMyKey.h', 'SmartDeviceLink/SDLNavigationAction.h', @@ -288,6 +292,8 @@ sdefault.public_header_files = [ 'SmartDeviceLink/SDLRegisterAppInterface.h', 'SmartDeviceLink/SDLRegisterAppInterfaceResponse.h', 'SmartDeviceLink/SDLRemoteControlCapabilities.h', +'SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.h', +'SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.h', 'SmartDeviceLink/SDLRequestType.h', 'SmartDeviceLink/SDLResetGlobalProperties.h', 'SmartDeviceLink/SDLResetGlobalPropertiesResponse.h', @@ -310,6 +316,8 @@ sdefault.public_header_files = [ 'SmartDeviceLink/SDLScrollableMessageResponse.h', 'SmartDeviceLink/SDLSeatControlCapabilities.h', 'SmartDeviceLink/SDLSeatControlData.h', +'SmartDeviceLink/SDLSeatLocation.h', +'SmartDeviceLink/SDLSeatLocationCapability.h', 'SmartDeviceLink/SDLSeatMemoryAction.h', 'SmartDeviceLink/SDLSeatMemoryActionType.h', 'SmartDeviceLink/SDLSupportedSeat.h', diff --git a/SmartDeviceLink/SDLAudioControlCapabilities.h b/SmartDeviceLink/SDLAudioControlCapabilities.h index b7f29a01c..d91bef2ef 100644 --- a/SmartDeviceLink/SDLAudioControlCapabilities.h +++ b/SmartDeviceLink/SDLAudioControlCapabilities.h @@ -2,6 +2,7 @@ // #import "SDLRPCMessage.h" +#import "SDLModuleInfo.h" NS_ASSUME_NONNULL_BEGIN @@ -13,7 +14,16 @@ NS_ASSUME_NONNULL_BEGIN @param name The short friendly name of the audio control module. @return An instance of the SDLAudioControlCapabilities class. */ -- (instancetype)initWithModuleName:(NSString *)name; +- (instancetype)initWithModuleName:(NSString *)name __deprecated_msg("Use initWithModuleName:moduleInfo: instead"); + +/** + Constructs a newly allocated SDLAudioControlCapabilities object with audio control module name (max 100 chars) + + @param name The short friendly name of the audio control module. + @param moduleInfo Information about a RC module, including its id. + @return An instance of the SDLAudioControlCapabilities class. + */ +- (instancetype)initWithModuleName:(NSString *)name moduleInfo:(nullable SDLModuleInfo *)moduleInfo; /** Constructs a newly allocated SDLAudioControlCapabilities object with given parameters @@ -25,7 +35,20 @@ NS_ASSUME_NONNULL_BEGIN @param equalizerMaxChannelID Equalizer channel ID (between 1-100). @return An instance of the SDLAudioControlCapabilities class. */ -- (instancetype)initWithModuleName:(NSString *)name sourceAvailable:(nullable NSNumber<SDLBool> *)sourceAvailable keepContextAvailable:(nullable NSNumber<SDLBool> *)keepContextAvailable volumeAvailable:(nullable NSNumber<SDLBool> *)volumeAvailable equalizerAvailable:(nullable NSNumber<SDLBool> *)equalizerAvailable equalizerMaxChannelID:(nullable NSNumber<SDLInt> *)equalizerMaxChannelID; +- (instancetype)initWithModuleName:(NSString *)name sourceAvailable:(nullable NSNumber<SDLBool> *)sourceAvailable keepContextAvailable:(nullable NSNumber<SDLBool> *)keepContextAvailable volumeAvailable:(nullable NSNumber<SDLBool> *)volumeAvailable equalizerAvailable:(nullable NSNumber<SDLBool> *)equalizerAvailable equalizerMaxChannelID:(nullable NSNumber<SDLInt> *)equalizerMaxChannelID __deprecated_msg("Use initWithModuleName:moduleInfo:sourceAvailable:keepContextAvailable:volumeAvailable:equalizerAvailable:equalizerMaxChannelID: instead"); + +/** + Constructs a newly allocated SDLAudioControlCapabilities object with given parameters + + @param name The short friendly name of the audio control module. + @param moduleInfo Information about a RC module, including its id. + @param sourceAvailable Availability of the control of audio source. + @param volumeAvailable Availability of the volume of audio source. + @param equalizerAvailable Availability of the equalizer of audio source. + @param equalizerMaxChannelID Equalizer channel ID (between 1-100). + @return An instance of the SDLAudioControlCapabilities class. + */ +- (instancetype)initWithModuleName:(NSString *)name moduleInfo:(nullable SDLModuleInfo *)moduleInfo sourceAvailable:(nullable NSNumber<SDLBool> *)sourceAvailable keepContextAvailable:(nullable NSNumber<SDLBool> *)keepContextAvailable volumeAvailable:(nullable NSNumber<SDLBool> *)volumeAvailable equalizerAvailable:(nullable NSNumber<SDLBool> *)equalizerAvailable equalizerMaxChannelID:(nullable NSNumber<SDLInt> *)equalizerMaxChannelID; /** * @abstract The short friendly name of the audio control module. @@ -71,6 +94,13 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nullable, strong, nonatomic) NSNumber<SDLInt> *equalizerMaxChannelId; +/** + * Information about a RC module, including its id. + * + * Optional + */ +@property (nullable, strong, nonatomic) SDLModuleInfo *moduleInfo; + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLAudioControlCapabilities.m b/SmartDeviceLink/SDLAudioControlCapabilities.m index ad204cc62..bc7ff568d 100644 --- a/SmartDeviceLink/SDLAudioControlCapabilities.m +++ b/SmartDeviceLink/SDLAudioControlCapabilities.m @@ -19,6 +19,17 @@ NS_ASSUME_NONNULL_BEGIN return self; } +- (instancetype)initWithModuleName:(NSString *)name moduleInfo:(nullable SDLModuleInfo *)moduleInfo { + self = [self init]; + if (!self) { + return nil; + } + self.moduleName = name; + self.moduleInfo = moduleInfo; + + return self; +} + - (instancetype)initWithModuleName:(NSString *)name sourceAvailable:(nullable NSNumber<SDLBool> *)sourceAvailable keepContextAvailable:(nullable NSNumber<SDLBool> *)keepContextAvailable volumeAvailable:(nullable NSNumber<SDLBool> *)volumeAvailable equalizerAvailable:(nullable NSNumber<SDLBool> *)equalizerAvailable equalizerMaxChannelID:(nullable NSNumber<SDLInt> *)equalizerMaxChannelID { self = [self init]; if (!self) { @@ -34,6 +45,25 @@ NS_ASSUME_NONNULL_BEGIN return self; } +- (instancetype)initWithModuleName:(NSString *)name moduleInfo:(nullable SDLModuleInfo *)moduleInfo sourceAvailable:(nullable NSNumber<SDLBool> *)sourceAvailable keepContextAvailable:(nullable NSNumber<SDLBool> *)keepContextAvailable volumeAvailable:(nullable NSNumber<SDLBool> *)volumeAvailable equalizerAvailable:(nullable NSNumber<SDLBool> *)equalizerAvailable equalizerMaxChannelID:(nullable NSNumber<SDLInt> *)equalizerMaxChannelID { + self = [self init]; + if (!self) { + return nil; + } + + self.moduleName = name; + self.moduleInfo = moduleInfo; + self.sourceAvailable = sourceAvailable; + self.keepContextAvailable = keepContextAvailable; + self.volumeAvailable = volumeAvailable; + self.equalizerAvailable = equalizerAvailable; + self.equalizerMaxChannelId = equalizerMaxChannelID; + + return self; + +} + + - (void)setModuleName:(NSString *)moduleName { [self.store sdl_setObject:moduleName forName:SDLRPCParameterNameModuleName]; } @@ -83,6 +113,14 @@ NS_ASSUME_NONNULL_BEGIN return [self.store sdl_objectForName:SDLRPCParameterNameEqualizerMaxChannelId ofClass:NSNumber.class error:nil]; } +- (void)setModuleInfo:(nullable SDLModuleInfo *)moduleInfo { + [self.store sdl_setObject:moduleInfo forName:SDLRPCParameterNameModuleInfo]; +} + +- (nullable SDLModuleInfo *)moduleInfo { + return [self.store sdl_objectForName:SDLRPCParameterNameModuleInfo ofClass:SDLModuleInfo.class error:nil]; +} + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLButtonCapabilities.h b/SmartDeviceLink/SDLButtonCapabilities.h index 35600f5b2..1333da2cf 100644 --- a/SmartDeviceLink/SDLButtonCapabilities.h +++ b/SmartDeviceLink/SDLButtonCapabilities.h @@ -4,6 +4,7 @@ #import "SDLRPCMessage.h" #import "SDLButtonName.h" +#import "SDLModuleInfo.h" /** @@ -44,6 +45,13 @@ NS_ASSUME_NONNULL_BEGIN */ @property (strong, nonatomic) NSNumber<SDLBool> *upDownAvailable; +/** + * Information about a RC module, including its id. + * + * Optional + */ +@property (nullable, strong, nonatomic) SDLModuleInfo *moduleInfo; + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLButtonCapabilities.m b/SmartDeviceLink/SDLButtonCapabilities.m index 12cd24847..1685d0907 100644 --- a/SmartDeviceLink/SDLButtonCapabilities.m +++ b/SmartDeviceLink/SDLButtonCapabilities.m @@ -46,6 +46,14 @@ NS_ASSUME_NONNULL_BEGIN return [self.store sdl_objectForName:SDLRPCParameterNameUpDownAvailable ofClass:NSNumber.class error:&error]; } +- (void)setModuleInfo:(nullable SDLModuleInfo *)moduleInfo { + [self.store sdl_setObject:moduleInfo forName:SDLRPCParameterNameModuleInfo]; +} + +- (nullable SDLModuleInfo *)moduleInfo { + return [self.store sdl_objectForName:SDLRPCParameterNameModuleInfo ofClass:SDLModuleInfo.class error:nil]; +} + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLButtonPress.h b/SmartDeviceLink/SDLButtonPress.h index b019b4edd..3d251f87d 100644 --- a/SmartDeviceLink/SDLButtonPress.h +++ b/SmartDeviceLink/SDLButtonPress.h @@ -15,7 +15,9 @@ NS_ASSUME_NONNULL_BEGIN @interface SDLButtonPress : SDLRPCRequest -- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType) moduleType; +- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType)moduleType __deprecated_msg(("Use initWithButtonName:moduleType:moduleId: instead"));; + +- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType)moduleType moduleId:(nullable NSString *)moduleId; /** * The module where the button should be pressed. @@ -24,6 +26,13 @@ NS_ASSUME_NONNULL_BEGIN @property (strong, nonatomic) SDLModuleType moduleType; /** + * Id of a module, published by System Capability. + * + * Optional + */ +@property (nullable, strong, nonatomic) NSString *moduleId; + +/** * The name of supported RC climate or radio button. * */ diff --git a/SmartDeviceLink/SDLButtonPress.m b/SmartDeviceLink/SDLButtonPress.m index f79152830..4f215c206 100644 --- a/SmartDeviceLink/SDLButtonPress.m +++ b/SmartDeviceLink/SDLButtonPress.m @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN } #pragma clang diagnostic pop -- (instancetype)initWithButtonName:(SDLButtonName) buttonName moduleType:(SDLModuleType) moduleType { +- (instancetype)initWithButtonName:(SDLButtonName) buttonName moduleType:(SDLModuleType)moduleType { self = [self init]; if (!self) { return nil; @@ -32,6 +32,19 @@ NS_ASSUME_NONNULL_BEGIN return self; } +- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType)moduleType moduleId:(nullable NSString *)moduleId { + self = [self init]; + if (!self) { + return nil; + } + + self.buttonName = buttonName; + self.moduleType = moduleType; + self.moduleId = moduleId; + + return self; +} + - (void)setModuleType:(SDLModuleType)moduleType { [self.parameters sdl_setObject:moduleType forName:SDLRPCParameterNameModuleType]; } @@ -59,5 +72,14 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_enumForName:SDLRPCParameterNameButtonPressMode error:&error]; } +- (void)setModuleId:(nullable NSString *)moduleId { + [self.parameters sdl_setObject:moduleId forName:SDLRPCParameterNameModuleId]; +} + +- (nullable NSString *)moduleId { + NSError *error = nil; + return [self.parameters sdl_objectForName:SDLRPCParameterNameModuleId ofClass:NSString.class error:&error]; +} + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLClimateControlCapabilities.h b/SmartDeviceLink/SDLClimateControlCapabilities.h index a8d4035da..99ad8fece 100644 --- a/SmartDeviceLink/SDLClimateControlCapabilities.h +++ b/SmartDeviceLink/SDLClimateControlCapabilities.h @@ -5,6 +5,7 @@ #import "SDLRPCMessage.h" #import "SDLDefrostZone.h" #import "SDLVentilationMode.h" +#import "SDLModuleInfo.h" NS_ASSUME_NONNULL_BEGIN @@ -17,7 +18,9 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithModuleName:(NSString *)moduleName fanSpeedAvailable:(BOOL)fanSpeedAvailable desiredTemperatureAvailable:(BOOL)desiredTemperatureAvailable acEnableAvailable:(BOOL)acEnableAvailable acMaxEnableAvailable:(BOOL)acMaxEnableAvailable circulateAirAvailable:(BOOL)circulateAirEnableAvailable autoModeEnableAvailable:(BOOL)autoModeEnableAvailable dualModeEnableAvailable:(BOOL)dualModeEnableAvailable defrostZoneAvailable:(BOOL)defrostZoneAvailable ventilationModeAvailable:(BOOL)ventilationModeAvailable heatedSteeringWheelAvailable:(BOOL)heatedSteeringWheelAvailable heatedWindshieldAvailable:(BOOL)heatedWindshieldAvailable heatedRearWindowAvailable:(BOOL)heatedRearWindowAvailable heatedMirrorsAvailable:(BOOL)heatedMirrorsAvailable __deprecated_msg("Use initWithModuleName:fanSpeedAvailable:desiredTemperatureAvailable:acEnableAvailable:acMaxEnableAvailable:circulateAirAvailable:autoModeEnableAvailable: dualModeEnableAvailable:defrostZoneAvailable:ventilationModeAvailable: heatedSteeringWheelAvailable:heatedWindshieldAvailable: heatedRearWindowAvailable:heatedMirrorsAvailable: climateEnableAvailable: instead"); -- (instancetype)initWithModuleName:(NSString *)moduleName fanSpeedAvailable:(BOOL)fanSpeedAvailable desiredTemperatureAvailable:(BOOL)desiredTemperatureAvailable acEnableAvailable:(BOOL)acEnableAvailable acMaxEnableAvailable:(BOOL)acMaxEnableAvailable circulateAirAvailable:(BOOL)circulateAirEnableAvailable autoModeEnableAvailable:(BOOL)autoModeEnableAvailable dualModeEnableAvailable:(BOOL)dualModeEnableAvailable defrostZoneAvailable:(BOOL)defrostZoneAvailable ventilationModeAvailable:(BOOL)ventilationModeAvailable heatedSteeringWheelAvailable:(BOOL)heatedSteeringWheelAvailable heatedWindshieldAvailable:(BOOL)heatedWindshieldAvailable heatedRearWindowAvailable:(BOOL)heatedRearWindowAvailable heatedMirrorsAvailable:(BOOL)heatedMirrorsAvailable climateEnableAvailable:(BOOL)climateEnableAvailable; +- (instancetype)initWithModuleName:(NSString *)moduleName fanSpeedAvailable:(BOOL)fanSpeedAvailable desiredTemperatureAvailable:(BOOL)desiredTemperatureAvailable acEnableAvailable:(BOOL)acEnableAvailable acMaxEnableAvailable:(BOOL)acMaxEnableAvailable circulateAirAvailable:(BOOL)circulateAirEnableAvailable autoModeEnableAvailable:(BOOL)autoModeEnableAvailable dualModeEnableAvailable:(BOOL)dualModeEnableAvailable defrostZoneAvailable:(BOOL)defrostZoneAvailable ventilationModeAvailable:(BOOL)ventilationModeAvailable heatedSteeringWheelAvailable:(BOOL)heatedSteeringWheelAvailable heatedWindshieldAvailable:(BOOL)heatedWindshieldAvailable heatedRearWindowAvailable:(BOOL)heatedRearWindowAvailable heatedMirrorsAvailable:(BOOL)heatedMirrorsAvailable climateEnableAvailable:(BOOL)climateEnableAvailable __deprecated_msg("Use initWithModuleName: moduleId:fanSpeedAvailable:desiredTemperatureAvailable:acEnableAvailable:acMaxEnableAvailable:circulateAirAvailable:autoModeEnableAvailable: dualModeEnableAvailable:defrostZoneAvailable:ventilationModeAvailable: heatedSteeringWheelAvailable:heatedWindshieldAvailable: heatedRearWindowAvailable:heatedMirrorsAvailable: climateEnableAvailable: instead"); + +- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo fanSpeedAvailable:(BOOL)fanSpeedAvailable desiredTemperatureAvailable:(BOOL)desiredTemperatureAvailable acEnableAvailable:(BOOL)acEnableAvailable acMaxEnableAvailable:(BOOL)acMaxEnableAvailable circulateAirAvailable:(BOOL)circulateAirEnableAvailable autoModeEnableAvailable:(BOOL)autoModeEnableAvailable dualModeEnableAvailable:(BOOL)dualModeEnableAvailable defrostZoneAvailable:(BOOL)defrostZoneAvailable ventilationModeAvailable:(BOOL)ventilationModeAvailable heatedSteeringWheelAvailable:(BOOL)heatedSteeringWheelAvailable heatedWindshieldAvailable:(BOOL)heatedWindshieldAvailable heatedRearWindowAvailable:(BOOL)heatedRearWindowAvailable heatedMirrorsAvailable:(BOOL)heatedMirrorsAvailable climateEnableAvailable:(BOOL)climateEnableAvailable; /** * The short friendly name of the climate control module. @@ -156,6 +159,13 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nullable, strong, nonatomic) NSNumber<SDLBool> *climateEnableAvailable; +/** + * Information about a RC module, including its id. + * + * Optional + */ +@property (nullable, strong, nonatomic) SDLModuleInfo *moduleInfo; + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLClimateControlCapabilities.m b/SmartDeviceLink/SDLClimateControlCapabilities.m index 199795974..5742cb82c 100644 --- a/SmartDeviceLink/SDLClimateControlCapabilities.m +++ b/SmartDeviceLink/SDLClimateControlCapabilities.m @@ -19,12 +19,17 @@ NS_ASSUME_NONNULL_BEGIN } - (instancetype)initWithModuleName:(NSString *)moduleName fanSpeedAvailable:(BOOL)fanSpeedAvailable desiredTemperatureAvailable:(BOOL)desiredTemperatureAvailable acEnableAvailable:(BOOL)acEnableAvailable acMaxEnableAvailable:(BOOL)acMaxEnableAvailable circulateAirAvailable:(BOOL)circulateAirEnableAvailable autoModeEnableAvailable:(BOOL)autoModeEnableAvailable dualModeEnableAvailable:(BOOL)dualModeEnableAvailable defrostZoneAvailable:(BOOL)defrostZoneAvailable ventilationModeAvailable:(BOOL)ventilationModeAvailable heatedSteeringWheelAvailable:(BOOL)steeringWheelAvailable heatedWindshieldAvailable:(BOOL)windshieldAvailable heatedRearWindowAvailable:(BOOL)rearWindowAvailable heatedMirrorsAvailable:(BOOL)mirrorsAvailable climateEnableAvailable:(BOOL)climateEnableAvailable{ + return [self initWithModuleName:moduleName moduleInfo:nil fanSpeedAvailable:fanSpeedAvailable desiredTemperatureAvailable:desiredTemperatureAvailable acEnableAvailable:acEnableAvailable acMaxEnableAvailable:acMaxEnableAvailable circulateAirAvailable:circulateAirEnableAvailable autoModeEnableAvailable:autoModeEnableAvailable dualModeEnableAvailable:dualModeEnableAvailable defrostZoneAvailable:defrostZoneAvailable ventilationModeAvailable:ventilationModeAvailable heatedSteeringWheelAvailable:steeringWheelAvailable heatedWindshieldAvailable:windshieldAvailable heatedRearWindowAvailable:rearWindowAvailable heatedMirrorsAvailable:mirrorsAvailable climateEnableAvailable:NO]; +} + +- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo fanSpeedAvailable:(BOOL)fanSpeedAvailable desiredTemperatureAvailable:(BOOL)desiredTemperatureAvailable acEnableAvailable:(BOOL)acEnableAvailable acMaxEnableAvailable:(BOOL)acMaxEnableAvailable circulateAirAvailable:(BOOL)circulateAirEnableAvailable autoModeEnableAvailable:(BOOL)autoModeEnableAvailable dualModeEnableAvailable:(BOOL)dualModeEnableAvailable defrostZoneAvailable:(BOOL)defrostZoneAvailable ventilationModeAvailable:(BOOL)ventilationModeAvailable heatedSteeringWheelAvailable:(BOOL)steeringWheelAvailable heatedWindshieldAvailable:(BOOL)windshieldAvailable heatedRearWindowAvailable:(BOOL)rearWindowAvailable heatedMirrorsAvailable:(BOOL)mirrorsAvailable climateEnableAvailable:(BOOL)climateEnableAvailable{ self = [self init]; if (!self) { return nil; } - + self.moduleName = moduleName; + self.moduleInfo = moduleInfo; self.fanSpeedAvailable = @(fanSpeedAvailable); self.desiredTemperatureAvailable = @(desiredTemperatureAvailable); self.acEnableAvailable = @(acEnableAvailable); @@ -179,6 +184,14 @@ NS_ASSUME_NONNULL_BEGIN return [self.store sdl_objectForName:SDLRPCParameterNameClimateEnableAvailable ofClass:NSNumber.class error:nil]; } +- (void)setModuleInfo:(nullable SDLModuleInfo *)moduleInfo { + [self.store sdl_setObject:moduleInfo forName:SDLRPCParameterNameModuleInfo]; +} + +- (nullable SDLModuleInfo *)moduleInfo { + return [self.store sdl_objectForName:SDLRPCParameterNameModuleInfo ofClass:SDLModuleInfo.class error:nil]; +} + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLFunctionID.m b/SmartDeviceLink/SDLFunctionID.m index 5c5546ffa..c03280dcd 100644 --- a/SmartDeviceLink/SDLFunctionID.m +++ b/SmartDeviceLink/SDLFunctionID.m @@ -93,6 +93,8 @@ NS_ASSUME_NONNULL_BEGIN @59: SDLRPCFunctionNameShowAppMenu, @60: SDLRPCFunctionNameCreateWindow, @61: SDLRPCFunctionNameDeleteWindow, + @62: SDLRPCFunctionNameGetInteriorVehicleDataConsent, + @63: SDLRPCFunctionNameReleaseInteriorVehicleDataModule, @32768: SDLRPCFunctionNameOnHMIStatus, @32769: SDLRPCFunctionNameOnAppInterfaceUnregistered, @32770: SDLRPCFunctionNameOnButtonEvent, diff --git a/SmartDeviceLink/SDLGetInteriorVehicleData.h b/SmartDeviceLink/SDLGetInteriorVehicleData.h index 01d208f71..143a2468f 100644 --- a/SmartDeviceLink/SDLGetInteriorVehicleData.h +++ b/SmartDeviceLink/SDLGetInteriorVehicleData.h @@ -4,6 +4,7 @@ #import "SDLRPCRequest.h" #import "SDLModuleType.h" +#import "SDLModuleInfo.h" /** * Reads the current status value of specified remote control module (type). @@ -17,11 +18,17 @@ NS_ASSUME_NONNULL_BEGIN @interface SDLGetInteriorVehicleData : SDLRPCRequest -- (instancetype)initWithModuleType:(SDLModuleType)moduleType; +- (instancetype)initWithModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId; -- (instancetype)initAndSubscribeToModuleType:(SDLModuleType)moduleType; +- (instancetype)initAndSubscribeToModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId; -- (instancetype)initAndUnsubscribeToModuleType:(SDLModuleType)moduleType; +- (instancetype)initAndUnsubscribeToModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId; + +- (instancetype)initWithModuleType:(SDLModuleType)moduleType __deprecated_msg("Use initWithModuleType:moduleId: instead"); + +- (instancetype)initAndSubscribeToModuleType:(SDLModuleType)moduleType __deprecated_msg("Use initAndSubscribeToModuleType:moduleId: instead"); + +- (instancetype)initAndUnsubscribeToModuleType:(SDLModuleType)moduleType __deprecated_msg("Use initAndUnsubscribeToModuleType:moduleId:"); /** * The type of a RC module to retrieve module data from the vehicle. @@ -30,8 +37,16 @@ NS_ASSUME_NONNULL_BEGIN @property (strong, nonatomic) SDLModuleType moduleType; /** - * If subscribe is true, the head unit will register onInteriorVehicleData notifications for the requested moduelType. - * If subscribe is false, the head unit will unregister onInteriorVehicleData notifications for the requested moduelType. + * Id of a module, published by System Capability. + * + * Optional + */ +@property (nullable, strong, nonatomic) NSString *moduleId; + +/** + * If subscribe is true, the head unit will register OnInteriorVehicleData notifications for the requested module (moduleId and moduleType). + * If subscribe is false, the head unit will unregister OnInteriorVehicleData notifications for the requested module (moduleId and moduleType). + * If subscribe is not included, the subscription status of the app for the requested module (moduleId and moduleType) will remain unchanged. * * optional, Boolean, default Value = false */ diff --git a/SmartDeviceLink/SDLGetInteriorVehicleData.m b/SmartDeviceLink/SDLGetInteriorVehicleData.m index 4f283fb49..57f0aa833 100755 --- a/SmartDeviceLink/SDLGetInteriorVehicleData.m +++ b/SmartDeviceLink/SDLGetInteriorVehicleData.m @@ -20,6 +20,44 @@ NS_ASSUME_NONNULL_BEGIN } #pragma clang diagnostic pop +- (instancetype)initWithModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId { + self = [self init]; + if (!self) { + return nil; + } + + self.moduleType = moduleType; + self.moduleId = moduleId; + + return self; +} + +- (instancetype)initAndSubscribeToModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId { + self = [self init]; + if (!self) { + return nil; + } + + self.moduleType = moduleType; + self.moduleId = moduleId; + self.subscribe = @(YES); + + return self; +} + +- (instancetype)initAndUnsubscribeToModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId { + self = [self init]; + if (!self) { + return nil; + } + + self.moduleType = moduleType; + self.moduleId = moduleId; + self.subscribe = @(NO); + + return self; +} + - (instancetype)initWithModuleType:(SDLModuleType)moduleType; { self = [self init]; if (!self) { @@ -72,6 +110,15 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:SDLRPCParameterNameSubscribe ofClass:NSNumber.class error:nil]; } +- (void)setModuleId:(nullable NSString *)moduleId { + [self.parameters sdl_setObject:moduleId forName:SDLRPCParameterNameModuleId]; +} + +- (nullable NSString *)moduleId { + NSError *error = nil; + return [self.parameters sdl_objectForName:SDLRPCParameterNameModuleId ofClass:NSString.class error:&error]; +} + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataConsent.h b/SmartDeviceLink/SDLGetInteriorVehicleDataConsent.h new file mode 100644 index 000000000..ff647fcde --- /dev/null +++ b/SmartDeviceLink/SDLGetInteriorVehicleDataConsent.h @@ -0,0 +1,34 @@ +// +// SDLGetInteriorVehicleDataConsent.h +// SmartDeviceLink +// +// Created by standa1 on 7/25/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLRPCRequest.h" +#import "SDLModuleType.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface SDLGetInteriorVehicleDataConsent : SDLRPCRequest + +- (instancetype)initWithModuleType:(SDLModuleType)moduleType moduleIds:(NSArray<NSString *> *)moduleIds; + +/** + * The module type that the app requests to control. + * + * Required + */ +@property (strong, nonatomic) SDLModuleType moduleType; + +/** + * Ids of a module of same type, published by System Capability. + * + * Required + */ +@property (strong, nonatomic) NSArray<NSString *> *moduleIds; + +@end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataConsent.m b/SmartDeviceLink/SDLGetInteriorVehicleDataConsent.m new file mode 100644 index 000000000..88ed0d8e9 --- /dev/null +++ b/SmartDeviceLink/SDLGetInteriorVehicleDataConsent.m @@ -0,0 +1,55 @@ +// +// SDLGetInteriorVehicleDataConsent.m +// SmartDeviceLink +// +// Created by standa1 on 7/25/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLGetInteriorVehicleDataConsent.h" +#import "SDLRPCParameterNames.h" +#import "SDLRPCFunctionNames.h" +#import "NSMutableDictionary+Store.h" + +@implementation SDLGetInteriorVehicleDataConsent + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +- (instancetype)init { + if (self = [super initWithName:SDLRPCFunctionNameGetInteriorVehicleDataConsent]) { + } + return self; +} +#pragma clang diagnostic pop + +- (instancetype)initWithModuleType:(SDLModuleType)moduleType moduleIds:(NSArray<NSString *> *)moduleIds { + self = [self init]; + if (!self) { + return nil; + } + + self.moduleType = moduleType; + self.moduleIds = moduleIds; + + return self; +} + +- (void)setModuleType:(SDLModuleType)moduleType { + [self.parameters sdl_setObject:moduleType forName:SDLRPCParameterNameModuleType]; +} + +- (SDLModuleType)moduleType { + NSError *error = nil; + return [self.parameters sdl_enumForName:SDLRPCParameterNameModuleType error:&error]; +} + +- (void)setModuleIds:(NSArray<NSString *> *)moduleIds { + [self.parameters sdl_setObject:moduleIds forName:SDLRPCParameterNameModuleIds]; +} + +- (NSArray<NSString *> *)moduleIds { + NSError *error = nil; + return [self.parameters sdl_objectsForName:SDLRPCParameterNameModuleIds ofClass:NSString.class error:&error]; +} + +@end diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h b/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h new file mode 100644 index 000000000..7aee83e57 --- /dev/null +++ b/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h @@ -0,0 +1,26 @@ +// +// SDLGetInteriorVehicleDataConsentResponse.h +// SmartDeviceLink +// +// Created by standa1 on 7/25/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLRPCResponse.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface SDLGetInteriorVehicleDataConsentResponse : SDLRPCResponse + +/** + This array has the same size as "moduleIds" in the request; each element corresponding to one moduleId + "true" - if SDL grants the permission for the requested module + "false" - SDL denies the permission for the requested module. + + Optional + */ +@property (strong, nonatomic, nullable) NSArray<NSNumber<SDLBool> *> *allowed; + +@end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.m b/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.m new file mode 100644 index 000000000..872eded62 --- /dev/null +++ b/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.m @@ -0,0 +1,34 @@ +// +// SDLGetInteriorVehicleDataConsentResponse.m +// SmartDeviceLink +// +// Created by standa1 on 7/25/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLGetInteriorVehicleDataConsentResponse.h" +#import "NSMutableDictionary+Store.h" +#import "SDLRPCFunctionNames.h" +#import "SDLRPCParameterNames.h" + +@implementation SDLGetInteriorVehicleDataConsentResponse + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +- (instancetype)init { + if (self = [super initWithName:SDLRPCFunctionNameGetInteriorVehicleDataConsent]) { + } + return self; +} +#pragma clang diagnostic pop + +- (void)setAllowed:(nullable NSArray<NSNumber<SDLBool> *> *)allowed { + [self.parameters sdl_setObject:allowed forName:SDLRPCParameterNameAllowed]; +} + +- (nullable NSArray<NSNumber<SDLBool> *> *)allowed { + NSError *error = nil; + return [self.parameters sdl_objectsForName:SDLRPCParameterNameAllowed ofClass:NSNumber.class error:&error]; +} + +@end diff --git a/SmartDeviceLink/SDLGlobalProperty.h b/SmartDeviceLink/SDLGlobalProperty.h index e719cd45c..9175288cb 100644 --- a/SmartDeviceLink/SDLGlobalProperty.h +++ b/SmartDeviceLink/SDLGlobalProperty.h @@ -45,3 +45,8 @@ extern SDLGlobalProperty const SDLGlobalPropertyMenuIcon; * Property related to the keyboard */ extern SDLGlobalProperty const SDLGlobalPropertyKeyboard; + +/** + * Location of the user's seat of setGlobalProperties + */ +extern SDLGlobalProperty const SDLGlobalPropertyUserLocation; diff --git a/SmartDeviceLink/SDLGlobalProperty.m b/SmartDeviceLink/SDLGlobalProperty.m index 00537847b..410af9179 100644 --- a/SmartDeviceLink/SDLGlobalProperty.m +++ b/SmartDeviceLink/SDLGlobalProperty.m @@ -11,3 +11,4 @@ SDLGlobalProperty const SDLGlobalPropertyVoiceRecognitionHelpItems = @"VRHELPITE SDLGlobalProperty const SDLGlobalPropertyMenuName = @"MENUNAME"; SDLGlobalProperty const SDLGlobalPropertyMenuIcon = @"MENUICON"; SDLGlobalProperty const SDLGlobalPropertyKeyboard = @"KEYBOARDPROPERTIES"; +SDLGlobalProperty const SDLGlobalPropertyUserLocation = @"USER_LOCATION"; diff --git a/SmartDeviceLink/SDLGrid.h b/SmartDeviceLink/SDLGrid.h new file mode 100644 index 000000000..64ad01e2f --- /dev/null +++ b/SmartDeviceLink/SDLGrid.h @@ -0,0 +1,56 @@ +// +// SDLGrid.h +// SmartDeviceLink +// +// Created by standa1 on 7/10/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLRPCMessage.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * Describes a location (origin coordinates and span) of a vehicle component. + */ +@interface SDLGrid : SDLRPCStruct + +/** + * + * Required, Integer, -1 - 100 + */ +@property (strong, nonatomic) NSNumber<SDLInt> *col; + +/** + * + * Required, Integer, -1 - 100 + */ +@property (strong, nonatomic) NSNumber<SDLInt> *row; + +/** + * + * Optional, Integer, -1 - 100 + */ +@property (strong, nonatomic, nullable) NSNumber<SDLInt> *level; + +/** + * + * Optional, Integer, 1 - 100 + */ +@property (strong, nonatomic, nullable) NSNumber<SDLInt> *colspan; + +/** + * + * Optional, Integer, 1 - 100 + */ +@property (strong, nonatomic, nullable) NSNumber<SDLInt> *rowspan; + +/** + * + * Optional, Integer, 1 - 100 + */ +@property (strong, nonatomic, nullable) NSNumber<SDLInt> *levelspan; + +@end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLGrid.m b/SmartDeviceLink/SDLGrid.m new file mode 100644 index 000000000..f0e5d333d --- /dev/null +++ b/SmartDeviceLink/SDLGrid.m @@ -0,0 +1,70 @@ +// +// SDLGrid.m +// SmartDeviceLink +// +// Created by standa1 on 7/10/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLGrid.h" + +#import "NSMutableDictionary+Store.h" +#import "SDLRPCParameterNames.h" + +@implementation SDLGrid + +- (void)setCol:(NSNumber<SDLInt> *)col { + [self.store sdl_setObject:col forName:SDLRPCParameterNameCol]; +} + +- (NSNumber<SDLInt> *)col { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameCol ofClass:NSNumber.class error:&error]; +} + +- (void)setRow:(NSNumber<SDLInt> *)row { + [self.store sdl_setObject:row forName:SDLRPCParameterNameRow]; +} + +- (NSNumber<SDLInt> *)row { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameRow ofClass:NSNumber.class error:&error]; +} + +- (void)setLevel:(nullable NSNumber<SDLInt> *)level { + [self.store sdl_setObject:level forName:SDLRPCParameterNameLevel]; +} + +- (nullable NSNumber<SDLInt> *)level { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameLevel ofClass:NSNumber.class error:&error]; +} + +- (void)setColspan:(nullable NSNumber<SDLInt> *)colspan { + [self.store sdl_setObject:colspan forName:SDLRPCParameterNameColSpan]; +} + +- (nullable NSNumber<SDLInt> *)colspan { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameColSpan ofClass:NSNumber.class error:&error]; +} + +- (void)setRowspan:(nullable NSNumber<SDLInt> *)rowspan { + [self.store sdl_setObject:rowspan forName:SDLRPCParameterNameRowSpan]; +} + +- (nullable NSNumber<SDLInt> *)rowspan { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameRowSpan ofClass:NSNumber.class error:&error]; +} + +- (void)setLevelspan:(nullable NSNumber<SDLInt> *)levelspan { + [self.store sdl_setObject:levelspan forName:SDLRPCParameterNameLevelSpan]; +} + +- (nullable NSNumber<SDLInt> *)levelspan { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameLevelSpan ofClass:NSNumber.class error:&error]; +} + +@end diff --git a/SmartDeviceLink/SDLHMISettingsControlCapabilities.h b/SmartDeviceLink/SDLHMISettingsControlCapabilities.h index da7d04310..4f0f0cf45 100644 --- a/SmartDeviceLink/SDLHMISettingsControlCapabilities.h +++ b/SmartDeviceLink/SDLHMISettingsControlCapabilities.h @@ -2,6 +2,7 @@ // #import "SDLRPCMessage.h" +#import "SDLModuleInfo.h" NS_ASSUME_NONNULL_BEGIN @@ -14,7 +15,17 @@ NS_ASSUME_NONNULL_BEGIN @return An instance of the SDLHMISettingsControlCapabilities class */ -- (instancetype)initWithModuleName:(NSString *)moduleName; +- (instancetype)initWithModuleName:(NSString *)moduleName __deprecated_msg("Use initWithModuleName:moduleInfo:"); + +/** + Constructs a newly allocated SDLHMISettingsControlCapabilities object with moduleName + + @param moduleName The short friendly name of the hmi setting module + @param moduleInfo Information about a RC module, including its id. + + @return An instance of the SDLHMISettingsControlCapabilities class + */ +- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo; /** Constructs a newly allocated SDLHMISettingsControlCapabilities object with given parameters @@ -26,7 +37,20 @@ NS_ASSUME_NONNULL_BEGIN @return An instance of the SDLHMISettingsControlCapabilities class */ -- (instancetype)initWithModuleName:(NSString *)moduleName distanceUnitAvailable:(BOOL)distanceUnitAvailable temperatureUnitAvailable:(BOOL)temperatureUnitAvailable displayModeUnitAvailable:(BOOL)displayModeUnitAvailable; +- (instancetype)initWithModuleName:(NSString *)moduleName distanceUnitAvailable:(BOOL)distanceUnitAvailable temperatureUnitAvailable:(BOOL)temperatureUnitAvailable displayModeUnitAvailable:(BOOL)displayModeUnitAvailable __deprecated_msg("Use initWithModuleName:moduleInfo:distanceUnitAvailable:distanceUnitAvailable:temperatureUnitAvailable:displayModeUnitAvailable:"); + +/** + Constructs a newly allocated SDLHMISettingsControlCapabilities object with given parameters + + @param moduleName The short friendly name of the hmi setting module. + @param moduleInfo Information about a RC module, including its id. + @param distanceUnitAvailable Availability of the control of distance unit. + @param temperatureUnitAvailable Availability of the control of temperature unit. + @param displayModeUnitAvailable Availability of the control of displayMode unit. + + @return An instance of the SDLHMISettingsControlCapabilities class + */ +- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo distanceUnitAvailable:(BOOL)distanceUnitAvailable temperatureUnitAvailable:(BOOL)temperatureUnitAvailable displayModeUnitAvailable:(BOOL)displayModeUnitAvailable; /** * @abstract The short friendly name of the hmi setting module. @@ -57,6 +81,13 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nullable, strong, nonatomic) NSNumber<SDLBool> *displayModeUnitAvailable; +/** + * Information about a RC module, including its id. + * + * Optional + */ +@property (nullable, strong, nonatomic) SDLModuleInfo *moduleInfo; + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLHMISettingsControlCapabilities.m b/SmartDeviceLink/SDLHMISettingsControlCapabilities.m index 82eff7c81..d7dab5f6f 100644 --- a/SmartDeviceLink/SDLHMISettingsControlCapabilities.m +++ b/SmartDeviceLink/SDLHMISettingsControlCapabilities.m @@ -19,6 +19,17 @@ NS_ASSUME_NONNULL_BEGIN return self; } +- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo { + self = [self init]; + if(!self) { + return nil; + } + self.moduleName = moduleName; + self.moduleInfo = moduleInfo; + + return self; +} + - (instancetype)initWithModuleName:(NSString *)moduleName distanceUnitAvailable:(BOOL)distanceUnitAvailable temperatureUnitAvailable:(BOOL)temperatureUnitAvailable displayModeUnitAvailable:(BOOL)displayModeUnitAvailable { self = [self init]; if(!self) { @@ -32,6 +43,20 @@ NS_ASSUME_NONNULL_BEGIN return self; } +- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo distanceUnitAvailable:(BOOL)distanceUnitAvailable temperatureUnitAvailable:(BOOL)temperatureUnitAvailable displayModeUnitAvailable:(BOOL)displayModeUnitAvailable { + self = [self init]; + if(!self) { + return nil; + } + self.moduleName = moduleName; + self.moduleInfo = moduleInfo; + self.distanceUnitAvailable = @(distanceUnitAvailable); + self.temperatureUnitAvailable = @(temperatureUnitAvailable); + self.displayModeUnitAvailable = @(displayModeUnitAvailable); + + return self; +} + - (void)setModuleName:(NSString *)moduleName { [self.store sdl_setObject:moduleName forName:SDLRPCParameterNameModuleName]; } @@ -66,6 +91,14 @@ NS_ASSUME_NONNULL_BEGIN return [self.store sdl_objectForName:SDLRPCParameterNameDisplayModeUnitAvailable ofClass:NSNumber.class error:nil]; } +- (void)setModuleInfo:(nullable SDLModuleInfo *)moduleInfo { + [self.store sdl_setObject:moduleInfo forName:SDLRPCParameterNameModuleInfo]; +} + +- (nullable SDLModuleInfo *)moduleInfo { + return [self.store sdl_objectForName:SDLRPCParameterNameModuleInfo ofClass:SDLModuleInfo.class error:nil]; +} + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLLightControlCapabilities.h b/SmartDeviceLink/SDLLightControlCapabilities.h index 26e675cea..d50e14db9 100644 --- a/SmartDeviceLink/SDLLightControlCapabilities.h +++ b/SmartDeviceLink/SDLLightControlCapabilities.h @@ -2,6 +2,7 @@ // #import "SDLRPCMessage.h" +#import "SDLModuleInfo.h" @class SDLLightCapabilities; @@ -17,7 +18,18 @@ NS_ASSUME_NONNULL_BEGIN @param supportedLights array of available LightCapabilities @return An instance of the SDLLightControlCapabilities class */ -- (instancetype)initWithModuleName:(NSString *)moduleName supportedLights:(NSArray<SDLLightCapabilities *> *)supportedLights; +- (instancetype)initWithModuleName:(NSString *)moduleName supportedLights:(NSArray<SDLLightCapabilities *> *)supportedLights __deprecated_msg("Use initWithModuleName:moduleInfo:supportedLights:"); + +/** + Constructs a newly allocated SDLLightControlCapabilities object with given parameters + + + @param moduleName friendly name of the light control module + @param moduleInfo information about a RC module, including its id + @param supportedLights array of available LightCapabilities + @return An instance of the SDLLightControlCapabilities class + */ +- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo supportedLights:(NSArray<SDLLightCapabilities *> *)supportedLights; /** * @abstract The short friendly name of the light control module. @@ -34,6 +46,12 @@ NS_ASSUME_NONNULL_BEGIN */ @property (strong, nonatomic) NSArray<SDLLightCapabilities *> *supportedLights; +/** + * Information about a RC module, including its id. + * + * Optional + */ +@property (nullable, strong, nonatomic) SDLModuleInfo *moduleInfo; @end diff --git a/SmartDeviceLink/SDLLightControlCapabilities.m b/SmartDeviceLink/SDLLightControlCapabilities.m index 88c38e437..4a899c2dd 100644 --- a/SmartDeviceLink/SDLLightControlCapabilities.m +++ b/SmartDeviceLink/SDLLightControlCapabilities.m @@ -22,6 +22,18 @@ NS_ASSUME_NONNULL_BEGIN return self; } +- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo supportedLights:(NSArray<SDLLightCapabilities *> *)supportedLights { + self = [self init]; + if(!self) { + return nil; + } + self.moduleName = moduleName; + self.moduleInfo = moduleInfo; + self.supportedLights = supportedLights; + + return self; +} + - (void)setModuleName:(NSString *)moduleName { [self.store sdl_setObject:moduleName forName:SDLRPCParameterNameModuleName]; } @@ -41,6 +53,13 @@ NS_ASSUME_NONNULL_BEGIN return [self.store sdl_objectsForName:SDLRPCParameterNameSupportedLights ofClass:SDLLightCapabilities.class error:&error]; } +- (void)setModuleInfo:(nullable SDLModuleInfo *)moduleInfo { + [self.store sdl_setObject:moduleInfo forName:SDLRPCParameterNameModuleInfo]; +} + +- (nullable SDLModuleInfo *)moduleInfo { + return [self.store sdl_objectForName:SDLRPCParameterNameModuleInfo ofClass:SDLModuleInfo.class error:nil]; +} @end diff --git a/SmartDeviceLink/SDLModuleData.h b/SmartDeviceLink/SDLModuleData.h index cd652804c..3ed7bfd15 100644 --- a/SmartDeviceLink/SDLModuleData.h +++ b/SmartDeviceLink/SDLModuleData.h @@ -78,6 +78,13 @@ NS_ASSUME_NONNULL_BEGIN @property (strong, nonatomic) SDLModuleType moduleType; /** + Id of a module, published by System Capability. + + Optional + */ +@property (nullable, strong, nonatomic) NSString *moduleId; + +/** The radio control data Optional diff --git a/SmartDeviceLink/SDLModuleData.m b/SmartDeviceLink/SDLModuleData.m index 09ae37864..9595deb4c 100644 --- a/SmartDeviceLink/SDLModuleData.m +++ b/SmartDeviceLink/SDLModuleData.m @@ -97,6 +97,15 @@ NS_ASSUME_NONNULL_BEGIN return [self.store sdl_enumForName:SDLRPCParameterNameModuleType error:&error]; } +- (void)setModuleId:(nullable NSString *)moduleId { + [self.store sdl_setObject:moduleId forName:SDLRPCParameterNameModuleId]; +} + +- (nullable NSString *)moduleId { + NSError *error = nil; + return [self.store sdl_enumForName:SDLRPCParameterNameModuleId error:&error]; +} + - (void)setRadioControlData:(nullable SDLRadioControlData *)radioControlData { [self.store sdl_setObject:radioControlData forName:SDLRPCParameterNameRadioControlData]; } diff --git a/SmartDeviceLink/SDLModuleInfo.h b/SmartDeviceLink/SDLModuleInfo.h new file mode 100644 index 000000000..f8dabce60 --- /dev/null +++ b/SmartDeviceLink/SDLModuleInfo.h @@ -0,0 +1,50 @@ +// +// SDLModuleInfo.h +// SmartDeviceLink +// +// Created by standa1 on 7/8/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLRPCMessage.h" +#import "SDLGrid.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * Contains information about a RC module. + */ +@interface SDLModuleInfo : SDLRPCStruct + +/** + * UUID of a module. "moduleId + moduleType" uniquely identify a module. + * + * Max string length 100 chars + + Required + */ +@property (nullable, strong, nonatomic) NSString *moduleId; + +/** + * Location of a module. + * Optional + */ +@property (nullable, strong, nonatomic) SDLGrid *location; + +/** + * Service area of a module. + * Optional + */ +@property (nullable, strong, nonatomic) SDLGrid *serviceArea; + +/** + * Allow multiple users/apps to access the module or not + * + * Optional, Boolean + */ +@property (nullable, strong, nonatomic) NSNumber<SDLBool> *allowMultipleAccess; + + +@end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLModuleInfo.m b/SmartDeviceLink/SDLModuleInfo.m new file mode 100644 index 000000000..46a95e697 --- /dev/null +++ b/SmartDeviceLink/SDLModuleInfo.m @@ -0,0 +1,52 @@ +// +// SDLModuleInfo.m +// SmartDeviceLink +// +// Created by standa1 on 7/8/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLModuleInfo.h" + +#import "NSMutableDictionary+Store.h" +#import "SDLRPCParameterNames.h" + +@implementation SDLModuleInfo + +- (void)setModuleId:(NSString *)moduleId { + [self.store sdl_setObject:moduleId forName:SDLRPCParameterNameModuleId]; +} + +- (NSString *)moduleId { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameModuleId ofClass:NSString.class error:&error]; +} + +- (void)setLocation:(nullable SDLGrid *)location { + [self.store sdl_setObject:location forName:SDLRPCParameterNameLocation]; +} + +- (nullable SDLGrid *)location { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameLocation ofClass:SDLGrid.class error:&error]; +} + +- (void)setServiceArea:(nullable SDLGrid *)serviceArea { + [self.store sdl_setObject:serviceArea forName:SDLRPCParameterNameServiceArea]; +} + +- (nullable SDLGrid *)serviceArea { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameServiceArea ofClass:SDLGrid.class error:&error]; +} + +- (void)setAllowMultipleAccess:(nullable NSNumber<SDLBool> *)allowMultipleAccess { + [self.store sdl_setObject:allowMultipleAccess forName:SDLRPCParameterNameAllowMultipleAccess]; +} + +- (nullable NSNumber<SDLBool> *)allowMultipleAccess { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameAllowMultipleAccess ofClass:NSNumber.class error:&error]; +} + +@end diff --git a/SmartDeviceLink/SDLNotificationConstants.h b/SmartDeviceLink/SDLNotificationConstants.h index d1efd8b8f..ac613208a 100644 --- a/SmartDeviceLink/SDLNotificationConstants.h +++ b/SmartDeviceLink/SDLNotificationConstants.h @@ -140,6 +140,7 @@ extern SDLNotificationName const SDLDidReceiveGetAppServiceDataResponse; extern SDLNotificationName const SDLDidReceiveGetDTCsResponse; extern SDLNotificationName const SDLDidReceiveGetFileResponse; extern SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataResponse; +extern SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataConsentResponse; extern SDLNotificationName const SDLDidReceiveGetSystemCapabilitiesResponse; extern SDLNotificationName const SDLDidReceiveGetVehicleDataResponse; extern SDLNotificationName const SDLDidReceiveGetWaypointsResponse; @@ -151,6 +152,7 @@ extern SDLNotificationName const SDLDidReceivePublishAppServiceResponse; extern SDLNotificationName const SDLDidReceivePutFileResponse; extern SDLNotificationName const SDLDidReceiveReadDIDResponse; extern SDLNotificationName const SDLDidReceiveRegisterAppInterfaceResponse; +extern SDLNotificationName const SDLDidReceiveReleaseInteriorVehicleDataModuleResponse; extern SDLNotificationName const SDLDidReceiveResetGlobalPropertiesResponse; extern SDLNotificationName const SDLDidReceiveScrollableMessageResponse; extern SDLNotificationName const SDLDidReceiveSendHapticDataResponse; @@ -204,6 +206,7 @@ extern SDLNotificationName const SDLDidReceiveGetCloudAppPropertiesRequest; extern SDLNotificationName const SDLDidReceiveGetDTCsRequest; extern SDLNotificationName const SDLDidReceiveGetFileRequest; extern SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataRequest; +extern SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataConsentRequest; extern SDLNotificationName const SDLDidReceiveGetSystemCapabilityRequest; extern SDLNotificationName const SDLDidReceiveGetVehicleDataRequest; extern SDLNotificationName const SDLDidReceiveGetWayPointsRequest; @@ -215,6 +218,7 @@ extern SDLNotificationName const SDLDidReceivePublishAppServiceRequest; extern SDLNotificationName const SDLDidReceivePutFileRequest; extern SDLNotificationName const SDLDidReceiveReadDIDRequest; extern SDLNotificationName const SDLDidReceiveRegisterAppInterfaceRequest; +extern SDLNotificationName const SDLDidReceiveReleaseInteriorVehicleDataModuleRequest; extern SDLNotificationName const SDLDidReceiveResetGlobalPropertiesRequest; extern SDLNotificationName const SDLDidReceiveScrollableMessageRequest; extern SDLNotificationName const SDLDidReceiveSendHapticDataRequest; diff --git a/SmartDeviceLink/SDLNotificationConstants.m b/SmartDeviceLink/SDLNotificationConstants.m index 7882d7d6f..74888f8b3 100644 --- a/SmartDeviceLink/SDLNotificationConstants.m +++ b/SmartDeviceLink/SDLNotificationConstants.m @@ -48,6 +48,7 @@ SDLNotificationName const SDLDidReceiveGetAppServiceDataResponse = @"com.sdl.res SDLNotificationName const SDLDidReceiveGetDTCsResponse = @"com.sdl.response.getDTCs"; SDLNotificationName const SDLDidReceiveGetFileResponse = @"com.sdl.response.getFile"; SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataResponse = @"com.sdl.response.getInteriorVehicleData"; +SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataConsentResponse = @"com.sdl.response.getInteriorVehicleDataConsent"; SDLNotificationName const SDLDidReceiveGetSystemCapabilitiesResponse = @"com.sdl.response.getSystemCapabilities"; SDLNotificationName const SDLDidReceiveGetVehicleDataResponse = @"com.sdl.response.getVehicleData"; SDLNotificationName const SDLDidReceiveGetWaypointsResponse = @"com.sdl.response.getWaypoints"; @@ -59,6 +60,7 @@ SDLNotificationName const SDLDidReceivePublishAppServiceResponse = @"com.sdl.res SDLNotificationName const SDLDidReceivePutFileResponse = @"com.sdl.response.putFile"; SDLNotificationName const SDLDidReceiveReadDIDResponse = @"com.sdl.response.readDID"; SDLNotificationName const SDLDidReceiveRegisterAppInterfaceResponse = @"com.sdl.response.registerAppInterface"; +SDLNotificationName const SDLDidReceiveReleaseInteriorVehicleDataModuleResponse = @"com.sdl.response.releaseInteriorVehicleDataModule"; SDLNotificationName const SDLDidReceiveResetGlobalPropertiesResponse = @"com.sdl.response.resetGlobalProperties"; SDLNotificationName const SDLDidReceiveScrollableMessageResponse = @"com.sdl.response.scrollableMessage"; SDLNotificationName const SDLDidReceiveSendHapticDataResponse = @"com.sdl.response.sendHapticData"; @@ -109,6 +111,7 @@ SDLNotificationName const SDLDidReceiveGetCloudAppPropertiesRequest = @"com.sdl. SDLNotificationName const SDLDidReceiveGetDTCsRequest = @"com.sdl.request.getDTCs"; SDLNotificationName const SDLDidReceiveGetFileRequest = @"com.sdl.request.getFile"; SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataRequest = @"com.sdl.request.getInteriorVehicleData"; +SDLNotificationName const SDLDidReceiveGetInteriorVehicleDataConsentRequest = @"com.sdl.request.getInteriorVehicleDataConsent"; SDLNotificationName const SDLDidReceiveGetSystemCapabilityRequest = @"com.sdl.request.getSystemCapability"; SDLNotificationName const SDLDidReceiveGetVehicleDataRequest = @"com.sdl.request.getVehicleData"; SDLNotificationName const SDLDidReceiveGetWayPointsRequest = @"com.sdl.request.getWayPoints"; @@ -120,6 +123,7 @@ SDLNotificationName const SDLDidReceivePublishAppServiceRequest = @"com.sdl.requ SDLNotificationName const SDLDidReceivePutFileRequest = @"com.sdl.request.putFile"; SDLNotificationName const SDLDidReceiveReadDIDRequest = @"com.sdl.request.readDID"; SDLNotificationName const SDLDidReceiveRegisterAppInterfaceRequest = @"com.sdl.request.registerAppInterface"; +SDLNotificationName const SDLDidReceiveReleaseInteriorVehicleDataModuleRequest = @"com.sdl.request.releaseInteriorVehicleDataModule"; SDLNotificationName const SDLDidReceiveResetGlobalPropertiesRequest = @"com.sdl.request.resetGlobalProperties"; SDLNotificationName const SDLDidReceiveScrollableMessageRequest = @"com.sdl.request.scrollableMessage"; SDLNotificationName const SDLDidReceiveSendHapticDataRequest = @"com.sdl.request.sendHapticData"; @@ -199,6 +203,7 @@ SDLNotificationName const SDLDidReceiveWaypointNotification = @"com.sdl.notifica SDLDidReceiveGetDTCsResponse, SDLDidReceiveGetFileResponse, SDLDidReceiveGetInteriorVehicleDataResponse, + SDLDidReceiveGetInteriorVehicleDataConsentResponse, SDLDidReceiveGetSystemCapabilitiesResponse, SDLDidReceiveGetVehicleDataResponse, SDLDidReceiveGetWaypointsResponse, @@ -210,6 +215,7 @@ SDLNotificationName const SDLDidReceiveWaypointNotification = @"com.sdl.notifica SDLDidReceivePutFileResponse, SDLDidReceiveReadDIDResponse, SDLDidReceiveRegisterAppInterfaceResponse, + SDLDidReceiveReleaseInteriorVehicleDataModuleResponse, SDLDidReceiveResetGlobalPropertiesResponse, SDLDidReceiveScrollableMessageResponse, SDLDidReceiveSendHapticDataResponse, diff --git a/SmartDeviceLink/SDLNotificationDispatcher.m b/SmartDeviceLink/SDLNotificationDispatcher.m index 5398eb7e1..e6115d61c 100644 --- a/SmartDeviceLink/SDLNotificationDispatcher.m +++ b/SmartDeviceLink/SDLNotificationDispatcher.m @@ -191,6 +191,10 @@ NS_ASSUME_NONNULL_BEGIN [self postRPCResponseNotification:SDLDidReceiveGetInteriorVehicleDataResponse response:response]; } +- (void)onGetInteriorVehicleDataConsentResponse:(SDLGetInteriorVehicleDataConsentResponse *)response { + [self postRPCResponseNotification:SDLDidReceiveGetInteriorVehicleDataConsentResponse response:response]; +} + - (void)onGetSystemCapabilityResponse:(SDLGetSystemCapabilityResponse *)response { [self postRPCResponseNotification:SDLDidReceiveGetSystemCapabilitiesResponse response:response]; } @@ -235,6 +239,10 @@ NS_ASSUME_NONNULL_BEGIN [self postRPCResponseNotification:SDLDidReceiveRegisterAppInterfaceResponse response:response]; } +- (void)onReleaseInteriorVehicleDataModuleResponse:(SDLReleaseInteriorVehicleDataModuleResponse *)response { + [self postRPCResponseNotification:SDLDidReceiveReleaseInteriorVehicleDataModuleResponse response:response]; +} + - (void)onResetGlobalPropertiesResponse:(SDLResetGlobalPropertiesResponse *)response { [self postRPCResponseNotification:SDLDidReceiveResetGlobalPropertiesResponse response:response]; } @@ -429,6 +437,10 @@ NS_ASSUME_NONNULL_BEGIN [self postRPCRequestNotification:SDLDidReceiveGetInteriorVehicleDataRequest request:request]; } +- (void)onGetInteriorVehicleDataConsent:(SDLGetInteriorVehicleDataConsent *)request { + [self postRPCRequestNotification:SDLDidReceiveGetInteriorVehicleDataConsentRequest request:request]; +} + - (void)onGetSystemCapability:(SDLGetSystemCapability *)request { [self postRPCRequestNotification:SDLDidReceiveGetSystemCapabilityRequest request:request]; } @@ -473,6 +485,10 @@ NS_ASSUME_NONNULL_BEGIN [self postRPCRequestNotification:SDLDidReceiveRegisterAppInterfaceRequest request:request]; } +- (void)onReleaseInteriorVehicleDataModule:(SDLReleaseInteriorVehicleDataModule *)request { + [self postRPCRequestNotification:SDLDidReceiveReleaseInteriorVehicleDataModuleRequest request:request]; +} + - (void)onResetGlobalProperties:(SDLResetGlobalProperties *)request { [self postRPCRequestNotification:SDLDidReceiveResetGlobalPropertiesRequest request:request]; } diff --git a/SmartDeviceLink/SDLProxyListener.h b/SmartDeviceLink/SDLProxyListener.h index 624242125..ebdbddeff 100644 --- a/SmartDeviceLink/SDLProxyListener.h +++ b/SmartDeviceLink/SDLProxyListener.h @@ -50,6 +50,8 @@ @class SDLGetFileResponse; @class SDLGetInteriorVehicleData; @class SDLGetInteriorVehicleDataResponse; +@class SDLGetInteriorVehicleDataConsent; +@class SDLGetInteriorVehicleDataConsentResponse; @class SDLGetSystemCapability; @class SDLGetSystemCapabilityResponse; @class SDLGetVehicleData; @@ -95,6 +97,8 @@ @class SDLReadDIDResponse; @class SDLRegisterAppInterface; @class SDLRegisterAppInterfaceResponse; +@class SDLReleaseInteriorVehicleDataModule; +@class SDLReleaseInteriorVehicleDataModuleResponse; @class SDLResetGlobalProperties; @class SDLResetGlobalPropertiesResponse; @class SDLScrollableMessage; @@ -348,6 +352,13 @@ NS_ASSUME_NONNULL_BEGIN - (void)onGetInteriorVehicleDataResponse:(SDLGetInteriorVehicleDataResponse *)response; /** + * Called when a Get Interior Vehicle Data Consent Response is received from Core + * + * @param response A SDLGetInteriorVehicleDataConsentResponse object + */ +- (void)onGetInteriorVehicleDataConsentResponse:(SDLGetInteriorVehicleDataConsentResponse *)response; + +/** * Called when a Get System Capability Response is received from Core * * @param response A SDLGetSystemCapabilityResponse object @@ -432,6 +443,13 @@ NS_ASSUME_NONNULL_BEGIN - (void)onRegisterAppInterfaceResponse:(SDLRegisterAppInterfaceResponse *)response; /** + * Called when a Release Interior Vehicle Data Module Response is received from Core + * + * @param response A SDLReleaseInteriorVehicleDataModuleResponse object + */ +- (void)onReleaseInteriorVehicleDataModuleResponse:(SDLReleaseInteriorVehicleDataModuleResponse *)response; + +/** * Called when a Reset Global Properties Response is received from Core * * @param response A SDLResetGlobalPropertiesResponse object @@ -770,6 +788,13 @@ NS_ASSUME_NONNULL_BEGIN - (void)onGetInteriorVehicleData:(SDLGetInteriorVehicleData *)request; /** + * Called when a `GetInteriorVehicleDataConsent` request is received from Core + * + * @param request A SDLGetInteriorVehicleDataConsent object + */ +- (void)onGetInteriorVehicleConsentData:(SDLGetInteriorVehicleDataConsent *)request; + +/** * Called when a `GetSystemCapability` request is received from Core * * @param request A SDLGetSystemCapability object @@ -847,6 +872,13 @@ NS_ASSUME_NONNULL_BEGIN - (void)onRegisterAppInterface:(SDLRegisterAppInterface *)request; /** + * Called when a `ReleaseInteriorVehicleDataModule` request is received from Core + * + * @param request A SDLReleaseInteriorVehicleDataModule object + */ +- (void)onReleaseInteriorVehicleDataModule:(SDLReleaseInteriorVehicleDataModule *)request; + +/** * Called when a `ResetGlobalProperties` request is received from Core * * @param request A SDLResetGlobalProperties object diff --git a/SmartDeviceLink/SDLRPCFunctionNames.h b/SmartDeviceLink/SDLRPCFunctionNames.h index 53658017b..8cb138cf9 100644 --- a/SmartDeviceLink/SDLRPCFunctionNames.h +++ b/SmartDeviceLink/SDLRPCFunctionNames.h @@ -35,6 +35,7 @@ extern SDLRPCFunctionName const SDLRPCFunctionNameGetDTCs; extern SDLRPCFunctionName const SDLRPCFunctionNameGetFile; extern SDLRPCFunctionName const SDLRPCFunctionNameGetCloudAppProperties; extern SDLRPCFunctionName const SDLRPCFunctionNameGetInteriorVehicleData; +extern SDLRPCFunctionName const SDLRPCFunctionNameGetInteriorVehicleDataConsent; extern SDLRPCFunctionName const SDLRPCFunctionNameGetSystemCapability; extern SDLRPCFunctionName const SDLRPCFunctionNameGetVehicleData; extern SDLRPCFunctionName const SDLRPCFunctionNameGetWayPoints; @@ -68,6 +69,7 @@ extern SDLRPCFunctionName const SDLRPCFunctionNamePerformInteraction; extern SDLRPCFunctionName const SDLRPCFunctionNamePublishAppService; extern SDLRPCFunctionName const SDLRPCFunctionNamePutFile; extern SDLRPCFunctionName const SDLRPCFunctionNameReadDID; +extern SDLRPCFunctionName const SDLRPCFunctionNameReleaseInteriorVehicleDataModule; extern SDLRPCFunctionName const SDLRPCFunctionNameRegisterAppInterface; extern SDLRPCFunctionName const SDLRPCFunctionNameReserved; extern SDLRPCFunctionName const SDLRPCFunctionNameResetGlobalProperties; diff --git a/SmartDeviceLink/SDLRPCFunctionNames.m b/SmartDeviceLink/SDLRPCFunctionNames.m index acb426970..5063716a8 100644 --- a/SmartDeviceLink/SDLRPCFunctionNames.m +++ b/SmartDeviceLink/SDLRPCFunctionNames.m @@ -30,6 +30,7 @@ SDLRPCFunctionName const SDLRPCFunctionNameGetDTCs = @"GetDTCs"; SDLRPCFunctionName const SDLRPCFunctionNameGetFile = @"GetFile"; SDLRPCFunctionName const SDLRPCFunctionNameGetCloudAppProperties = @"GetCloudAppProperties"; SDLRPCFunctionName const SDLRPCFunctionNameGetInteriorVehicleData = @"GetInteriorVehicleData"; +SDLRPCFunctionName const SDLRPCFunctionNameGetInteriorVehicleDataConsent = @"GetInteriorVehicleDataConsent"; SDLRPCFunctionName const SDLRPCFunctionNameGetSystemCapability = @"GetSystemCapability"; SDLRPCFunctionName const SDLRPCFunctionNameGetVehicleData = @"GetVehicleData"; SDLRPCFunctionName const SDLRPCFunctionNameGetWayPoints = @"GetWayPoints"; @@ -63,6 +64,7 @@ SDLRPCFunctionName const SDLRPCFunctionNamePerformInteraction = @"PerformInterac SDLRPCFunctionName const SDLRPCFunctionNamePublishAppService = @"PublishAppService"; SDLRPCFunctionName const SDLRPCFunctionNamePutFile = @"PutFile"; SDLRPCFunctionName const SDLRPCFunctionNameReadDID = @"ReadDID"; +SDLRPCFunctionName const SDLRPCFunctionNameReleaseInteriorVehicleDataModule = @"ReleaseInteriorVehicleDataModule"; SDLRPCFunctionName const SDLRPCFunctionNameRegisterAppInterface = @"RegisterAppInterface"; SDLRPCFunctionName const SDLRPCFunctionNameReserved = @"reserved"; SDLRPCFunctionName const SDLRPCFunctionNameResetGlobalProperties = @"ResetGlobalProperties"; diff --git a/SmartDeviceLink/SDLRPCParameterNames.h b/SmartDeviceLink/SDLRPCParameterNames.h index c579c4ad1..0e127c363 100644 --- a/SmartDeviceLink/SDLRPCParameterNames.h +++ b/SmartDeviceLink/SDLRPCParameterNames.h @@ -29,6 +29,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameAlignment; extern SDLRPCParameterName const SDLRPCParameterNameAllocatedModules; extern SDLRPCParameterName const SDLRPCParameterNameAllowAppConsumers; extern SDLRPCParameterName const SDLRPCParameterNameAllowed; +extern SDLRPCParameterName const SDLRPCParameterNameAllowMultipleAccess; extern SDLRPCParameterName const SDLRPCParameterNameAltitude; extern SDLRPCParameterName const SDLRPCParameterNameAltitudeMeters; extern SDLRPCParameterName const SDLRPCParameterNameAmbientLightSensorStatus; @@ -86,6 +87,9 @@ extern SDLRPCParameterName const SDLRPCParameterNameButtonEventMode; extern SDLRPCParameterName const SDLRPCParameterNameButtonName; extern SDLRPCParameterName const SDLRPCParameterNameButtonPressMode; extern SDLRPCParameterName const SDLRPCParameterNameColor; +extern SDLRPCParameterName const SDLRPCParameterNameCol; +extern SDLRPCParameterName const SDLRPCParameterNameColSpan; +extern SDLRPCParameterName const SDLRPCParameterNameColumns; extern SDLRPCParameterName const SDLRPCParameterNameCoolingEnabled; extern SDLRPCParameterName const SDLRPCParameterNameCoolingEnabledAvailable; extern SDLRPCParameterName const SDLRPCParameterNameCoolingLevel; @@ -219,6 +223,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameGPS; extern SDLRPCParameterName const SDLRPCParameterNameGraphic; extern SDLRPCParameterName const SDLRPCParameterNameGraphicSupported; extern SDLRPCParameterName const SDLRPCParameterNameGreen; +extern SDLRPCParameterName const SDLRPCParameterNameGrid; extern SDLRPCParameterName const SDLRPCParameterNameHandledRPCs; extern SDLRPCParameterName const SDLRPCParameterNameHapticRectData; extern SDLRPCParameterName const SDLRPCParameterNameHapticSpatialDataSupported; @@ -309,6 +314,9 @@ extern SDLRPCParameterName const SDLRPCParameterNameLeftRearInflatableBelted; extern SDLRPCParameterName const SDLRPCParameterNameLeftRow2BuckleBelted; extern SDLRPCParameterName const SDLRPCParameterNameLeftRow3BuckleBelted; extern SDLRPCParameterName const SDLRPCParameterNameLength; +extern SDLRPCParameterName const SDLRPCParameterNameLevel; +extern SDLRPCParameterName const SDLRPCParameterNameLevels; +extern SDLRPCParameterName const SDLRPCParameterNameLevelSpan; extern SDLRPCParameterName const SDLRPCParameterNameLightControlCapabilities; extern SDLRPCParameterName const SDLRPCParameterNameLightControlData; extern SDLRPCParameterName const SDLRPCParameterNameLightState; @@ -385,6 +393,9 @@ extern SDLRPCParameterName const SDLRPCParameterNameMinuteForecast; extern SDLRPCParameterName const SDLRPCParameterNameMinutes; extern SDLRPCParameterName const SDLRPCParameterNameModel; extern SDLRPCParameterName const SDLRPCParameterNameModuleData; +extern SDLRPCParameterName const SDLRPCParameterNameModuleId; +extern SDLRPCParameterName const SDLRPCParameterNameModuleIds; +extern SDLRPCParameterName const SDLRPCParameterNameModuleInfo; extern SDLRPCParameterName const SDLRPCParameterNameModuleName; extern SDLRPCParameterName const SDLRPCParameterNameModuleType; extern SDLRPCParameterName const SDLRPCParameterNameModelYear; @@ -511,7 +522,9 @@ extern SDLRPCParameterName const SDLRPCParameterNameRightRearInflatableBelted; extern SDLRPCParameterName const SDLRPCParameterNameRightRow2BuckleBelted; extern SDLRPCParameterName const SDLRPCParameterNameRightRow3BuckleBelted; extern SDLRPCParameterName const SDLRPCParameterNameRolloverEvent; +extern SDLRPCParameterName const SDLRPCParameterNameRow; extern SDLRPCParameterName const SDLRPCParameterNameRows; +extern SDLRPCParameterName const SDLRPCParameterNameRowSpan; extern SDLRPCParameterName const SDLRPCParameterNameRPCName; extern SDLRPCParameterName const SDLRPCParameterNameRPCSpecVersion; extern SDLRPCParameterName const SDLRPCParameterNameRPM; @@ -524,6 +537,8 @@ extern SDLRPCParameterName const SDLRPCParameterNameSDLVersion; extern SDLRPCParameterName const SDLRPCParameterNameSearchAddress; extern SDLRPCParameterName const SDLRPCParameterNameSeatControlData; extern SDLRPCParameterName const SDLRPCParameterNameSeatControlCapabilities; +extern SDLRPCParameterName const SDLRPCParameterNameSeatLocationCapability; +extern SDLRPCParameterName const SDLRPCParameterNameSeats; extern SDLRPCParameterName const SDLRPCParameterNameSecondaryColor; extern SDLRPCParameterName const SDLRPCParameterNameSecondaryGraphic; extern SDLRPCParameterName const SDLRPCParameterNameSecondaryImage; @@ -532,6 +547,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameSecond; extern SDLRPCParameterName const SDLRPCParameterNameSeconds; extern SDLRPCParameterName const SDLRPCParameterNameSendLocationEnabled; extern SDLRPCParameterName const SDLRPCParameterNameServiceActive; +extern SDLRPCParameterName const SDLRPCParameterNameServiceArea; extern SDLRPCParameterName const SDLRPCParameterNameServiceData; extern SDLRPCParameterName const SDLRPCParameterNameServiceIcon; extern SDLRPCParameterName const SDLRPCParameterNameServiceID; @@ -648,6 +664,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameUpDownAvailable; extern SDLRPCParameterName const SDLRPCParameterNameURL; extern SDLRPCParameterName const SDLRPCParameterNameURLUppercase; extern SDLRPCParameterName const SDLRPCParameterNameUserDisallowed; +extern SDLRPCParameterName const SDLRPCParameterNameUserLocation; extern SDLRPCParameterName const SDLRPCParameterNameUserSelected; extern SDLRPCParameterName const SDLRPCParameterNameUTCDay; extern SDLRPCParameterName const SDLRPCParameterNameUTCHours; diff --git a/SmartDeviceLink/SDLRPCParameterNames.m b/SmartDeviceLink/SDLRPCParameterNames.m index 6472b1f93..2c562168f 100644 --- a/SmartDeviceLink/SDLRPCParameterNames.m +++ b/SmartDeviceLink/SDLRPCParameterNames.m @@ -26,6 +26,7 @@ SDLRPCParameterName const SDLRPCParameterNameAlertText3 = @"alertText3"; SDLRPCParameterName const SDLRPCParameterNameAlignment = @"alignment"; SDLRPCParameterName const SDLRPCParameterNameAllowAppConsumers = @"allowAppConsumers"; SDLRPCParameterName const SDLRPCParameterNameAllowed = @"allowed"; +SDLRPCParameterName const SDLRPCParameterNameAllowMultipleAccess = @"allowMultipleAccess"; SDLRPCParameterName const SDLRPCParameterNameAllocatedModules = @"allocatedModules"; SDLRPCParameterName const SDLRPCParameterNameAltitude = @"altitude"; SDLRPCParameterName const SDLRPCParameterNameAltitudeMeters = @"altitudeMeters"; @@ -105,6 +106,9 @@ SDLRPCParameterName const SDLRPCParameterNameCloudCover = @"cloudCover"; SDLRPCParameterName const SDLRPCParameterNameClusterModes = @"clusterModes"; SDLRPCParameterName const SDLRPCParameterNameClusterModeStatus = @"clusterModeStatus"; SDLRPCParameterName const SDLRPCParameterNameColor = @"color"; +SDLRPCParameterName const SDLRPCParameterNameCol = @"col"; +SDLRPCParameterName const SDLRPCParameterNameColSpan = @"colspan"; +SDLRPCParameterName const SDLRPCParameterNameColumns = @"columns"; SDLRPCParameterName const SDLRPCParameterNameCommandIcon = @"cmdIcon"; SDLRPCParameterName const SDLRPCParameterNameCommandId = @"cmdID"; SDLRPCParameterName const SDLRPCParameterNameCompassDirection = @"compassDirection"; @@ -215,6 +219,7 @@ SDLRPCParameterName const SDLRPCParameterNameGPS = @"gps"; SDLRPCParameterName const SDLRPCParameterNameGraphic = @"graphic"; SDLRPCParameterName const SDLRPCParameterNameGraphicSupported = @"graphicSupported"; SDLRPCParameterName const SDLRPCParameterNameGreen = @"green"; +SDLRPCParameterName const SDLRPCParameterNameGrid = @"grid"; SDLRPCParameterName const SDLRPCParameterNameHandledRPCs = @"handledRPCs"; SDLRPCParameterName const SDLRPCParameterNameHapticRectData = @"hapticRectData"; SDLRPCParameterName const SDLRPCParameterNameHapticSpatialDataSupported = @"hapticSpatialDataSupported"; @@ -306,6 +311,9 @@ SDLRPCParameterName const SDLRPCParameterNameLeftRearInflatableBelted = @"leftRe SDLRPCParameterName const SDLRPCParameterNameLeftRow2BuckleBelted = @"leftRow2BuckleBelted"; SDLRPCParameterName const SDLRPCParameterNameLeftRow3BuckleBelted = @"leftRow3BuckleBelted"; SDLRPCParameterName const SDLRPCParameterNameLength = @"length"; +SDLRPCParameterName const SDLRPCParameterNameLevel = @"level"; +SDLRPCParameterName const SDLRPCParameterNameLevels = @"levels"; +SDLRPCParameterName const SDLRPCParameterNameLevelSpan = @"levelspan"; SDLRPCParameterName const SDLRPCParameterNameLightControlCapabilities = @"lightControlCapabilities"; SDLRPCParameterName const SDLRPCParameterNameLightControlData = @"lightControlData"; SDLRPCParameterName const SDLRPCParameterNameLightState = @"lightState"; @@ -378,6 +386,9 @@ SDLRPCParameterName const SDLRPCParameterNameMinuteForecast = @"minuteForecast"; SDLRPCParameterName const SDLRPCParameterNameMinutes = @"minutes"; SDLRPCParameterName const SDLRPCParameterNameModel = @"model"; SDLRPCParameterName const SDLRPCParameterNameModuleData = @"moduleData"; +SDLRPCParameterName const SDLRPCParameterNameModuleId = @"moduleId"; +SDLRPCParameterName const SDLRPCParameterNameModuleIds = @"moduleIds"; +SDLRPCParameterName const SDLRPCParameterNameModuleInfo = @"moduleInfo"; SDLRPCParameterName const SDLRPCParameterNameModuleName = @"moduleName"; SDLRPCParameterName const SDLRPCParameterNameModuleType = @"moduleType"; SDLRPCParameterName const SDLRPCParameterNameModelYear = @"modelYear"; @@ -506,7 +517,9 @@ SDLRPCParameterName const SDLRPCParameterNameRightRearInflatableBelted = @"right SDLRPCParameterName const SDLRPCParameterNameRightRow2BuckleBelted = @"rightRow2BuckleBelted"; SDLRPCParameterName const SDLRPCParameterNameRightRow3BuckleBelted = @"rightRow3BuckleBelted"; SDLRPCParameterName const SDLRPCParameterNameRolloverEvent = @"rolloverEvent"; +SDLRPCParameterName const SDLRPCParameterNameRow = @"row"; SDLRPCParameterName const SDLRPCParameterNameRows = @"rows"; +SDLRPCParameterName const SDLRPCParameterNameRowSpan = @"rowspan"; SDLRPCParameterName const SDLRPCParameterNameRPCName = @"rpcName"; SDLRPCParameterName const SDLRPCParameterNameRPCSpecVersion = @"rpcSpecVersion"; SDLRPCParameterName const SDLRPCParameterNameRPM = @"rpm"; @@ -519,6 +532,8 @@ SDLRPCParameterName const SDLRPCParameterNameSDLVersion = @"sdlVersion"; SDLRPCParameterName const SDLRPCParameterNameSearchAddress = @"searchAddress"; SDLRPCParameterName const SDLRPCParameterNameSeatControlData = @"seatControlData"; SDLRPCParameterName const SDLRPCParameterNameSeatControlCapabilities = @"seatControlCapabilities"; +SDLRPCParameterName const SDLRPCParameterNameSeatLocationCapability = @"seatLocationCapability"; +SDLRPCParameterName const SDLRPCParameterNameSeats = @"seats"; SDLRPCParameterName const SDLRPCParameterNameSecondaryGraphic = @"secondaryGraphic"; SDLRPCParameterName const SDLRPCParameterNameSecondaryImage = @"secondaryImage"; SDLRPCParameterName const SDLRPCParameterNameSecondaryText = @"secondaryText"; @@ -526,6 +541,7 @@ SDLRPCParameterName const SDLRPCParameterNameSecond = @"second"; SDLRPCParameterName const SDLRPCParameterNameSeconds = @"seconds"; SDLRPCParameterName const SDLRPCParameterNameSendLocationEnabled = @"sendLocationEnabled"; SDLRPCParameterName const SDLRPCParameterNameServiceActive = @"serviceActive"; +SDLRPCParameterName const SDLRPCParameterNameServiceArea = @"serviceArea"; SDLRPCParameterName const SDLRPCParameterNameServiceData = @"serviceData"; SDLRPCParameterName const SDLRPCParameterNameServiceIcon = @"serviceIcon"; SDLRPCParameterName const SDLRPCParameterNameServiceID = @"serviceID"; @@ -643,6 +659,7 @@ SDLRPCParameterName const SDLRPCParameterNameUpDownAvailable = @"upDownAvailable SDLRPCParameterName const SDLRPCParameterNameURL = @"url"; SDLRPCParameterName const SDLRPCParameterNameURLUppercase = @"URL"; SDLRPCParameterName const SDLRPCParameterNameUserDisallowed = @"userDisallowed"; +SDLRPCParameterName const SDLRPCParameterNameUserLocation = @"userLocation"; SDLRPCParameterName const SDLRPCParameterNameUserSelected = @"userSelected"; SDLRPCParameterName const SDLRPCParameterNameUTCDay = @"utcDay"; SDLRPCParameterName const SDLRPCParameterNameUTCHours = @"utcHours"; diff --git a/SmartDeviceLink/SDLRadioControlCapabilities.h b/SmartDeviceLink/SDLRadioControlCapabilities.h index 2552e406f..0c35df16f 100644 --- a/SmartDeviceLink/SDLRadioControlCapabilities.h +++ b/SmartDeviceLink/SDLRadioControlCapabilities.h @@ -3,6 +3,7 @@ // #import "SDLRPCMessage.h" +#import "SDLModuleInfo.h" NS_ASSUME_NONNULL_BEGIN @@ -37,7 +38,7 @@ NS_ASSUME_NONNULL_BEGIN @param radioFrequencyAvailable Availability of the control of radio frequency. @param hdChannelAvailable Availability of the control of HD radio channel. @param rdsDataAvailable Availability of the getting Radio Data System (RDS) data. - @param availableHDChannelsAvailable Availability of the list of available HD sub-channel indexes. + @param availableHDsAvailable Availability of the getting the number of available HD channels. @param stateAvailable Availability of the getting the Radio state. @param signalStrengthAvailable Availability of the getting the signal strength. @param signalChangeThresholdAvailable Availability of the getting the signal Change Threshold. @@ -46,18 +47,39 @@ NS_ASSUME_NONNULL_BEGIN @param sisDataAvailable Availability of sis data. @return An instance of the SDLRadioControlCapabilities class */ -- (instancetype)initWithModuleName:(NSString *)moduleName radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDChannelsAvailable:(BOOL)availableHDChannelsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable; +- (instancetype)initWithModuleName:(NSString *)moduleName radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDsAvailable:(BOOL)availableHDsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable __deprecated_msg(("Use initWithModuleName:moduleName:radioEnableAvailable radioFrequencyAvailable:hdChannelAvailable:rdsDataAvailable:availableHDChannelsAvailable:stateAvailable:signalStrengthAvailable:signalChangeThresholdAvailable:hdRadioEnableAvailable:siriusXMRadioAvailable:sisDataAvailable: instead")); /** Constructs a newly allocated SDLRadioControlCapabilities object with given parameters. + + @param moduleName The short friendly name of the radio control module. + @param radioEnableAvailable Availability of the control of enable/disable radio. + @param radioBandAvailable Availability of the control of radio band. + @param radioFrequencyAvailable Availability of the control of radio frequency. + @param hdChannelAvailable Availability of the control of HD radio channel. + @param rdsDataAvailable Availability of the getting Radio Data System (RDS) data. + @param availableHDChannelsAvailable Availability of the list of available HD sub-channel indexes. + @param stateAvailable Availability of the getting the Radio state. + @param signalStrengthAvailable Availability of the getting the signal strength. + @param signalChangeThresholdAvailable Availability of the getting the signal Change Threshold. + @param hdRadioEnableAvailable Availability of the control of enable/disable HD radio. + @param siriusXMRadioAvailable Availability of sirius XM radio. + @param sisDataAvailable Availability of sis data. + @return An instance of the SDLRadioControlCapabilities class + */ +- (instancetype)initWithModuleName:(NSString *)moduleName radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDChannelsAvailable:(BOOL)availableHDChannelsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable __deprecated_msg(("Use initWithModuleName:moduleName:moduleInfo:radioEnableAvailable radioFrequencyAvailable:hdChannelAvailable:rdsDataAvailable:availableHDChannelsAvailable:stateAvailable:signalStrengthAvailable:signalChangeThresholdAvailable:hdRadioEnableAvailable:siriusXMRadioAvailable:sisDataAvailable: instead")); +/** + Constructs a newly allocated SDLRadioControlCapabilities object with given parameters. + @param moduleName The short friendly name of the radio control module. + @param moduleInfo Information about a RC module, including its id. @param radioEnableAvailable Availability of the control of enable/disable radio. @param radioBandAvailable Availability of the control of radio band. @param radioFrequencyAvailable Availability of the control of radio frequency. @param hdChannelAvailable Availability of the control of HD radio channel. @param rdsDataAvailable Availability of the getting Radio Data System (RDS) data. - @param availableHDsAvailable Availability of the getting the number of available HD channels. + @param availableHDChannelsAvailable Availability of the list of available HD sub-channel indexes. @param stateAvailable Availability of the getting the Radio state. @param signalStrengthAvailable Availability of the getting the signal strength. @param signalChangeThresholdAvailable Availability of the getting the signal Change Threshold. @@ -66,7 +88,7 @@ NS_ASSUME_NONNULL_BEGIN @param sisDataAvailable Availability of sis data. @return An instance of the SDLRadioControlCapabilities class */ -- (instancetype)initWithModuleName:(NSString *)moduleName radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDsAvailable:(BOOL)availableHDsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable __deprecated_msg(("Use initWithModuleName:moduleName:radioEnableAvailable radioFrequencyAvailable:hdChannelAvailable:rdsDataAvailable:availableHDChannelsAvailable:stateAvailable:signalStrengthAvailable:signalChangeThresholdAvailable:hdRadioEnableAvailable:siriusXMRadioAvailable:sisDataAvailable: instead")); +- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDChannelsAvailable:(BOOL)availableHDChannelsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable; /** * The short friendly name of the radio control module. @@ -191,6 +213,13 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nullable, strong, nonatomic) NSNumber<SDLBool> *sisDataAvailable; +/** + * Information about a RC module, including its id. + * + * SDLModuleInfo + */ +@property (nullable, strong, nonatomic) SDLModuleInfo *moduleInfo; + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLRadioControlCapabilities.m b/SmartDeviceLink/SDLRadioControlCapabilities.m index 7846ff267..921e2e651 100644 --- a/SmartDeviceLink/SDLRadioControlCapabilities.m +++ b/SmartDeviceLink/SDLRadioControlCapabilities.m @@ -14,6 +14,29 @@ NS_ASSUME_NONNULL_BEGIN return [self initWithModuleName:moduleName radioEnableAvailable:radioEnableAvailable radioBandAvailable:radioBandAvailable radioFrequencyAvailable:radioFrequencyAvailable hdChannelAvailable:hdChannelAvailable rdsDataAvailable:rdsDataAvailable availableHDsAvailable:availableHDsAvailable stateAvailable:stateAvailable signalStrengthAvailable:signalStrengthAvailable signalChangeThresholdAvailable:signalChangeThresholdAvailable hdRadioEnableAvailable:NO siriusXMRadioAvailable:NO sisDataAvailable:NO]; } +- (instancetype)initWithModuleName:(NSString *)moduleName radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDsAvailable:(BOOL)availableHDsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable { + self = [self init]; + if(!self){ + return nil; + } + + self.moduleName = moduleName; + self.radioEnableAvailable = @(radioEnableAvailable); + self.radioBandAvailable = @(radioBandAvailable); + self.radioFrequencyAvailable = @(radioFrequencyAvailable); + self.hdChannelAvailable = @(hdChannelAvailable); + self.rdsDataAvailable = @(rdsDataAvailable); + self.availableHDsAvailable = @(availableHDsAvailable); + self.stateAvailable = @(stateAvailable); + self.signalStrengthAvailable = @(signalStrengthAvailable); + self.signalChangeThresholdAvailable = @(signalChangeThresholdAvailable); + self.hdRadioEnableAvailable = @(hdRadioEnableAvailable); + self.siriusXMRadioAvailable = @(siriusXMRadioAvailable); + self.sisDataAvailable = @(sisDataAvailable); + + return self; +} + - (instancetype)initWithModuleName:(NSString *)moduleName radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDChannelsAvailable:(BOOL)availableHDChannelsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable { self = [self init]; if(!self){ @@ -37,26 +60,27 @@ NS_ASSUME_NONNULL_BEGIN return self; } -- (instancetype)initWithModuleName:(NSString *)moduleName radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDsAvailable:(BOOL)availableHDsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable { +- (instancetype)initWithModuleName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo radioEnableAvailable:(BOOL)radioEnableAvailable radioBandAvailable:(BOOL)radioBandAvailable radioFrequencyAvailable:(BOOL)radioFrequencyAvailable hdChannelAvailable:(BOOL)hdChannelAvailable rdsDataAvailable:(BOOL)rdsDataAvailable availableHDChannelsAvailable:(BOOL)availableHDChannelsAvailable stateAvailable:(BOOL)stateAvailable signalStrengthAvailable:(BOOL)signalStrengthAvailable signalChangeThresholdAvailable:(BOOL)signalChangeThresholdAvailable hdRadioEnableAvailable:(BOOL)hdRadioEnableAvailable siriusXMRadioAvailable:(BOOL)siriusXMRadioAvailable sisDataAvailable:(BOOL)sisDataAvailable { self = [self init]; if(!self){ return nil; } - + self.moduleName = moduleName; + self.moduleInfo = moduleInfo; self.radioEnableAvailable = @(radioEnableAvailable); self.radioBandAvailable = @(radioBandAvailable); self.radioFrequencyAvailable = @(radioFrequencyAvailable); self.hdChannelAvailable = @(hdChannelAvailable); self.rdsDataAvailable = @(rdsDataAvailable); - self.availableHDsAvailable = @(availableHDsAvailable); + self.availableHDChannelsAvailable = @(availableHDChannelsAvailable); self.stateAvailable = @(stateAvailable); self.signalStrengthAvailable = @(signalStrengthAvailable); self.signalChangeThresholdAvailable = @(signalChangeThresholdAvailable); self.hdRadioEnableAvailable = @(hdRadioEnableAvailable); self.siriusXMRadioAvailable = @(siriusXMRadioAvailable); self.sisDataAvailable = @(sisDataAvailable); - + return self; } @@ -173,6 +197,14 @@ NS_ASSUME_NONNULL_BEGIN return [self.store sdl_objectForName:SDLRPCParameterNameSISDataAvailable ofClass:NSNumber.class error:nil]; } +- (void)setModuleInfo:(nullable SDLModuleInfo *)moduleInfo { + [self.store sdl_setObject:moduleInfo forName:SDLRPCParameterNameModuleInfo]; +} + +- (nullable SDLModuleInfo *)moduleInfo { + return [self.store sdl_objectForName:SDLRPCParameterNameModuleInfo ofClass:SDLModuleInfo.class error:nil]; +} + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.h b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.h new file mode 100644 index 000000000..e8d946244 --- /dev/null +++ b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.h @@ -0,0 +1,34 @@ +// +// SDLReleaseInteriorVehicleDataModule.h +// SmartDeviceLink +// +// Created by standa1 on 7/25/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLRPCRequest.h" +#import "SDLModuleType.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface SDLReleaseInteriorVehicleDataModule : SDLRPCRequest + +- (instancetype)initWithModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId; + +/** + * The module type that the app requests to control. + * + * Required + */ +@property (strong, nonatomic) SDLModuleType moduleType; + +/** + * Id of a module, published by System Capability. + * + * Optional + */ +@property (strong, nonatomic, nullable) NSString *moduleId; + +@end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.m b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.m new file mode 100644 index 000000000..b28247963 --- /dev/null +++ b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModule.m @@ -0,0 +1,56 @@ +// +// SDLReleaseInteriorVehicleDataModule.m +// SmartDeviceLink +// +// Created by standa1 on 7/25/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLReleaseInteriorVehicleDataModule.h" + +#import "NSMutableDictionary+Store.h" +#import "SDLRPCParameterNames.h" +#import "SDLRPCFunctionNames.h" + +@implementation SDLReleaseInteriorVehicleDataModule + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +- (instancetype)init { + if (self = [super initWithName:SDLRPCFunctionNameReleaseInteriorVehicleDataModule]) { + } + return self; +} +#pragma clang diagnostic pop + +- (instancetype)initWithModuleType:(SDLModuleType)moduleType moduleId:(NSString *)moduleId { + self = [self init]; + if (!self) { + return nil; + } + + self.moduleType = moduleType; + self.moduleId = moduleId; + + return self; +} + +- (void)setModuleType:(SDLModuleType)moduleType { + [self.parameters sdl_setObject:moduleType forName:SDLRPCParameterNameModuleType]; +} + +- (SDLModuleType)moduleType { + NSError *error = nil; + return [self.parameters sdl_enumForName:SDLRPCParameterNameModuleType error:&error]; +} + +- (void)setModuleId:(nullable NSString *)moduleId { + [self.parameters sdl_setObject:moduleId forName:SDLRPCParameterNameModuleId]; +} + +- (nullable NSString *)moduleId { + NSError *error = nil; + return [self.parameters sdl_objectForName:SDLRPCParameterNameModuleId ofClass:NSString.class error:&error]; +} + +@end diff --git a/SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.h b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.h new file mode 100644 index 000000000..650f4b107 --- /dev/null +++ b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.h @@ -0,0 +1,17 @@ +// +// SDLReleaseInteriorVehicleDataModuleResponse.h +// SmartDeviceLink +// +// Created by standa1 on 7/25/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLRPCResponse.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface SDLReleaseInteriorVehicleDataModuleResponse : SDLRPCResponse + +@end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.m b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.m new file mode 100644 index 000000000..9013d23c1 --- /dev/null +++ b/SmartDeviceLink/SDLReleaseInteriorVehicleDataModuleResponse.m @@ -0,0 +1,23 @@ +// +// SDLReleaseInteriorVehicleDataModuleResponse.m +// SmartDeviceLink +// +// Created by standa1 on 7/25/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLReleaseInteriorVehicleDataModuleResponse.h" +#import "SDLRPCFunctionNames.h" + +@implementation SDLReleaseInteriorVehicleDataModuleResponse + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +- (instancetype)init { + if (self = [super initWithName:SDLRPCFunctionNameReleaseInteriorVehicleDataModule]) { + } + return self; +} +#pragma clang diagnostic pop + +@end diff --git a/SmartDeviceLink/SDLSeatControlCapabilities.h b/SmartDeviceLink/SDLSeatControlCapabilities.h index de166d34d..b54287086 100644 --- a/SmartDeviceLink/SDLSeatControlCapabilities.h +++ b/SmartDeviceLink/SDLSeatControlCapabilities.h @@ -3,6 +3,7 @@ #import "SDLRPCStruct.h" +#import "SDLModuleInfo.h" NS_ASSUME_NONNULL_BEGIN @@ -11,10 +12,16 @@ NS_ASSUME_NONNULL_BEGIN */ @interface SDLSeatControlCapabilities : SDLRPCStruct -- (instancetype)initWithName:(NSString *)moduleName; +- (instancetype)initWithName:(NSString *)moduleName __deprecated_msg("Use initWithName:moduleInfo:"); + +- (instancetype)initWithName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo; - (instancetype)initWithName:(NSString *)moduleName heatingEnabledAvailable:(BOOL)heatingEnabledAvail - coolingEnabledAvailable:(BOOL)coolingEnabledAvail heatingLevelAvailable:(BOOL)heatingLevelAvail coolingLevelAvailable:(BOOL)coolingLevelAvail horizontalPositionAvailable:(BOOL)horizontalPositionAvail verticalPositionAvailable:(BOOL)verticalPositionAvail frontVerticalPositionAvailable:(BOOL)frontVerticalPositionAvail backVerticalPositionAvailable:(BOOL)backVerticalPositionAvail backTiltAngleAvailable:(BOOL)backTitlAngleAvail headSupportHorizontalPositionAvailable:(BOOL)headSupportHorizontalPositionAvail headSupportVerticalPositionAvailable:(BOOL)headSupportVerticalPositionAvail massageEnabledAvailable:(BOOL)massageEnabledAvail massageModeAvailable:(BOOL)massageModeAvail massageCushionFirmnessAvailable:(BOOL)massageCushionFirmnessAvail memoryAvailable:(BOOL)memoryAvail; + coolingEnabledAvailable:(BOOL)coolingEnabledAvail heatingLevelAvailable:(BOOL)heatingLevelAvail coolingLevelAvailable:(BOOL)coolingLevelAvail horizontalPositionAvailable:(BOOL)horizontalPositionAvail verticalPositionAvailable:(BOOL)verticalPositionAvail frontVerticalPositionAvailable:(BOOL)frontVerticalPositionAvail backVerticalPositionAvailable:(BOOL)backVerticalPositionAvail backTiltAngleAvailable:(BOOL)backTitlAngleAvail headSupportHorizontalPositionAvailable:(BOOL)headSupportHorizontalPositionAvail headSupportVerticalPositionAvailable:(BOOL)headSupportVerticalPositionAvail massageEnabledAvailable:(BOOL)massageEnabledAvail massageModeAvailable:(BOOL)massageModeAvail massageCushionFirmnessAvailable:(BOOL)massageCushionFirmnessAvail memoryAvailable:(BOOL)memoryAvail __deprecated_msg("Use initWithName:moduleInfo:heatingEnabledAvailable:coolingEnabledAvailable:heatingLevelAvailable:coolingLevelAvailable:horizontalPositionAvailable:verticalPositionAvailable:frontVerticalPositionAvailable:backVerticalPositionAvailable:backTiltAngleAvailable:headSupportHorizontalPositionAvailable:headSupportVerticalPositionAvailable:massageEnabledAvailable:massageModeAvailable:massageCushionFirmnessAvailable:memoryAvailable:"); + +- (instancetype)initWithName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo heatingEnabledAvailable:(BOOL)heatingEnabledAvail + coolingEnabledAvailable:(BOOL)coolingEnabledAvail heatingLevelAvailable:(BOOL)heatingLevelAvail coolingLevelAvailable:(BOOL)coolingLevelAvail horizontalPositionAvailable:(BOOL)horizontalPositionAvail verticalPositionAvailable:(BOOL)verticalPositionAvail frontVerticalPositionAvailable:(BOOL)frontVerticalPositionAvail backVerticalPositionAvailable:(BOOL)backVerticalPositionAvail backTiltAngleAvailable:(BOOL)backTitlAngleAvail headSupportHorizontalPositionAvailable:(BOOL)headSupportHorizontalPositionAvail headSupportVerticalPositionAvailable:(BOOL)headSupportVerticalPositionAvail massageEnabledAvailable:(BOOL)massageEnabledAvail massageModeAvailable:(BOOL)massageModeAvail massageCushionFirmnessAvailable:(BOOL)massageCushionFirmnessAvail memoryAvailable:(BOOL)memoryAvail; + /** * @abstract The short friendly name of the light control module. * It should not be used to identify a module by mobile application. @@ -128,6 +135,12 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nullable, strong, nonatomic) NSNumber<SDLBool> *memoryAvailable; +/** + * @abstract Information about a RC module, including its id. + * + * Optional + */ +@property (nullable, strong, nonatomic) SDLModuleInfo *moduleInfo; @end diff --git a/SmartDeviceLink/SDLSeatControlCapabilities.m b/SmartDeviceLink/SDLSeatControlCapabilities.m index 7aa4c2b5d..248c87db0 100644 --- a/SmartDeviceLink/SDLSeatControlCapabilities.m +++ b/SmartDeviceLink/SDLSeatControlCapabilities.m @@ -16,6 +16,14 @@ NS_ASSUME_NONNULL_BEGIN return self; } +- (instancetype)initWithName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo { + if (self = [super init]) { + self.moduleName = moduleName; + self.moduleInfo = moduleInfo; + } + return self; +} + - (instancetype)initWithName:(NSString *)moduleName heatingEnabledAvailable:(BOOL)heatingEnabledAvail coolingEnabledAvailable:(BOOL)coolingEnabledAvail heatingLevelAvailable:(BOOL)heatingLevelAvail coolingLevelAvailable:(BOOL)coolingLevelAvail horizontalPositionAvailable:(BOOL)horizontalPositionAvail verticalPositionAvailable:(BOOL)verticalPositionAvail frontVerticalPositionAvailable:(BOOL)frontVerticalPositionAvail backVerticalPositionAvailable:(BOOL)backVerticalPositionAvail backTiltAngleAvailable:(BOOL)backTitlAngleAvail headSupportHorizontalPositionAvailable:(BOOL)headSupportHorizontalPositionAvail headSupportVerticalPositionAvailable:(BOOL)headSupportVerticalPositionAvail massageEnabledAvailable:(BOOL)massageEnabledAvail massageModeAvailable:(BOOL)massageModeAvail massageCushionFirmnessAvailable:(BOOL)massageCushionFirmnessAvail memoryAvailable:(BOOL)memoryAvail { self = [super init]; @@ -43,6 +51,35 @@ NS_ASSUME_NONNULL_BEGIN return self; } +- (instancetype)initWithName:(NSString *)moduleName moduleInfo:(nullable SDLModuleInfo *)moduleInfo heatingEnabledAvailable:(BOOL)heatingEnabledAvail + coolingEnabledAvailable:(BOOL)coolingEnabledAvail heatingLevelAvailable:(BOOL)heatingLevelAvail coolingLevelAvailable:(BOOL)coolingLevelAvail horizontalPositionAvailable:(BOOL)horizontalPositionAvail verticalPositionAvailable:(BOOL)verticalPositionAvail frontVerticalPositionAvailable:(BOOL)frontVerticalPositionAvail backVerticalPositionAvailable:(BOOL)backVerticalPositionAvail backTiltAngleAvailable:(BOOL)backTitlAngleAvail headSupportHorizontalPositionAvailable:(BOOL)headSupportHorizontalPositionAvail headSupportVerticalPositionAvailable:(BOOL)headSupportVerticalPositionAvail massageEnabledAvailable:(BOOL)massageEnabledAvail massageModeAvailable:(BOOL)massageModeAvail massageCushionFirmnessAvailable:(BOOL)massageCushionFirmnessAvail memoryAvailable:(BOOL)memoryAvail { + + self = [super init]; + if (!self) { + return nil; + } + + self.moduleName = moduleName; + self.moduleInfo = moduleInfo; + self.heatingEnabledAvailable = @(heatingEnabledAvail); + self.coolingEnabledAvailable = @(coolingEnabledAvail); + self.heatingLevelAvailable = @(heatingLevelAvail); + self.coolingLevelAvailable = @(coolingLevelAvail); + self.horizontalPositionAvailable = @(horizontalPositionAvail); + self.verticalPositionAvailable = @(verticalPositionAvail); + self.frontVerticalPositionAvailable = @(frontVerticalPositionAvail); + self.backVerticalPositionAvailable = @(backVerticalPositionAvail); + self.backTiltAngleAvailable = @(backTitlAngleAvail); + self.headSupportVerticalPositionAvailable = @(headSupportVerticalPositionAvail); + self.headSupportHorizontalPositionAvailable = @(headSupportHorizontalPositionAvail); + self.massageEnabledAvailable = @(massageEnabledAvail); + self.massageModeAvailable = @(massageModeAvail); + self.massageCushionFirmnessAvailable = @(massageCushionFirmnessAvail); + self.memoryAvailable = @(memoryAvail); + + return self; +} + - (void)setModuleName:(NSString *)moduleName { [self.store sdl_setObject:moduleName forName:SDLRPCParameterNameModuleName]; } @@ -199,6 +236,14 @@ NS_ASSUME_NONNULL_BEGIN return [self.store sdl_objectForName:SDLRPCParameterNameMemoryAvailable ofClass:NSNumber.class error:nil]; } +- (void)setModuleInfo:(nullable SDLModuleInfo *)moduleInfo { + [self.store sdl_setObject:moduleInfo forName:SDLRPCParameterNameModuleInfo]; +} + +- (nullable SDLModuleInfo *)moduleInfo { + return [self.store sdl_objectForName:SDLRPCParameterNameModuleInfo ofClass:SDLModuleInfo.class error:nil]; +} + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLSeatControlData.h b/SmartDeviceLink/SDLSeatControlData.h index e08492d28..73cd8a6e0 100644 --- a/SmartDeviceLink/SDLSeatControlData.h +++ b/SmartDeviceLink/SDLSeatControlData.h @@ -23,7 +23,10 @@ NS_ASSUME_NONNULL_BEGIN @param supportedSeat id of remote controllable seat. @return An instance of the SDLSeatControlData class */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" - (instancetype)initWithId:(SDLSupportedSeat)supportedSeat; +#pragma clang diagnostic pop /** Constructs a newly allocated SDLSeatControlData object with cushion and firmness @@ -46,14 +49,21 @@ NS_ASSUME_NONNULL_BEGIN @param memoryAction type of action to be performed. @return An instance of the SDLSeatControlData class */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" - (instancetype)initWithId:(SDLSupportedSeat)supportedSeat heatingEnabled:(BOOL)heatingEnable coolingEnable:(BOOL)coolingEnable heatingLevel:(UInt8)heatingLevel coolingLevel:(UInt8)coolingLevel horizontalPostion:(UInt8)horizontal verticalPostion:(UInt8)vertical frontVerticalPostion:(UInt8)frontVertical backVerticalPostion:(UInt8)backVertical backTiltAngle:(UInt8)backAngle headSupportedHorizontalPostion:(UInt8)headSupportedHorizontal headSupportedVerticalPostion:(UInt8)headSupportedVertical massageEnabled:(BOOL)massageEnable massageMode:(NSArray<SDLMassageModeData *> *)massageMode massageCussionFirmness:(NSArray<SDLMassageCushionFirmness *> *)firmness memory:(SDLSeatMemoryAction *)memoryAction; +#pragma clang diagnostic pop /** * @abstract id of seat that is a remote controllable seat. + * @warning This should not be used to identify a seat, this is a deprecated parameter. * * Required */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" @property (strong, nonatomic) SDLSupportedSeat id; +#pragma clang diagnostic pop /** * @abstract Whether or not heating is enabled. diff --git a/SmartDeviceLink/SDLSeatControlData.m b/SmartDeviceLink/SDLSeatControlData.m index 7fbebb67b..6054cb908 100644 --- a/SmartDeviceLink/SDLSeatControlData.m +++ b/SmartDeviceLink/SDLSeatControlData.m @@ -13,7 +13,10 @@ NS_ASSUME_NONNULL_BEGIN @implementation SDLSeatControlData +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" - (instancetype)initWithId:(SDLSupportedSeat)supportedSeat { +#pragma clang diagnostic pop self = [self init]; if (!self) { return nil; @@ -23,7 +26,10 @@ NS_ASSUME_NONNULL_BEGIN return self; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" - (instancetype)initWithId:(SDLSupportedSeat)supportedSeat heatingEnabled:(BOOL)heatingEnable coolingEnable:(BOOL)coolingEnabled heatingLevel:(UInt8)heatingLevel coolingLevel:(UInt8)coolingLevel horizontalPostion:(UInt8)horizontal verticalPostion:(UInt8)vertical frontVerticalPostion:(UInt8)frontVertical backVerticalPostion:(UInt8)backVertical backTiltAngle:(UInt8)backAngle headSupportedHorizontalPostion:(UInt8)headSupportedHorizontal headSupportedVerticalPostion:(UInt8)headSupportedVertical massageEnabled:(BOOL)massageEnable massageMode:(NSArray<SDLMassageModeData *> *)massageMode massageCussionFirmness:(NSArray<SDLMassageCushionFirmness *> *)firmness memory:(SDLSeatMemoryAction *)memoryAction { +#pragma clang diagnostic pop self = [super init]; if (!self) { @@ -53,11 +59,17 @@ NS_ASSUME_NONNULL_BEGIN return self; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" - (void)setId:(SDLSupportedSeat)id { +#pragma clang diagnostic pop [self.store sdl_setObject:id forName:SDLRPCParameterNameId]; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" - (SDLSupportedSeat)id { +#pragma clang diagnostic pop NSError *error = nil; return [self.store sdl_enumForName:SDLRPCParameterNameId error:&error]; } diff --git a/SmartDeviceLink/SDLSeatLocation.h b/SmartDeviceLink/SDLSeatLocation.h new file mode 100644 index 000000000..0c4d70597 --- /dev/null +++ b/SmartDeviceLink/SDLSeatLocation.h @@ -0,0 +1,26 @@ +// +// SDLSeatLocation.h +// SmartDeviceLink +// +// Created by standa1 on 7/11/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLRPCMessage.h" +#import "SDLGrid.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * Describes the location of a seat + */ +@interface SDLSeatLocation : SDLRPCStruct + +/** + * Optional + */ +@property (strong, nonatomic, nullable) SDLGrid *grid; + +@end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLSeatLocation.m b/SmartDeviceLink/SDLSeatLocation.m new file mode 100644 index 000000000..82fc28940 --- /dev/null +++ b/SmartDeviceLink/SDLSeatLocation.m @@ -0,0 +1,25 @@ +// +// SDLSeatLocation.m +// SmartDeviceLink +// +// Created by standa1 on 7/11/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLSeatLocation.h" + +#import "NSMutableDictionary+Store.h" +#import "SDLRPCParameterNames.h" + +@implementation SDLSeatLocation + +- (void)setGrid:(nullable SDLGrid *)grid { + [self.store sdl_setObject:grid forName:SDLRPCParameterNameGrid]; +} + +- (nullable SDLGrid *)grid { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameGrid ofClass:SDLGrid.class error:&error]; +} + +@end diff --git a/SmartDeviceLink/SDLSeatLocationCapability.h b/SmartDeviceLink/SDLSeatLocationCapability.h new file mode 100644 index 000000000..9f7d6a15f --- /dev/null +++ b/SmartDeviceLink/SDLSeatLocationCapability.h @@ -0,0 +1,48 @@ +// +// SDLSeatLocationCapability.h +// SmartDeviceLink +// +// Created by standa1 on 7/11/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLRPCMessage.h" + +#import "SDLSeatLocation.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * Contains information about the locations of each seat. + */ +@interface SDLSeatLocationCapability : SDLRPCStruct + +- (instancetype)initWithSeats:(NSArray<SDLSeatLocation *> *)seats cols:(NSNumber<SDLInt> *)cols rows:(NSNumber<SDLInt> *)rows levels:(NSNumber<SDLInt> *)levels; + +/** + * + * Optional, Integer, 1 - 100 + */ +@property (strong, nonatomic, nullable) NSNumber<SDLInt> *cols; + +/** + * + * Optional, Integer, 1 - 100 + */ +@property (strong, nonatomic, nullable) NSNumber<SDLInt> *rows; + +/** + * + * Optional, Integer, 1 - 100 + */ +@property (strong, nonatomic, nullable) NSNumber<SDLInt> *levels; + +/** + * Contains a list of SeatLocation in the vehicle, the first element is the driver's seat + * Optional + */ +@property (strong, nonatomic, nullable) NSArray<SDLSeatLocation *> *seats; + +@end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLSeatLocationCapability.m b/SmartDeviceLink/SDLSeatLocationCapability.m new file mode 100644 index 000000000..f6c59e58c --- /dev/null +++ b/SmartDeviceLink/SDLSeatLocationCapability.m @@ -0,0 +1,70 @@ +// +// SDLSeatLocationCapability.m +// SmartDeviceLink +// +// Created by standa1 on 7/11/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import "SDLSeatLocationCapability.h" + +#import "NSMutableDictionary+Store.h" +#import "SDLRPCParameterNames.h" + +NS_ASSUME_NONNULL_BEGIN + +@implementation SDLSeatLocationCapability + +- (instancetype)initWithSeats:(NSArray<SDLSeatLocation *> *)seats cols:(NSNumber<SDLInt> *)cols rows:(NSNumber<SDLInt> *)rows levels:(NSNumber<SDLInt> *)levels { + self = [self init]; + if (!self) { + return self; + } + + self.seats = seats; + self.cols = cols; + self.rows = rows; + self.levels = levels; + + return self; +} + +- (void)setCols:(nullable NSNumber<SDLInt> *)cols { + [self.store sdl_setObject:cols forName:SDLRPCParameterNameColumns]; +} + +- (nullable NSNumber<SDLInt> *)cols { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameColumns ofClass:NSNumber.class error:&error]; +} + +- (void)setRows:(nullable NSNumber<SDLInt> *)rows { + [self.store sdl_setObject:rows forName:SDLRPCParameterNameRows]; +} + +- (nullable NSNumber<SDLInt> *)rows { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameRows ofClass:NSNumber.class error:&error]; +} + +- (void)setLevels:(nullable NSNumber<SDLInt> *)levels { + [self.store sdl_setObject:levels forName:SDLRPCParameterNameLevels]; +} + +- (nullable NSNumber<SDLInt> *)levels { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameLevels ofClass:NSNumber.class error:&error]; +} + +- (void)setSeats:(nullable NSArray<SDLSeatLocation *> *)seats { + [self.store sdl_setObject:seats forName:SDLRPCParameterNameSeats]; +} + +- (nullable NSArray<SDLSeatLocation *> *)seats { + NSError *error = nil; + return [self.store sdl_objectsForName:SDLRPCParameterNameSeats ofClass:SDLSeatLocation.class error:&error]; +} + +@end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLSetGlobalProperties.h b/SmartDeviceLink/SDLSetGlobalProperties.h index 7b3370d9b..a0a947757 100644 --- a/SmartDeviceLink/SDLSetGlobalProperties.h +++ b/SmartDeviceLink/SDLSetGlobalProperties.h @@ -7,6 +7,7 @@ @class SDLKeyboardProperties; @class SDLTTSChunk; @class SDLVRHelpItem; +@class SDLSeatLocation; NS_ASSUME_NONNULL_BEGIN @@ -104,6 +105,13 @@ NS_ASSUME_NONNULL_BEGIN */ @property (strong, nonatomic, nullable) SDLKeyboardProperties *keyboardProperties; +/** + Location of the user's seat. Default is driver's seat location if it is not set yet + + Optional + */ +@property (strong, nonatomic, nullable) SDLSeatLocation *userLocation; + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLSetGlobalProperties.m b/SmartDeviceLink/SDLSetGlobalProperties.m index 69f06d5d5..6dc337505 100644 --- a/SmartDeviceLink/SDLSetGlobalProperties.m +++ b/SmartDeviceLink/SDLSetGlobalProperties.m @@ -11,6 +11,7 @@ #import "SDLRPCFunctionNames.h" #import "SDLTTSChunk.h" #import "SDLVrHelpItem.h" +#import "SDLSeatLocation.h" NS_ASSUME_NONNULL_BEGIN @@ -106,6 +107,14 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:SDLRPCParameterNameKeyboardProperties ofClass:SDLKeyboardProperties.class error:nil]; } +- (void)setUserLocation:(nullable SDLSeatLocation *)userLocation { + [self.parameters sdl_setObject:userLocation forName:SDLRPCParameterNameUserLocation]; +} + +- (nullable SDLSeatLocation *)userLocation { + return [self.parameters sdl_objectForName:SDLRPCParameterNameUserLocation ofClass:SDLSeatLocation.class error:nil]; +} + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLSupportedSeat.h b/SmartDeviceLink/SDLSupportedSeat.h index 7c7df2f9d..63badc582 100644 --- a/SmartDeviceLink/SDLSupportedSeat.h +++ b/SmartDeviceLink/SDLSupportedSeat.h @@ -5,16 +5,22 @@ /** * List possible seats that is a remote controllable seat. - * + * @warning This should not be used to supported seats, this is a deprecated parameter. */ -typedef SDLEnum SDLSupportedSeat SDL_SWIFT_ENUM; +typedef SDLEnum SDLSupportedSeat SDL_SWIFT_ENUM __deprecated; /** * @abstract Save current seat postions and settings to seat memory. */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" extern SDLSupportedSeat const SDLSupportedSeatDriver; +#pragma clang diagnostic pop /** * @abstract Restore / apply the seat memory settings to the current seat. */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" extern SDLSupportedSeat const SDLSupportedSeatFrontPassenger; +#pragma clang diagnostic pop diff --git a/SmartDeviceLink/SDLSupportedSeat.m b/SmartDeviceLink/SDLSupportedSeat.m index f97678bb1..1260ced9d 100644 --- a/SmartDeviceLink/SDLSupportedSeat.m +++ b/SmartDeviceLink/SDLSupportedSeat.m @@ -3,5 +3,8 @@ #import "SDLSupportedSeat.h" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLSupportedSeat const SDLSupportedSeatDriver = @"DRIVER"; SDLSupportedSeat const SDLSupportedSeatFrontPassenger = @"FRONT_PASSENGER"; +#pragma clang diagnostic pop diff --git a/SmartDeviceLink/SDLSystemCapability.h b/SmartDeviceLink/SDLSystemCapability.h index b38aa3959..283f35667 100755 --- a/SmartDeviceLink/SDLSystemCapability.h +++ b/SmartDeviceLink/SDLSystemCapability.h @@ -14,6 +14,7 @@ @class SDLNavigationCapability; @class SDLVideoStreamingCapability; @class SDLRemoteControlCapabilities; +@class SDLSeatLocationCapability; @class SDLDisplayCapability; NS_ASSUME_NONNULL_BEGIN @@ -74,6 +75,14 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithDisplayCapabilities:(NSArray<SDLDisplayCapability *> *)capabilities; /** + * Convenience init for a Remote Control Capability + * + * @param capability Describes information about the locations of each seat + * @return A SDLSystemCapability object + */ +- (instancetype)initWithSeatLocationCapability:(SDLSeatLocationCapability *)capability; + +/** * Used as a descriptor of what data to expect in this struct. The corresponding param to this enum should be included and the only other parameter included. */ @property (strong, nonatomic) SDLSystemCapabilityType systemCapabilityType; @@ -114,6 +123,13 @@ NS_ASSUME_NONNULL_BEGIN @property (nullable, strong, nonatomic) SDLRemoteControlCapabilities *remoteControlCapability; /** + * Describes information about the locations of each seat + * + * Optional + */ +@property (nullable, strong, nonatomic) SDLSeatLocationCapability *seatLocationCapability; + +/** Contain the display related information and all windows related to that display Optional diff --git a/SmartDeviceLink/SDLSystemCapability.m b/SmartDeviceLink/SDLSystemCapability.m index 2c42ea42f..3936e463b 100755 --- a/SmartDeviceLink/SDLSystemCapability.m +++ b/SmartDeviceLink/SDLSystemCapability.m @@ -16,6 +16,7 @@ #import "SDLSystemCapabilityType.h" #import "SDLVideoStreamingCapability.h" #import "SDLRemoteControlCapabilities.h" +#import "SDLSeatLocationCapability.h" #import "SDLDisplayCapability.h" NS_ASSUME_NONNULL_BEGIN @@ -93,6 +94,18 @@ NS_ASSUME_NONNULL_BEGIN return self; } + +- (instancetype)initWithSeatLocationCapability:(SDLSeatLocationCapability *)capability { + self = [self init]; + if (!self) { + return nil; + } + + self.systemCapabilityType = SDLSystemCapabilityTypeSeatLocation; + self.seatLocationCapability = capability; + + return self; +} - (void)setSystemCapabilityType:(SDLSystemCapabilityType)type { [self.store sdl_setObject:type forName:SDLRPCParameterNameSystemCapabilityType]; @@ -143,6 +156,13 @@ NS_ASSUME_NONNULL_BEGIN return [self.store sdl_objectForName:SDLRPCParameterNameRemoteControlCapability ofClass:SDLRemoteControlCapabilities.class error:nil]; } +- (void)setSeatLocationCapability:(nullable SDLSeatLocationCapability *)seatLocationCapability { + [self.store sdl_setObject:seatLocationCapability forName:SDLRPCParameterNameSeatLocationCapability]; +} + +- (nullable SDLSeatLocationCapability *)seatLocationCapability { + return [self.store sdl_objectForName:SDLRPCParameterNameSeatLocationCapability ofClass:SDLSeatLocationCapability.class error:nil]; +} - (void)setDisplayCapabilities:(nullable NSArray<SDLDisplayCapability *> *)displayCapabilities { [self.store sdl_setObject:displayCapabilities forName:SDLRPCParameterNameDisplayCapabilities]; diff --git a/SmartDeviceLink/SDLSystemCapabilityManager.h b/SmartDeviceLink/SDLSystemCapabilityManager.h index 67b15b64f..109b34efb 100644 --- a/SmartDeviceLink/SDLSystemCapabilityManager.h +++ b/SmartDeviceLink/SDLSystemCapabilityManager.h @@ -24,6 +24,7 @@ @class SDLPhoneCapability; @class SDLPresetBankCapabilities; @class SDLRemoteControlCapabilities; +@class SDLSeatLocationCapability; @class SDLSoftButtonCapabilities; @class SDLSystemCapability; @class SDLSystemCapabilityManager; @@ -193,6 +194,15 @@ typedef void (^SDLCapabilityUpdateHandler)(SDLSystemCapability *capability); @property (nullable, strong, nonatomic, readonly) SDLRemoteControlCapabilities *remoteControlCapability; /** + If returned, the platform supports remote control capabilities for seats + + @see SDLSeatLocationCapability + + Optional + */ +@property (nullable, strong, nonatomic, readonly) SDLSeatLocationCapability *seatLocationCapability; + +/** Init is unavailable. Dependencies must be injected using initWithConnectionManager: @return nil diff --git a/SmartDeviceLink/SDLSystemCapabilityManager.m b/SmartDeviceLink/SDLSystemCapabilityManager.m index d15cabdfa..20bf167c5 100644 --- a/SmartDeviceLink/SDLSystemCapabilityManager.m +++ b/SmartDeviceLink/SDLSystemCapabilityManager.m @@ -30,6 +30,7 @@ #import "SDLRemoteControlCapabilities.h" #import "SDLRPCNotificationNotification.h" #import "SDLRPCResponseNotification.h" +#import "SDLSeatLocationCapability.h" #import "SDLSetDisplayLayoutResponse.h" #import "SDLSystemCapability.h" #import "SDLSystemCapabilityObserver.h" @@ -62,6 +63,7 @@ typedef NSString * SDLServiceID; @property (nullable, strong, nonatomic, readwrite) SDLPhoneCapability *phoneCapability; @property (nullable, strong, nonatomic, readwrite) SDLVideoStreamingCapability *videoStreamingCapability; @property (nullable, strong, nonatomic, readwrite) SDLRemoteControlCapabilities *remoteControlCapability; +@property (nullable, strong, nonatomic, readwrite) SDLSeatLocationCapability *seatLocationCapability; @property (nullable, strong, nonatomic) NSMutableDictionary<SDLServiceID, SDLAppServiceCapability *> *appServicesCapabilitiesDictionary; @@ -129,6 +131,7 @@ typedef NSString * SDLServiceID; _phoneCapability = nil; _videoStreamingCapability = nil; _remoteControlCapability = nil; + _seatLocationCapability = nil; _appServicesCapabilitiesDictionary = [NSMutableDictionary dictionary]; _supportsSubscriptions = NO; @@ -464,6 +467,9 @@ typedef NSString * SDLServiceID; } else if ([systemCapabilityType isEqualToEnum:SDLSystemCapabilityTypeRemoteControl]) { if ([self.remoteControlCapability isEqual:systemCapability.remoteControlCapability]) { return [self sdl_callSaveHandlerForCapability:systemCapability andReturnWithValue:NO handler:handler]; } self.remoteControlCapability = systemCapability.remoteControlCapability; + } else if ([systemCapabilityType isEqualToEnum:SDLSystemCapabilityTypeSeatLocation]) { + if ([self.seatLocationCapability isEqual:systemCapability.seatLocationCapability]) { return [self sdl_callSaveHandlerForCapability:systemCapability andReturnWithValue:NO handler:handler]; } + self.seatLocationCapability = systemCapability.seatLocationCapability; } else if ([systemCapabilityType isEqualToEnum:SDLSystemCapabilityTypeVideoStreaming]) { if ([self.videoStreamingCapability isEqual:systemCapability.videoStreamingCapability]) { return [self sdl_callSaveHandlerForCapability:systemCapability andReturnWithValue:NO handler:handler]; } self.videoStreamingCapability = systemCapability.videoStreamingCapability; diff --git a/SmartDeviceLink/SDLSystemCapabilityType.h b/SmartDeviceLink/SDLSystemCapabilityType.h index 1f7bd2178..60f11a78a 100755 --- a/SmartDeviceLink/SDLSystemCapabilityType.h +++ b/SmartDeviceLink/SDLSystemCapabilityType.h @@ -39,6 +39,11 @@ extern SDLSystemCapabilityType const SDLSystemCapabilityTypeVideoStreaming; extern SDLSystemCapabilityType const SDLSystemCapabilityTypeRemoteControl; /** + Contains information about the locations of each seat + */ +extern SDLSystemCapabilityType const SDLSystemCapabilityTypeSeatLocation; + +/** The Display type capability @since SDL 6.0 diff --git a/SmartDeviceLink/SDLSystemCapabilityType.m b/SmartDeviceLink/SDLSystemCapabilityType.m index 2fb81a7fe..4185345e6 100755 --- a/SmartDeviceLink/SDLSystemCapabilityType.m +++ b/SmartDeviceLink/SDLSystemCapabilityType.m @@ -13,4 +13,5 @@ SDLSystemCapabilityType const SDLSystemCapabilityTypeNavigation = @"NAVIGATION"; SDLSystemCapabilityType const SDLSystemCapabilityTypePhoneCall = @"PHONE_CALL"; SDLSystemCapabilityType const SDLSystemCapabilityTypeVideoStreaming = @"VIDEO_STREAMING"; SDLSystemCapabilityType const SDLSystemCapabilityTypeRemoteControl = @"REMOTE_CONTROL"; +SDLSystemCapabilityType const SDLSystemCapabilityTypeSeatLocation = @"SEAT_LOCATION"; SDLSystemCapabilityType const SDLSystemCapabilityTypeDisplays = @"DISPLAYS"; diff --git a/SmartDeviceLink/SmartDeviceLink.h b/SmartDeviceLink/SmartDeviceLink.h index f7f397a1e..58dffc8d9 100644 --- a/SmartDeviceLink/SmartDeviceLink.h +++ b/SmartDeviceLink/SmartDeviceLink.h @@ -42,6 +42,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[]; #import "SDLGetDTCs.h" #import "SDLGetFile.h" #import "SDLGetInteriorVehicleData.h" +#import "SDLGetInteriorVehicleDataConsent.h" #import "SDLGetSystemCapability.h" #import "SDLGetVehicleData.h" #import "SDLGetWayPoints.h" @@ -74,6 +75,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[]; #import "SDLSyncPData.h" #import "SDLSystemRequest.h" #import "SDLUnpublishAppService.h" +#import "SDLReleaseInteriorVehicleDataModule.h" #import "SDLUnregisterAppInterface.h" #import "SDLUnsubscribeButton.h" #import "SDLUnsubscribeVehicleData.h" @@ -104,6 +106,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[]; #import "SDLGetAppServiceDataResponse.h" #import "SDLGetDTCsResponse.h" #import "SDLGetFileResponse.h" +#import "SDLGetInteriorVehicleDataConsentResponse.h" #import "SDLGetInteriorVehicleDataResponse.h" #import "SDLGetSystemCapabilityResponse.h" #import "SDLGetVehicleDataResponse.h" @@ -136,6 +139,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[]; #import "SDLSubscribeWayPointsResponse.h" #import "SDLSyncPDataResponse.h" #import "SDLUnpublishAppServiceResponse.h" +#import "SDLReleaseInteriorVehicleDataModuleResponse.h" #import "SDLUnregisterAppInterfaceResponse.h" #import "SDLUnsubscribeButtonResponse.h" #import "SDLUnsubscribeVehicleDataResponse.h" @@ -197,6 +201,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[]; #import "SDLFuelRange.h" #import "SDLEqualizerSettings.h" #import "SDLGPSData.h" +#import "SDLGrid.h" #import "SDLHapticRect.h" #import "SDLHMICapabilities.h" #import "SDLHMIPermissions.h" @@ -220,6 +225,7 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[]; #import "SDLMenuParams.h" #import "SDLMetadataTags.h" #import "SDLModuleData.h" +#import "SDLModuleInfo.h" #import "SDLMyKey.h" #import "SDLNavigationCapability.h" #import "SDLNavigationInstruction.h" @@ -240,6 +246,8 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[]; #import "SDLSeatControlCapabilities.h" #import "SDLSeatControlData.h" #import "SDLSeatMemoryAction.h" +#import "SDLSeatLocation.h" +#import "SDLSeatLocationCapability.h" #import "SDLSingleTireStatus.h" #import "SDLSISData.h" #import "SDLSoftButton.h" diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLGlobalProperySpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLGlobalProperySpec.m index 34d2c4fb6..ecdf7bece 100644 --- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLGlobalProperySpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLGlobalProperySpec.m @@ -21,6 +21,7 @@ describe(@"Individual Enum Value Tests", ^ { expect(SDLGlobalPropertyMenuName).to(equal(@"MENUNAME")); expect(SDLGlobalPropertyMenuIcon).to(equal(@"MENUICON")); expect(SDLGlobalPropertyKeyboard).to(equal(@"KEYBOARDPROPERTIES")); + expect(SDLGlobalPropertyUserLocation).to(equal(@"USER_LOCATION")); }); }); diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLButtonPressSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLButtonPressSpec.m index 648d4cbc9..f4c4c8a75 100644 --- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLButtonPressSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLButtonPressSpec.m @@ -22,10 +22,12 @@ describe(@"Getter/Setter Tests", ^ { SDLButtonPress* testRequest = [[SDLButtonPress alloc] init]; testRequest.moduleType = SDLModuleTypeClimate; + testRequest.moduleId = @"123"; testRequest.buttonName = SDLButtonNameAC; testRequest.buttonPressMode = SDLButtonPressModeShort; expect(testRequest.moduleType).to(equal(SDLModuleTypeClimate)); + expect(testRequest.moduleId).to(equal(@"123")); expect(testRequest.buttonName).to(equal(SDLButtonNameAC)); expect(testRequest.buttonPressMode).to(equal(SDLButtonPressModeShort)); @@ -36,7 +38,9 @@ describe(@"Getter/Setter Tests", ^ { @{SDLRPCParameterNameParameters: @{SDLRPCParameterNameModuleType : SDLModuleTypeClimate, SDLRPCParameterNameButtonName : SDLButtonNameAC, - SDLRPCParameterNameButtonPressMode : SDLButtonPressModeShort}, + SDLRPCParameterNameButtonPressMode : SDLButtonPressModeShort, + SDLRPCParameterNameModuleId:@"123" + }, SDLRPCParameterNameOperationName:SDLRPCFunctionNameButtonPress}} mutableCopy]; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -44,6 +48,7 @@ describe(@"Getter/Setter Tests", ^ { #pragma clang diagnostic pop expect(testRequest.moduleType).to(equal(SDLModuleTypeClimate)); + expect(testRequest.moduleId).to(equal(@"123")); expect(testRequest.buttonName).to(equal(SDLButtonNameAC)); expect(testRequest.buttonPressMode).to(equal(SDLButtonPressModeShort)); }); @@ -53,12 +58,14 @@ describe(@"Getter/Setter Tests", ^ { expect(testRequest.buttonName).to(equal(SDLButtonNameAC)); expect(testRequest.moduleType).to(equal(SDLModuleTypeClimate)); + expect(testRequest.moduleId).to(beNil()); }); it(@"Should return nil if not set", ^ { SDLButtonPress* testRequest = [[SDLButtonPress alloc] init]; expect(testRequest.moduleType).to(beNil()); + expect(testRequest.moduleId).to(beNil()); expect(testRequest.buttonName).to(beNil()); expect(testRequest.buttonPressMode).to(beNil()); }); diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataConsentSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataConsentSpec.m new file mode 100644 index 000000000..bc9d19774 --- /dev/null +++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataConsentSpec.m @@ -0,0 +1,61 @@ +// +// SDLGetInteriorVehicleDataConsentSpec.m +// SmartDeviceLinkTests +// +// Created by standa1 on 7/29/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import <Foundation/Foundation.h> + +#import <Quick/Quick.h> +#import <Nimble/Nimble.h> + +#import "SDLGetInteriorVehicleDataConsent.h" +#import "SDLModuleType.h" +#import "SDLRPCParameterNames.h" +#import "SDLRPCFunctionNames.h" + +QuickSpecBegin(SDLGetInteriorVehicleDataConsentSpec) + +describe(@"Getter/Setter Tests", ^ { + it(@"Should set and get correctly", ^ { + SDLGetInteriorVehicleDataConsent *testRequest = [[SDLGetInteriorVehicleDataConsent alloc] init]; + testRequest.moduleType = SDLModuleTypeRadio; + testRequest.moduleIds = @[@"123", @"456"]; + + expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio)); + expect(testRequest.moduleIds).to(equal(@[@"123", @"456"])); + }); + + it(@"Should get correctly when initialized with a dictionary", ^ { + NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest: + @{SDLRPCParameterNameParameters: + @{SDLRPCParameterNameModuleType : SDLModuleTypeRadio, + SDLRPCParameterNameModuleIds: @[@"123", @"456"]}, + SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetInteriorVehicleData}} mutableCopy]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + SDLGetInteriorVehicleDataConsent *testRequest = [[SDLGetInteriorVehicleDataConsent alloc] initWithDictionary:dict]; +#pragma clang diagnostic pop + + expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio)); + expect(testRequest.moduleIds).to(equal(@[@"123", @"456"])); + }); + + it(@"Should get correctly when initialized with module type and module ids", ^ { + SDLGetInteriorVehicleDataConsent *testRequest = [[SDLGetInteriorVehicleDataConsent alloc] initWithModuleType:SDLModuleTypeRadio moduleIds:@[@"123", @"456"]]; + + expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio)); + expect(testRequest.moduleIds).to(equal(@[@"123", @"456"])); + }); + + it(@"Should return nil if not set", ^ { + SDLGetInteriorVehicleDataConsent *testRequest = [[SDLGetInteriorVehicleDataConsent alloc] init]; + + expect(testRequest.moduleType).to(beNil()); + expect(testRequest.moduleIds).to(beNil()); + }); +}); + +QuickSpecEnd diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataSpec.m index d3ed4c409..9801a0e1d 100755 --- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetInteriorVehicleDataSpec.m @@ -20,15 +20,18 @@ describe(@"Getter/Setter Tests", ^ { SDLGetInteriorVehicleData* testRequest = [[SDLGetInteriorVehicleData alloc] init]; testRequest.moduleType = SDLModuleTypeRadio; testRequest.subscribe = @YES; + testRequest.moduleId = @"123"; expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio)); expect(testRequest.subscribe).to(equal(@YES)); + expect(testRequest.moduleId).to(equal(@"123")); }); it(@"Should get correctly when initialized with a dictionary", ^ { NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest: @{SDLRPCParameterNameParameters: @{SDLRPCParameterNameModuleType : SDLModuleTypeRadio, + SDLRPCParameterNameModuleId: @"123", SDLRPCParameterNameSubscribe : @YES}, SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetInteriorVehicleData}} mutableCopy]; #pragma clang diagnostic push @@ -38,12 +41,14 @@ describe(@"Getter/Setter Tests", ^ { expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio)); expect(testRequest.subscribe).to(equal(@YES)); + expect(testRequest.moduleId).to(equal(@"123")); }); it(@"Should get correctly when initialized with module type", ^ { SDLGetInteriorVehicleData* testRequest = [[SDLGetInteriorVehicleData alloc] initWithModuleType:SDLModuleTypeRadio]; expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio)); + expect(testRequest.moduleId).to(beNil()); }); it(@"Should get correctly when initialized with module type and subscribe", ^ { @@ -51,6 +56,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio)); expect(testRequest.subscribe).to(equal(@YES)); + expect(testRequest.moduleId).to(beNil()); }); it(@"Should get correctly when initialized with module type and unsubscribe", ^ { @@ -58,6 +64,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio)); expect(testRequest.subscribe).to(equal(@NO)); + expect(testRequest.moduleId).to(beNil()); }); @@ -66,6 +73,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testRequest.moduleType).to(beNil()); expect(testRequest.subscribe).to(beNil()); + expect(testRequest.moduleId).to(beNil()); }); }); diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLReleaseInteriorVehicleDataModuleSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLReleaseInteriorVehicleDataModuleSpec.m new file mode 100644 index 000000000..6f98c4f28 --- /dev/null +++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLReleaseInteriorVehicleDataModuleSpec.m @@ -0,0 +1,61 @@ +// +// SDLReleaseInteriorVehicleDataModuleSpec.m +// SmartDeviceLinkTests +// +// Created by standa1 on 7/29/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import <Foundation/Foundation.h> + +#import <Quick/Quick.h> +#import <Nimble/Nimble.h> + +#import "SDLReleaseInteriorVehicleDataModule.h" +#import "SDLModuleType.h" +#import "SDLRPCParameterNames.h" +#import "SDLRPCFunctionNames.h" + +QuickSpecBegin(SDLReleaseInteriorVehicleDataModuleSpec) + +describe(@"Getter/Setter Tests", ^ { + it(@"Should set and get correctly", ^ { + SDLReleaseInteriorVehicleDataModule *testRequest = [[SDLReleaseInteriorVehicleDataModule alloc] init]; + testRequest.moduleType = SDLModuleTypeRadio; + testRequest.moduleId = @"123"; + + expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio)); + expect(testRequest.moduleId).to(equal(@"123")); + }); + + it(@"Should get correctly when initialized with a dictionary", ^ { + NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest: + @{SDLRPCParameterNameParameters: + @{SDLRPCParameterNameModuleType: SDLModuleTypeRadio, + SDLRPCParameterNameModuleId: @"123"}, + SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetInteriorVehicleData}} mutableCopy]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + SDLReleaseInteriorVehicleDataModule *testRequest = [[SDLReleaseInteriorVehicleDataModule alloc] initWithDictionary:dict]; +#pragma clang diagnostic pop + + expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio)); + expect(testRequest.moduleId).to(equal(@"123")); + }); + + it(@"Should get correctly when initialized with module type and module ids", ^ { + SDLReleaseInteriorVehicleDataModule *testRequest = [[SDLReleaseInteriorVehicleDataModule alloc] initWithModuleType:SDLModuleTypeRadio moduleId:@"123"]; + + expect(testRequest.moduleType).to(equal(SDLModuleTypeRadio)); + expect(testRequest.moduleId).to(equal(@"123")); + }); + + it(@"Should return nil if not set", ^ { + SDLReleaseInteriorVehicleDataModule *testRequest = [[SDLReleaseInteriorVehicleDataModule alloc] init]; + + expect(testRequest.moduleType).to(beNil()); + expect(testRequest.moduleId).to(beNil()); + }); +}); + +QuickSpecEnd diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSetGlobalPropertiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSetGlobalPropertiesSpec.m index b12672582..e875e411c 100644 --- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSetGlobalPropertiesSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSetGlobalPropertiesSpec.m @@ -15,6 +15,7 @@ #import "SDLSetGlobalProperties.h" #import "SDLTTSChunk.h" #import "SDLVrHelpItem.h" +#import "SDLSeatLocation.h" QuickSpecBegin(SDLSetGlobalPropertiesSpec) @@ -24,6 +25,7 @@ SDLTTSChunk* chunk2 = [[SDLTTSChunk alloc] init]; SDLVRHelpItem* help = [[SDLVRHelpItem alloc] init]; SDLImage* image = [[SDLImage alloc] init]; SDLKeyboardProperties* keyboard = [[SDLKeyboardProperties alloc] init]; +SDLSeatLocation *seatLocation = [[SDLSeatLocation alloc] init]; describe(@"Getter/Setter Tests", ^ { it(@"Should set and get correctly", ^ { @@ -36,6 +38,7 @@ describe(@"Getter/Setter Tests", ^ { testRequest.menuTitle = @"TheNewMenu"; testRequest.menuIcon = image; testRequest.keyboardProperties = keyboard; + testRequest.userLocation = seatLocation; expect(testRequest.helpPrompt).to(equal([@[chunk1] mutableCopy])); expect(testRequest.timeoutPrompt).to(equal([@[chunk2] mutableCopy])); @@ -44,6 +47,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testRequest.menuTitle).to(equal(@"TheNewMenu")); expect(testRequest.menuIcon).to(equal(image)); expect(testRequest.keyboardProperties).to(equal(keyboard)); + expect(testRequest.userLocation).to(equal(seatLocation)); }); it(@"Should get correctly when initialized", ^ { @@ -54,6 +58,7 @@ describe(@"Getter/Setter Tests", ^ { SDLRPCParameterNameVRHelpTitle:@"vr", SDLRPCParameterNameVRHelp:[@[help] mutableCopy], SDLRPCParameterNameMenuTitle:@"TheNewMenu", + SDLRPCParameterNameUserLocation: seatLocation, SDLRPCParameterNameMenuIcon:image, SDLRPCParameterNameKeyboardProperties:keyboard}, SDLRPCParameterNameOperationName:SDLRPCFunctionNameSetGlobalProperties}} mutableCopy]; @@ -69,6 +74,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testRequest.menuTitle).to(equal(@"TheNewMenu")); expect(testRequest.menuIcon).to(equal(image)); expect(testRequest.keyboardProperties).to(equal(keyboard)); + expect(testRequest.userLocation).to(equal(seatLocation)); }); it(@"Should return nil if not set", ^ { @@ -81,6 +87,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testRequest.menuTitle).to(beNil()); expect(testRequest.menuIcon).to(beNil()); expect(testRequest.keyboardProperties).to(beNil()); + expect(testRequest.userLocation).to(beNil()); }); }); diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetInteriorVehicleDataConsentResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetInteriorVehicleDataConsentResponseSpec.m new file mode 100644 index 000000000..479220441 --- /dev/null +++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetInteriorVehicleDataConsentResponseSpec.m @@ -0,0 +1,58 @@ +// +// SDLGetInteriorVehicleDataConsent.m +// SmartDeviceLinkTests +// +// Created by standa1 on 7/29/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import <Foundation/Foundation.h> + +#import <Quick/Quick.h> +#import <Nimble/Nimble.h> + +#import "SDLGetInteriorVehicleDataConsentResponse.h" +#import "SDLModuleData.h" +#import "SDLRPCParameterNames.h" +#import "SDLRPCFunctionNames.h" + +QuickSpecBegin(SDLGetInteriorVehicleDataConsentResponseSpec) + +describe(@"Getter/Setter Tests", ^ { + __block NSArray<NSNumber<SDLBool> *> *allowed = nil; + + beforeEach(^{ + allowed = @[@YES, @NO]; + }); + + it(@"Should set and get correctly", ^ { + SDLGetInteriorVehicleDataConsentResponse *testResponse = [[SDLGetInteriorVehicleDataConsentResponse alloc] init]; + + testResponse.allowed = allowed; + + expect(testResponse.allowed).to(equal(allowed)); + }); + + + + it(@"Should get correctly when initialized", ^ { + NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameResponse: + @{SDLRPCParameterNameParameters: + @{SDLRPCParameterNameAllowed:allowed}, + SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetInteriorVehicleData}} mutableCopy]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + SDLGetInteriorVehicleDataConsentResponse *testResponse = [[SDLGetInteriorVehicleDataConsentResponse alloc] initWithDictionary:dict]; +#pragma clang diagnostic pop + + expect(testResponse.allowed).to(equal(allowed)); + }); + + it(@"Should return nil if not set", ^ { + SDLGetInteriorVehicleDataConsentResponse *testResponse = [[SDLGetInteriorVehicleDataConsentResponse alloc] init]; + + expect(testResponse.allowed).to(beNil()); + }); +}); + +QuickSpecEnd diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLReleaseInteriorVehicleDataModuleResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLReleaseInteriorVehicleDataModuleResponseSpec.m new file mode 100644 index 000000000..463f6c6fd --- /dev/null +++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLReleaseInteriorVehicleDataModuleResponseSpec.m @@ -0,0 +1,19 @@ +// +// SDLReleaseInteriorVehicleDataModuleResponseSpec.m +// SmartDeviceLinkTests +// +// Created by standa1 on 7/29/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// +#import <Foundation/Foundation.h> + +#import <Quick/Quick.h> +#import <Nimble/Nimble.h> + +#import "SDLReleaseInteriorVehicleDataModuleResponse.h" +#import "SDLRPCParameterNames.h" + +QuickSpecBegin(SDLReleaseInteriorVehicleDataModuleResponseSpec) + +QuickSpecEnd + diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAudioControlCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAudioControlCapabilitiesSpec.m index d4ba87009..d23b64eba 100644 --- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAudioControlCapabilitiesSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLAudioControlCapabilitiesSpec.m @@ -15,10 +15,28 @@ QuickSpecBegin( SDLAudioControlCapabilitiesSpec) describe(@"Getter/Setter Tests", ^ { + __block SDLModuleInfo *testModuleInfo = nil; + __block SDLGrid *testGird = nil; + + beforeEach(^{ + testGird.col = @0; + testGird.row = @0; + testGird.level = @0; + testGird.rowspan = @2; + testGird.colspan = @3; + testGird.levelspan = @1; + testModuleInfo = [[SDLModuleInfo alloc] init]; + testModuleInfo.moduleId = @"123"; + testModuleInfo.allowMultipleAccess = @YES; + testModuleInfo.serviceArea = testGird; + testModuleInfo.location = testGird; + }); + it(@"Should set and get correctly", ^ { SDLAudioControlCapabilities* testStruct = [[SDLAudioControlCapabilities alloc] init]; testStruct.moduleName = @"module"; + testStruct.moduleInfo = testModuleInfo; testStruct.sourceAvailable = @(YES); testStruct.keepContextAvailable = @YES; testStruct.volumeAvailable = @(NO); @@ -26,6 +44,7 @@ describe(@"Getter/Setter Tests", ^ { testStruct.equalizerMaxChannelId = @56; expect(testStruct.moduleName).to(equal(@"module")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.keepContextAvailable).to(equal(@YES)); expect(testStruct.sourceAvailable).to(equal(@(YES))); expect(testStruct.volumeAvailable).to(equal(@(NO))); @@ -34,9 +53,13 @@ describe(@"Getter/Setter Tests", ^ { }); it(@"Should set and get correctly", ^ { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLAudioControlCapabilities* testStruct = [[SDLAudioControlCapabilities alloc] initWithModuleName:@"module"]; +#pragma clang diagnostic pop expect(testStruct.moduleName).to(equal(@"module")); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.sourceAvailable).to(beNil()); expect(testStruct.keepContextAvailable).to(beNil()); expect(testStruct.volumeAvailable).to(beNil()); @@ -45,9 +68,40 @@ describe(@"Getter/Setter Tests", ^ { }); it(@"Should set and get correctly", ^ { + SDLAudioControlCapabilities* testStruct = [[SDLAudioControlCapabilities alloc] initWithModuleName:@"module" moduleInfo:testModuleInfo]; + + expect(testStruct.moduleName).to(equal(@"module")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); + expect(testStruct.sourceAvailable).to(beNil()); + expect(testStruct.keepContextAvailable).to(beNil()); + expect(testStruct.volumeAvailable).to(beNil()); + expect(testStruct.equalizerAvailable).to(beNil()); + expect(testStruct.equalizerMaxChannelId).to(beNil()); + }); + + it(@"Should set and get correctly", ^ { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLAudioControlCapabilities* testStruct = [[SDLAudioControlCapabilities alloc] initWithModuleName:@"module" sourceAvailable:@NO keepContextAvailable:@NO volumeAvailable:@YES equalizerAvailable:@NO equalizerMaxChannelID:@34]; +#pragma clang diagnostic pop expect(testStruct.moduleName).to(equal(@"module")); + expect(testStruct.moduleInfo).to(beNil()); + expect(testStruct.sourceAvailable).to(equal(@(NO))); + expect(testStruct.keepContextAvailable).to(equal(@NO)); + expect(testStruct.volumeAvailable).to(equal(@(YES))); + expect(testStruct.equalizerAvailable).to(equal(@(NO))); + expect(testStruct.equalizerMaxChannelId).to(equal(@34)); + }); + + it(@"Should set and get correctly", ^ { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + SDLAudioControlCapabilities* testStruct = [[SDLAudioControlCapabilities alloc] initWithModuleName:@"module" moduleInfo:testModuleInfo sourceAvailable:@NO keepContextAvailable:@NO volumeAvailable:@YES equalizerAvailable:@NO equalizerMaxChannelID:@34]; +#pragma clang diagnostic pop + + expect(testStruct.moduleName).to(equal(@"module")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.sourceAvailable).to(equal(@(NO))); expect(testStruct.keepContextAvailable).to(equal(@NO)); expect(testStruct.volumeAvailable).to(equal(@(YES))); @@ -55,8 +109,10 @@ describe(@"Getter/Setter Tests", ^ { expect(testStruct.equalizerMaxChannelId).to(equal(@34)); }); + it(@"Should get correctly when initialized", ^ { NSMutableDictionary* dict = [@{SDLRPCParameterNameModuleName:@"module", + SDLRPCParameterNameModuleInfo:testModuleInfo, SDLRPCParameterNameSourceAvailable:@(NO), SDLRPCParameterNameKeepContextAvailable: @YES, SDLRPCParameterNameVolumeAvailable:@(YES), @@ -69,6 +125,7 @@ describe(@"Getter/Setter Tests", ^ { #pragma clang diagnostic pop expect(testStruct.moduleName).to(equal(@"module")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.sourceAvailable).to(equal(@(NO))); expect(testStruct.keepContextAvailable).to(equal(@YES)); expect(testStruct.volumeAvailable).to(equal(@(YES))); @@ -81,6 +138,7 @@ describe(@"Getter/Setter Tests", ^ { SDLAudioControlCapabilities* testStruct = [[SDLAudioControlCapabilities alloc] init]; expect(testStruct.moduleName).to(beNil()); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.sourceAvailable).to(beNil()); expect(testStruct.keepContextAvailable).to(beNil()); expect(testStruct.volumeAvailable).to(beNil()); diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLButtonCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLButtonCapabilitiesSpec.m index f60e67998..eb3f8eea5 100644 --- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLButtonCapabilitiesSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLButtonCapabilitiesSpec.m @@ -16,6 +16,23 @@ QuickSpecBegin(SDLButtonCapabilitiesSpec) describe(@"Getter/Setter Tests", ^ { + __block SDLModuleInfo *testModuleInfo = nil; + __block SDLGrid *testGird = nil; + + beforeEach(^{ + testGird.col = @0; + testGird.row = @0; + testGird.level = @0; + testGird.rowspan = @2; + testGird.colspan = @3; + testGird.levelspan = @1; + testModuleInfo = [[SDLModuleInfo alloc] init]; + testModuleInfo.moduleId = @"123"; + testModuleInfo.allowMultipleAccess = @YES; + testModuleInfo.serviceArea = testGird; + testModuleInfo.location = testGird; + }); + it(@"Should set and get correctly", ^ { SDLButtonCapabilities* testStruct = [[SDLButtonCapabilities alloc] init]; @@ -25,6 +42,7 @@ describe(@"Getter/Setter Tests", ^ { testStruct.upDownAvailable = @NO; expect(testStruct.name).to(equal(SDLButtonNameTuneUp)); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.shortPressAvailable).to(equal(@YES)); expect(testStruct.longPressAvailable).to(equal(@YES)); expect(testStruct.upDownAvailable).to(equal(@NO)); @@ -32,6 +50,7 @@ describe(@"Getter/Setter Tests", ^ { it(@"Should get correctly when initialized", ^ { NSMutableDictionary* dict = [@{SDLRPCParameterNameName:SDLButtonNameCustomButton, + SDLRPCParameterNameModuleInfo:testModuleInfo, SDLRPCParameterNameShortPressAvailable:@YES, SDLRPCParameterNameLongPressAvailable:@YES, SDLRPCParameterNameUpDownAvailable:@NO} mutableCopy]; @@ -41,6 +60,7 @@ describe(@"Getter/Setter Tests", ^ { #pragma clang diagnostic pop expect(testStruct.name).to(equal(SDLButtonNameCustomButton)); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.shortPressAvailable).to(equal(@YES)); expect(testStruct.longPressAvailable).to(equal(@YES)); expect(testStruct.upDownAvailable).to(equal(@NO)); @@ -50,6 +70,7 @@ describe(@"Getter/Setter Tests", ^ { SDLButtonCapabilities* testStruct = [[SDLButtonCapabilities alloc] init]; expect(testStruct.name).to(beNil()); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.shortPressAvailable).to(beNil()); expect(testStruct.longPressAvailable).to(beNil()); expect(testStruct.upDownAvailable).to(beNil()); diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLClimateControlCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLClimateControlCapabilitiesSpec.m index 41b919542..ce3b93301 100644 --- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLClimateControlCapabilitiesSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLClimateControlCapabilitiesSpec.m @@ -17,10 +17,28 @@ QuickSpecBegin(SDLClimateControlCapabilitiesSpec) describe(@"Getter/Setter Tests", ^ { + __block SDLModuleInfo *testModuleInfo = nil; + __block SDLGrid *testGird = nil; + + beforeEach(^{ + testGird.col = @0; + testGird.row = @0; + testGird.level = @0; + testGird.rowspan = @2; + testGird.colspan = @3; + testGird.levelspan = @1; + testModuleInfo = [[SDLModuleInfo alloc] init]; + testModuleInfo.moduleId = @"123"; + testModuleInfo.allowMultipleAccess = @YES; + testModuleInfo.serviceArea = testGird; + testModuleInfo.location = testGird; + }); + it(@"Should set and get correctly", ^ { SDLClimateControlCapabilities* testStruct = [[SDLClimateControlCapabilities alloc] init]; testStruct.moduleName = @"Name"; + testStruct.moduleInfo = testModuleInfo; testStruct.fanSpeedAvailable = @YES; testStruct.desiredTemperatureAvailable = @NO; testStruct.acEnableAvailable = @NO; @@ -39,6 +57,7 @@ describe(@"Getter/Setter Tests", ^ { testStruct.climateEnableAvailable = @(NO); expect(testStruct.moduleName).to(equal(@"Name")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.fanSpeedAvailable).to(equal(@YES)); expect(testStruct.desiredTemperatureAvailable).to(equal(@NO)); expect(testStruct.acEnableAvailable).to(equal(@NO)); @@ -60,6 +79,7 @@ describe(@"Getter/Setter Tests", ^ { it(@"Should get correctly when initialized", ^ { NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameModuleName:@"Name", + SDLRPCParameterNameModuleInfo:testModuleInfo, SDLRPCParameterNameFanSpeedAvailable:@YES, SDLRPCParameterNameDesiredTemperatureAvailable:@NO, SDLRPCParameterNameACEnableAvailable:@NO, @@ -83,6 +103,7 @@ describe(@"Getter/Setter Tests", ^ { #pragma clang diagnostic pop expect(testStruct.moduleName).to(equal(@"Name")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.fanSpeedAvailable).to(equal(@YES)); expect(testStruct.desiredTemperatureAvailable).to(equal(@NO)); expect(testStruct.acEnableAvailable).to(equal(@NO)); @@ -107,6 +128,7 @@ describe(@"Getter/Setter Tests", ^ { SDLClimateControlCapabilities* testStruct = [[SDLClimateControlCapabilities alloc] initWithModuleName:@"Name" fanSpeedAvailable:YES desiredTemperatureAvailable:NO acEnableAvailable:NO acMaxEnableAvailable:YES circulateAirAvailable:NO autoModeEnableAvailable:NO dualModeEnableAvailable:NO defrostZoneAvailable:YES ventilationModeAvailable:YES]; expect(testStruct.moduleName).to(equal(@"Name")); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.fanSpeedAvailable).to(equal(@YES)); expect(testStruct.desiredTemperatureAvailable).to(equal(@NO)); expect(testStruct.acEnableAvailable).to(equal(@NO)); @@ -128,8 +150,10 @@ describe(@"Getter/Setter Tests", ^ { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLClimateControlCapabilities* testStruct = [[SDLClimateControlCapabilities alloc] initWithModuleName:@"Name" fanSpeedAvailable:YES desiredTemperatureAvailable:NO acEnableAvailable:NO acMaxEnableAvailable:YES circulateAirAvailable:NO autoModeEnableAvailable:NO dualModeEnableAvailable:NO defrostZoneAvailable:YES ventilationModeAvailable:YES heatedSteeringWheelAvailable:YES heatedWindshieldAvailable:NO heatedRearWindowAvailable:YES heatedMirrorsAvailable:NO]; +#pragma clang diagnostic pop expect(testStruct.moduleName).to(equal(@"Name")); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.fanSpeedAvailable).to(equal(@YES)); expect(testStruct.desiredTemperatureAvailable).to(equal(@NO)); expect(testStruct.acEnableAvailable).to(equal(@NO)); @@ -170,6 +194,7 @@ describe(@"Getter/Setter Tests", ^ { SDLClimateControlCapabilities* testStruct = [[SDLClimateControlCapabilities alloc] init]; expect(testStruct.moduleName).to(beNil()); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.fanSpeedAvailable).to(beNil()); expect(testStruct.desiredTemperatureAvailable).to(beNil()); expect(testStruct.acEnableAvailable).to(beNil()); diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMISettingsControlCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMISettingsControlCapabilitiesSpec.m index 7b766f176..9906477d4 100644 --- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMISettingsControlCapabilitiesSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLHMISettingsControlCapabilitiesSpec.m @@ -15,33 +15,83 @@ QuickSpecBegin(SDLHMISettingsControlCapabilitiesSpec) describe(@"Getter/Setter Tests", ^ { + __block SDLModuleInfo *testModuleInfo = nil; + __block SDLGrid *testGird = nil; + + beforeEach(^{ + testGird.col = @0; + testGird.row = @0; + testGird.level = @0; + testGird.rowspan = @2; + testGird.colspan = @3; + testGird.levelspan = @1; + testModuleInfo = [[SDLModuleInfo alloc] init]; + testModuleInfo.moduleId = @"123"; + testModuleInfo.allowMultipleAccess = @YES; + testModuleInfo.serviceArea = testGird; + testModuleInfo.location = testGird; + }); + it(@"Should set and get correctly", ^ { SDLHMISettingsControlCapabilities* testStruct = [[SDLHMISettingsControlCapabilities alloc] init]; testStruct.moduleName = @"displayMode"; + testStruct.moduleInfo = testModuleInfo; testStruct.distanceUnitAvailable = @(NO); testStruct.temperatureUnitAvailable = @(NO); testStruct.displayModeUnitAvailable = @(YES); expect(testStruct.moduleName).to(equal(@"displayMode")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.distanceUnitAvailable).to(equal(@(NO))); expect(testStruct.temperatureUnitAvailable).to(equal(@(NO))); expect(testStruct.displayModeUnitAvailable).to(equal(@(YES))); }); it(@"Should set and get correctly", ^ { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLHMISettingsControlCapabilities* testStruct = [[SDLHMISettingsControlCapabilities alloc] initWithModuleName:@"displayMode"]; +#pragma clang diagnostic pop expect(testStruct.moduleName).to(equal(@"displayMode")); + expect(testStruct.moduleInfo).to(beNil()); + expect(testStruct.distanceUnitAvailable).to(beNil()); + expect(testStruct.temperatureUnitAvailable).to(beNil()); + expect(testStruct.displayModeUnitAvailable).to(beNil()); + }); + + it(@"Should set and get correctly", ^ { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + SDLHMISettingsControlCapabilities* testStruct = [[SDLHMISettingsControlCapabilities alloc] initWithModuleName:@"displayMode" moduleInfo:testModuleInfo]; +#pragma clang diagnostic pop + + expect(testStruct.moduleName).to(equal(@"displayMode")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.distanceUnitAvailable).to(beNil()); expect(testStruct.temperatureUnitAvailable).to(beNil()); expect(testStruct.displayModeUnitAvailable).to(beNil()); }); it(@"Should set and get correctly", ^ { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLHMISettingsControlCapabilities* testStruct = [[SDLHMISettingsControlCapabilities alloc] initWithModuleName:@"displayMode" distanceUnitAvailable:NO temperatureUnitAvailable:YES displayModeUnitAvailable:NO]; +#pragma clang diagnostic pop expect(testStruct.moduleName).to(equal(@"displayMode")); + expect(testStruct.moduleInfo).to(beNil()); + expect(testStruct.distanceUnitAvailable).to(equal(@(NO))); + expect(testStruct.temperatureUnitAvailable).to(equal(@(YES))); + expect(testStruct.displayModeUnitAvailable).to(equal(@(NO))); + }); + + it(@"Should set and get correctly", ^ { + SDLHMISettingsControlCapabilities* testStruct = [[SDLHMISettingsControlCapabilities alloc] initWithModuleName:@"displayMode" moduleInfo:testModuleInfo distanceUnitAvailable:NO temperatureUnitAvailable:YES displayModeUnitAvailable:NO]; + + expect(testStruct.moduleName).to(equal(@"displayMode")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.distanceUnitAvailable).to(equal(@(NO))); expect(testStruct.temperatureUnitAvailable).to(equal(@(YES))); expect(testStruct.displayModeUnitAvailable).to(equal(@(NO))); @@ -49,6 +99,7 @@ describe(@"Getter/Setter Tests", ^ { it(@"Should get correctly when initialized", ^ { NSMutableDictionary* dict = [@{SDLRPCParameterNameModuleName:@"temperatureUnit", + SDLRPCParameterNameModuleInfo:testModuleInfo, SDLRPCParameterNameTemperatureUnitAvailable:@(YES), SDLRPCParameterNameDistanceUnitAvailable:@(YES), SDLRPCParameterNameDisplayModeUnitAvailable:@(NO) @@ -59,6 +110,7 @@ describe(@"Getter/Setter Tests", ^ { #pragma clang diagnostic pop expect(testStruct.moduleName).to(equal(@"temperatureUnit")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.distanceUnitAvailable).to(equal(@(YES))); expect(testStruct.temperatureUnitAvailable).to(equal(@(YES))); expect(testStruct.displayModeUnitAvailable).to(equal(@(NO))); @@ -69,6 +121,7 @@ describe(@"Getter/Setter Tests", ^ { SDLHMISettingsControlCapabilities* testStruct = [[SDLHMISettingsControlCapabilities alloc] init]; expect(testStruct.moduleName).to(beNil()); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.distanceUnitAvailable).to(beNil()); expect(testStruct.temperatureUnitAvailable).to(beNil()); expect(testStruct.displayModeUnitAvailable).to(beNil()); diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLLightControlCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLLightControlCapabilitiesSpec.m index 7531a4813..404dc2aeb 100644 --- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLLightControlCapabilitiesSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLLightControlCapabilitiesSpec.m @@ -17,27 +17,60 @@ QuickSpecBegin( SDLLightControlCapabilitiesSpec) SDLLightCapabilities* somelightCapabilities = [[SDLLightCapabilities alloc] init]; describe(@"Getter/Setter Tests", ^ { + __block SDLModuleInfo *testModuleInfo = nil; + __block SDLGrid *testGird = nil; + + beforeEach(^{ + testGird.col = @0; + testGird.row = @0; + testGird.level = @0; + testGird.rowspan = @2; + testGird.colspan = @3; + testGird.levelspan = @1; + testModuleInfo = [[SDLModuleInfo alloc] init]; + testModuleInfo.moduleId = @"123"; + testModuleInfo.allowMultipleAccess = @YES; + testModuleInfo.serviceArea = testGird; + testModuleInfo.location = testGird; + }); + it(@"Should set and get correctly", ^ { SDLLightControlCapabilities* testStruct = [[SDLLightControlCapabilities alloc] init]; testStruct.moduleName = @"moduleName"; + testStruct.moduleInfo = testModuleInfo; testStruct.supportedLights = [@[somelightCapabilities] copy]; expect(testStruct.moduleName).to(equal(@"moduleName")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.supportedLights).to(equal([@[somelightCapabilities] copy])); }); it(@"Should set and get correctly", ^ { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLLightControlCapabilities* testStruct = [[SDLLightControlCapabilities alloc] initWithModuleName:@"moduleName" supportedLights:[@[somelightCapabilities] copy]]; +#pragma clang diagnostic pop expect(testStruct.moduleName).to(equal(@"moduleName")); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.supportedLights).to(equal([@[somelightCapabilities] copy])); }); + it(@"Should set and get correctly", ^ { + SDLLightControlCapabilities* testStruct = [[SDLLightControlCapabilities alloc] initWithModuleName:@"moduleName" moduleInfo:testModuleInfo supportedLights:[@[somelightCapabilities] copy]]; + + expect(testStruct.moduleName).to(equal(@"moduleName")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); + expect(testStruct.supportedLights).to(equal([@[somelightCapabilities] copy])); + + }); + it(@"Should get correctly when initialized", ^ { NSMutableDictionary* dict = [@{SDLRPCParameterNameModuleName:@"moduleName", + SDLRPCParameterNameModuleInfo:testModuleInfo, SDLRPCParameterNameSupportedLights:[@[somelightCapabilities] copy] } mutableCopy]; #pragma clang diagnostic push @@ -46,6 +79,7 @@ describe(@"Getter/Setter Tests", ^ { #pragma clang diagnostic pop expect(testStruct.moduleName).to(equal(@"moduleName")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.supportedLights).to(equal([@[somelightCapabilities] copy])); }); @@ -53,6 +87,7 @@ describe(@"Getter/Setter Tests", ^ { SDLLightControlCapabilities* testStruct = [[SDLLightControlCapabilities alloc] init]; expect(testStruct.moduleName).to(beNil()); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.supportedLights).to(beNil()); }); }); diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLModuleDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLModuleDataSpec.m index 10789bd9c..5a4ce340f 100644 --- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLModuleDataSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLModuleDataSpec.m @@ -27,6 +27,7 @@ describe(@"Initialization tests", ^{ __block SDLLightControlData* someLightData = [[SDLLightControlData alloc] init]; __block SDLHMISettingsControlData* someHMISettingsData = [[SDLHMISettingsControlData alloc] init]; __block SDLSeatControlData* someSeatData = [[SDLSeatControlData alloc] init]; + __block NSString *someModuleId = @"123"; it(@"should properly initialize init", ^{ SDLModuleData* testStruct = [[SDLModuleData alloc] init]; @@ -38,7 +39,7 @@ describe(@"Initialization tests", ^{ expect(testStruct.audioControlData).to(beNil()); expect(testStruct.hmiSettingsControlData).to(beNil()); expect(testStruct.lightControlData).to(beNil()); - + expect(testStruct.moduleId).to(beNil()); }); it(@"should properly initialize initWithDictionary", ^{ @@ -49,7 +50,8 @@ describe(@"Initialization tests", ^{ SDLRPCParameterNameSeatControlData:someSeatData, SDLRPCParameterNameAudioControlData:someAudioData, SDLRPCParameterNameLightControlData:someLightData, - SDLRPCParameterNameHmiSettingsControlData:someHMISettingsData} mutableCopy]; + SDLRPCParameterNameHmiSettingsControlData:someHMISettingsData, + SDLRPCParameterNameModuleId:someModuleId} mutableCopy]; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLModuleData* testStruct = [[SDLModuleData alloc] initWithDictionary:dict]; @@ -62,7 +64,7 @@ describe(@"Initialization tests", ^{ expect(testStruct.audioControlData).to(equal(someAudioData)); expect(testStruct.hmiSettingsControlData).to(equal(someHMISettingsData)); expect(testStruct.lightControlData).to(equal(someLightData)); - + expect(testStruct.moduleId).to(equal(someModuleId)); }); it(@"Should set and get correctly", ^{ @@ -74,6 +76,7 @@ describe(@"Initialization tests", ^{ testStruct.audioControlData = someAudioData; testStruct.lightControlData = someLightData; testStruct.hmiSettingsControlData = someHMISettingsData; + testStruct.moduleId = someModuleId; expect(testStruct.moduleType).to(equal(SDLModuleTypeRadio)); expect(testStruct.seatControlData).to(equal(someSeatData)); @@ -82,6 +85,7 @@ describe(@"Initialization tests", ^{ expect(testStruct.audioControlData).to(equal(someAudioData)); expect(testStruct.hmiSettingsControlData).to(equal(someHMISettingsData)); expect(testStruct.lightControlData).to(equal(someLightData)); + expect(testStruct.moduleId).to(equal(someModuleId)); }); it(@"Should get correctly when initialized with RadioControlData", ^ { @@ -91,6 +95,7 @@ describe(@"Initialization tests", ^{ expect(testStruct.radioControlData).to(equal(someRadioData)); expect(testStruct.climateControlData).to(beNil()); expect(testStruct.seatControlData).to(beNil()); + expect(testStruct.moduleId).to(beNil()); }); it(@"Should get correctly when initialized with ClimateControlData", ^ { @@ -100,6 +105,7 @@ describe(@"Initialization tests", ^{ expect(testStruct.climateControlData).to(equal(someClimateData)); expect(testStruct.radioControlData).to(beNil()); expect(testStruct.seatControlData).to(beNil()); + expect(testStruct.moduleId).to(beNil()); }); it(@"Should get correctly when initialized with ClimateControlData", ^ { @@ -109,6 +115,7 @@ describe(@"Initialization tests", ^{ expect(testStruct.seatControlData).to(equal(someSeatData)); expect(testStruct.radioControlData).to(beNil()); expect(testStruct.climateControlData).to(beNil()); + expect(testStruct.moduleId).to(beNil()); }); it(@"Should get correctly when initialized with ClimateControlData", ^ { @@ -120,6 +127,7 @@ describe(@"Initialization tests", ^{ expect(testStruct.audioControlData).to(beNil()); expect(testStruct.lightControlData).to(beNil()); expect(testStruct.hmiSettingsControlData).to(equal(someHMISettingsData)); + expect(testStruct.moduleId).to(beNil()); }); it(@"Should get correctly when initialized with ClimateControlData", ^ { @@ -131,6 +139,7 @@ describe(@"Initialization tests", ^{ expect(testStruct.audioControlData).to(beNil()); expect(testStruct.lightControlData).to(equal(someLightData)); expect(testStruct.hmiSettingsControlData).to(beNil()); + expect(testStruct.moduleId).to(beNil()); }); it(@"Should get correctly when initialized with ClimateControlData", ^ { @@ -142,6 +151,7 @@ describe(@"Initialization tests", ^{ expect(testStruct.audioControlData).to(equal(someAudioData)); expect(testStruct.lightControlData).to(beNil()); expect(testStruct.hmiSettingsControlData).to(beNil()); + expect(testStruct.moduleId).to(beNil()); }); }); diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLRadioControlCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLRadioControlCapabilitiesSpec.m index e68ee0af2..3ec5b48c7 100644 --- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLRadioControlCapabilitiesSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLRadioControlCapabilitiesSpec.m @@ -14,11 +14,28 @@ QuickSpecBegin(SDLRadioControlCapabilitiesSpec) describe(@"Initialization tests", ^{ + __block SDLModuleInfo *testModuleInfo = nil; + __block SDLGrid *testGird = nil; + beforeEach(^{ + testGird.col = @0; + testGird.row = @0; + testGird.level = @0; + testGird.rowspan = @2; + testGird.colspan = @3; + testGird.levelspan = @1; + testModuleInfo = [[SDLModuleInfo alloc] init]; + testModuleInfo.moduleId = @"123"; + testModuleInfo.allowMultipleAccess = @YES; + testModuleInfo.serviceArea = testGird; + testModuleInfo.location = testGird; + }); + it(@"should properly initialize init", ^{ SDLRadioControlCapabilities* testStruct = [[SDLRadioControlCapabilities alloc] init]; expect(testStruct.moduleName).to(beNil()); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.radioEnableAvailable).to(beNil()); expect(testStruct.radioBandAvailable).to(beNil()); expect(testStruct.radioFrequencyAvailable).to(beNil()); @@ -43,6 +60,7 @@ describe(@"Initialization tests", ^{ it(@"should properly initialize initWithDictionary", ^{ NSMutableDictionary* dict = [@{SDLRPCParameterNameModuleName : @"someName", + SDLRPCParameterNameModuleInfo: testModuleInfo, SDLRPCParameterNameRadioEnableAvailable : @YES, SDLRPCParameterNameRadioBandAvailable : @YES, SDLRPCParameterNameRadioFrequencyAvailable : @YES, @@ -55,7 +73,7 @@ describe(@"Initialization tests", ^{ SDLRPCParameterNameSignalChangeThresholdAvailable : @NO, SDLRPCParameterNameHDRadioEnableAvailable : @YES, SDLRPCParameterNameSiriusXMRadioAvailable : @NO, - SDLRPCParameterNameSISDataAvailable:@YES + SDLRPCParameterNameSISDataAvailable: @YES } mutableCopy]; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -63,6 +81,7 @@ describe(@"Initialization tests", ^{ #pragma clang diagnostic pop expect(testStruct.moduleName).to(equal(@"someName")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.radioEnableAvailable).to(equal(@YES)); expect(testStruct.radioBandAvailable).to(equal(@YES)); expect(testStruct.radioFrequencyAvailable).to(equal(@YES)); @@ -88,6 +107,7 @@ describe(@"Initialization tests", ^{ SDLRadioControlCapabilities* testStruct = [[SDLRadioControlCapabilities alloc] init]; testStruct.moduleName = @"someName"; + testStruct.moduleInfo = testModuleInfo; testStruct.radioEnableAvailable = @YES; testStruct.radioBandAvailable = @YES; testStruct.radioFrequencyAvailable = @YES; @@ -108,6 +128,7 @@ describe(@"Initialization tests", ^{ testStruct.sisDataAvailable = @YES; expect(testStruct.moduleName).to(equal(@"someName")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.radioEnableAvailable).to(equal(@YES)); expect(testStruct.radioBandAvailable).to(equal(@YES)); expect(testStruct.radioFrequencyAvailable).to(equal(@YES)); @@ -154,6 +175,7 @@ describe(@"Initialization tests", ^{ SDLRadioControlCapabilities* testStruct = [[SDLRadioControlCapabilities alloc] initWithModuleName:@"someName" radioEnableAvailable:YES radioBandAvailable:NO radioFrequencyAvailable:YES hdChannelAvailable:NO rdsDataAvailable:NO availableHDsAvailable:NO stateAvailable:YES signalStrengthAvailable:YES signalChangeThresholdAvailable:NO]; expect(testStruct.moduleName).to(equal(@"someName")); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.radioEnableAvailable).to(equal(@YES)); expect(testStruct.radioBandAvailable).to(equal(@NO)); expect(testStruct.radioFrequencyAvailable).to(equal(@YES)); @@ -171,11 +193,14 @@ describe(@"Initialization tests", ^{ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" it(@"Should get correctly when initialized with Module Name and other radio control capabilite's parameters", ^ { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLRadioControlCapabilities* testStruct = [[SDLRadioControlCapabilities alloc] initWithModuleName:@"someName" radioEnableAvailable:YES radioBandAvailable:NO radioFrequencyAvailable:YES hdChannelAvailable:NO rdsDataAvailable:NO availableHDsAvailable:NO stateAvailable:YES signalStrengthAvailable:YES signalChangeThresholdAvailable:NO hdRadioEnableAvailable:YES siriusXMRadioAvailable:YES sisDataAvailable:YES]; #pragma clang diagnostic pop expect(testStruct.moduleName).to(equal(@"someName")); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.radioEnableAvailable).to(equal(@YES)); expect(testStruct.radioBandAvailable).to(equal(@NO)); expect(testStruct.radioFrequencyAvailable).to(equal(@YES)); @@ -195,6 +220,7 @@ describe(@"Initialization tests", ^{ expect(testStruct.sisDataAvailable).to(equal(@YES)); }); + }); QuickSpecEnd diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatControlCapabilitiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatControlCapabilitiesSpec.m index bb320be41..31912578d 100644 --- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatControlCapabilitiesSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatControlCapabilitiesSpec.m @@ -16,10 +16,28 @@ QuickSpecBegin(SDLSeatControlCapabilitiesSpec) describe(@"Getter/Setter Tests", ^ { + __block SDLModuleInfo *testModuleInfo = nil; + __block SDLGrid *testGird = nil; + + beforeEach(^{ + testGird.col = @0; + testGird.row = @0; + testGird.level = @0; + testGird.rowspan = @2; + testGird.colspan = @3; + testGird.levelspan = @1; + testModuleInfo = [[SDLModuleInfo alloc] init]; + testModuleInfo.moduleId = @"123"; + testModuleInfo.allowMultipleAccess = @YES; + testModuleInfo.serviceArea = testGird; + testModuleInfo.location = testGird; + }); + it(@"Should set and get correctly", ^ { SDLSeatControlCapabilities* testStruct = [[SDLSeatControlCapabilities alloc] init]; testStruct.moduleName = @"moduleName"; + testStruct.moduleInfo = testModuleInfo; testStruct.heatingEnabledAvailable = @YES; testStruct.coolingEnabledAvailable = @NO; testStruct.heatingLevelAvailable = @YES; @@ -37,6 +55,7 @@ describe(@"Getter/Setter Tests", ^ { testStruct.memoryAvailable = @NO; expect(testStruct.moduleName).to(equal(@"moduleName")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.heatingEnabledAvailable).to(equal(@YES)); expect(testStruct.coolingEnabledAvailable).to(equal(@NO)); expect(testStruct.heatingLevelAvailable).to(equal(@YES)); @@ -56,9 +75,13 @@ describe(@"Getter/Setter Tests", ^ { }); it(@"Should set and get correctly", ^ { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLSeatControlCapabilities* testStruct = [[SDLSeatControlCapabilities alloc] initWithName:@"moduleName" heatingEnabledAvailable:YES coolingEnabledAvailable:NO heatingLevelAvailable:YES coolingLevelAvailable:NO horizontalPositionAvailable:NO verticalPositionAvailable:NO frontVerticalPositionAvailable:NO backVerticalPositionAvailable:NO backTiltAngleAvailable:YES headSupportHorizontalPositionAvailable:NO headSupportVerticalPositionAvailable:YES massageEnabledAvailable:NO massageModeAvailable:YES massageCushionFirmnessAvailable:NO memoryAvailable:YES]; +#pragma clang diagnostic pop expect(testStruct.moduleName).to(equal(@"moduleName")); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.heatingEnabledAvailable).to(equal(@YES)); expect(testStruct.coolingEnabledAvailable).to(equal(@NO)); expect(testStruct.heatingLevelAvailable).to(equal(@YES)); @@ -78,9 +101,13 @@ describe(@"Getter/Setter Tests", ^ { }); it(@"Should set and get correctly", ^ { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLSeatControlCapabilities* testStruct = [[SDLSeatControlCapabilities alloc] initWithName:@"moduleName"]; +#pragma clang diagnostic pop expect(testStruct.moduleName).to(equal(@"moduleName")); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.heatingEnabledAvailable).to(beNil()); expect(testStruct.heatingEnabledAvailable).to(beNil()); expect(testStruct.heatingLevelAvailable).to(beNil()); @@ -98,9 +125,56 @@ describe(@"Getter/Setter Tests", ^ { expect(testStruct.memoryAvailable).to(beNil()); }); + + it(@"Should set and get correctly", ^ { + SDLSeatControlCapabilities* testStruct = [[SDLSeatControlCapabilities alloc] initWithName:@"moduleName" moduleInfo:testModuleInfo]; + + expect(testStruct.moduleName).to(equal(@"moduleName")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); + expect(testStruct.heatingEnabledAvailable).to(beNil()); + expect(testStruct.heatingEnabledAvailable).to(beNil()); + expect(testStruct.heatingLevelAvailable).to(beNil()); + expect(testStruct.coolingLevelAvailable).to(beNil()); + expect(testStruct.horizontalPositionAvailable).to(beNil()); + expect(testStruct.verticalPositionAvailable).to(beNil()); + expect(testStruct.frontVerticalPositionAvailable).to(beNil()); + expect(testStruct.backVerticalPositionAvailable).to(beNil()); + expect(testStruct.backTiltAngleAvailable).to(beNil()); + expect(testStruct.headSupportHorizontalPositionAvailable).to(beNil()); + expect(testStruct.headSupportVerticalPositionAvailable).to(beNil()); + expect(testStruct.massageEnabledAvailable).to(beNil()); + expect(testStruct.massageModeAvailable).to(beNil()); + expect(testStruct.massageCushionFirmnessAvailable).to(beNil()); + expect(testStruct.memoryAvailable).to(beNil()); + + }); + + it(@"Should set and get correctly", ^ { + SDLSeatControlCapabilities* testStruct = [[SDLSeatControlCapabilities alloc] initWithName:@"moduleName" moduleInfo:testModuleInfo heatingEnabledAvailable:YES coolingEnabledAvailable:NO heatingLevelAvailable:YES coolingLevelAvailable:NO horizontalPositionAvailable:NO verticalPositionAvailable:NO frontVerticalPositionAvailable:NO backVerticalPositionAvailable:NO backTiltAngleAvailable:YES headSupportHorizontalPositionAvailable:NO headSupportVerticalPositionAvailable:YES massageEnabledAvailable:NO massageModeAvailable:YES massageCushionFirmnessAvailable:NO memoryAvailable:YES]; + + expect(testStruct.moduleName).to(equal(@"moduleName")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); + expect(testStruct.heatingEnabledAvailable).to(equal(@YES)); + expect(testStruct.coolingEnabledAvailable).to(equal(@NO)); + expect(testStruct.heatingLevelAvailable).to(equal(@YES)); + expect(testStruct.coolingLevelAvailable).to(equal(@NO)); + expect(testStruct.horizontalPositionAvailable).to(equal(@NO)); + expect(testStruct.verticalPositionAvailable).to(equal(@NO)); + expect(testStruct.frontVerticalPositionAvailable).to(equal(@NO)); + expect(testStruct.backVerticalPositionAvailable).to(equal(@NO)); + expect(testStruct.backTiltAngleAvailable).to(equal(@YES)); + expect(testStruct.headSupportHorizontalPositionAvailable).to(equal(@NO)); + expect(testStruct.headSupportVerticalPositionAvailable).to(equal(@YES)); + expect(testStruct.massageEnabledAvailable).to(equal(@NO)); + expect(testStruct.massageModeAvailable).to(equal(@YES)); + expect(testStruct.massageCushionFirmnessAvailable).to(equal(@NO)); + expect(testStruct.memoryAvailable).to(equal(@YES)); + + }); it(@"Should get correctly when initialized", ^ { NSMutableDictionary* dict = [@{SDLRPCParameterNameModuleName:@"moduleName", + SDLRPCParameterNameModuleInfo:testModuleInfo, SDLRPCParameterNameHeatingEnabledAvailable:(@YES), SDLRPCParameterNameCoolingEnabledAvailable:@YES, SDLRPCParameterNameHeatingLevelAvailable:@YES, @@ -123,6 +197,7 @@ describe(@"Getter/Setter Tests", ^ { #pragma clang diagnostic pop expect(testStruct.moduleName).to(equal(@"moduleName")); + expect(testStruct.moduleInfo).to(equal(testModuleInfo)); expect(testStruct.heatingEnabledAvailable).to(equal(@YES)); expect(testStruct.coolingEnabledAvailable).to(equal(@YES)); expect(testStruct.heatingLevelAvailable).to(equal(@YES)); @@ -144,6 +219,7 @@ describe(@"Getter/Setter Tests", ^ { SDLSeatControlCapabilities* testStruct = [[SDLSeatControlCapabilities alloc] init]; expect(testStruct.moduleName).to(beNil()); + expect(testStruct.moduleInfo).to(beNil()); expect(testStruct.heatingEnabledAvailable).to(beNil()); expect(testStruct.heatingEnabledAvailable).to(beNil()); expect(testStruct.heatingLevelAvailable).to(beNil()); diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatLocationCapabilitySpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatLocationCapabilitySpec.m new file mode 100644 index 000000000..e238c5737 --- /dev/null +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatLocationCapabilitySpec.m @@ -0,0 +1,88 @@ +// +// SDLSeatLocationCapabilitySpec.m +// SmartDeviceLinkTests +// +// Created by standa1 on 7/29/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import <Foundation/Foundation.h> + +#import <Quick/Quick.h> +#import <Nimble/Nimble.h> + +#import "SDLSeatLocationCapability.h" +#import "SDLGrid.h" +#import "SDLRPCParameterNames.h" + + +QuickSpecBegin(SDLSeatLocationCapabilitySpec) + +describe(@"Getter/Setter Tests", ^ { + __block SDLGrid *testGird = nil; + __block SDLSeatLocation *driverSeat = nil; + + beforeEach(^{ + testGird = [[SDLGrid alloc] init]; + testGird.col = @0; + testGird.row = @0; + testGird.level = @0; + testGird.rowspan = @2; + testGird.colspan = @3; + testGird.levelspan = @1; + driverSeat = [[SDLSeatLocation alloc] init]; + driverSeat.grid = testGird; + }); + + it(@"Should set and get correctly", ^ { + SDLSeatLocationCapability *testStruct = [[SDLSeatLocationCapability alloc] init]; + + testStruct.cols = @3; + testStruct.rows = @2; + testStruct.levels = @1; + testStruct.seats = @[driverSeat]; + + expect(testStruct.cols).to(equal(@3)); + expect(testStruct.rows).to(equal(@2)); + expect(testStruct.levels).to(equal(@1)); + expect(testStruct.seats).to(equal(@[driverSeat])); + }); + + it(@"Should get correctly when initialized", ^ { + NSMutableDictionary* dict = [@{ + SDLRPCParameterNameRows:@2, + SDLRPCParameterNameColumns:@3, + SDLRPCParameterNameLevels:@1, + SDLRPCParameterNameSeats:@[driverSeat]} mutableCopy]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + SDLSeatLocationCapability *testStruct = [[SDLSeatLocationCapability alloc] initWithDictionary:dict]; +#pragma clang diagnostic pop + + expect(testStruct.cols).to(equal(@3)); + expect(testStruct.rows).to(equal(@2)); + expect(testStruct.levels).to(equal(@1)); + expect(testStruct.seats).to(equal(@[driverSeat])); + }); + + it(@"Should get correctly when initialized", ^ { + SDLSeatLocationCapability *testStruct = [[SDLSeatLocationCapability alloc] initWithSeats:@[driverSeat] cols:@3 rows:@2 levels:@1]; + + expect(testStruct.cols).to(equal(@3)); + expect(testStruct.rows).to(equal(@2)); + expect(testStruct.levels).to(equal(@1)); + expect(testStruct.seats).to(equal(@[driverSeat])); + }); + + + it(@"Should return nil if not set", ^ { + SDLSeatLocationCapability *testStruct = [[SDLSeatLocationCapability alloc] init]; + + expect(testStruct.cols).to(beNil()); + expect(testStruct.rows).to(beNil()); + expect(testStruct.levels).to(beNil()); + expect(testStruct.seats).to(beNil()); + }); +}); + +QuickSpecEnd diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatLocationSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatLocationSpec.m new file mode 100644 index 000000000..31234bbbe --- /dev/null +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSeatLocationSpec.m @@ -0,0 +1,58 @@ +// +// SDLSeatLocationSpec.m +// SmartDeviceLinkTests +// +// Created by standa1 on 7/29/19. +// Copyright © 2019 smartdevicelink. All rights reserved. +// + +#import <Foundation/Foundation.h> + +#import <Quick/Quick.h> +#import <Nimble/Nimble.h> + +#import "SDLSeatLocation.h" +#import "SDLRPCParameterNames.h" + + +QuickSpecBegin(SDLSeatLocationSpec) + +describe(@"Getter/Setter Tests", ^ { + __block SDLGrid *testGird = nil; + + beforeEach(^{ + testGird = [[SDLGrid alloc] init]; + testGird.col = @0; + testGird.row = @0; + testGird.level = @0; + testGird.rowspan = @2; + testGird.colspan = @3; + testGird.levelspan = @1; + }); + + it(@"Should set and get correctly", ^ { + SDLSeatLocation *testStruct = [[SDLSeatLocation alloc] init]; + + testStruct.grid = testGird; + + expect(testStruct.grid).to(equal(testGird)); + }); + + it(@"Should get correctly when initialized", ^ { + NSMutableDictionary* dict = [@{SDLRPCParameterNameGrid:testGird} mutableCopy]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + SDLSeatLocation *testStruct = [[SDLSeatLocation alloc] initWithDictionary:dict]; +#pragma clang diagnostic pop + + expect(testStruct.grid).to(equal(testGird)); + }); + + it(@"Should return nil if not set", ^ { + SDLSeatLocation *testStruct = [[SDLSeatLocation alloc] init]; + + expect(testStruct.grid).to(beNil()); + }); +}); + +QuickSpecEnd diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m index 42286b97b..b937eb3e1 100755 --- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLSystemCapabilitySpec.m @@ -16,6 +16,7 @@ #import "SDLVideoStreamingCodec.h" #import "SDLVideoStreamingFormat.h" #import "SDLVideoStreamingProtocol.h" +#import "SDLSeatLocationCapability.h" #import "SDLRPCParameterNames.h" @@ -27,6 +28,7 @@ describe(@"Getter/Setter Tests", ^ { __block SDLPhoneCapability *testPhoneCapability = nil; __block SDLRemoteControlCapabilities *testRemoteControlCapabilities = nil; __block SDLVideoStreamingCapability *testVideoStreamingCapability = nil; + __block SDLSeatLocationCapability *testSeatLocationCapability = nil; beforeEach(^{ testAppServicesCapabilities = [[SDLAppServicesCapabilities alloc] initWithAppServices:nil]; @@ -34,6 +36,7 @@ describe(@"Getter/Setter Tests", ^ { testPhoneCapability = [[SDLPhoneCapability alloc] initWithDialNumber:YES]; testRemoteControlCapabilities = [[SDLRemoteControlCapabilities alloc] initWithClimateControlCapabilities:nil radioControlCapabilities:nil buttonCapabilities:nil seatControlCapabilities:nil audioControlCapabilities:nil hmiSettingsControlCapabilities:nil lightControlCapabilities:nil]; testVideoStreamingCapability = [[SDLVideoStreamingCapability alloc] initWithPreferredResolution:[[SDLImageResolution alloc] initWithWidth:50 height:50] maxBitrate:5 supportedFormats:@[] hapticDataSupported:false]; + testSeatLocationCapability = [[SDLSeatLocationCapability alloc] init]; }); it(@"Should set and get correctly", ^ { @@ -44,6 +47,7 @@ describe(@"Getter/Setter Tests", ^ { testStruct.phoneCapability = testPhoneCapability; testStruct.videoStreamingCapability = testVideoStreamingCapability; testStruct.remoteControlCapability = testRemoteControlCapabilities; + testStruct.seatLocationCapability = testSeatLocationCapability; expect(testStruct.systemCapabilityType).to(equal(SDLSystemCapabilityTypeNavigation)); expect(testStruct.appServicesCapabilities).to(equal(testAppServicesCapabilities)); @@ -51,6 +55,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testStruct.phoneCapability).to(equal(testPhoneCapability)); expect(testStruct.videoStreamingCapability).to(equal(testVideoStreamingCapability)); expect(testStruct.remoteControlCapability).to(equal(testRemoteControlCapabilities)); + expect(testStruct.seatLocationCapability).to(equal(testSeatLocationCapability)); }); it(@"Should get correctly when initialized with a dictionary", ^ { @@ -60,7 +65,8 @@ describe(@"Getter/Setter Tests", ^ { SDLRPCParameterNameNavigationCapability:testNavigationCapability, SDLRPCParameterNamePhoneCapability:testPhoneCapability, SDLRPCParameterNameRemoteControlCapability:testRemoteControlCapabilities, - SDLRPCParameterNameVideoStreamingCapability:testVideoStreamingCapability + SDLRPCParameterNameVideoStreamingCapability:testVideoStreamingCapability, + SDLRPCParameterNameSeatLocationCapability:testSeatLocationCapability }; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -73,6 +79,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testStruct.phoneCapability).to(equal(testPhoneCapability)); expect(testStruct.remoteControlCapability).to(equal(testRemoteControlCapabilities)); expect(testStruct.videoStreamingCapability).to(equal(testVideoStreamingCapability)); + expect(testStruct.seatLocationCapability).to(equal(testSeatLocationCapability)); }); it(@"Should return nil if not set", ^ { @@ -84,6 +91,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testStruct.phoneCapability).to(beNil()); expect(testStruct.videoStreamingCapability).to(beNil()); expect(testStruct.remoteControlCapability).to(beNil()); + expect(testStruct.seatLocationCapability).to(beNil()); }); it(@"should initialize correctly with initWithAppServicesCapabilities:", ^{ @@ -95,6 +103,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testStruct.phoneCapability).to(beNil()); expect(testStruct.remoteControlCapability).to(beNil()); expect(testStruct.videoStreamingCapability).to(beNil()); + expect(testStruct.seatLocationCapability).to(beNil()); }); it(@"should initialize correctly with initWithPhoneCapability:", ^{ @@ -107,6 +116,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testStruct.phoneCapability).to(equal(testPhoneStruct)); expect(testStruct.remoteControlCapability).to(beNil()); expect(testStruct.videoStreamingCapability).to(beNil()); + expect(testStruct.seatLocationCapability).to(beNil()); }); it(@"should initialize correctly with initWithNavigationCapability:", ^{ @@ -119,6 +129,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testStruct.phoneCapability).to(beNil()); expect(testStruct.remoteControlCapability).to(beNil()); expect(testStruct.videoStreamingCapability).to(beNil()); + expect(testStruct.seatLocationCapability).to(beNil()); }); it(@"should initialize correctly with initWithVideoStreamingCapability:", ^{ @@ -148,6 +159,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testStruct.phoneCapability).to(beNil()); expect(testStruct.remoteControlCapability).to(beNil()); expect(testStruct.videoStreamingCapability).to(equal(testVidStruct)); + expect(testStruct.seatLocationCapability).to(beNil()); }); it(@"should initialize correctly with initWithRemoteControlCapability:", ^{ @@ -159,6 +171,19 @@ describe(@"Getter/Setter Tests", ^ { expect(testStruct.phoneCapability).to(beNil()); expect(testStruct.remoteControlCapability).to(equal(testRemoteControlCapabilities)); expect(testStruct.videoStreamingCapability).to(beNil()); + expect(testStruct.seatLocationCapability).to(beNil()); + }); + + it(@"should initialize correctly with initWithSeatLocationCapability:", ^{ + SDLSystemCapability *testStruct = [[SDLSystemCapability alloc] initWithSeatLocationCapability:testSeatLocationCapability]; + + expect(testStruct.systemCapabilityType).to(equal(SDLSystemCapabilityTypeSeatLocation)); + expect(testStruct.appServicesCapabilities).to(beNil()); + expect(testStruct.navigationCapability).to(beNil()); + expect(testStruct.phoneCapability).to(beNil()); + expect(testStruct.remoteControlCapability).to(beNil()); + expect(testStruct.videoStreamingCapability).to(beNil()); + expect(testStruct.seatLocationCapability).to(equal(testSeatLocationCapability)); }); }); |