1 //
2 // TWTRNotificationConstants.h
3 // TwitterKit
4 //
5 // Copyright © 2016 Twitter. All rights reserved.
6 //
7
8 #import <Foundation/Foundation.h>
9
10 NS_ASSUME_NONNULL_BEGIN
11
12 /**
13 * Constants for notifications that are posted from TwitterKit. These are posted on the default notification center.
14 */
15
16 #pragma mark - Tweet Action Notifications
17
18 /**
19 * Notification indicating a Tweet was selected.
20 */
21 FOUNDATION_EXPORT NSString * const TWTRDidSelectTweetNotification;
22
23 /**
24 * Notification indicating the Tweet detail view was shown for a given Tweet.
25 */
26 FOUNDATION_EXPORT NSString * const TWTRDidShowTweetDetailNotification;
27
28 /**
29 * Notification indicating the user has selected to share Tweet.
30 */
31 FOUNDATION_EXPORT NSString * const TWTRWillShareTweetNotification;
32
33 /**
34 * Notification indicating the Tweet was shared.
35 */
36 FOUNDATION_EXPORT NSString * const TWTRDidShareTweetNotification;
37
38 /**
39 * Notification indicating the user has cancelled sharing of the Tweet.
40 */
41 FOUNDATION_EXPORT NSString * const TWTRCancelledShareTweetNotification;
42
43 /**
44 * Notification indicating the user has liked a Tweet.
45 */
46 FOUNDATION_EXPORT NSString * const TWTRDidLikeTweetNotification;
47
48 /**
49 * Notification indicating the user has unliked a Tweet.
50 */
51 FOUNDATION_EXPORT NSString * const TWTRDidUnlikeTweetNotification;
52
53 #pragma mark - Media Notifications
54
55 /**
56 * Notification indicating the the playback state of a video
57 * has changed.
58 *
59 * object: The UIView emitting these notifications
60 * userInfo: {TWTRVideoPlaybackStateKey: TWTRVideoStateValuePlaying}
61 * {TWTRVideoPlaybackStateKey: TWTRVideoStateValuePaused}
62 * {TWTRVideoPlaybackStateKey: TWTRVideoStateValueCompleted}
63 */
64 FOUNDATION_EXPORT NSString * const TWTRVideoPlaybackStateChangedNotification;
65
66 /**
67 * User info key for the state of video playback.
68 */
69 FOUNDATION_EXPORT NSString * const TWTRVideoPlaybackStateKey;
70
71 /**
72 * User info values for the state of video playback.
73 */
74 FOUNDATION_EXPORT NSString * const TWTRVideoStateValuePlaying;
75 FOUNDATION_EXPORT NSString * const TWTRVideoStateValuePaused;
76 FOUNDATION_EXPORT NSString * const TWTRVideoStateValueCompleted;
77
78 #pragma mark - Presentation Notifications
79
80 /**
81 * Notification indicating that the video view controller will
82 * be presented.
83 *
84 * object: The UIViewController hosting the video view
85 * userInfo: {TWTRVideoTypeKey: TWTRVideoTypeGIF}
86 * {TWTRVideoTypeKey: TWTRVideoTypeStandard}
87 * {TWTRVideoTypeKey: TWTRVideoTypeVine}
88 */
89 FOUNDATION_EXPORT NSString * const TWTRWillPresentVideoNotification;
90
91 /**
92 * Notification indicating that the video view controller has
93 * been dismissed.
94 *
95 * object: The UIViewController hosting the video view
96 */
97 FOUNDATION_EXPORT NSString * const TWTRDidDismissVideoNotification;
98
99 /**
100 * The key to fetch the type of video being displayed in a
101 * TWTRVideoViewController.
102 */
103 FOUNDATION_EXPORT NSString * const TWTRVideoTypeKey;
104
105 /**
106 * User info values for the type of video being displayed
107 * in a TWTRVideoViewController.
108 */
109 FOUNDATION_EXPORT NSString * const TWTRVideoTypeGIF;
110 FOUNDATION_EXPORT NSString * const TWTRVideoTypeStandard;
111 FOUNDATION_EXPORT NSString * const TWTRVideoTypeVine;
112
113 #pragma mark - Notification User Info
114
115 /**
116 * User info key to fetch the associated Tweet in the notification.
117 */
118 FOUNDATION_EXPORT NSString * const TWTRNotificationInfoTweet;
119
120
121 /**
122 * A notification which is posted when a user logs out of Twitter.
123 * The notification will contain a user dictionary which contains
124 * the user id which is being logged out. Note, this notification may
125 * be posted as a result of starting the Twitter object.
126 */
127 FOUNDATION_EXPORT NSString * const TWTRUserDidLogOutNotification;
128 FOUNDATION_EXPORT NSString * const TWTRLoggedOutUserIDKey;
129
130 /**
131 * A notification which is posted when a user logs in to Twitter.
132 * The notification will contain a user dictionary which contains
133 * the user id which is being logged in. Note, this notification may
134 * be posted as a result of starting the Twitter object.
135 */
136 FOUNDATION_EXPORT NSString * const TWTRUserDidLogInNotification;
137 FOUNDATION_EXPORT NSString * const TWTRLoggedInUserIDKey;
138
139 NS_ASSUME_NONNULL_END