diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2020-07-09 13:56:21 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2020-07-09 13:56:21 -0400 |
commit | 6d78493a4a448de1ecec80c953c769ef213a7f1d (patch) | |
tree | 22b8b75f577f837eb6bb1791d07b29bdf5167778 | |
parent | fadf19f85f10e51a07335f946addcef083fa26ef (diff) | |
parent | a8a9aedaa1043b7e8588ede76169ff7aa329e8d3 (diff) | |
download | sdl_ios-6d78493a4a448de1ecec80c953c769ef213a7f1d.tar.gz |
Merge branch 'bugfix/issue-1682-tracking-parameter-permissions' of https://github.com/smartdevicelink/sdl_ios into bugfix/issue-1682-tracking-parameter-permissions
# Conflicts:
# Example Apps/Example Swift/RPCPermissionsManager.swift
# SmartDeviceLink/SDLPermissionConstants.h
-rw-r--r-- | Example Apps/Example ObjC/RPCPermissionsManager.m | 2 | ||||
-rw-r--r-- | Example Apps/Example Swift/RPCPermissionsManager.swift | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLPermissionConstants.h | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLPermissionFilter.h | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/Example Apps/Example ObjC/RPCPermissionsManager.m b/Example Apps/Example ObjC/RPCPermissionsManager.m index 1e259739d..93d2755e6 100644 --- a/Example Apps/Example ObjC/RPCPermissionsManager.m +++ b/Example Apps/Example ObjC/RPCPermissionsManager.m @@ -30,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN NSArray<SDLPermissionElement *> *menuRPCPermissions = @[addCommandPermissionElement, createInteractionPermissionElement, performInteractionPermissionElement]; [self sdlex_checkCurrentGroupPermissionsWithManager:manager permissionElements:menuRPCPermissions]; - // Set up an observer for permissions changes to media template releated RPCs. Since the `groupType` is set to all allowed, this block is called when the group permissions changes from all allowed. This block is called immediately when created. + // Set up an observer for permissions changes to media template releated RPCs. Since the `groupType` is set to all allowed, this block is called when the group permissions changes to all-allowed or from all-allowed to some-not-allowed. SDLPermissionElement *setMediaClockPermissionElement = [[SDLPermissionElement alloc] initWithRPCName:SDLRPCFunctionNameSetMediaClockTimer parameterPermissions:nil]; SDLPermissionElement *subscribeButtonPermissionElement = [[SDLPermissionElement alloc] initWithRPCName:SDLRPCFunctionNameSubscribeButton parameterPermissions:nil]; NSArray<SDLPermissionElement *> *mediaTemplateRPCPermissions = @[setMediaClockPermissionElement, subscribeButtonPermissionElement]; diff --git a/Example Apps/Example Swift/RPCPermissionsManager.swift b/Example Apps/Example Swift/RPCPermissionsManager.swift index 62550513a..144a636f6 100644 --- a/Example Apps/Example Swift/RPCPermissionsManager.swift +++ b/Example Apps/Example Swift/RPCPermissionsManager.swift @@ -26,7 +26,7 @@ class RPCPermissionsManager { let menuRPCPermissions = [addCommandPermissionElement, createInteractionPermissionElement, performInteractionPermissionElement] _ = checkCurrentGroupPermissions(with: manager, permissionElements: menuRPCPermissions) - // Set up an observer for permissions changes to media template releated RPCs. Since the `groupType` is set to all allowed, this block is called when the group permissions changes from all allowed. This block is called immediately when created. + // Set up an observer for permissions changes to media template releated RPCs. Since the `groupType` is set to all allowed, this block is called when the group permissions changes to all-allowed or from all-allowed to some-not-allowed. let setMediaClockPermissionElement = SDLPermissionElement(rpcName: SDLRPCFunctionName.setMediaClockTimer, parameterPermissions: nil) let subscribeButtonPermissionElement = SDLPermissionElement(rpcName: SDLRPCFunctionName.subscribeButton, parameterPermissions: nil) let mediaTemplatePermissions = [setMediaClockPermissionElement, subscribeButtonPermissionElement] diff --git a/SmartDeviceLink/SDLPermissionConstants.h b/SmartDeviceLink/SDLPermissionConstants.h index 907056779..2cd9bbc4e 100644 --- a/SmartDeviceLink/SDLPermissionConstants.h +++ b/SmartDeviceLink/SDLPermissionConstants.h @@ -70,7 +70,7 @@ typedef NS_ENUM(NSUInteger, SDLPermissionGroupStatus) { typedef void (^SDLPermissionsChangedHandler)(NSDictionary<SDLPermissionRPCName, NSNumber *> *_Nonnull change, SDLPermissionGroupStatus status); /** - * This is a block that is passed in to some methods that will be stored and called when specified permissions change. + * A block that will be called when specified permissions change. It will return whether each RPC and its parameters are allowed as well as the permission group status of all the RPCs. * * @param change A dictionary of permission changes containing <key(String): SDLPermissionRPCName, object(SDLRPCPermissionStatus)> * @param status The change made to all of the RPCs in the change dictionary. Allowed, if all RPCs are now allowed, Disallowed if all RPCs are now disallowed, or Mixed if some are allowed, and some are disallowed diff --git a/SmartDeviceLink/SDLPermissionFilter.h b/SmartDeviceLink/SDLPermissionFilter.h index 93cf4d2fd..e733d2331 100644 --- a/SmartDeviceLink/SDLPermissionFilter.h +++ b/SmartDeviceLink/SDLPermissionFilter.h @@ -58,9 +58,9 @@ NS_ASSUME_NONNULL_BEGIN /** * Create a new permission filter group with a SDLRPCPermissionStatusChangedHandler. * - * @param rpcNames The names of the RPCs to watch permissions of. + * @param rpcNames The names of the RPCs to watch permissions of. * @param groupType The type of notifications to be sent for this filter group. - * @param permissionStatusHandler The block observer to be called when changes occur. + * @param permissionStatusHandler The block observer to be called when changes occur. * * @return An instance of `SDLPermissionFilter`. */ @@ -76,7 +76,7 @@ NS_ASSUME_NONNULL_BEGIN - (BOOL)isEqualToFilter:(SDLPermissionFilter *)otherFilter; /** - * Converts an array of SDLPermissionElement objects to and array of SDLPermissionRPCName objects + * Converts an array of SDLPermissionElement objects to an array of SDLPermissionRPCName objects * * @param permissionElements The permission elements to convert. * |