Declare adapter delegate

This commit is contained in:
Sergey Abramchuk 2017-02-11 16:26:58 +03:00
parent 1130f46f00
commit 9e3a72e02a

View File

@ -6,9 +6,32 @@
//
//
#import "OpenVPNEvent.h"
#import "OpenVPNAdapter.h"
@class NEPacketTunnelFlow;
@class NEPacketTunnelNetworkSettings;
@protocol OpenVPNAdapterDelegate <NSObject>
- (void)setTunnelSettings:(nonnull NEPacketTunnelNetworkSettings *)settings
callback:(nonnull void (^)(NEPacketTunnelFlow * __nullable flow))callback
NS_SWIFT_NAME(setTunnel(settings:callback:));
- (void)handleEvent:(OpenVPNEvent)event
message:(nullable NSString *)message
NS_SWIFT_NAME(handle(event:message:));
- (void)handleError:(nonnull NSError *)error
NS_SWIFT_NAME(handle(error:));
@end
@interface OpenVPNAdapter (Provider)
@property (weak, nonatomic, null_unspecified) id<OpenVPNAdapterDelegate> delegate;
@end