diff options
author | James Lapinski <43190016+lapinskijw@users.noreply.github.com> | 2020-06-11 10:05:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-11 10:05:26 -0400 |
commit | 7f86e6966f2fa227bddc439c3711467b91160115 (patch) | |
tree | 761bbade76bdd33e10124a850bfd7b846d837b9b | |
parent | 92fb57785d5a0e69319fc893406ac0b192c9b5cd (diff) | |
download | sdl_ios-bugfix/issue-1667-permission-manager-method-alignment.tar.gz |
Apply suggestions from code reviewbugfix/issue-1667-permission-manager-method-alignment
Co-authored-by: NicoleYarroch <nicole@livio.io>
-rw-r--r-- | Example Apps/Example Swift/RPCPermissionsManager.swift | 4 | ||||
-rw-r--r-- | SmartDeviceLink/SDLPermissionConstants.h | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/Example Apps/Example Swift/RPCPermissionsManager.swift b/Example Apps/Example Swift/RPCPermissionsManager.swift index a7568b162..1efcbe129 100644 --- a/Example Apps/Example Swift/RPCPermissionsManager.swift +++ b/Example Apps/Example Swift/RPCPermissionsManager.swift @@ -101,7 +101,7 @@ private extension RPCPermissionsManager { /// - rpcName: The name of the RPC /// - isRPCAllowed: The permission status for the RPC class func logRPCPermission(rpcName: SDLRPCFunctionName, isRPCAllowed: Bool) { - SDLLog.d("\(rpcName) RPC can be sent to SDL Core? \(isRPCAllowed ? "yes" : "no")") + SDLLog.d("\(rpcName.rawValue.rawValue) RPC can be sent to SDL Core? \(isRPCAllowed ? "yes" : "no")") } /// Logs permissions for a group of RPCs @@ -111,7 +111,7 @@ private extension RPCPermissionsManager { /// - groupPermissionStatus: The permission status for all RPCs in the group /// - individualPermissionStatuses: The permission status for each of the RPCs in the group class func logRPCGroupPermissions(rpcNames: [SDLRPCFunctionName], groupPermissionStatus: SDLPermissionGroupStatus, individualPermissionStatuses: [SDLRPCFunctionName:NSNumber]) { - SDLLog.d("The group status for \(rpcNames) has changed to: \(groupPermissionStatus)") + SDLLog.d("The group status for \(rpcNames.map { $0.rawValue.rawValue } ) has changed to: \(groupPermissionStatus.rawValue)") for (rpcName, rpcAllowed) in individualPermissionStatuses { logRPCPermission(rpcName: rpcName, isRPCAllowed: rpcAllowed.boolValue) } diff --git a/SmartDeviceLink/SDLPermissionConstants.h b/SmartDeviceLink/SDLPermissionConstants.h index 8fd9c588a..05b528bfd 100644 --- a/SmartDeviceLink/SDLPermissionConstants.h +++ b/SmartDeviceLink/SDLPermissionConstants.h @@ -68,11 +68,11 @@ typedef NS_ENUM(NSUInteger, SDLPermissionGroupStatus) { typedef void (^SDLPermissionsChangedHandler)(NSDictionary<SDLPermissionRPCName, NSNumber *> *_Nonnull change, SDLPermissionGroupStatus status); /** -* The SDLObservedPermissionsChangedHandler is a block that is passed in to subscribeToRPCNames:groupType:withHandler: that will be stored and called when specified permissions change. -* -* @param change A dictionary of permission changes containing <key(SDLRPCFunctionName): RPC Name, object(BOOL): YES if the RPC is allowed, NO if it is not allowed> -* @param status The change made to all of the RPCs in the changedDict. Allowed, if all RPCs are now allowed, Disallowed if all RPCs are now disallowed, or Mixed if some are allowed, and some are disallowed -*/ + * The SDLObservedPermissionsChangedHandler is a block that is passed in to subscribeToRPCNames:groupType:withHandler: that will be stored and called when specified permissions change. + * + * @param change A dictionary of permission changes containing <key(SDLRPCFunctionName): RPC Name, object(BOOL): YES if the RPC is allowed, NO if it is not allowed> + * @param status The change made to all of the RPCs in the changedDict. Allowed, if all RPCs are now allowed, Disallowed if all RPCs are now disallowed, or Mixed if some are allowed, and some are disallowed + */ typedef void (^SDLSubscribedPermissionsChangedHandler)(NSDictionary<SDLRPCFunctionName, NSNumber *> *_Nonnull change, SDLPermissionGroupStatus status); NS_ASSUME_NONNULL_END |