From 447a90d16fdb1adb037ec5c1259761d01fac35ca Mon Sep 17 00:00:00 2001 From: Sergey Abramchuk Date: Mon, 24 Apr 2017 18:32:59 +0300 Subject: [PATCH] Remove username and password properties and declare methods for applying configuration and providing credentials --- OpenVPN Adapter/OpenVPNAdapter+Public.h | 32 +++++++++++++------------ 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/OpenVPN Adapter/OpenVPNAdapter+Public.h b/OpenVPN Adapter/OpenVPNAdapter+Public.h index 5bd5a09..64b4d9e 100644 --- a/OpenVPN Adapter/OpenVPNAdapter+Public.h +++ b/OpenVPN Adapter/OpenVPNAdapter+Public.h @@ -7,9 +7,10 @@ // #import "OpenVPNEvent.h" - #import "OpenVPNAdapter.h" +@class OpenVPNConfiguration; +@class OpenVPNCredentials; @class NEPacketTunnelNetworkSettings; // TODO: Add documentation to properties and methods @@ -85,16 +86,6 @@ NS_SWIFT_NAME(handle(logMessage:)); */ @interface OpenVPNAdapter (Provider) -/** - <#Description#> - */ -@property (strong, nonatomic, nullable) NSString *username; - -/** - <#Description#> - */ -@property (strong, nonatomic, nullable) NSString *password; - /** <#Description#> */ @@ -103,13 +94,24 @@ NS_SWIFT_NAME(handle(logMessage:)); /** <#Description#> - @param settings <#settings description#> + @param configuration <#configuration description#> @param error <#error description#> @return <#return value description#> */ -- (BOOL)configureUsingSettings:(nonnull NSData *)settings - error:(out NSError * __nullable * __nullable)error -NS_SWIFT_NAME(configure(using:)); +- (BOOL)applyConfiguration:(nonnull OpenVPNConfiguration *)configuration + error:(out NSError * __nullable * __nullable)error +NS_SWIFT_NAME(apply(configuration:)); + +/** + <#Description#> + + @param credentials <#credentials description#> + @param error <#error description#> + @return <#return value description#> + */ +- (BOOL)provideCredentials:(nonnull OpenVPNCredentials *)credentials + error:(out NSError * __nullable * __nullable)error +NS_SWIFT_NAME(provide(credentials:)); /** Establish connection with the VPN server