summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLPermissionConstants.h
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2016-05-27 14:34:27 -0400
committerJoel Fischer <joeljfischer@gmail.com>2016-05-27 14:34:27 -0400
commit8cbaaf1788f0d6f6fee710db4c12f34c4d12aca4 (patch)
tree61bf8e8760ee61b76a56adb4b1541d119f4a2beb /SmartDeviceLink/SDLPermissionConstants.h
parent85027d6e03a997cf585c965ff453d36f3ce12adc (diff)
parente274adde593fead0a5b787e7ef024d20f983dacb (diff)
downloadsdl_ios-8cbaaf1788f0d6f6fee710db4c12f34c4d12aca4.tar.gz
Merge branch 'develop' into feature/enhanced_framework
Conflicts: README.md SmartDeviceLink-iOS.xcodeproj/project.pbxproj
Diffstat (limited to 'SmartDeviceLink/SDLPermissionConstants.h')
-rw-r--r--SmartDeviceLink/SDLPermissionConstants.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLPermissionConstants.h b/SmartDeviceLink/SDLPermissionConstants.h
new file mode 100644
index 000000000..49a6dd187
--- /dev/null
+++ b/SmartDeviceLink/SDLPermissionConstants.h
@@ -0,0 +1,39 @@
+//
+// SDLPermissionsConstants.h
+// SmartDeviceLink-iOS
+//
+// Created by Joel Fischer on 11/18/15.
+// Copyright © 2015 smartdevicelink. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import "NSNumber+NumberType.h"
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef NSString SDLPermissionRPCName;
+typedef NSUUID SDLPermissionObserverIdentifier;
+
+typedef NS_ENUM(NSUInteger, SDLPermissionGroupType) {
+ SDLPermissionGroupTypeAllAllowed,
+ SDLPermissionGroupTypeAny
+};
+
+typedef NS_ENUM(NSUInteger, SDLPermissionGroupStatus) {
+ SDLPermissionGroupStatusAllowed,
+ SDLPermissionGroupStatusDisallowed,
+ SDLPermissionGroupStatusMixed,
+ SDLPermissionGroupStatusUnknown
+};
+
+/**
+ * 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): 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 (^SDLPermissionObserver)(NSDictionary<SDLPermissionRPCName *, NSNumber<SDLBool> *> * _Nonnull change, SDLPermissionGroupStatus status);
+
+NS_ASSUME_NONNULL_END \ No newline at end of file