• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 7.1.0.193
GDNetUtility.h
Go to the documentation of this file.
1 /*
2  * (c) 2017 BlackBerry Limited. All rights reserved.
3  */
4 
5 #ifndef ios_GDNetUtility_h
6 #define ios_GDNetUtility_h
7 
8 #import <Foundation/Foundation.h>
9 
10 /* \cond DOXYGEN_IGNORE */
11 // See: http://clang.llvm.org/docs/LanguageExtensions.html
12 #ifndef __has_extension
13 #define __has_extension(x) 0 // Compatibility with non-clang compilers.
14 #endif
15 /* \endcond */
16 
24 typedef NS_ENUM(NSInteger, GDNslookupType)
25 {
29 
33 };
34 
35 /* \cond DOXYGEN_IGNORE */
36 #if __has_extension(attribute_deprecated_with_message)
37 # define DEPRECATE_ERRORHOSTNOTLISTED __attribute__((deprecated("No longer required")))
38 #else
39 # define DEPRECATE_ERRORHOSTNOTLISTED __attribute__((deprecated))
40 #endif
41 /* \endcond */
42 
55 extern NSString* const GDNetUtilityErrorDomain;
56 
57 typedef NS_ENUM(NSInteger, GDNslookupErr)
58 {
62 
68  GDNslookupErrHostNotListed DEPRECATE_ERRORHOSTNOTLISTED,
69 
74 
78 
82 
86 
90 };
91 
107 typedef void (^GDNslookupCompletion)(NSDictionary *response, NSError *error);
108 
109 
117 @interface GDNetUtility : NSObject
118 
149 + (void)nslookup:(NSString*)host type:(GDNslookupType)type completion:(GDNslookupCompletion)completion;
150 
163 @property (class, nonatomic, assign) BOOL webProxyAppliedByApp;
164 
165 @end
166 
167 
168 #endif
GDNetUtility
BlackBerry Dynamics proxy infrastructure network utilities.
Definition: GDNetUtility.h:117
GDNslookupErrInternalError
@ GDNslookupErrInternalError
An internal error occured.
Definition: GDNetUtility.h:81
GDNslookupErrTimeout
@ GDNslookupErrTimeout
A time out occurred.
Definition: GDNetUtility.h:61
GDNslookupARECORD
@ GDNslookupARECORD
Specify an A record lookup.
Definition: GDNetUtility.h:32
GDNetUtilityErrorDomain
NSString *const GDNetUtilityErrorDomain
The error domain for BlackBerry Dynamics proxy infrastructure utility errors.
GDNslookupType
GDNslookupType
Enumerated constants for use with the BlackBerry Dynamics name service.
Definition: GDNetUtility.h:24
GDNslookupErr
GDNslookupErr
Definition: GDNetUtility.h:57
GDNetUtility::webProxyAppliedByApp
BOOL webProxyAppliedByApp
Configure usage of a web proxy server for connections through the BlackBerry Dynamics proxy infrastru...
Definition: GDNetUtility.h:163
GDNslookupErrHostNotListed
@ GDNslookupErrHostNotListed
Definition: GDNetUtility.h:68
GDNslookupCompletion
void(^ GDNslookupCompletion)(NSDictionary *response, NSError *error)
BlackBerry Dynamics name service lookup completion block.
Definition: GDNetUtility.h:107
GDNslookupErrParameterError
@ GDNslookupErrParameterError
One or more parameters to the lookup was invalid.
Definition: GDNetUtility.h:85
GDNslookupErrNetworkError
@ GDNslookupErrNetworkError
A network error occurred, for example the enterprise deployment couldn't be reached or the mobile dat...
Definition: GDNetUtility.h:73
GDNslookupCNAME
@ GDNslookupCNAME
Specify a CNAME lookup.
Definition: GDNetUtility.h:28
GDNetUtilityErrCouldNotPerformService
@ GDNetUtilityErrCouldNotPerformService
A general error occurred.
Definition: GDNetUtility.h:89
GDNslookupErrParsingResponseError
@ GDNslookupErrParsingResponseError
The name service response couldn't be parsed.
Definition: GDNetUtility.h:77