mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-04-06 00:00:03 +08:00
Declare adapter delegate
This commit is contained in:
@@ -6,9 +6,32 @@
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#import "OpenVPNEvent.h"
|
||||||
|
|
||||||
#import "OpenVPNAdapter.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)
|
@interface OpenVPNAdapter (Provider)
|
||||||
|
|
||||||
|
@property (weak, nonatomic, null_unspecified) id<OpenVPNAdapterDelegate> delegate;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Reference in New Issue
Block a user