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 CKKSZoneUpdateReceiver <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)receiverForEnvironment:(NSString*)environmentName
namedDelegatePort:(NSString*)namedDelegatePort
apsConnectionClass:(Class<OctagonAPSConnection>)apsConnectionClass;
- (CKKSCondition*)registerReceiver:(id<CKKSZoneUpdateReceiver>)receiver forZoneID:(CKRecordZoneID*)zoneID;
- (CKKSCondition*)registerCuttlefishReceiver:(id<OctagonCuttlefishUpdateReceiver>)receiver forContainerName:(NSString*)containerName;
- (instancetype)initWithEnvironmentName:(NSString*)environmentName
namedDelegatePort:(NSString*)namedDelegatePort
apsConnectionClass:(Class<OctagonAPSConnection>)apsConnectionClass;
+ (dispatch_queue_t)apsDeliveryQueue;
+ (int64_t)stalePushTimeout;
@end
NS_ASSUME_NONNULL_END
#endif // OCTAGON