Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align iOS and Android Replace SDLSyncMsgVersion with SDLMsgVersion #1354

Merged
merged 6 commits into from Jul 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions SmartDeviceLink-iOS.podspec
Expand Up @@ -354,6 +354,7 @@ ss.public_header_files = [
'SmartDeviceLink/SDLSubscribeWaypoints.h',
'SmartDeviceLink/SDLSubscribeWaypointsResponse.h',
'SmartDeviceLink/SDLSyncMsgVersion.h',
'SmartDeviceLink/SDLMsgVersion.h',
'SmartDeviceLink/SDLSyncPData.h',
'SmartDeviceLink/SDLSyncPDataResponse.h',
'SmartDeviceLink/SDLSystemAction.h',
Expand Down
8 changes: 8 additions & 0 deletions SmartDeviceLink-iOS.xcodeproj/project.pbxproj
Expand Up @@ -1236,6 +1236,8 @@
755F176222A00B7C0041B9CB /* SDLMenuManagerConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 755F176122A00B7C0041B9CB /* SDLMenuManagerConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
756C62762289F11F008B57A2 /* SDLDynamicMenuUpdateRunScore.h in Headers */ = {isa = PBXBuildFile; fileRef = 756C62742289F11F008B57A2 /* SDLDynamicMenuUpdateRunScore.h */; };
756C62772289F11F008B57A2 /* SDLDynamicMenuUpdateRunScore.m in Sources */ = {isa = PBXBuildFile; fileRef = 756C62752289F11F008B57A2 /* SDLDynamicMenuUpdateRunScore.m */; };
75FF2E3B22E0DD5400D0C13B /* SDLMsgVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 75FF2E3922E0DD5400D0C13B /* SDLMsgVersion.h */; settings = {ATTRIBUTES = (Public, ); }; };
75FF2E3C22E0DD5400D0C13B /* SDLMsgVersion.m in Sources */ = {isa = PBXBuildFile; fileRef = 75FF2E3A22E0DD5400D0C13B /* SDLMsgVersion.m */; };
880245A420F79C3400ED195B /* SDLFileManagerConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 880245A220F79C3400ED195B /* SDLFileManagerConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; };
880245A520F79C3400ED195B /* SDLFileManagerConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 880245A320F79C3400ED195B /* SDLFileManagerConfiguration.m */; };
8803DCEF22C2B84B00FBB7CE /* SDLBackgroundTaskManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 8803DCED22C2B84B00FBB7CE /* SDLBackgroundTaskManager.h */; };
Expand Down Expand Up @@ -2895,6 +2897,8 @@
755F176122A00B7C0041B9CB /* SDLMenuManagerConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLMenuManagerConstants.h; sourceTree = "<group>"; };
756C62742289F11F008B57A2 /* SDLDynamicMenuUpdateRunScore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLDynamicMenuUpdateRunScore.h; sourceTree = "<group>"; };
756C62752289F11F008B57A2 /* SDLDynamicMenuUpdateRunScore.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLDynamicMenuUpdateRunScore.m; sourceTree = "<group>"; };
75FF2E3922E0DD5400D0C13B /* SDLMsgVersion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLMsgVersion.h; sourceTree = "<group>"; };
75FF2E3A22E0DD5400D0C13B /* SDLMsgVersion.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLMsgVersion.m; sourceTree = "<group>"; };
880245A220F79C3400ED195B /* SDLFileManagerConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLFileManagerConfiguration.h; sourceTree = "<group>"; };
880245A320F79C3400ED195B /* SDLFileManagerConfiguration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLFileManagerConfiguration.m; sourceTree = "<group>"; };
8803DCED22C2B84B00FBB7CE /* SDLBackgroundTaskManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLBackgroundTaskManager.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -4473,6 +4477,8 @@
88AAD4BB2211B76800F1E6D7 /* SDLMediaServiceManifest.m */,
5D61FB0B1A84238A00846EE7 /* SDLMenuParams.h */,
5D61FB0C1A84238A00846EE7 /* SDLMenuParams.m */,
75FF2E3922E0DD5400D0C13B /* SDLMsgVersion.h */,
75FF2E3A22E0DD5400D0C13B /* SDLMsgVersion.m */,
8B9376D51F3349FC009605C4 /* SDLMetadataTags.h */,
8B9376D61F3349FC009605C4 /* SDLMetadataTags.m */,
1E5AD06E1F209C880029B8AF /* SDLModuleData.h */,
Expand Down Expand Up @@ -6680,6 +6686,7 @@
5D92936320B3551600FCC775 /* SDLKeyboardDelegate.h in Headers */,
5D92936820B3601700FCC775 /* SDLChoiceSetManager.h in Headers */,
5DBF06351E64A9FE00A5CF03 /* SDLLogConstants.h in Headers */,
75FF2E3B22E0DD5400D0C13B /* SDLMsgVersion.h in Headers */,
DAC572671D10C5640004288B /* CGPoint_Util.h in Headers */,
5D61FDF91A84238C00846EE7 /* SDLV2ProtocolHeader.h in Headers */,
884E702B21FBB151008D53BA /* SDLAppServiceRecord.h in Headers */,
Expand Down Expand Up @@ -7329,6 +7336,7 @@
5D61FCB21A84238C00846EE7 /* SDLGetDTCs.m in Sources */,
8881AFB92225E5EE00EA870B /* SDLGetCloudAppProperties.m in Sources */,
5D61FD441A84238C00846EE7 /* SDLProtocol.m in Sources */,
75FF2E3C22E0DD5400D0C13B /* SDLMsgVersion.m in Sources */,
5DF40B23208E761A00DD6FDA /* SDLVoiceCommandManager.m in Sources */,
5D61FC341A84238C00846EE7 /* SDLAddSubMenuResponse.m in Sources */,
5DA240011F325621009C0313 /* SDLStreamingMediaConfiguration.m in Sources */,
Expand Down
1 change: 1 addition & 0 deletions SmartDeviceLink.podspec
Expand Up @@ -355,6 +355,7 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLSubscribeWaypoints.h',
'SmartDeviceLink/SDLSubscribeWaypointsResponse.h',
'SmartDeviceLink/SDLSyncMsgVersion.h',
'SmartDeviceLink/SDLMsgVersion.h',
'SmartDeviceLink/SDLSyncPData.h',
'SmartDeviceLink/SDLSyncPDataResponse.h',
'SmartDeviceLink/SDLSystemAction.h',
Expand Down
2 changes: 1 addition & 1 deletion SmartDeviceLink/NSMutableDictionary+Store.h
Expand Up @@ -17,7 +17,7 @@ typedef NSString* SDLEnum SDL_SWIFT_ENUM;

@interface NSDictionary (Store)

- (void)sdl_setObject:(NSObject *)object forName:(SDLRPCParameterName)name;
- (void)sdl_setObject:(nullable NSObject *)object forName:(SDLRPCParameterName)name;

- (nullable SDLEnum)sdl_enumForName:(SDLRPCParameterName)name error:(NSError * _Nullable *)error;
- (nullable NSArray<SDLEnum> *)sdl_enumsForName:(SDLRPCParameterName)name error:(NSError * _Nullable *)error;
Expand Down
2 changes: 1 addition & 1 deletion SmartDeviceLink/NSMutableDictionary+Store.m
Expand Up @@ -14,7 +14,7 @@

@implementation NSMutableDictionary (Store)

- (void)sdl_setObject:(NSObject *)object forName:(SDLRPCParameterName)name {
- (void)sdl_setObject:(nullable NSObject *)object forName:(SDLRPCParameterName)name {
if (object != nil) {
self[name] = object;
} else {
Expand Down
73 changes: 68 additions & 5 deletions SmartDeviceLink/SDLAppServiceManifest.h
Expand Up @@ -15,6 +15,7 @@
@class SDLMediaServiceManifest;
@class SDLNavigationServiceManifest;
@class SDLSyncMsgVersion;
@class SDLMsgVersion;
@class SDLWeatherServiceManifest;


Expand Down Expand Up @@ -44,7 +45,20 @@ NS_ASSUME_NONNULL_BEGIN
* @param mediaServiceManifest A media service manifest
* @return A SDLAppServiceManifest object
*/
- (instancetype)initWithMediaServiceName:(nullable NSString *)serviceName serviceIcon:(nullable SDLImage *)serviceIcon allowAppConsumers:(BOOL)allowAppConsumers rpcSpecVersion:(nullable SDLSyncMsgVersion *)rpcSpecVersion handledRPCs:(nullable NSArray<NSNumber<SDLInt> *> *)handledRPCs mediaServiceManifest:(nullable SDLMediaServiceManifest *)mediaServiceManifest;
- (instancetype)initWithMediaServiceName:(nullable NSString *)serviceName serviceIcon:(nullable SDLImage *)serviceIcon allowAppConsumers:(BOOL)allowAppConsumers rpcSpecVersion:(nullable SDLSyncMsgVersion *)rpcSpecVersion handledRPCs:(nullable NSArray<NSNumber<SDLInt> *> *)handledRPCs mediaServiceManifest:(nullable SDLMediaServiceManifest *)mediaServiceManifest __deprecated_msg(("Use initWithMediaServiceName:serviceIcon:allowAppConsumers:maxRPCSpecVersion:handledRPCs:mediaServiceManifest instead"));

/**
* Convenience init for a media service manifest.
*
* @param serviceName Unique name of this service
* @param serviceIcon The file name of the icon to be associated with this service
* @param allowAppConsumers If true, app service consumers beyond the IVI system will be able to access this service. If false, only the IVI system will be able consume the service. If not provided, it is assumed to be false
* @param maxRPCSpecVersion This is the max RPC Spec version the app service understands
* @param handledRPCs This field contains the Function IDs for the RPCs that this service intends to handle correctly
* @param mediaServiceManifest A media service manifest
* @return A SDLAppServiceManifest object
*/
- (instancetype)initWithMediaServiceName:(nullable NSString *)serviceName serviceIcon:(nullable SDLImage *)serviceIcon allowAppConsumers:(BOOL)allowAppConsumers maxRPCSpecVersion:(nullable SDLMsgVersion *)maxRPCSpecVersion handledRPCs:(nullable NSArray<NSNumber<SDLInt> *> *)handledRPCs mediaServiceManifest:(nullable SDLMediaServiceManifest *)mediaServiceManifest;

/**
* Convenience init for a weather service manifest.
Expand All @@ -57,7 +71,20 @@ NS_ASSUME_NONNULL_BEGIN
* @param weatherServiceManifest A weather service manifest
* @return A SDLAppServiceManifest object
*/
- (instancetype)initWithWeatherServiceName:(nullable NSString *)serviceName serviceIcon:(nullable SDLImage *)serviceIcon allowAppConsumers:(BOOL)allowAppConsumers rpcSpecVersion:(nullable SDLSyncMsgVersion *)rpcSpecVersion handledRPCs:(nullable NSArray<NSNumber<SDLInt> *> *)handledRPCs weatherServiceManifest:(nullable SDLWeatherServiceManifest *)weatherServiceManifest;
- (instancetype)initWithWeatherServiceName:(nullable NSString *)serviceName serviceIcon:(nullable SDLImage *)serviceIcon allowAppConsumers:(BOOL)allowAppConsumers rpcSpecVersion:(nullable SDLSyncMsgVersion *)rpcSpecVersion handledRPCs:(nullable NSArray<NSNumber<SDLInt> *> *)handledRPCs weatherServiceManifest:(nullable SDLWeatherServiceManifest *)weatherServiceManifest __deprecated_msg(("Use initWithWeatherServiceName:serviceIcon:allowAppConsumers::maxRPCSpecVersion:handledRPCs:weatherServiceManifest instead"));

/**
* Convenience init for a weather service manifest.
*
* @param serviceName Unique name of this service
* @param serviceIcon The file name of the icon to be associated with this service
* @param allowAppConsumers If true, app service consumers beyond the IVI system will be able to access this service. If false, only the IVI system will be able consume the service. If not provided, it is assumed to be false
* @param maxRPCSpecVersion This is the max RPC Spec version the app service understands
* @param handledRPCs This field contains the Function IDs for the RPCs that this service intends to handle correctly
* @param weatherServiceManifest A weather service manifest
* @return A SDLAppServiceManifest object
*/
- (instancetype)initWithWeatherServiceName:(nullable NSString *)serviceName serviceIcon:(nullable SDLImage *)serviceIcon allowAppConsumers:(BOOL)allowAppConsumers maxRPCSpecVersion:(nullable SDLMsgVersion *)maxRPCSpecVersion handledRPCs:(nullable NSArray<NSNumber<SDLInt> *> *)handledRPCs weatherServiceManifest:(nullable SDLWeatherServiceManifest *)weatherServiceManifest;

/**
* Convenience init for a navigation service manifest.
Expand All @@ -70,7 +97,20 @@ NS_ASSUME_NONNULL_BEGIN
* @param navigationServiceManifest A navigation service manifest
* @return A SDLAppServiceManifest object
*/
- (instancetype)initWithNavigationServiceName:(nullable NSString *)serviceName serviceIcon:(nullable SDLImage *)serviceIcon allowAppConsumers:(BOOL)allowAppConsumers rpcSpecVersion:(nullable SDLSyncMsgVersion *)rpcSpecVersion handledRPCs:(nullable NSArray<NSNumber<SDLInt> *> *)handledRPCs navigationServiceManifest:(nullable SDLNavigationServiceManifest *)navigationServiceManifest;
- (instancetype)initWithNavigationServiceName:(nullable NSString *)serviceName serviceIcon:(nullable SDLImage *)serviceIcon allowAppConsumers:(BOOL)allowAppConsumers rpcSpecVersion:(nullable SDLSyncMsgVersion *)rpcSpecVersion handledRPCs:(nullable NSArray<NSNumber<SDLInt> *> *)handledRPCs navigationServiceManifest:(nullable SDLNavigationServiceManifest *)navigationServiceManifest __deprecated_msg(("Use initWithNavigationServiceName:serviceIcon:allowAppConsumers:macRPCSpecVersion:handledRPCs:navigationServiceManifest instead"));

/**
* Convenience init for a navigation service manifest.
*
* @param serviceName Unique name of this service
* @param serviceIcon The file name of the icon to be associated with this service
* @param allowAppConsumers If true, app service consumers beyond the IVI system will be able to access this service. If false, only the IVI system will be able consume the service. If not provided, it is assumed to be false
* @param maxRPCSpecVersion This is the max RPC Spec version the app service understands
* @param handledRPCs This field contains the Function IDs for the RPCs that this service intends to handle correctly
* @param navigationServiceManifest A navigation service manifest
* @return A SDLAppServiceManifest object
*/
- (instancetype)initWithNavigationServiceName:(nullable NSString *)serviceName serviceIcon:(nullable SDLImage *)serviceIcon allowAppConsumers:(BOOL)allowAppConsumers maxRPCSpecVersion:(nullable SDLMsgVersion *)maxRPCSpecVersion handledRPCs:(nullable NSArray<NSNumber<SDLInt> *> *)handledRPCs navigationServiceManifest:(nullable SDLNavigationServiceManifest *)navigationServiceManifest;

/**
* Convenience init for all parameters.
Expand All @@ -86,7 +126,23 @@ NS_ASSUME_NONNULL_BEGIN
* @param navigationServiceManifest A navigation service manifest
* @return A SDLAppServiceManifest object
*/
- (instancetype)initWithServiceName:(nullable NSString *)serviceName serviceType:(SDLAppServiceType)serviceType serviceIcon:(nullable SDLImage *)serviceIcon allowAppConsumers:(BOOL)allowAppConsumers rpcSpecVersion:(nullable SDLSyncMsgVersion *)rpcSpecVersion handledRPCs:(nullable NSArray<NSNumber<SDLInt> *> *)handledRPCs mediaServiceManifest:(nullable SDLMediaServiceManifest *)mediaServiceManifest weatherServiceManifest:(nullable SDLWeatherServiceManifest *)weatherServiceManifest navigationServiceManifest:(nullable SDLNavigationServiceManifest *)navigationServiceManifest;
- (instancetype)initWithServiceName:(nullable NSString *)serviceName serviceType:(SDLAppServiceType)serviceType serviceIcon:(nullable SDLImage *)serviceIcon allowAppConsumers:(BOOL)allowAppConsumers rpcSpecVersion:(nullable SDLSyncMsgVersion *)rpcSpecVersion handledRPCs:(nullable NSArray<NSNumber<SDLInt> *> *)handledRPCs mediaServiceManifest:(nullable SDLMediaServiceManifest *)mediaServiceManifest weatherServiceManifest:(nullable SDLWeatherServiceManifest *)weatherServiceManifest navigationServiceManifest:(nullable SDLNavigationServiceManifest *)navigationServiceManifest __deprecated_msg(("Use initWithServiceName:serviceType:serviceIcon:allowAppConsumers:maxRPCSpecVersion:handledRPCs:mediaServiceManifest:weatherServiceManifest:navigationServiceManifest instead"));

/**
* Convenience init for all parameters.
*
* @param serviceName Unique name of this service
* @param serviceType The type of service that is to be offered by this app
* @param serviceIcon The file name of the icon to be associated with this service
* @param allowAppConsumers If true, app service consumers beyond the IVI system will be able to access this service. If false, only the IVI system will be able consume the service. If not provided, it is assumed to be false
* @param maxRPCSpecVersion This is the max RPC Spec version the app service understands
* @param handledRPCs This field contains the Function IDs for the RPCs that this service intends to handle correctly
* @param mediaServiceManifest A media service manifest
* @param weatherServiceManifest A weather service manifest
* @param navigationServiceManifest A navigation service manifest
* @return A SDLAppServiceManifest object
*/
- (instancetype)initWithServiceName:(nullable NSString *)serviceName serviceType:(SDLAppServiceType)serviceType serviceIcon:(nullable SDLImage *)serviceIcon allowAppConsumers:(BOOL)allowAppConsumers maxRPCSpecVersion:(nullable SDLMsgVersion *)maxRPCSpecVersion handledRPCs:(nullable NSArray<NSNumber<SDLInt> *> *)handledRPCs mediaServiceManifest:(nullable SDLMediaServiceManifest *)mediaServiceManifest weatherServiceManifest:(nullable SDLWeatherServiceManifest *)weatherServiceManifest navigationServiceManifest:(nullable SDLNavigationServiceManifest *)navigationServiceManifest;

/**
* Unique name of this service.
Expand Down Expand Up @@ -121,7 +177,14 @@ NS_ASSUME_NONNULL_BEGIN
*
* SyncMsgVersion, Optional
*/
@property (nullable, strong, nonatomic) SDLSyncMsgVersion *rpcSpecVersion;
@property (nullable, strong, nonatomic) SDLSyncMsgVersion *rpcSpecVersion __deprecated_msg(("Use maxRPCSpecVersion instead"));

/**
* This is the max RPC Spec version the app service understands. This is important during the RPC passthrough functionality. If not included, it is assumed the max version of the module is acceptable.
*
* SDLMsgVersion, Optional
*/
@property (nullable, strong, nonatomic) SDLMsgVersion *maxRPCSpecVersion;

/**
* This field contains the Function IDs for the RPCs that this service intends to handle correctly. This means the service will provide meaningful responses. See FunctionID for enum equivalent values. This parameter is an integer to allow for new function IDs to be used by apps on older versions of SDL Core.
Expand Down