mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2024-10-06 09:12:08 +08:00
Declare adapter delegate
This commit is contained in:
parent
1130f46f00
commit
9e3a72e02a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user