-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIdentityLookup.framework.h
507 lines (368 loc) · 16 KB
/
IdentityLookup.framework.h
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
// ========== IdentityLookup.framework/Headers/ILCommunication.h
//
// ILCommunication.h
// IdentityLookup
//
// Copyright © 2018 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <IdentityLookup/ILBase.h>
NS_ASSUME_NONNULL_BEGIN
/// An incident of communication via some medium.
IL_EXTERN API_AVAILABLE(ios(12.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface ILCommunication : NSObject <NSSecureCoding>
/// The phone number or e-mail address of the sender. The value will be nil if the sender is unknown.
@property (nonatomic, readonly, copy, nullable) NSString *sender;
@property (nonatomic, readonly, copy) NSDate *dateReceived;
- (BOOL)isEqualToCommunication:(ILCommunication *)communication NS_SWIFT_UNAVAILABLE("Use == operator instead");
- (instancetype)init NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/ILMessageFilterError.h
//
// ILMessageFilterError.h
// IdentityLookup
//
// Copyright © 2017 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <IdentityLookup/ILBase.h>
NS_ASSUME_NONNULL_BEGIN
IL_EXTERN NSErrorDomain const ILMessageFilterErrorDomain API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
typedef NS_ERROR_ENUM(ILMessageFilterErrorDomain, ILMessageFilterError) {
/// An unspecified system error occurred.
ILMessageFilterErrorSystem = 1,
/// The network request URL included in the extension's Info.plist was either missing or invalid. See documentation for network request URL requirements.
ILMessageFilterErrorInvalidNetworkURL = 2,
/// Extension's containing app is not authorized to allow extension to defer network requests to the host specified in the URL of the extension's Info.plist.
ILMessageFilterErrorNetworkURLUnauthorized = 3,
/// Network request was attempted but failed. See `NSUnderlyingErrorKey` in `userInfo` dictionary for details.
ILMessageFilterErrorNetworkRequestFailed = 4,
/// Extension requested to defer a request to its network service more than once. Requests may be deferred to the network at most once.
ILMessageFilterErrorRedundantNetworkDeferral = 5,
} API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/ILMessageFilterQueryHandling.h
//
// ILMessageFilterQueryHandling.h
// IdentityLookup
//
// Copyright © 2017 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <IdentityLookup/ILBase.h>
NS_ASSUME_NONNULL_BEGIN
@class ILMessageFilterQueryRequest;
@class ILMessageFilterExtensionContext;
@class ILMessageFilterQueryResponse;
/**
Functionality related to MessageFilter extension query requests.
Subclasses of ILMessageFilterExtension which support querying must conform to this protocol.
*/
IL_EXTERN API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@protocol ILMessageFilterQueryHandling <NSObject>
/**
Evaluate a query request and provide a response describing how the system should handle the message it represents.
May include either (or both) of the following:
- Using offline/stored information to form a response about the message described by the query request.
- Deferring the query request to a network service associated with the app extension, allowing the network service to
return data back to extension in order to form a response about the message. The `context` parameter provides an API which
allows deferring a request to the network and receiving the response to that network request.
Block specified in `completion` parameter must be invoked with a response describing how to handle the message, and may be
invoked asynchronously.
@param queryRequest A query request to be handled which describes a received message.
@param context Extension context which offers API to defer request to network if necessary.
@param completion Completion block for returning a response.
*/
- (void)handleQueryRequest:(ILMessageFilterQueryRequest *)queryRequest context:(ILMessageFilterExtensionContext *)context completion:(void (^)(ILMessageFilterQueryResponse *))completion;
@end
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/ILCallCommunication.h
//
// ILCallCommunication.h
// IdentityLookup
//
// Copyright © 2018 Apple. All rights reserved.
//
#import <IdentityLookup/ILCommunication.h>
NS_ASSUME_NONNULL_BEGIN
IL_EXTERN API_AVAILABLE(ios(12.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface ILCallCommunication : ILCommunication
- (BOOL)isEqualToCallCommunication:(ILCallCommunication *)communication NS_SWIFT_UNAVAILABLE("Use == operator instead");;
- (instancetype)init NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/ILClassificationActions.h
//
// ILClassificationActions.h
// IdentityLookup
//
// Copyright © 2018 Apple. All rights reserved.
//
NS_ASSUME_NONNULL_BEGIN
/// Describes various classification actions.
typedef NS_ENUM(NSInteger, ILClassificationAction) {
/// Indicate that no action is requested.
ILClassificationActionNone = 0,
/// Report communication(s) as not junk.
ILClassificationActionReportNotJunk = 1,
/// Report communication(s) as junk.
ILClassificationActionReportJunk = 2,
/// Report communication(s) as junk and block the sender.
ILClassificationActionReportJunkAndBlockSender = 3,
} API_AVAILABLE(ios(12.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/ILMessageFilterQueryResponse.h
//
// ILMessageFilterQueryResponse.h
// IdentityLookup
//
// Copyright © 2017 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <IdentityLookup/ILBase.h>
#import <IdentityLookup/ILMessageFilterAction.h>
NS_ASSUME_NONNULL_BEGIN
/// A response to an ILMessageFilterQueryRequest.
IL_EXTERN API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface ILMessageFilterQueryResponse : NSObject <NSSecureCoding>
/// Action to take for the received message.
@property (nonatomic) ILMessageFilterAction action;
@end
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/ILCallClassificationRequest.h
//
// ILCallClassificationRequest.h
// IdentityLookup
//
// Copyright © 2018 Apple. All rights reserved.
//
#import <IdentityLookup/ILClassificationRequest.h>
NS_ASSUME_NONNULL_BEGIN
@class ILCallCommunication;
IL_EXTERN API_AVAILABLE(ios(12.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface ILCallClassificationRequest : ILClassificationRequest <NSSecureCoding>
// An array of call communications sorted by date received
@property (nonatomic, readonly, copy) NSArray<ILCallCommunication *> *callCommunications;
- (instancetype)init NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/ILBase.h
//
// ILBase.h
// IdentityLookup
//
// Copyright © 2017 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
#ifdef __cplusplus
#define IL_EXTERN extern "C" __attribute__((visibility("default")))
#else
#define IL_EXTERN extern __attribute__((visibility("default")))
#endif
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/IdentityLookup.h
//
// IdentityLookup.h
// IdentityLookup
//
// Copyright © 2017 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <IdentityLookup/ILBase.h>
#import <IdentityLookup/ILMessageFilterAction.h>
#import <IdentityLookup/ILMessageFilterError.h>
#import <IdentityLookup/ILNetworkResponse.h>
#import <IdentityLookup/ILMessageFilterExtension.h>
#import <IdentityLookup/ILMessageFilterExtensionContext.h>
#import <IdentityLookup/ILMessageFilterQueryHandling.h>
#import <IdentityLookup/ILMessageFilterQueryRequest.h>
#import <IdentityLookup/ILMessageFilterQueryResponse.h>
#import <IdentityLookup/ILCommunication.h>
#import <IdentityLookup/ILCallCommunication.h>
#import <IdentityLookup/ILMessageCommunication.h>
#import <IdentityLookup/ILClassificationRequest.h>
#import <IdentityLookup/ILClassificationResponse.h>
#import <IdentityLookup/ILClassificationActions.h>
#import <IdentityLookup/ILMessageClassificationRequest.h>
#import <IdentityLookup/ILCallClassificationRequest.h>
// ========== IdentityLookup.framework/Headers/ILNetworkResponse.h
//
// ILNetworkResponse.h
// IdentityLookup
//
// Copyright © 2017 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <IdentityLookup/ILBase.h>
NS_ASSUME_NONNULL_BEGIN
/// A response to an HTTPS network request.
IL_EXTERN API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface ILNetworkResponse : NSObject <NSSecureCoding>
/// Represents the URL response itself. See documentation for NSHTTPURLResponse.
@property (nonatomic, readonly) NSHTTPURLResponse *urlResponse;
/// Data returned in the HTTPS response.
@property (nonatomic, readonly) NSData *data;
- (instancetype)init NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/ILMessageCommunication.h
//
// ILMessageCommunication.h
// IdentityLookup
//
// Copyright © 2018 Apple. All rights reserved.
//
#import <IdentityLookup/ILCommunication.h>
NS_ASSUME_NONNULL_BEGIN
IL_EXTERN API_AVAILABLE(ios(12.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface ILMessageCommunication : ILCommunication
// Contains the contents of the message
@property (nonatomic, readonly, copy, nullable) NSString *messageBody;
- (BOOL)isEqualToMessageCommunication:(ILMessageCommunication *)communication NS_SWIFT_UNAVAILABLE("Use == operator instead");
- (instancetype)init NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/ILMessageClassificationRequest.h
//
// ILMessageClassificationRequest.h
// IdentityLookup
//
// Copyright © 2018 Apple. All rights reserved.
//
#import <IdentityLookup/ILClassificationRequest.h>
NS_ASSUME_NONNULL_BEGIN
@class ILMessageCommunication;
IL_EXTERN API_AVAILABLE(ios(12.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface ILMessageClassificationRequest : ILClassificationRequest <NSSecureCoding>
// An array of message communications sorted by date received
@property (nonatomic, readonly, copy) NSArray<ILMessageCommunication *> *messageCommunications;
- (instancetype)init NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/ILMessageFilterQueryRequest.h
//
// ILMessageFilterQueryRequest.h
// IdentityLookup
//
// Copyright © 2017 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <IdentityLookup/ILBase.h>
NS_ASSUME_NONNULL_BEGIN
/// A request to query a MessageFilter extension about how to interpret a received message.
IL_EXTERN API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface ILMessageFilterQueryRequest : NSObject <NSSecureCoding>
/// The sender of the message the receiver relates to.
@property (nonatomic, readonly, nullable) NSString *sender;
/// The body of the message the receiver relates to.
@property (nonatomic, readonly, nullable) NSString *messageBody;
- (instancetype)init NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/ILClassificationRequest.h
//
// ILClassificationRequest.h
// IdentityLookup
//
// Copyright © 2018 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// A request to classify a communication.
IL_EXTERN API_AVAILABLE(ios(12.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface ILClassificationRequest : NSObject <NSSecureCoding>
@end
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/ILMessageFilterExtension.h
//
// ILMessageFilterExtension.h
// IdentityLookup
//
// Copyright © 2017 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <IdentityLookup/ILBase.h>
NS_ASSUME_NONNULL_BEGIN
/// Parent class for a MessageFilter extension's principal class.
IL_EXTERN API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface ILMessageFilterExtension : NSObject
@end
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/ILMessageFilterExtensionContext.h
//
// ILMessageFilterExtensionContext.h
// IdentityLookup
//
// Copyright © 2017 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <IdentityLookup/ILBase.h>
NS_ASSUME_NONNULL_BEGIN
@class ILNetworkResponse;
/// Represents a MessageFilter extension request's context.
IL_EXTERN API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface ILMessageFilterExtensionContext : NSExtensionContext
/**
Defer the current query request to the app extension's associated network service and receive a network response asynchronously.
This causes the system to perform an HTTPS network request to a URL specified in the app extension's Info.plist, and the response
to that HTTPS request (or an error) is returned asynchronously. See documentation for details regarding how this HTTPS request
is formatted, restrictions on the URL, etc.
@param completion Completion block containing either the network response to the HTTPS request or an error.
*/
- (void)deferQueryRequestToNetworkWithCompletion:(void (^)(ILNetworkResponse *_Nullable response, NSError *_Nullable error))completion;
@end
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/ILMessageFilterAction.h
//
// ILMessageFilterAction.h
// IdentityLookup
//
// Copyright © 2017 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/// Describes an action to take in response to a received message.
typedef NS_ENUM(NSInteger, ILMessageFilterAction) {
/// Insufficient information to determine an action to take. In a query response, has the effect of allowing the message to be shown normally.
ILMessageFilterActionNone = 0,
/// Allow the message to be shown normally.
ILMessageFilterActionAllow = 1,
/// Prevent the message from being shown normally.
ILMessageFilterActionFilter = 2,
} API_AVAILABLE(ios(11.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos);
NS_ASSUME_NONNULL_END
// ========== IdentityLookup.framework/Headers/ILClassificationResponse.h
//
// ILClassificationResponse.h
// IdentityLookup
//
// Copyright © 2018 Apple. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <IdentityLookup/ILClassificationActions.h>
NS_ASSUME_NONNULL_BEGIN
/// A response to an ILClassificationRequest.
IL_EXTERN API_AVAILABLE(ios(12.0), uikitformac(13.0)) API_UNAVAILABLE( tvos) API_UNAVAILABLE(macos, watchos)
@interface ILClassificationResponse : NSObject <NSSecureCoding>
@property (nonatomic, readonly, assign) ILClassificationAction action;
/*
The value of this string will be sent when a value for
ILClassificationExtensionSMSReportDestination has been set in the extension's Info.plist
*/
@property (nonatomic, readwrite, copy, nullable) NSString *userString API_AVAILABLE(ios(12.1));
/*
The JSON representation of this dictionary will be sent when a value for
ILClassificationExtensionNetworkReportDestination has been set in the extension's Info.plist
The keys and values in this dictionary must conform to the NSJSONSerialization specifications:
- Top level object is an NSDictionary
- All objects are NSString, NSNumber, NSArray, NSDictionary, or NSNull
- All dictionary keys are NSStrings
- NSNumbers are not NaN or infinity
*/
@property (nonatomic, readwrite, copy, nullable) NSDictionary<NSString *, id> *userInfo;
- (instancetype)initWithClassificationAction:(ILClassificationAction)action NS_SWIFT_NAME(init(action:)) NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
@end
NS_ASSUME_NONNULL_END