mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-04-24 00:00:05 +08:00
Remove expiration class method and convert platform to class property
This commit is contained in:
@@ -128,6 +128,11 @@ NSString * const OpenVPNAdapterErrorEventKey = @"me.ss-abramchuk.openvpn-adapter
|
||||
|
||||
#pragma mark Properties
|
||||
|
||||
+ (NSString *)platform {
|
||||
std::string platform = OpenVPNClient::platform();
|
||||
return [NSString stringWithUTF8String:platform.c_str()];
|
||||
}
|
||||
|
||||
- (void)setDelegate:(id<OpenVPNAdapterDelegate>)delegate {
|
||||
_delegate = delegate;
|
||||
}
|
||||
@@ -158,16 +163,6 @@ NSString * const OpenVPNAdapterErrorEventKey = @"me.ss-abramchuk.openvpn-adapter
|
||||
return [[OpenVPNInterfaceStats alloc] initWithInterfaceStats:stats];
|
||||
}
|
||||
|
||||
+ (NSDate *)expiration {
|
||||
NSNumber *time = [NSNumber numberWithInteger:OpenVPNClient::app_expire()];
|
||||
return [NSDate dateWithTimeIntervalSince1970:[time doubleValue]];
|
||||
}
|
||||
|
||||
+ (NSString *)platform {
|
||||
std::string platform = OpenVPNClient::platform();
|
||||
return [NSString stringWithUTF8String:platform.c_str()];
|
||||
}
|
||||
|
||||
#pragma mark Client Configuration
|
||||
|
||||
- (OpenVPNProperties *)applyConfiguration:(nonnull OpenVPNConfiguration *)configuration error:(out NSError * __nullable * __nullable)error {
|
||||
|
||||
Reference in New Issue
Block a user