summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauricio <mjuare44@ford.com>2019-08-28 12:44:25 +0200
committerMauricio <mjuare44@ford.com>2019-08-28 12:44:25 +0200
commitbe9a44bd03b27e628a684f31710f29903ccd5b60 (patch)
tree4431ef74abb278ec926aba03373de8016b2b9c87
parentfe35d7795e12f739d1b30a85b4c2bcaa39a1dcdb (diff)
downloadsdl_ios-be9a44bd03b27e628a684f31710f29903ccd5b60.tar.gz
Change windowID, duplicateUpdatedFromWindowID to NSInteger, SDLUint
-rw-r--r--SmartDeviceLink-iOS.podspec1
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj8
-rw-r--r--SmartDeviceLink.podspec1
-rw-r--r--SmartDeviceLink/SDLCreateWindow.h8
-rw-r--r--SmartDeviceLink/SDLCreateWindow.m12
-rw-r--r--SmartDeviceLink/SDLDeleteWindow.h4
-rw-r--r--SmartDeviceLink/SDLDeleteWindow.m6
-rw-r--r--SmartDeviceLink/SDLEnum.h4
-rw-r--r--SmartDeviceLink/SDLEnumTypes.h13
-rw-r--r--SmartDeviceLink/SDLMacros.h5
-rw-r--r--SmartDeviceLink/SDLOnHMIStatus.h2
-rw-r--r--SmartDeviceLink/SDLOnHMIStatus.m4
-rw-r--r--SmartDeviceLink/SDLPredefinedWindows.h21
-rw-r--r--SmartDeviceLink/SDLPredefinedWindows.m8
-rw-r--r--SmartDeviceLink/SDLShow.h2
-rw-r--r--SmartDeviceLink/SDLShow.m4
-rw-r--r--SmartDeviceLink/SDLWindowCapability.h2
-rw-r--r--SmartDeviceLink/SDLWindowCapability.m4
-rw-r--r--SmartDeviceLink/SmartDeviceLink.h1
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLPredefinedWindowsSpec.m4
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCreateWindowSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteWindowSpec.m2
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m1
23 files changed, 37 insertions, 82 deletions
diff --git a/SmartDeviceLink-iOS.podspec b/SmartDeviceLink-iOS.podspec
index 9c3f48dae..8de91538d 100644
--- a/SmartDeviceLink-iOS.podspec
+++ b/SmartDeviceLink-iOS.podspec
@@ -120,7 +120,6 @@ ss.public_header_files = [
'SmartDeviceLink/SDLEndAudioPassThruResponse.h',
'SmartDeviceLink/SDLEqualizerSettings.h',
'SmartDeviceLink/SDLEnum.h',
-'SmartDeviceLink/SDLEnumTypes.h',
'SmartDeviceLink/SDLErrorConstants.h',
'SmartDeviceLink/SDLFile.h',
'SmartDeviceLink/SDLFileManager.h',
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index 2feba02d1..84d6bfe81 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -374,7 +374,6 @@
1FF7DABA1F75B2A800B46C30 /* SDLFocusableItemLocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FF7DAB91F75B2A800B46C30 /* SDLFocusableItemLocator.h */; };
1FF7DABC1F75B2BF00B46C30 /* SDLFocusableItemLocator.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FF7DABB1F75B2BF00B46C30 /* SDLFocusableItemLocator.m */; };
1FF7DAC01F75CF6C00B46C30 /* SDLHapticManagerSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FF7DABF1F75CF6C00B46C30 /* SDLHapticManagerSpec.m */; };
- 2B6D962E230A9286004B6C4E /* SDLEnumTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B6D962C230A9286004B6C4E /* SDLEnumTypes.h */; settings = {ATTRIBUTES = (Public, ); }; };
2BF2F84F20ED004000A26EF2 /* SDLAudioStreamingIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BF2F84D20ED004000A26EF2 /* SDLAudioStreamingIndicator.h */; settings = {ATTRIBUTES = (Public, ); }; };
2BF2F85020ED004000A26EF2 /* SDLAudioStreamingIndicator.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BF2F84E20ED004000A26EF2 /* SDLAudioStreamingIndicator.m */; };
2BF2F85220ED068200A26EF2 /* SDLAudioStreamingIndicatorSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BF2F85120ED068200A26EF2 /* SDLAudioStreamingIndicatorSpec.m */; };
@@ -1485,7 +1484,6 @@
9FE2471522D77AD500F8D2FC /* SDLWindowType.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FE2471322D77AD500F8D2FC /* SDLWindowType.h */; settings = {ATTRIBUTES = (Public, ); }; };
9FE2471622D77AD500F8D2FC /* SDLWindowType.m in Sources */ = {isa = PBXBuildFile; fileRef = 9FE2471422D77AD500F8D2FC /* SDLWindowType.m */; };
9FE2471922D77AED00F8D2FC /* SDLPredefinedWindows.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FE2471722D77AED00F8D2FC /* SDLPredefinedWindows.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 9FE2471A22D77AED00F8D2FC /* SDLPredefinedWindows.m in Sources */ = {isa = PBXBuildFile; fileRef = 9FE2471822D77AED00F8D2FC /* SDLPredefinedWindows.m */; };
DA0C46AD1DCD35080001F2A8 /* SDLRPCParameterNames.m in Sources */ = {isa = PBXBuildFile; fileRef = DA0C46AC1DCD35080001F2A8 /* SDLRPCParameterNames.m */; };
DA0C46AF1DCD41E30001F2A8 /* SDLMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = DA0C46AE1DCD41E30001F2A8 /* SDLMacros.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA318C1F1DD0F06C00C035AC /* NSMutableDictionary+Store.h in Headers */ = {isa = PBXBuildFile; fileRef = DA318C1D1DD0F06C00C035AC /* NSMutableDictionary+Store.h */; };
@@ -2034,7 +2032,6 @@
1FF7DAB91F75B2A800B46C30 /* SDLFocusableItemLocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLFocusableItemLocator.h; sourceTree = "<group>"; };
1FF7DABB1F75B2BF00B46C30 /* SDLFocusableItemLocator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLFocusableItemLocator.m; sourceTree = "<group>"; };
1FF7DABF1F75CF6C00B46C30 /* SDLHapticManagerSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDLHapticManagerSpec.m; path = ProxySpecs/SDLHapticManagerSpec.m; sourceTree = "<group>"; };
- 2B6D962C230A9286004B6C4E /* SDLEnumTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLEnumTypes.h; sourceTree = "<group>"; };
2BF2F84D20ED004000A26EF2 /* SDLAudioStreamingIndicator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLAudioStreamingIndicator.h; sourceTree = "<group>"; };
2BF2F84E20ED004000A26EF2 /* SDLAudioStreamingIndicator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLAudioStreamingIndicator.m; sourceTree = "<group>"; };
2BF2F85120ED068200A26EF2 /* SDLAudioStreamingIndicatorSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLAudioStreamingIndicatorSpec.m; sourceTree = "<group>"; };
@@ -3184,7 +3181,6 @@
9FE2471322D77AD500F8D2FC /* SDLWindowType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLWindowType.h; sourceTree = "<group>"; };
9FE2471422D77AD500F8D2FC /* SDLWindowType.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLWindowType.m; sourceTree = "<group>"; };
9FE2471722D77AED00F8D2FC /* SDLPredefinedWindows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLPredefinedWindows.h; sourceTree = "<group>"; };
- 9FE2471822D77AED00F8D2FC /* SDLPredefinedWindows.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLPredefinedWindows.m; sourceTree = "<group>"; };
BB3C600D221AEF37007DD4CA /* NSMutableDictionary+StoreSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "NSMutableDictionary+StoreSpec.m"; path = "DevAPISpecs/NSMutableDictionary+StoreSpec.m"; sourceTree = "<group>"; };
DA0C46AC1DCD35080001F2A8 /* SDLRPCParameterNames.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLRPCParameterNames.m; sourceTree = "<group>"; };
DA0C46AE1DCD41E30001F2A8 /* SDLMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLMacros.h; sourceTree = "<group>"; };
@@ -4831,7 +4827,6 @@
5D61FB4C1A84238B00846EE7 /* SDLPrerecordedSpeech.h */,
5D61FB4D1A84238B00846EE7 /* SDLPrerecordedSpeech.m */,
9FE2471722D77AED00F8D2FC /* SDLPredefinedWindows.h */,
- 9FE2471822D77AED00F8D2FC /* SDLPredefinedWindows.m */,
5D61FB501A84238B00846EE7 /* SDLPrimaryAudioSource.h */,
5D61FB511A84238B00846EE7 /* SDLPrimaryAudioSource.m */,
5D61FB541A84238B00846EE7 /* SDLPRNDL.h */,
@@ -5047,7 +5042,6 @@
children = (
5D61FABA1A84238A00846EE7 /* SDLEnum.h */,
DA4F47951E771AA100FC809E /* SDLEnum.m */,
- 2B6D962C230A9286004B6C4E /* SDLEnumTypes.h */,
5DB92D301AC9C8BA00C15BB0 /* SDLRPCStruct.h */,
5DB92D311AC9C8BA00C15BB0 /* SDLRPCStruct.m */,
5D61FB7C1A84238B00846EE7 /* SDLRPCMessage.h */,
@@ -6336,7 +6330,6 @@
buildActionMask = 2147483647;
files = (
9F425AD222DD980200BE3245 /* SDLWindowCapability.h in Headers */,
- 2B6D962E230A9286004B6C4E /* SDLEnumTypes.h in Headers */,
9F425ADA22DD983500BE3245 /* SDLDisplayCapability.h in Headers */,
9F425ACE22DD97DE00BE3245 /* SDLTemplateConfiguration.h in Headers */,
9F425AD622DD981E00BE3245 /* SDLWindowTypeCapabilities.h in Headers */,
@@ -7290,7 +7283,6 @@
5DBF06281E64A91D00A5CF03 /* SDLLogFileModule.m in Sources */,
88AF11DD220B6B3D00A59985 /* SDLPerformAppServiceInteraction.m in Sources */,
5D6F7A361BC5B9B60070BF37 /* SDLLockScreenViewController.m in Sources */,
- 9FE2471A22D77AED00F8D2FC /* SDLPredefinedWindows.m in Sources */,
5D61FDE81A84238C00846EE7 /* SDLUnsubscribeButton.m in Sources */,
5D61FCF71A84238C00846EE7 /* SDLMediaClockFormat.m in Sources */,
5D61FD8A1A84238C00846EE7 /* SDLSetGlobalPropertiesResponse.m in Sources */,
diff --git a/SmartDeviceLink.podspec b/SmartDeviceLink.podspec
index 09ec0253f..6ffc1f5e0 100644
--- a/SmartDeviceLink.podspec
+++ b/SmartDeviceLink.podspec
@@ -121,7 +121,6 @@ sdefault.public_header_files = [
'SmartDeviceLink/SDLEndAudioPassThruResponse.h',
'SmartDeviceLink/SDLEqualizerSettings.h',
'SmartDeviceLink/SDLEnum.h',
-'SmartDeviceLink/SDLEnumTypes.h',
'SmartDeviceLink/SDLErrorConstants.h',
'SmartDeviceLink/SDLFile.h',
'SmartDeviceLink/SDLFileManager.h',
diff --git a/SmartDeviceLink/SDLCreateWindow.h b/SmartDeviceLink/SDLCreateWindow.h
index a6d7814cd..6c76f3441 100644
--- a/SmartDeviceLink/SDLCreateWindow.h
+++ b/SmartDeviceLink/SDLCreateWindow.h
@@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
MaxLength 100.
@param windowType The type of the window to be created. Main window or widget.
*/
-- (instancetype)initWithId:(UInt32)windowId windowName:(NSString *)windowName windowType:(SDLWindowType)windowType;
+- (instancetype)initWithId:(NSUInteger)windowId windowName:(NSString *)windowName windowType:(SDLWindowType)windowType;
/**
Convinience constructor with all the parameters.
@@ -37,14 +37,14 @@ NS_ASSUME_NONNULL_BEGIN
@param associatedServiceType Allows an app to create a widget related to a specific service type. @see associatedServiceType
@param duplicateUpdatesFromWindowID Optional parameter. Specify whether the content sent to an existing window should be duplicated to the created window. If there isn't a window with the ID, the request will be rejected with `INVALID_DATA`.
*/
-- (instancetype)initWithId:(UInt32)windowId windowName:(NSString *)windowName windowType:(SDLWindowType)windowType associatedServiceType:(nullable NSString *)associatedServiceType duplicateUpdatesFromWindowID:(UInt32)duplicateUpdatesFromWindowID;
+- (instancetype)initWithId:(NSUInteger)windowId windowName:(NSString *)windowName windowType:(SDLWindowType)windowType associatedServiceType:(nullable NSString *)associatedServiceType duplicateUpdatesFromWindowID:(NSUInteger)duplicateUpdatesFromWindowID;
/**
A unique ID to identify the window.
@discussion The value of '0' will always be the default main window on the main display and should not be used in this context as it will already be created for the app. See PredefinedWindows enum. Creating a window with an ID that is already in use will be rejected with `INVALID_ID`.
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *windowID;
+@property (strong, nonatomic) NSNumber<SDLUInt> *windowID;
/**
The window name to be used by the HMI.
@@ -67,7 +67,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Optional parameter. Specify whether the content sent to an existing window should be duplicated to the created window. If there isn't a window with the ID, the request will be rejected with `INVALID_DATA`.
*/
-@property (strong, nonatomic, nullable) NSNumber<SDLInt> *duplicateUpdatesFromWindowID;
+@property (strong, nonatomic, nullable) NSNumber<SDLUInt> *duplicateUpdatesFromWindowID;
@end
diff --git a/SmartDeviceLink/SDLCreateWindow.m b/SmartDeviceLink/SDLCreateWindow.m
index 7c34d0c64..b6b55ec17 100644
--- a/SmartDeviceLink/SDLCreateWindow.m
+++ b/SmartDeviceLink/SDLCreateWindow.m
@@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (instancetype)initWithId:(UInt32)windowId windowName:(NSString *)windowName windowType:(SDLWindowType)windowType {
+- (instancetype)initWithId:(NSUInteger)windowId windowName:(NSString *)windowName windowType:(SDLWindowType)windowType {
self = [self init];
if (!self) {
return nil;
@@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
-- (instancetype)initWithId:(UInt32)windowId windowName:(NSString *)windowName windowType:(SDLWindowType)windowType associatedServiceType:(nullable NSString *)associatedServiceType duplicateUpdatesFromWindowID:(UInt32)duplicateUpdatesFromWindowID {
+- (instancetype)initWithId:(NSUInteger)windowId windowName:(NSString *)windowName windowType:(SDLWindowType)windowType associatedServiceType:(nullable NSString *)associatedServiceType duplicateUpdatesFromWindowID:(NSUInteger)duplicateUpdatesFromWindowID {
self = [self initWithId:windowId windowName:windowName windowType:windowType];
if (!self) {
return nil;
@@ -45,11 +45,11 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - Getters / Setters
-- (void)setWindowID:(NSNumber<SDLInt> *)windowID {
+- (void)setWindowID:(NSNumber<SDLUInt> *)windowID {
[self.parameters sdl_setObject:windowID forName:SDLRPCParameterNameWindowId];
}
-- (NSNumber<SDLInt> *)windowID {
+- (NSNumber<SDLUInt> *)windowID {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameWindowId ofClass:NSNumber.class error:&error];
}
@@ -82,11 +82,11 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameAssociatedServiceType ofClass:NSString.class error:&error];
}
-- (void)setDuplicateUpdatesFromWindowID:(nullable NSNumber<SDLInt> *)duplicateUpdatesFromWindowID {
+- (void)setDuplicateUpdatesFromWindowID:(nullable NSNumber<SDLUInt> *)duplicateUpdatesFromWindowID {
[self.parameters sdl_setObject:duplicateUpdatesFromWindowID forName:SDLRPCParameterNameDuplicateUpdatesFromWindowID];
}
-- (nullable NSNumber<SDLInt> *)duplicateUpdatesFromWindowID {
+- (nullable NSNumber<SDLUInt> *)duplicateUpdatesFromWindowID {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameDuplicateUpdatesFromWindowID ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLink/SDLDeleteWindow.h b/SmartDeviceLink/SDLDeleteWindow.h
index 568a2ea95..2561b45c1 100644
--- a/SmartDeviceLink/SDLDeleteWindow.h
+++ b/SmartDeviceLink/SDLDeleteWindow.h
@@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
@param windowId A unique ID to identify the window. The value of '0' will always be the default main window on the main display and cannot be deleted.
*/
-- (instancetype)initWithId:(NSInteger)windowId;
+- (instancetype)initWithId:(NSUInteger)windowId;
/**
A unique ID to identify the window.
@@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
@see PredefinedWindows enum.
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *windowID;
+@property (strong, nonatomic) NSNumber<SDLUInt> *windowID;
@end
diff --git a/SmartDeviceLink/SDLDeleteWindow.m b/SmartDeviceLink/SDLDeleteWindow.m
index 1b6e8da9a..d4f6189c8 100644
--- a/SmartDeviceLink/SDLDeleteWindow.m
+++ b/SmartDeviceLink/SDLDeleteWindow.m
@@ -19,7 +19,7 @@
}
#pragma clang diagnostic pop
-- (instancetype)initWithId:(NSInteger)windowId {
+- (instancetype)initWithId:(NSUInteger)windowId {
self = [self init];
if (!self) {
return nil;
@@ -28,11 +28,11 @@
return self;
}
-- (void)setWindowID:(NSNumber<SDLInt> *)windowID {
+- (void)setWindowID:(NSNumber<SDLUInt> *)windowID {
[self.parameters sdl_setObject:windowID forName:SDLRPCParameterNameWindowId];
}
-- (NSNumber<SDLInt> *)windowID {
+- (NSNumber<SDLUInt> *)windowID {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameWindowId ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLink/SDLEnum.h b/SmartDeviceLink/SDLEnum.h
index d7331281b..d22bc44db 100644
--- a/SmartDeviceLink/SDLEnum.h
+++ b/SmartDeviceLink/SDLEnum.h
@@ -3,10 +3,12 @@
#import <Foundation/Foundation.h>
-#import "SDLEnumTypes.h"
+#import "SDLMacros.h"
NS_ASSUME_NONNULL_BEGIN
+typedef NSString* SDLEnum SDL_SWIFT_ENUM;
+
@interface NSString (SDLEnum)
/**
diff --git a/SmartDeviceLink/SDLEnumTypes.h b/SmartDeviceLink/SDLEnumTypes.h
deleted file mode 100644
index fd72c9e83..000000000
--- a/SmartDeviceLink/SDLEnumTypes.h
+++ /dev/null
@@ -1,13 +0,0 @@
-// SDLEnumTypes.h
-//
-
-#import <Foundation/Foundation.h>
-#import "SDLMacros.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-typedef NSString* SDLEnum SDL_SWIFT_ENUM;
-
-typedef NSInteger SDLIntEnum SDL_TYPED_ENUM;
-
-NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLMacros.h b/SmartDeviceLink/SDLMacros.h
index 0531f25a4..1ab0bb6d0 100644
--- a/SmartDeviceLink/SDLMacros.h
+++ b/SmartDeviceLink/SDLMacros.h
@@ -10,14 +10,11 @@
#define SDLMacros_h
// Resolves issue of pre-xcode 8 versions due to NS_STRING_ENUM unavailability.
-#ifndef SDL_ENUMS_DEFINED
- #define SDL_ENUMS_DEFINED
+#ifndef SDL_SWIFT_ENUM
#if __has_attribute(swift_wrapper)
#define SDL_SWIFT_ENUM NS_STRING_ENUM
- #define SDL_TYPED_ENUM NS_TYPED_ENUM
#else
#define SDL_SWIFT_ENUM
- #define SDL_TYPED_ENUM
#endif
#endif
diff --git a/SmartDeviceLink/SDLOnHMIStatus.h b/SmartDeviceLink/SDLOnHMIStatus.h
index d77f3bb7d..e72f49cd3 100644
--- a/SmartDeviceLink/SDLOnHMIStatus.h
+++ b/SmartDeviceLink/SDLOnHMIStatus.h
@@ -51,7 +51,7 @@ NS_ASSUME_NONNULL_BEGIN
@since SDL 6.0
*/
-@property (strong, nonatomic, nullable) NSNumber<SDLInt> *windowID;
+@property (strong, nonatomic, nullable) NSNumber<SDLUInt> *windowID;
@end
diff --git a/SmartDeviceLink/SDLOnHMIStatus.m b/SmartDeviceLink/SDLOnHMIStatus.m
index c0015f5ae..f80b4b4fb 100644
--- a/SmartDeviceLink/SDLOnHMIStatus.m
+++ b/SmartDeviceLink/SDLOnHMIStatus.m
@@ -58,11 +58,11 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_enumForName:SDLRPCParameterNameSystemContext error:&error];
}
-- (void)setWindowID:(nullable NSNumber<SDLInt> *)windowID {
+- (void)setWindowID:(nullable NSNumber<SDLUInt> *)windowID {
[self.parameters sdl_setObject:windowID forName:SDLRPCParameterNameWindowId];
}
-- (nullable NSNumber<SDLInt> *)windowID {
+- (nullable NSNumber<SDLUInt> *)windowID {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameWindowId ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLink/SDLPredefinedWindows.h b/SmartDeviceLink/SDLPredefinedWindows.h
index 80281fc71..2f6a031a9 100644
--- a/SmartDeviceLink/SDLPredefinedWindows.h
+++ b/SmartDeviceLink/SDLPredefinedWindows.h
@@ -5,22 +5,11 @@
#import "SDLEnum.h"
/**
- Specifies which windows and IDs are predefined and pre-created on behalf of the app.
-
- The default window is always available and represents the app window on the main display. It's an equivalent to today's app window. For backward compatibility, this will ensure the app always has at least the default window on the main display. The app can choose to use this predefined enum element to specifically address app's main window or to duplicate window content. It is not possible to duplicate another window to the default window.
-
- The primary widget is a special widget, that can be associated with a service type, which is used by the HMI whenever a single widget needs to represent the whole app. The primary widget should be named as the app and can be pre-created by the HMI.
+ Specifies which windows and IDs are predefined and pre-created on behalf of the app. The default window is always available and represents the app window on the main display. It's an equivalent to today's app window. For backward compatibility, this will ensure the app always has at least the default window on the main display. The app can choose to use this predefined enum element to specifically address app's main window or to duplicate window content. It is not possible to duplicate another window to the default window. The primary widget is a special widget, that can be associated with a service type, which is used by the HMI whenever a single widget needs to represent the whole app. The primary widget should be named as the app and can be pre-created by the HMI.
@since SDL 6.0
*/
-typedef SDLIntEnum SDLPredefinedWindows;
-
-/**
- The default window is a main window pre-created on behalf of the app.
- */
-extern SDLPredefinedWindows const SDLPredefinedWindowsDefaultWindow;
-
-/**
- The primary widget of the app.
- */
-extern SDLPredefinedWindows const SDLPredefinedWindowsPrimaryWidget;
+typedef NS_ENUM(NSUInteger, SDLPredefinedWindows){
+ SDLPredefinedWindowsDefaultWindow = 0, //The default window is a main window pre-created on behalf of the app.
+ SDLPredefinedWindowsPrimaryWidget = 1 //The primary widget of the app.
+};
diff --git a/SmartDeviceLink/SDLPredefinedWindows.m b/SmartDeviceLink/SDLPredefinedWindows.m
deleted file mode 100644
index b9ea58fce..000000000
--- a/SmartDeviceLink/SDLPredefinedWindows.m
+++ /dev/null
@@ -1,8 +0,0 @@
-//
-// SDLPredefinedWindows.m
-// SmartDeviceLink
-
-#import "SDLPredefinedWindows.h"
-
-SDLPredefinedWindows const SDLPredefinedWindowsDefaultWindow = 0;
-SDLPredefinedWindows const SDLPredefinedWindowsPrimaryWidget = 1;
diff --git a/SmartDeviceLink/SDLShow.h b/SmartDeviceLink/SDLShow.h
index 062aef7b8..7b397ea98 100644
--- a/SmartDeviceLink/SDLShow.h
+++ b/SmartDeviceLink/SDLShow.h
@@ -257,7 +257,7 @@ NS_ASSUME_NONNULL_BEGIN
@since SDL 6.0
*/
-@property (strong, nonatomic, nullable) NSNumber<SDLInt> *windowID;
+@property (strong, nonatomic, nullable) NSNumber<SDLUInt> *windowID;
/**
Used to set an alternate template layout to a window.
diff --git a/SmartDeviceLink/SDLShow.m b/SmartDeviceLink/SDLShow.m
index 5fec3a77f..b1f490f1c 100644
--- a/SmartDeviceLink/SDLShow.m
+++ b/SmartDeviceLink/SDLShow.m
@@ -205,11 +205,11 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameMetadataTags ofClass:SDLMetadataTags.class error:nil];
}
-- (void)setWindowID:(nullable NSNumber<SDLInt> *)windowID {
+- (void)setWindowID:(nullable NSNumber<SDLUInt> *)windowID {
[self.parameters sdl_setObject:windowID forName:SDLRPCParameterNameWindowId];
}
-- (nullable NSNumber<SDLInt> *)windowID {
+- (nullable NSNumber<SDLUInt> *)windowID {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameWindowId ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLink/SDLWindowCapability.h b/SmartDeviceLink/SDLWindowCapability.h
index 2cec8f0b4..66a9aaeda 100644
--- a/SmartDeviceLink/SDLWindowCapability.h
+++ b/SmartDeviceLink/SDLWindowCapability.h
@@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
* Can be set to a predefined window, or omitted for the main window on the main display.
* Size: min 1 max 100
*/
-@property (nullable, strong, nonatomic) NSNumber<SDLInt> *windowID;
+@property (nullable, strong, nonatomic) NSNumber<SDLUInt> *windowID;
/**
* A set of all fields that support text data.
diff --git a/SmartDeviceLink/SDLWindowCapability.m b/SmartDeviceLink/SDLWindowCapability.m
index ff27a5bc4..3e30a2b4c 100644
--- a/SmartDeviceLink/SDLWindowCapability.m
+++ b/SmartDeviceLink/SDLWindowCapability.m
@@ -13,11 +13,11 @@
@implementation SDLWindowCapability
-- (void)setWindowID:(nullable NSNumber<SDLInt> *)windowID {
+- (void)setWindowID:(nullable NSNumber<SDLUInt> *)windowID {
[self.store sdl_setObject:windowID forName:SDLRPCParameterNameWindowId];
}
-- (nullable NSNumber<SDLInt> *)windowID {
+- (nullable NSNumber<SDLUInt> *)windowID {
return [self.store sdl_objectForName:SDLRPCParameterNameWindowId ofClass:NSNumber.class error:nil];
}
diff --git a/SmartDeviceLink/SmartDeviceLink.h b/SmartDeviceLink/SmartDeviceLink.h
index b078e1be3..f7f397a1e 100644
--- a/SmartDeviceLink/SmartDeviceLink.h
+++ b/SmartDeviceLink/SmartDeviceLink.h
@@ -12,7 +12,6 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[];
/***** RPCs *****/
// Superclasses
#import "SDLEnum.h"
-#import "SDLEnumTypes.h"
#import "SDLRPCMessage.h"
#import "SDLRPCNotification.h"
#import "SDLRPCRequest.h"
diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLPredefinedWindowsSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLPredefinedWindowsSpec.m
index a7e372657..28efd0724 100644
--- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLPredefinedWindowsSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLPredefinedWindowsSpec.m
@@ -10,8 +10,8 @@ QuickSpecBegin(SDLPredefinedWindowsSpec)
describe(@"Individual Enum Value Tests", ^ {
it(@"Should match internal values", ^ {
- expect(SDLPredefinedWindowsDefaultWindow).to(equal(0));
- expect(SDLPredefinedWindowsPrimaryWidget).to(equal(1));
+ expect(@(SDLPredefinedWindowsDefaultWindow)).to(equal(0));
+ expect(@(SDLPredefinedWindowsPrimaryWidget)).to(equal(1));
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCreateWindowSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCreateWindowSpec.m
index 97a23a5e5..c1698c380 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCreateWindowSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCreateWindowSpec.m
@@ -16,7 +16,7 @@ describe(@"Getter/Setter Tests", ^ {
__block NSString *testAssociatedServiceType = nil;
__block NSString *testWindowName = nil;
__block SDLPredefinedWindows testWindowID;
- __block int testDuplicateUpdatesFromWindowID = 8;
+ __block NSUInteger testDuplicateUpdatesFromWindowID = 8;
beforeEach(^{
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteWindowSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteWindowSpec.m
index 23cc5dbd1..d1f6c2877 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteWindowSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteWindowSpec.m
@@ -11,7 +11,7 @@ QuickSpecBegin(SDLDeleteWindowSpec)
describe(@"Getter/Setter Tests", ^ {
- __block int testWindowID = 4;
+ __block NSUInteger testWindowID = 4;
it(@"Should set and get correctly", ^ {
SDLDeleteWindow *testRPC = [[SDLDeleteWindow alloc] init];
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m
index 94722a0f1..fc9a65699 100644
--- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m
@@ -24,7 +24,6 @@ describe(@"Getter/Setter Tests", ^ {
__block SDLImageType testImageType = nil;
__block NSString *testTextName = nil;
__block NSString *testImageName = nil;
- __block int testMaximunNumberOfWindows = 4;
beforeEach(^{
testImageType = SDLImageTypeDynamic;