blackberry.com
BlackBerry Dynamics
Runtime library for iOS applications
from the application developer portal

GDiOS.h

Go to the documentation of this file.
00001 /*
00002  * (c) 2018 BlackBerry Limited. All rights reserved.
00003  *
00004  */
00005 
00006 #ifndef __GD_IOS_H__
00007 #define __GD_IOS_H__
00008 
00009 #import <UIKit/UIKit.h>
00010 #import "GDAppResultCode.h"
00011 #import "GDPortability.h"
00012 #import "GDAppConfig.h"
00013 #import "GDVersion.h"
00014 
00015 // See: http://clang.llvm.org/docs/LanguageExtensions.html
00016 #ifndef __has_extension
00017 #define __has_extension(x) 0  // Compatibility with non-clang compilers.
00018 #endif
00019 
00020 @class GDServiceProvider, GDVersion, GDState;
00021 
00022 
00029 typedef NS_ENUM(NSInteger, GDServiceType)
00030 {
00032     GDServiceTypeApplication=0,
00034     GDServiceTypeServer,
00035 };
00036 
00037 
00047 typedef NS_ENUM(NSInteger, GDServiceProviderType)
00048 {
00054     GDServiceProviderApplication __deprecated_enum_msg("Use GDServiceTypeApplication instead.") = 0,
00055     
00061     GDServiceProviderServer __deprecated_enum_msg("Use GDServiceTypeServer instead"),
00062 };
00063 
00064 
00065 GD_NS_ASSUME_NONNULL_BEGIN
00066 
00072 @interface GDAppEvent : NSObject
00073 {
00074    
00075     NSString* message;
00076 
00077     GDAppResultCode code;
00078 
00079     GDAppEventType type;
00080 }
00081 
00088 @property (nonatomic, copy) NSString* message;
00089 
00096 @property (nonatomic, assign) GDAppResultCode code;
00097 /* error code 0, means success */
00098 
00105 @property (nonatomic, assign) GDAppEventType type;
00106 
00107 @end
00108 
00109 
00118 @protocol GDiOSDelegate
00119 @optional
00120 
00129 - (void)handleEvent:(GDAppEvent*)anEvent;
00130 
00131 @end
00132 
00632 @interface GDiOS : NSObject
00633 
00646 + (instancetype)sharedInstance;
00647 
00778 - (void)authorize:(id<GDiOSDelegate> _Nonnull)delegate;
00779 
00797 - (void)authorize;
00798 
00842 - (BOOL)authorizeAutonomously:(id<GDiOSDelegate> _Nonnull)delegate;
00843 
00857 - (BOOL)authorizeAutonomously;
00858 
00913 typedef NSString *ActivationParameter;
00914 extern ActivationParameter const ActivationParameterUserIdentifier;
00915 extern ActivationParameter const ActivationParameterAccessKey;
00916 extern ActivationParameter const ActivationParameterNOCAddress;
00917 extern ActivationParameter const ActivationParameterShowUserInterface;
00918 
00949 - (void)programmaticAuthorize:(NSDictionary<ActivationParameter, id> *)activationParameters;
00950 
00951 #if __has_extension(attribute_deprecated_with_message)
00952 #   define DEPRECATE_PROGRAMMATICAUTHORIZE __attribute((deprecated("Use -programmaticAuthorize:activationParameters instead.")))
00953 #else
00954 #   define DEPRECATE_GETWINDOW __attribute((deprecated))
00955 #endif
00956 
00967 - (void)programmaticAuthorize:(NSString *)userID  withAccessKey:(NSString *)accessKey DEPRECATE_PROGRAMMATICAUTHORIZE;
00968 
01011 - (void)programmaticAuthorize:(NSString *)userID
01012                 withAccessKey:(NSString *)accessKey
01013        networkOperationCenter:(NSURL *)nocAddress DEPRECATE_PROGRAMMATICAUTHORIZE;
01014 
01015 #undef DEPRECATE_PROGRAMMATICAUTHORIZE
01016 
01029 @property (nonatomic, assign, readonly, getter=isActivated) BOOL activationComplete;
01030 
01351 - (GD_NSDictionary(NSString *, id) *)getApplicationConfig;
01352 
01407 - (GD_NSDictionary(NSString *, id) *)getApplicationPolicy;
01408 
01438 - (NSString*)getApplicationPolicyString;
01439 
01533 - (GD_NSArray(GDServiceProvider *) *)getServiceProviders;
01534 
01570 - (GD_NSArray(GDServiceProvider *) *)getServiceProvidersFor:(NSString*)serviceId andVersion:(GD_NSNULLABLE NSString*)version andServiceType:(GDServiceType)serviceType;
01571 
01572 
01573 #if __has_extension(attribute_deprecated_with_message)
01574 #   define DEPRECATE_GETSERVICEPROVIDERSFOR __attribute((deprecated("Use getServiceProvidersFor:andVersion:andServiceType:")))
01575 #else
01576 #   define DEPRECATE_GETSERVICEPROVIDERSFOR __attribute((deprecated))
01577 #endif
01578 
01619 - (GD_NSArray(GDServiceProvider *) *)getServiceProvidersFor:(NSString*)serviceId andVersion:(GD_NSNULLABLE NSString*)version andType:(GDServiceProviderType)serviceProviderType DEPRECATE_GETSERVICEPROVIDERSFOR;
01620 
01621 #undef DEPRECATE_GETSERVICEPROVIDERSFOR
01622 
01639 typedef void (^GDGetEntitlementVersionsForBlock) (GD_NSArray(GDVersion *)* GD_NSNULLABLE_POINTER entitlementVersions, NSError* error);
01640 
01708 - (void)getEntitlementVersionsFor:(NSString*)identifier
01709                     callbackBlock:(GDGetEntitlementVersionsForBlock)block;
01710 
01711 #if __has_extension(attribute_deprecated_with_message)
01712 #   define DEPRECATE_GETWINDOW __attribute((deprecated("Use the window property from the main app delegate instance.")))
01713 #else
01714 #   define DEPRECATE_GETWINDOW __attribute((deprecated))
01715 #endif
01716 
01747 - (UIWindow*)getWindow DEPRECATE_GETWINDOW;
01748 
01749 #undef DEPRECATE_GETWINDOW
01750 
01757 - (NSString*)getVersion;
01758 
01779 - (BOOL)showPreferenceUI:(GD_NSNULLABLE UIViewController*)baseViewController;
01780 
01836 - (BOOL)setUIAutoRotationForPortrait:(BOOL) portrait
01837                andPortraitUpsideDown:(BOOL) portraitUpsideDown
01838                    andLandscapeRight:(BOOL) landscapeRight
01839                     andLandscapeLeft:(BOOL)landscapeLeft;
01840 
01873 - (void)configureUIWithLogo:(NSString*)imagePath
01874                      bundle:(GD_NSNULLABLE NSBundle*)bundle
01875                       color:(GD_NSNULLABLE UIColor*)color;
01876 
01877 #if __has_extension(attribute_deprecated_with_message)
01878 #   define DEPRECATE_CONFIG_UI_WITH_BLOCK_MESSAGE __attribute__((deprecated("No longer supported")))
01879 #   define DEPRECATE_CONFIG_UI_WITH_WIPE_MESSAGE __attribute__((deprecated("No longer supported")))
01880 #else
01881 #   define DEPRECATE_CONFIG_UI_WITH_BLOCK_MESSAGE __attribute__((deprecated))
01882 #   define DEPRECATE_CONFIG_UI_WITH_WIPE_MESSAGE __attribute__((deprecated))
01883 #endif
01884 
01905 - (void)configureUIWithBlockedMessage:(GD_NSNULLABLE NSString*)message DEPRECATE_CONFIG_UI_WITH_BLOCK_MESSAGE;
01906 
01928 - (void)configureUIWithWipedMessage:(GD_NSNULLABLE NSString*)message DEPRECATE_CONFIG_UI_WITH_WIPE_MESSAGE;
01929 
01942 @property (GD_NSNULLABLE_PROP nonatomic, weak) id<GDiOSDelegate> delegate;
01943 
01944 #if __has_extension(attribute_deprecated_with_message)
01945 #   define DEPRECATE_LAUNCHOPTIONS __attribute__((deprecated("No longer required.")))
01946 #else
01947 #   define DEPRECATE_LAUNCHOPTIONS __attribute__((deprecated))
01948 #endif
01949 
01969 @property (GD_NSNULLABLE_PROP nonatomic, strong) GD_NSDictionary(NSObject *, id)* launchOptions DEPRECATE_LAUNCHOPTIONS;
01970 
02013 @property (nonatomic, readonly) BOOL canAuthorizeAutonomously;
02014 
02033 - (BOOL)executeRemoteLock;
02034 
02060 - (void)executeBlock:(NSString *)blockId withTitle:(NSString *)title withMessage:(NSString *)message;
02061 
02070 - (void)executeUnblock:(NSString *)blockId;
02071 
02084 @property (nonatomic, strong, readonly) GDState *state;
02085 
02086 @end
02087 
02088 GD_NS_ASSUME_NONNULL_END
02089 
02090 #endif /* __GD_IOS_H__ */