• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 12.0.1.79
GDPush.h
Go to the documentation of this file.
1 /*
2  * Copyright 2023 BlackBerry Limited. All rights reserved.
3  *
4  */
5 
6 #ifndef __GD_PUSH_H__
7 #define __GD_PUSH_H__
8 
9 #import <Foundation/Foundation.h>
10 
11 // See: http://clang.llvm.org/docs/LanguageExtensions.html
12 /* \cond DOXYGEN_IGNORE */
13 #ifndef __has_extension
14 #define __has_extension(x) 0 // Compatibility with non-clang compilers.
15 #endif
16 /* \endcond */
17 
18 /* \cond DOXYGEN_IGNORE */
19 #if __has_extension(attribute_deprecated_with_message)
20 # define DEPRECATE_PUSH_CONNECT_DISCONNECT __attribute__((deprecated("No longer required")))
21 # define DEPRECATE_GDPUSHCONNECTION __attribute__((deprecated("GDPushConnection interface has been deprecated")))
22 # define DEPRECATE_GDPUSHCHANNELDELEGATE __attribute__((deprecated("GDPushChannelDelegate protocol has been deprecated, use notifications instead.")))
23 #else
24 # define DEPRECATE_PUSH_CONNECT_DISCONNECT __attribute__((deprecated))
25 # define DEPRECATE_GDPUSHCONNECTION __attribute__((deprecated))
26 # define DEPRECATE_GDPUSHCHANNELDELEGATE __attribute__((deprecated))
27 #endif
28 /* \endcond */
29 
30 NS_ASSUME_NONNULL_BEGIN
31 
43 typedef NS_ENUM(NSInteger, GDPushChannelState)
44 {
48 
52 
56 
60 };
61 
91 extern NSString* const GDPushChannelOpenedNotification;
92 
130 extern NSString* const GDPushChannelClosedNotification;
131 
179 extern NSString* const GDPushChannelErrorNotification;
180 
217 extern NSString* const GDPushChannelMessageNotification;
218 
295 extern NSString* const GDPushChannelPingFailedNotification;
296 
316 extern NSString* const GDPushChannelTokenKey;
317 
334 extern NSString* const GDPushChannelHostKey;
335 
352 extern NSString* const GDPushChannelMessageKey;
353 
373 extern NSString* const GDPushChannelErrorKey;
374 
384 @interface GDPushChannel : NSObject {
385  @private
386  void* m_pushChannelInternal;
387 }
388 
396 @property (nonatomic, readonly) GDPushChannelState state;
397 
398 
410 - (instancetype)initWithIdentifier:(NSString*)pushChannelIdentifier;
411 
436 - (void)connect;
437 
463 - (void)disconnect;
464 
465 @end
466 
467 NS_ASSUME_NONNULL_END
468 
469 #endif /* __GD_PUSH_H__ */
GDPushChannelOpenedNotification
NSString *const GDPushChannelOpenedNotification
Push Channel opened notification name.
GDPushChannelMessageKey
NSString *const GDPushChannelMessageKey
Key for the message data, in a Push Channel notification user information dictionary.
GDPushChannelStateClosed
@ GDPushChannelStateClosed
Definition: GDPush.h:55
GDPushChannelHostKey
NSString *const GDPushChannelHostKey
Key for the Push Channel host name, in a notification user information dictionary.
GDPushChannelStateError
@ GDPushChannelStateError
Definition: GDPush.h:59
GDPushChannelClosedNotification
NSString *const GDPushChannelClosedNotification
Push Channel closed notification name.
GDPushChannelStateOpen
@ GDPushChannelStateOpen
Definition: GDPush.h:51
GDPushChannel
Manage Push Channel tokens and notifications.
Definition: GDPush.h:384
GDPushChannelErrorKey
NSString *const GDPushChannelErrorKey
Key for the error code, in a Push Channel notification user information dictionary.
GDPushChannelPingFailedNotification
NSString *const GDPushChannelPingFailedNotification
Push Channel ping failed on server notification name.
GDPushChannelErrorNotification
NSString *const GDPushChannelErrorNotification
Push Channel error notification name.
GDPushChannelMessageNotification
NSString *const GDPushChannelMessageNotification
Push Channel received message notification name.
GDPushChannelState
GDPushChannelState
Push Channel state.
Definition: GDPush.h:43
GDPushChannelStateNone
@ GDPushChannelStateNone
Definition: GDPush.h:47
GDPushChannelTokenKey
NSString *const GDPushChannelTokenKey
Key for the Push Channel token, in a notification user information dictionary.