summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlapinskijw <jlapinski.dev@gmail.com>2020-06-24 08:16:40 -0400
committerlapinskijw <jlapinski.dev@gmail.com>2020-06-24 08:16:40 -0400
commit222e0623d6966a469e3bdc4c51f4a15674495429 (patch)
tree2bbf4f54af09817cb473a7216430e9be10b29ecf
parent8814e7ae355aeef42a9e1603d524c5b4a3b6addd (diff)
downloadsdl_ios-222e0623d6966a469e3bdc4c51f4a15674495429.tar.gz
code cleanup
-rw-r--r--SmartDeviceLink/SDLPermissionFilter.h5
-rw-r--r--SmartDeviceLink/SDLPermissionManager.h2
-rw-r--r--SmartDeviceLink/SDLPermissionManager.m11
3 files changed, 1 insertions, 17 deletions
diff --git a/SmartDeviceLink/SDLPermissionFilter.h b/SmartDeviceLink/SDLPermissionFilter.h
index 8f271c8ad..bc16a8253 100644
--- a/SmartDeviceLink/SDLPermissionFilter.h
+++ b/SmartDeviceLink/SDLPermissionFilter.h
@@ -31,11 +31,6 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (assign, nonatomic, readonly) SDLPermissionGroupType groupType;
-///**
-// * The block that will be called on status changes to this filter group.
-// */
-//@property (copy, nonatomic, readonly) SDLPermissionsChangedHandler handler;
-
/**
* The block that will be called on status changes to this filter group.
*/
diff --git a/SmartDeviceLink/SDLPermissionManager.h b/SmartDeviceLink/SDLPermissionManager.h
index b5d485dac..5639867bf 100644
--- a/SmartDeviceLink/SDLPermissionManager.h
+++ b/SmartDeviceLink/SDLPermissionManager.h
@@ -89,7 +89,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* @return A dictionary specifying if the passed in RPC names are currently allowed or not
*/
-- (NSDictionary<SDLPermissionElement *, NSNumber *> *)statusesOfRPCNames:(NSArray<SDLPermissionElement *> *)rpcNames;
+- (NSDictionary<SDLRPCFunctionName, NSNumber *> *)statusesOfRPCNames:(NSArray<SDLPermissionElement *> *)rpcNames;
/**
* Add an observer for specified RPC names, with a callback that will be called whenever the value changes, as well as immediately with the current status.
diff --git a/SmartDeviceLink/SDLPermissionManager.m b/SmartDeviceLink/SDLPermissionManager.m
index 06438528e..c923a17d3 100644
--- a/SmartDeviceLink/SDLPermissionManager.m
+++ b/SmartDeviceLink/SDLPermissionManager.m
@@ -160,7 +160,6 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark Add Observers
- (SDLPermissionObserverIdentifier)addObserverForRPCs:(NSArray<SDLPermissionRPCName> *)rpcNames groupType:(SDLPermissionGroupType)groupType withHandler:(nonnull SDLPermissionsChangedHandler)handler {
-
SDLPermissionFilter *filter = [SDLPermissionFilter filterWithRPCNames:[self sdl_createPermissionElementFromRPCNames:rpcNames] groupType:groupType observer:handler];
// Store the filter for later use
@@ -308,16 +307,6 @@ NS_ASSUME_NONNULL_BEGIN
return permissionElements;
}
-- (NSDictionary<SDLPermissionRPCName, NSNumber *> *)sdl_convertPermissionElementsDictionary:(NSDictionary<SDLPermissionElement*, NSNumber *> *)permissionElementsDictionary {
- NSMutableDictionary *rpcNameDictionary = [[NSMutableDictionary alloc] init];
- for (SDLPermissionElement *key in permissionElementsDictionary.allKeys) {
- SDLPermissionRPCName rpcName = key.rpcName;
- [rpcNameDictionary setObject:permissionElementsDictionary[key] forKey:rpcName];
- }
-
- return rpcNameDictionary;
-}
-
/**
* Determine if a filter changes based on an HMI level change and the filter's group type settings. This will run through the filter's RPCs, check the permission for each and see if any permission within the filter changes based on some permission now being allowed when it wasn't, or not allowed when it was. This also takes into account the group type setting, so an All Allowed filter will return YES if and only if some permission changed *and* that causes a status change *to* or *from* Allowed.
*