• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 12.0.1.79
platform/apple/ios/build/BlackBerryDynamics.framework/Headers/GDServices.h
Go to the documentation of this file.
1 /*
2  * Copyright 2023 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 
189 @protocol GDServiceClientDelegate<NSObject>
190 @required
247 - (void) GDServiceClientDidReceiveFrom:(NSString*)application
248  withParams:(id)params
249  withAttachments:(NSArray<NSString *> *)attachments
250  correspondingToRequestID:(NSString*)requestID;
251 
252 @optional
279 - (void) GDServiceClientDidStartSendingTo:(NSString*)application withFilename:(NSString*)filename correspondingToRequestID:(NSString*)requestID;
280 
281 @optional
310 - (void) GDServiceClientDidFinishSendingTo:(NSString*)application withAttachments:(NSArray<NSString *> *)attachments withParams:(id)params correspondingToRequestID:(NSString*)requestID;
311 
312 @optional
340 - (void) GDServiceClientWillStartReceivingFrom:(NSString*)application
341  numberOfAttachments:(NSUInteger)attachments
342  forRequestID:(NSString*)requestID;
343 
344 @optional
376 - (void) GDServiceClientWillStartReceivingFrom:(NSString*)application
377  attachmentPath:(NSString*)path
378  fileSize:(NSNumber*)size
379  forRequestID:(NSString*)requestID;
380 
381 @end
382 
383 
390 @interface GDServiceClient : NSObject
391 
464 + (BOOL) sendTo:(NSString*)application
465  withService:(NSString*)service
466  withVersion:(NSString*)version
467  withMethod:(NSString*)method
468  withParams:(nullable id)params
469 withAttachments:(nullable NSArray<NSString *> *)attachments
470 bringServiceToFront:(GDTForegroundOption)option
471  requestID:(NSString * _Nullable * _Nullable)requestID
472  error:(NSError**)error;
473 
509 + (BOOL) cancelRequest:(nullable NSString*)requestID toApplication:(NSString*)application;
510 
541 + (BOOL) bringToFront:(nonnull NSString*)application completion:( void(^)(BOOL) )completion error:(NSError**)error;
542 
565 + (BOOL) bringToFront:(NSString*)application error:(NSError**)error DEPRECATE_BRINGTOFRONTWITHOUTCOMPLETION;
566 
584 @property (nullable, weak, getter = getDelegate, setter = setDelegate:) id<GDServiceClientDelegate> delegate;
585 
586 @end
587 
594 @protocol GDServiceDelegate<NSObject>
595 
596 @required
666 - (void) GDServiceDidReceiveFrom:(NSString*)application
667  forService:(NSString*)service
668  withVersion:(NSString*)version
669  forMethod:(NSString*)method
670  withParams:(id)params
671  withAttachments:(NSArray<NSString *> *)attachments
672  forRequestID:(NSString*)requestID;
673 
674 @optional
675 
702 - (void) GDServiceDidStartSendingTo:(NSString*)application withFilename:(NSString*)filename correspondingToRequestID:(NSString*)requestID;
703 
733 - (void) GDServiceDidFinishSendingTo:(NSString*)application withAttachments:(NSArray<NSString *> *)attachments withParams:(id)params correspondingToRequestID:(NSString*)requestID;
734 
735 @optional
762 - (void) GDServiceWillStartReceivingFrom:(NSString*)application
763  numberOfAttachments:(NSUInteger)attachments
764  forRequestID:(NSString*)requestID;
765 
766 @optional
797 - (void) GDServiceWillStartReceivingFrom:(NSString*)application
798  attachmentPath:(NSString*)path
799  fileSize:(NSNumber*)size
800  forRequestID:(NSString*)requestID;
801 
802 @end
803 
813 @interface GDService : NSObject
814 
873 + (BOOL) replyTo:(nullable NSString*)application
874  withParams:(nullable id)params
875 bringClientToFront:(GDTForegroundOption)option
876  withAttachments:(nullable NSArray<NSString *> *)attachments
877  requestID:(NSString*)requestID
878  error:(NSError**)error;
879 
909 + (BOOL) bringToFront:(nonnull NSString *)application completion:( void(^)(BOOL) )completion error:(NSError**)error;
910 
932 + (BOOL) bringToFront:(nonnull NSString *)application error:(NSError**)error DEPRECATE_BRINGTOFRONTWITHOUTCOMPLETION;
933 
951 @property (nullable, weak, getter = getDelegate, setter = setDelegate:) id<GDServiceDelegate> delegate;
952 
953 @end
954 
955 NS_ASSUME_NONNULL_END
956 
957 #endif
GDEPreferMeInForeground
@ GDEPreferMeInForeground
The current application is to be in the foreground.
Definition: platform/apple/ios/build/BlackBerryDynamics.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/BlackBerryDynamics.framework/Headers/GDServices.h:951
GDServicesErrorDomain
NSString *const GDServicesErrorDomain
Error domain for AppKinetics errors.
GDService
AppKinetics service provider.
Definition: platform/apple/ios/build/BlackBerryDynamics.framework/Headers/GDServices.h:813
GDENoForegroundPreference
@ GDENoForegroundPreference
There is no preference for which application is in foreground.
Definition: platform/apple/ios/build/BlackBerryDynamics.framework/Headers/GDServices.h:160
GDServiceDelegate-p
AppKinetics service provider implementation.
Definition: platform/apple/ios/build/BlackBerryDynamics.framework/Headers/GDServices.h:594
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/BlackBerryDynamics.framework/Headers/GDServices.h:189
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/BlackBerryDynamics.framework/Headers/GDServices.h:151
GDEPreferPeerInForeground
@ GDEPreferPeerInForeground
The other application is to be in the foreground.
Definition: platform/apple/ios/build/BlackBerryDynamics.framework/Headers/GDServices.h:157
GDServiceClient::delegate
id< GDServiceClientDelegate > delegate
Handler for responses to service requests.
Definition: platform/apple/ios/build/BlackBerryDynamics.framework/Headers/GDServices.h:584
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/BlackBerryDynamics.framework/Headers/GDServices.h:390
GDServicesServiceDisabled
const NSInteger GDServicesServiceDisabled
The service consumer sent a request that specified a service that has been disabled in the service pr...