-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIncomingCallNotifications.framework.h
More file actions
193 lines (141 loc) · 6.64 KB
/
IncomingCallNotifications.framework.h
File metadata and controls
193 lines (141 loc) · 6.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
// ========== IncomingCallNotifications.framework/Headers/ICTypes.h
//
// ICTypes.h
// IncomingCallNotifications
//
// Copyright © 2019 Apple. All rights reserved.
//
#import <IncomingCallNotifications/ICBase.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, ICDeclineReason) {
ICDeclineReasonGeneric, // A generic decline, for example the decline button was pressed.
ICDeclineReasonCancelled, // The notification was cancelled.
ICDeclineReasonUserBusy, // The user was busy, such as another incoming call already being present.
ICDeclineReasonUnanswered, // The notification was never responded to, and was automatically declined.
} API_AVAILABLE(ios(13.0));
NS_ASSUME_NONNULL_END
// ========== IncomingCallNotifications.framework/Headers/ICHandle.h
//
// ICHandle.h
// IncomingCallNotifications
//
// Copyright © 2019 Apple. All rights reserved.
//
#import <IncomingCallNotifications/ICBase.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, ICHandleType) {
ICHandleTypeGeneric = 1,
ICHandleTypePhoneNumber = 2,
ICHandleTypeEmailAddress = 3,
} API_AVAILABLE(ios(13.0));
IC_CLASS_AVAILABLE(ios(13.0))
@interface ICHandle : NSObject <NSCopying>
@property (nonatomic, readonly) ICHandleType type;
@property (nonatomic, readonly, copy) NSString *value;
- (instancetype)initWithType:(ICHandleType)type value:(NSString *)value NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
- (BOOL)isEqualToHandle:(ICHandle *)handle;
@end
NS_ASSUME_NONNULL_END
// ========== IncomingCallNotifications.framework/Headers/IncomingCallNotifications.h
//
// IncomingCallNotifications.h
// IncomingCallNotifications
//
// Copyright © 2019 Apple. All rights reserved.
//
#import <IncomingCallNotifications/ICBase.h>
#import <IncomingCallNotifications/ICTypes.h>
#import <IncomingCallNotifications/ICHandle.h>
#import <IncomingCallNotifications/ICNotification.h>
#import <IncomingCallNotifications/ICNotificationManagerConfiguration.h>
#import <IncomingCallNotifications/ICNotificationManager.h>
// ========== IncomingCallNotifications.framework/Headers/ICNotificationManagerConfiguration.h
//
// ICNotificationManagerConfiguration.h
// IncomingCallNotifications
//
// Copyright © 2019 Apple. All rights reserved.
//
#import <IncomingCallNotifications/ICBase.h>
#import <IncomingCallNotifications/ICTypes.h>
NS_ASSUME_NONNULL_BEGIN
/// The configuration used for the notification manager. Each configuration is unique, so it is advised that you don't cache this configuration and use it for multiple notification manager instances. Instead, create a new one each time you initialize the notification manager.
IC_CLASS_AVAILABLE(ios(13.0))
@interface ICNotificationManagerConfiguration : NSObject <NSCopying>
/// The localized display name to use when showing the notification. If this is nil, the display name of your application will be used instead.
@property (nonatomic, readwrite, copy, nullable) NSString *localizedDisplayName;
@end
NS_ASSUME_NONNULL_END
// ========== IncomingCallNotifications.framework/Headers/ICNotification.h
//
// ICNotification.h
// IncomingCallNotifications
//
// Copyright © 2019 Apple. All rights reserved.
//
#import <IncomingCallNotifications/ICBase.h>
#import <IncomingCallNotifications/ICTypes.h>
NS_ASSUME_NONNULL_BEGIN
@class ICHandle;
IC_CLASS_AVAILABLE(ios(13.0))
@interface ICNotification : NSObject <NSCopying>
- (instancetype)initWithUUID:(NSUUID *)identifier handle:(ICHandle *)handle NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
/// The unique identifier for this notification. This can be used to map this notification back to the sending call in your application.
@property (nonatomic, readonly, copy) NSUUID *identifier;
/// The handle for the person that will be displayed on the incoming call notification.
@property (nonatomic, readonly, copy) ICHandle *handle;
/// Whether or not this notification is for a call that supports video.
@property (nonatomic, readwrite, assign, getter=isVideo) BOOL video;
@end
NS_ASSUME_NONNULL_END
// ========== IncomingCallNotifications.framework/Headers/ICNotificationManager.h
//
// ICNotificationManager.h
// IncomingCallNotifications
//
// Copyright © 2019 Apple. All rights reserved.
//
#import <IncomingCallNotifications/ICBase.h>
#import <IncomingCallNotifications/ICTypes.h>
NS_ASSUME_NONNULL_BEGIN
@class ICNotification;
@class ICNotificationManagerConfiguration;
@class ICNotificationManager;
@protocol ICNotificationManagerDelegate <NSObject>
@optional
/// Called when a notification is responded to by accepting it (e.g. choosing to accept the incoming call). Your application will be brought to the foreground and this callback will be invoked on the delegate.
- (void)notificationManager:(ICNotificationManager *)notificationManager didAcceptNotification:(ICNotification *)notification;
/// Called when a notification is responded to by declining it (e.g. the users declines the incoming call notification).
- (void)notificationManager:(ICNotificationManager *)notificationManager didDeclineNotification:(ICNotification *)notification reason:(ICDeclineReason)reason;
@end
IC_CLASS_AVAILABLE(ios(13.0))
@interface ICNotificationManager : NSObject
- (instancetype)initWithConfiguration:(ICNotificationManagerConfiguration *)configuration NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
/// Set delegate and optional queue for delegate callbacks to be performed on.
/// A nil queue implies that delegate callbacks should happen on the main queue. The delegate is stored weakly
- (void)setDelegate:(nullable id<ICNotificationManagerDelegate>)delegate queue:(nullable dispatch_queue_t)queue;
/// Post an incoming call notification to the system. If there is an error posting the notification, the error will be set in the completion block.
- (void)postNotification:(ICNotification *)notification completion:(void (^_Nullable)(NSError *_Nullable))completion;
/// If an incoming call notification is currently being displayed with this identifier, this cancels the notification. The notification manager's delegate will also get called with a decline reason of ICDeclineReasonCancelled.
- (void)cancelNotificationWithIdentifier:(NSUUID *)identifier;
@end
NS_ASSUME_NONNULL_END
// ========== IncomingCallNotifications.framework/Headers/ICBase.h
//
// ICBase.h
// IncomingCallNotifications
//
// Copyright © 2019 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
#ifdef __cplusplus
#define IC_EXTERN extern "C" __attribute__((visibility("default")))
#else
#define IC_EXTERN extern __attribute__((visibility("default")))
#endif
#define IC_CLASS_AVAILABLE(...) IC_EXTERN API_AVAILABLE(__VA_ARGS__)
NS_ASSUME_NONNULL_END