diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2017-01-23 09:30:54 -0500 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2017-01-23 09:30:54 -0500 |
commit | b8fb408dd3f26e2f1b8e232dc6e6bfc1d1e37ba8 (patch) | |
tree | 0328571be77fcd5411ece33fd46749058b1e1555 | |
parent | 9f4dfa50d23f24c29cdd36186676d9ee393106e6 (diff) | |
download | sdl_ios-feature/sdl_0005_immutable_rpc_collections.tar.gz |
Make `NSMutableDictionary+Store.h` privatefeature/sdl_0005_immutable_rpc_collections
* Remove a helper method that’s not needed
-rw-r--r-- | SmartDeviceLink-iOS.xcodeproj/project.pbxproj | 2 | ||||
-rw-r--r-- | SmartDeviceLink/NSMutableDictionary+Store.h | 1 | ||||
-rw-r--r-- | SmartDeviceLink/NSMutableDictionary+Store.m | 6 | ||||
-rw-r--r-- | SmartDeviceLink/SDLDisplayCapabilities.m | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLHMIPermissions.m | 4 | ||||
-rw-r--r-- | SmartDeviceLink/SDLImageField.m | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLRegisterAppInterface.m | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLResetGlobalProperties.m | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SmartDeviceLink.h | 1 |
9 files changed, 8 insertions, 14 deletions
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj index 3bb5759c9..4fa757f46 100644 --- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj +++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj @@ -867,7 +867,7 @@ 5DFFB9151BD7C89700DB3F04 /* SDLConnectionManagerType.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DFFB9141BD7C89700DB3F04 /* SDLConnectionManagerType.h */; }; DA0C46AD1DCD35080001F2A8 /* SDLNames.m in Sources */ = {isa = PBXBuildFile; fileRef = DA0C46AC1DCD35080001F2A8 /* SDLNames.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 */; settings = {ATTRIBUTES = (Public, ); }; }; + DA318C1F1DD0F06C00C035AC /* NSMutableDictionary+Store.h in Headers */ = {isa = PBXBuildFile; fileRef = DA318C1D1DD0F06C00C035AC /* NSMutableDictionary+Store.h */; }; DA318C201DD0F06C00C035AC /* NSMutableDictionary+Store.m in Sources */ = {isa = PBXBuildFile; fileRef = DA318C1E1DD0F06C00C035AC /* NSMutableDictionary+Store.m */; }; DA4353DF1D271FD10099B8C4 /* CGPointUtilSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DA4353DE1D271FD10099B8C4 /* CGPointUtilSpec.m */; }; DA4353E31D2720A30099B8C4 /* SDLPinchGestureSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DA4353E21D2720A30099B8C4 /* SDLPinchGestureSpec.m */; }; diff --git a/SmartDeviceLink/NSMutableDictionary+Store.h b/SmartDeviceLink/NSMutableDictionary+Store.h index fa13cd1b7..7bc77366a 100644 --- a/SmartDeviceLink/NSMutableDictionary+Store.h +++ b/SmartDeviceLink/NSMutableDictionary+Store.h @@ -20,7 +20,6 @@ typedef NSString* SDLEnum SDL_SWIFT_ENUM; - (nullable id)sdl_objectForName:(SDLName)name; - (nullable id)sdl_objectForName:(SDLName)name ofClass:(Class)classType; - (NSArray *)sdl_objectsForName:(SDLName)name ofClass:(Class)classType; -- (NSArray<SDLEnum> *)sdl_enumsForName:(SDLName)name; @end diff --git a/SmartDeviceLink/NSMutableDictionary+Store.m b/SmartDeviceLink/NSMutableDictionary+Store.m index 905fc15a1..92007cf25 100644 --- a/SmartDeviceLink/NSMutableDictionary+Store.m +++ b/SmartDeviceLink/NSMutableDictionary+Store.m @@ -44,14 +44,10 @@ NS_ASSUME_NONNULL_BEGIN for (NSDictionary<NSString *, id> *dict in array) { [newList addObject:[[classType alloc] initWithDictionary:dict]]; } - return [NSArray arrayWithArray:newList]; + return [newList copy]; } } -- (NSArray<SDLEnum> *)sdl_enumsForName:(SDLName)name { - return [self sdl_objectForName:name]; -} - @end diff --git a/SmartDeviceLink/SDLDisplayCapabilities.m b/SmartDeviceLink/SDLDisplayCapabilities.m index 95a03c635..06a8912e7 100644 --- a/SmartDeviceLink/SDLDisplayCapabilities.m +++ b/SmartDeviceLink/SDLDisplayCapabilities.m @@ -42,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN } - (NSArray<SDLMediaClockFormat> *)mediaClockFormats { - return [store sdl_enumsForName:SDLNameMediaClockFormats]; + return [store sdl_objectForName:SDLNameMediaClockFormats]; } - (void)setGraphicSupported:(NSNumber<SDLBool> *)graphicSupported { diff --git a/SmartDeviceLink/SDLHMIPermissions.m b/SmartDeviceLink/SDLHMIPermissions.m index 5cb1a11aa..96d947aa5 100644 --- a/SmartDeviceLink/SDLHMIPermissions.m +++ b/SmartDeviceLink/SDLHMIPermissions.m @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN } - (NSArray<SDLHMILevel> *)allowed { - return [store sdl_enumsForName:SDLNameAllowed]; + return [store sdl_objectForName:SDLNameAllowed]; } - (void)setUserDisallowed:(NSArray<SDLHMILevel> *)userDisallowed { @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN } - (NSArray<SDLHMILevel> *)userDisallowed { - return [store sdl_enumsForName:SDLNameUserDisallowed]; + return [store sdl_objectForName:SDLNameUserDisallowed]; } @end diff --git a/SmartDeviceLink/SDLImageField.m b/SmartDeviceLink/SDLImageField.m index fdd3bbd47..d25b6e213 100644 --- a/SmartDeviceLink/SDLImageField.m +++ b/SmartDeviceLink/SDLImageField.m @@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN } - (NSArray<SDLFileType> *)imageTypeSupported { - return [store sdl_enumsForName:SDLNameImageTypeSupported]; + return [store sdl_objectForName:SDLNameImageTypeSupported]; } - (void)setImageResolution:(nullable SDLImageResolution *)imageResolution { diff --git a/SmartDeviceLink/SDLRegisterAppInterface.m b/SmartDeviceLink/SDLRegisterAppInterface.m index adeb737cc..7cf17ba86 100644 --- a/SmartDeviceLink/SDLRegisterAppInterface.m +++ b/SmartDeviceLink/SDLRegisterAppInterface.m @@ -147,7 +147,7 @@ NS_ASSUME_NONNULL_BEGIN } - (nullable NSArray<SDLAppHMIType> *)appHMIType { - return [parameters sdl_enumsForName:SDLNameAppHMIType]; + return [parameters sdl_objectForName:SDLNameAppHMIType]; } - (void)setHashID:(nullable NSString *)hashID { diff --git a/SmartDeviceLink/SDLResetGlobalProperties.m b/SmartDeviceLink/SDLResetGlobalProperties.m index 341f9a22e..21242cbab 100644 --- a/SmartDeviceLink/SDLResetGlobalProperties.m +++ b/SmartDeviceLink/SDLResetGlobalProperties.m @@ -34,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN } - (NSArray<SDLGlobalProperty> *)properties { - return [parameters sdl_enumsForName:SDLNameProperties]; + return [parameters sdl_objectForName:SDLNameProperties]; } @end diff --git a/SmartDeviceLink/SmartDeviceLink.h b/SmartDeviceLink/SmartDeviceLink.h index 9a9f7f0f2..9ca9975b4 100644 --- a/SmartDeviceLink/SmartDeviceLink.h +++ b/SmartDeviceLink/SmartDeviceLink.h @@ -306,7 +306,6 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[]; #import "SDLPermissionManager.h" // Utilities -#import "NSMutableDictionary+Store.h" #import "NSNumber+NumberType.h" #import "SDLErrorConstants.h" #import "SDLNotificationConstants.h" |