• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 11.0.1.151
platform/apple/ios/build/GD.framework/Headers/GDServices.h
Go to the documentation of this file.
1 /*
2  * (c) 2017 BlackBerry Limited. All rights reserved.
3  *
4  * The documentation in this file is also used elsewhere.
5  */
6 
7 #ifndef __GD_SERVICES_H__
8 #define __GD_SERVICES_H__
9 
10 #import <Foundation/Foundation.h>
11 
12 /* \cond DOXYGEN_IGNORE */
13 #if __has_extension(attribute_deprecated_with_message)
14 # define DEPRECATE_BRINGTOFRONTWITHOUTCOMPLETION __attribute((deprecated("Use bringToFront:completion:error:")))
15 #else
16 # define DEPRECATE_BRINGTOFRONTWITHOUTCOMPLETION __attribute((deprecated))
17 #endif
18 /* \endcond */
19 
20 NS_ASSUME_NONNULL_BEGIN
21 
66 extern NSString* const GDServicesErrorDomain;
67 
70 extern NSInteger const GDServicesErrorGeneral;
71 
74 extern NSInteger const GDServicesErrorProcessSuspended;
75 
79 extern NSInteger const GDServicesErrorApplicationNotFound;
80 
84 extern NSInteger const GDServicesErrorServiceNotFound;
85 
89 extern NSInteger const GDServicesErrorServiceVersionNotFound;
90 
94 extern NSInteger const GDServicesErrorMethodNotFound;
95 
99 extern NSInteger const GDServicesErrorNotAllowed;
100 
104 extern NSInteger const GDServicesErrorInvalidParams;
105 
109 extern NSInteger const GDServicesErrorCertificateNotFound;
110 
114 extern NSInteger const GDServicesMethodDisabled;
115 
119 extern NSInteger const GDServicesVersionDisabled;
120 
124 extern NSInteger const GDServicesServiceDisabled;
125 
129 extern NSInteger const GDServicesErrorEnterpriseUserNotMatch;
130 
151 typedef NS_ENUM(NSInteger, GDTForegroundOption)
152 {
155 
158 
161 
162 };
163 
170 extern NSString* const GDFrontRequestService;
171 
178 extern NSString* const GDFrontRequestMethod;
179 
216 @protocol GDServiceClientDelegate<NSObject>
217 @required
274 - (void) GDServiceClientDidReceiveFrom:(NSString*)application
275  withParams:(id)params
276  withAttachments:(NSArray<NSString *> *)attachments
277  correspondingToRequestID:(NSString*)requestID;
278 
279 @optional
306 - (void) GDServiceClientDidStartSendingTo:(NSString*)application withFilename:(NSString*)filename correspondingToRequestID:(NSString*)requestID;
307 
308 @optional
337 - (void) GDServiceClientDidFinishSendingTo:(NSString*)application withAttachments:(NSArray<NSString *> *)attachments withParams:(id)params correspondingToRequestID:(NSString*)requestID;
338 
339 @optional
367 - (void) GDServiceClientWillStartReceivingFrom:(NSString*)application
368  numberOfAttachments:(NSUInteger)attachments
369  forRequestID:(NSString*)requestID;
370 
371 @optional
403 - (void) GDServiceClientWillStartReceivingFrom:(NSString*)application
404  attachmentPath:(NSString*)path
405  fileSize:(NSNumber*)size
406  forRequestID:(NSString*)requestID;
407 
408 @end
409 
410 
446 @interface GDServiceClient : NSObject
447 
520 + (BOOL) sendTo:(NSString*)application
521  withService:(NSString*)service
522  withVersion:(NSString*)version
523  withMethod:(NSString*)method
524  withParams:(nullable id)params
525 withAttachments:(nullable NSArray<NSString *> *)attachments
526 bringServiceToFront:(GDTForegroundOption)option
527  requestID:(NSString * _Nullable * _Nullable)requestID
528  error:(NSError**)error;
529 
565 + (BOOL) cancelRequest:(NSString*)requestID toApplication:(NSString*)application;
566 
597 + (BOOL) bringToFront:(nonnull NSString*)application completion:( void(^)(BOOL) )completion error:(NSError**)error;
598 
621 + (BOOL) bringToFront:(NSString*)application error:(NSError**)error DEPRECATE_BRINGTOFRONTWITHOUTCOMPLETION;
622 
640 @property (nullable, weak, getter = getDelegate, setter = setDelegate:) id<GDServiceClientDelegate> delegate;
641 
642 @end
643 
682 @protocol GDServiceDelegate<NSObject>
683 
684 @required
754 - (void) GDServiceDidReceiveFrom:(NSString*)application
755  forService:(NSString*)service
756  withVersion:(NSString*)version
757  forMethod:(NSString*)method
758  withParams:(id)params
759  withAttachments:(NSArray<NSString *> *)attachments
760  forRequestID:(NSString*)requestID;
761 
762 @optional
763 
790 - (void) GDServiceDidStartSendingTo:(NSString*)application withFilename:(NSString*)filename correspondingToRequestID:(NSString*)requestID;
791 
821 - (void) GDServiceDidFinishSendingTo:(NSString*)application withAttachments:(NSArray<NSString *> *)attachments withParams:(id)params correspondingToRequestID:(NSString*)requestID;
822 
823 @optional
850 - (void) GDServiceWillStartReceivingFrom:(NSString*)application
851  numberOfAttachments:(NSUInteger)attachments
852  forRequestID:(NSString*)requestID;
853 
854 @optional
885 - (void) GDServiceWillStartReceivingFrom:(NSString*)application
886  attachmentPath:(NSString*)path
887  fileSize:(NSNumber*)size
888  forRequestID:(NSString*)requestID;
889 
890 @end
891 
1297 @interface GDService : NSObject
1298 
1357 + (BOOL) replyTo:(nullable NSString*)application
1358  withParams:(nullable id)params
1359 bringClientToFront:(GDTForegroundOption)option
1360  withAttachments:(nullable NSArray<NSString *> *)attachments
1361  requestID:(NSString*)requestID
1362  error:(NSError**)error;
1363 
1393 + (BOOL) bringToFront:(nonnull NSString *)application completion:( void(^)(BOOL) )completion error:(NSError**)error;
1394 
1416 + (BOOL) bringToFront:(nonnull NSString *)application error:(NSError**)error DEPRECATE_BRINGTOFRONTWITHOUTCOMPLETION;
1417 
1435 @property (nullable, weak, getter = getDelegate, setter = setDelegate:) id<GDServiceDelegate> delegate;
1436 
1437 @end
1438 
1439 NS_ASSUME_NONNULL_END
1440 
1441 #endif
GDEPreferMeInForeground
@ GDEPreferMeInForeground
The current application is to be in the foreground.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:154
GDServicesErrorInvalidParams
const NSInteger GDServicesErrorInvalidParams
The application attempted to utilize an unsupported type as a service parameter, either in a service ...
GDServicesErrorGeneral
const NSInteger GDServicesErrorGeneral
A general AppKinetics error occurred.
GDServicesErrorEnterpriseUserNotMatch
const NSInteger GDServicesErrorEnterpriseUserNotMatch
The application attempted to establish a connection to the application that was activated for a diffe...
GDService::delegate
id< GDServiceDelegate > delegate
Handler that implements the services provided by the application.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:1435
GDServicesErrorDomain
NSString *const GDServicesErrorDomain
Error domain for AppKinetics errors.
GDService
AppKinetics service provider.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:1297
GDENoForegroundPreference
@ GDENoForegroundPreference
There is no preference for which application is in foreground.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:160
GDServiceDelegate-p
AppKinetics service provider implementation.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:682
GDFrontRequestMethod
NSString *const GDFrontRequestMethod
Method name for the Front Request API.
GDServicesVersionDisabled
const NSInteger GDServicesVersionDisabled
The service consumer sent a request that specified a service version that has been disabled in the se...
GDServicesErrorServiceNotFound
const NSInteger GDServicesErrorServiceNotFound
The service consumer sent a request that specified a service that isn't supported by the service prov...
GDServicesErrorNotAllowed
const NSInteger GDServicesErrorNotAllowed
The service consumer sent a request to an application that couldn't be unlocked.
GDServicesErrorProcessSuspended
const NSInteger GDServicesErrorProcessSuspended
Application's process has been suspended by system.
GDServicesErrorServiceVersionNotFound
const NSInteger GDServicesErrorServiceVersionNotFound
The service consumer sent a request that specified a service version that isn't supported by the serv...
GDServicesErrorApplicationNotFound
const NSInteger GDServicesErrorApplicationNotFound
The service consumer sent a request to an application that couldn't be found on the device or compute...
GDFrontRequestService
NSString *const GDFrontRequestService
BlackBerry Dynamics service ID for Front Request.
GDServicesErrorMethodNotFound
const NSInteger GDServicesErrorMethodNotFound
The service consumer sent a request that specified a method that isn't supported by the service provi...
GDServiceClientDelegate-p
Handler for AppKinetics consumer events.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:216
GDServicesErrorCertificateNotFound
const NSInteger GDServicesErrorCertificateNotFound
The application attempted to establish a connection but couldn't find a valid X509 certificate.
GDTForegroundOption
GDTForegroundOption
Constants for specifying foreground execution preference.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:151
GDEPreferPeerInForeground
@ GDEPreferPeerInForeground
The other application is to be in the foreground.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:157
GDServiceClient::delegate
id< GDServiceClientDelegate > delegate
Handler for responses to service requests.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:640
GDServicesMethodDisabled
const NSInteger GDServicesMethodDisabled
The service consumer sent a request that specified a method that has been disabled in the service pro...
GDServiceClient
AppKinetics service consumer.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:446
GDServicesServiceDisabled
const NSInteger GDServicesServiceDisabled
The service consumer sent a request that specified a service that has been disabled in the service pr...