summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLPermissionConstants.h
diff options
context:
space:
mode:
Diffstat (limited to 'SmartDeviceLink/SDLPermissionConstants.h')
-rw-r--r--SmartDeviceLink/SDLPermissionConstants.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLPermissionConstants.h b/SmartDeviceLink/SDLPermissionConstants.h
index 05b528bfd..1e452f29d 100644
--- a/SmartDeviceLink/SDLPermissionConstants.h
+++ b/SmartDeviceLink/SDLPermissionConstants.h
@@ -10,6 +10,7 @@
#import "NSNumber+NumberType.h"
#import "SDLRPCFunctionNames.h"
+#import "SDLPermissionElement.h"
NS_ASSUME_NONNULL_BEGIN
@@ -68,6 +69,14 @@ typedef NS_ENUM(NSUInteger, SDLPermissionGroupStatus) {
typedef void (^SDLPermissionsChangedHandler)(NSDictionary<SDLPermissionRPCName, NSNumber *> *_Nonnull change, SDLPermissionGroupStatus status);
/**
+ * The PermissionObserver is a block that is passed in to some methods that will be stored and called when specified permissions change.
+ *
+ * @param change A dictionary of permission changes containing <key(String): Permission Element, 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 (^SDLPermissionElementsChangedHandler)(NSDictionary<SDLPermissionElement *, 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>