• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 7.1.0.193
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 #import "GDPortability.h"
12 
13 /* \cond DOXYGEN_IGNORE */
14 #if __has_extension(attribute_deprecated_with_message)
15 # define DEPRECATE_BRINGTOFRONTWITHOUTCOMPLETION __attribute((deprecated("Use bringToFront:completion:error:")))
16 #else
17 # define DEPRECATE_BRINGTOFRONTWITHOUTCOMPLETION __attribute((deprecated))
18 #endif
19 /* \endcond */
20 
22 
67 extern NSString* const GDServicesErrorDomain;
68 
71 extern NSInteger const GDServicesErrorGeneral;
72 
75 extern NSInteger const GDServicesErrorProcessSuspended;
76 
80 extern NSInteger const GDServicesErrorApplicationNotFound;
81 
85 extern NSInteger const GDServicesErrorServiceNotFound;
86 
90 extern NSInteger const GDServicesErrorServiceVersionNotFound;
91 
95 extern NSInteger const GDServicesErrorMethodNotFound;
96 
100 extern NSInteger const GDServicesErrorNotAllowed;
101 
105 extern NSInteger const GDServicesErrorInvalidParams;
106 
110 extern NSInteger const GDServicesErrorCertificateNotFound;
111 
115 extern NSInteger const GDServicesMethodDisabled;
116 
120 extern NSInteger const GDServicesVersionDisabled;
121 
125 extern NSInteger const GDServicesServiceDisabled;
126 
130 extern NSInteger const GDServicesErrorEnterpriseUserNotMatch;
131 
152 typedef NS_ENUM(NSInteger, GDTForegroundOption)
153 {
156 
159 
162 
163 };
164 
171 extern NSString* const GDFrontRequestService;
172 
179 extern NSString* const GDFrontRequestMethod;
180 
217 @protocol GDServiceClientDelegate<NSObject>
218 @required
275 - (void) GDServiceClientDidReceiveFrom:(NSString*)application
276  withParams:(id)params
277  withAttachments:(GD_NSArray(NSString *) *)attachments
278  correspondingToRequestID:(NSString*)requestID;
279 
280 @optional
307 - (void) GDServiceClientDidStartSendingTo:(NSString*)application withFilename:(NSString*)filename correspondingToRequestID:(NSString*)requestID;
308 
309 @optional
338 - (void) GDServiceClientDidFinishSendingTo:(NSString*)application withAttachments:(GD_NSArray(NSString *) *)attachments withParams:(id)params correspondingToRequestID:(NSString*)requestID;
339 
340 @optional
368 - (void) GDServiceClientWillStartReceivingFrom:(NSString*)application
369  numberOfAttachments:(NSUInteger)attachments
370  forRequestID:(NSString*)requestID;
371 
372 @optional
404 - (void) GDServiceClientWillStartReceivingFrom:(NSString*)application
405  attachmentPath:(NSString*)path
406  fileSize:(NSNumber*)size
407  forRequestID:(NSString*)requestID;
408 
409 @end
410 
411 
447 @interface GDServiceClient : NSObject
448 
521 + (BOOL) sendTo:(NSString*)application
522  withService:(NSString*)service
523  withVersion:(NSString*)version
524  withMethod:(NSString*)method
525  withParams:(GD_NSNULLABLE id)params
526 withAttachments:(GD_NSNULLABLE GD_NSArray(NSString *) *)attachments
527 bringServiceToFront:(GDTForegroundOption)option
528  requestID:(NSString * GD_NSNULLABLE_POINTER * GD_NSNULLABLE_POINTER)requestID
529  error:(NSError**)error;
530 
566 + (BOOL) cancelRequest:(NSString*)requestID toApplication:(NSString*)application;
567 
598 + (BOOL) bringToFront:(GD_NSNON_NULL NSString*)application completion:( void(^)(BOOL) )completion error:(NSError**)error;
599 
622 + (BOOL) bringToFront:(NSString*)application error:(NSError**)error DEPRECATE_BRINGTOFRONTWITHOUTCOMPLETION;
623 
641 @property (GD_NSNULLABLE_PROP weak, getter = getDelegate, setter = setDelegate:) id<GDServiceClientDelegate> delegate;
642 
643 @end
644 
683 @protocol GDServiceDelegate<NSObject>
684 
685 @required
755 - (void) GDServiceDidReceiveFrom:(NSString*)application
756  forService:(NSString*)service
757  withVersion:(NSString*)version
758  forMethod:(NSString*)method
759  withParams:(id)params
760  withAttachments:(GD_NSArray(NSString *) *)attachments
761  forRequestID:(NSString*)requestID;
762 
763 @optional
764 
791 - (void) GDServiceDidStartSendingTo:(NSString*)application withFilename:(NSString*)filename correspondingToRequestID:(NSString*)requestID;
792 
822 - (void) GDServiceDidFinishSendingTo:(NSString*)application withAttachments:(GD_NSArray(NSString *) *)attachments withParams:(id)params correspondingToRequestID:(NSString*)requestID;
823 
824 @optional
851 - (void) GDServiceWillStartReceivingFrom:(NSString*)application
852  numberOfAttachments:(NSUInteger)attachments
853  forRequestID:(NSString*)requestID;
854 
855 @optional
886 - (void) GDServiceWillStartReceivingFrom:(NSString*)application
887  attachmentPath:(NSString*)path
888  fileSize:(NSNumber*)size
889  forRequestID:(NSString*)requestID;
890 
891 @end
892 
1298 @interface GDService : NSObject
1299 
1358 + (BOOL) replyTo:(GD_NSNULLABLE NSString*)application
1359  withParams:(GD_NSNULLABLE id)params
1360 bringClientToFront:(GDTForegroundOption)option
1361  withAttachments:(GD_NSNULLABLE GD_NSArray(NSString *) *)attachments
1362  requestID:(NSString*)requestID
1363  error:(NSError**)error;
1364 
1394 + (BOOL) bringToFront:(GD_NSNON_NULL NSString *)application completion:( void(^)(BOOL) )completion error:(NSError**)error;
1395 
1417 + (BOOL) bringToFront:(GD_NSNON_NULL NSString *)application error:(NSError**)error DEPRECATE_BRINGTOFRONTWITHOUTCOMPLETION;
1418 
1436 @property (GD_NSNULLABLE_PROP weak, getter = getDelegate, setter = setDelegate:) id<GDServiceDelegate> delegate;
1437 
1438 @end
1439 
1441 
1442 #endif
GDEPreferMeInForeground
@ GDEPreferMeInForeground
The current application is to be in the foreground.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:155
GD_NSNULLABLE
#define GD_NSNULLABLE
Definition: GDPortability.h:71
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.
GD_NSNULLABLE_PROP
#define GD_NSNULLABLE_PROP
Definition: GDPortability.h:70
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:1436
GDServicesErrorDomain
NSString *const GDServicesErrorDomain
Error domain for AppKinetics errors.
GDService
AppKinetics service provider.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:1298
GDENoForegroundPreference
@ GDENoForegroundPreference
There is no preference for which application is in foreground.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:161
GDServiceDelegate-p
AppKinetics service provider implementation.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:683
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...
GD_NSNON_NULL
#define GD_NSNON_NULL
Definition: GDPortability.h:73
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.
GD_NSNULLABLE_POINTER
#define GD_NSNULLABLE_POINTER
Definition: GDPortability.h:77
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:217
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:152
GD_NS_ASSUME_NONNULL_END
#define GD_NS_ASSUME_NONNULL_END
Definition: GDPortability.h:89
GDEPreferPeerInForeground
@ GDEPreferPeerInForeground
The other application is to be in the foreground.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:158
GDServiceClient::delegate
id< GDServiceClientDelegate > delegate
Handler for responses to service requests.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:641
GDServicesMethodDisabled
const NSInteger GDServicesMethodDisabled
The service consumer sent a request that specified a method that has been disabled in the service pro...
GD_NSArray
#define GD_NSArray(ObjectType)
Definition: GDPortability.h:112
GDServiceClient
AppKinetics service consumer.
Definition: platform/apple/ios/build/GD.framework/Headers/GDServices.h:447
GDServicesServiceDisabled
const NSInteger GDServicesServiceDisabled
The service consumer sent a request that specified a service that has been disabled in the service pr...
GD_NS_ASSUME_NONNULL_BEGIN
#define GD_NS_ASSUME_NONNULL_BEGIN
Definition: GDPortability.h:88
GDPortability.h