2020-01-13 10:17:30 -08:00
|
|
|
//
|
|
|
|
|
// ALTNotificationConnection.h
|
|
|
|
|
// AltServer
|
|
|
|
|
//
|
|
|
|
|
// Created by Riley Testut on 1/10/20.
|
|
|
|
|
// Copyright © 2020 Riley Testut. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
2020-09-03 16:02:28 -07:00
|
|
|
#import "AltSign.h"
|
2020-01-13 10:17:30 -08:00
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
NS_SWIFT_NAME(NotificationConnection)
|
|
|
|
|
@interface ALTNotificationConnection : NSObject
|
|
|
|
|
|
|
|
|
|
@property (nonatomic, copy, readonly) ALTDevice *device;
|
|
|
|
|
|
|
|
|
|
@property (nonatomic, copy, nullable) void (^receivedNotificationHandler)(CFNotificationName notification);
|
|
|
|
|
|
|
|
|
|
- (void)startListeningForNotifications:(NSArray<NSString *> *)notifications
|
|
|
|
|
completionHandler:(void (^)(BOOL success, NSError *_Nullable error))completionHandler;
|
|
|
|
|
|
|
|
|
|
- (void)sendNotification:(CFNotificationName)notification
|
|
|
|
|
completionHandler:(void (^)(BOOL success, NSError *_Nullable error))completionHandler;
|
|
|
|
|
|
|
|
|
|
- (void)disconnect;
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|