OctagonAPSReceiver.h [plain text]
#import <Foundation/Foundation.h>
#if OCTAGON
#import <ApplePushService/ApplePushService.h>
#import <CloudKit/CloudKit.h>
#import "keychain/ckks/CKKSCondition.h"
#import "keychain/ckks/CloudKitDependencies.h"
NS_ASSUME_NONNULL_BEGIN
@interface CKRecordZoneNotification (CKKSPushTracing)
@property (nonatomic, assign) BOOL ckksPushTracingEnabled;
@property (nonatomic, strong, nullable) NSString* ckksPushTracingUUID;
@property (nonatomic, strong, nullable) NSDate* ckksPushReceivedDate;
@end
@protocol CKKSZoneUpdateReceiverProtocol <NSObject>
- (void)notifyZoneChange:(CKRecordZoneNotification* _Nullable)notification;
@end
@protocol OctagonCuttlefishUpdateReceiver <NSObject>
- (void)notifyContainerChange:(APSIncomingMessage* _Nullable)notification;
@end
@interface OctagonAPSReceiver : NSObject <APSConnectionDelegate>
@property (readonly) Class<OctagonAPSConnection> apsConnectionClass;
@property (nullable) id<OctagonAPSConnection> apsConnection;
@property (readonly) BOOL haveStalePushes;
+ (instancetype)receiverForNamedDelegatePort:(NSString*)namedDelegatePort
apsConnectionClass:(Class<OctagonAPSConnection>)apsConnectionClass;
+ (void)resetGlobalDelegatePortMap;
- (void)registerForEnvironment:(NSString*)environmentName;
- (CKKSCondition*)registerCKKSReceiver:(id<CKKSZoneUpdateReceiverProtocol>)receiver;
- (CKKSCondition*)registerCuttlefishReceiver:(id<OctagonCuttlefishUpdateReceiver>)receiver forContainerName:(NSString*)containerName;
- (instancetype)initWithNamedDelegatePort:(NSString*)namedDelegatePort
apsConnectionClass:(Class<OctagonAPSConnection>)apsConnectionClass;
- (instancetype)initWithNamedDelegatePort:(NSString*)namedDelegatePort
apsConnectionClass:(Class<OctagonAPSConnection>)apsConnectionClass
stalePushTimeout:(uint64_t)stalePushTimeout;
+ (dispatch_queue_t)apsDeliveryQueue;
- (NSArray<NSString *>*)registeredPushEnvironments;
@end
@interface OctagonAPSReceiver (Testing)
- (void)reportDroppedPushes:(NSSet<CKRecordZoneNotification*>*)notifications;
@end
NS_ASSUME_NONNULL_END
#endif // OCTAGON