mirror of
https://github.com/deneraraujo/OpenVPNAdapter.git
synced 2026-04-24 00:00:05 +08:00
Return expiration and platform
This commit is contained in:
@@ -124,6 +124,16 @@ NS_SWIFT_NAME(handle(logMessage:));
|
|||||||
*/
|
*/
|
||||||
@property (nonnull, readonly, nonatomic) OpenVPNInterfaceStats *interfaceStats;
|
@property (nonnull, readonly, nonatomic) OpenVPNInterfaceStats *interfaceStats;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns date/time of app expiration
|
||||||
|
*/
|
||||||
|
+ (nonnull NSDate *)expiration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns platform description
|
||||||
|
*/
|
||||||
|
+ (nonnull NSString *)platform;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
<#Description#>
|
<#Description#>
|
||||||
|
|
||||||
|
|||||||
@@ -158,6 +158,16 @@ NSString * const OpenVPNAdapterErrorEventKey = @"me.ss-abramchuk.openvpn-adapter
|
|||||||
return [[OpenVPNInterfaceStats alloc] initWithInterfaceStats:stats];
|
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
|
#pragma mark Client Configuration
|
||||||
|
|
||||||
- (OpenVPNProperties *)applyConfiguration:(nonnull OpenVPNConfiguration *)configuration error:(out NSError * __nullable * __nullable)error {
|
- (OpenVPNProperties *)applyConfiguration:(nonnull OpenVPNConfiguration *)configuration error:(out NSError * __nullable * __nullable)error {
|
||||||
|
|||||||
Reference in New Issue
Block a user