/** * @since Available in iOS 8.0 and later. */ public static NSObject overseStatusDidChange(NEVPNConnection object, final VoidBlock1<NEVPNConnection> block) { return NSNotificationCenter.getDefaultCenter().addObserver(StatusDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.invoke((NEVPNConnection)a.getObject()); } }); } }
/** * @since Available in iOS 8.0 and later. */ public boolean startVPNTunnel() throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = startVPNTunnel(ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 8.0 and later. */ public boolean startVPNTunnel() throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = startVPNTunnel(ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 8.0 and later. */ public static NSObject overseStatusDidChange(NEVPNConnection object, final VoidBlock1<NEVPNConnection> block) { return NSNotificationCenter.getDefaultCenter().addObserver(StatusDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.invoke((NEVPNConnection)a.getObject()); } }); } }
/** * @since Available in iOS 8.0 and later. */ public boolean startVPNTunnel() throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = startVPNTunnel(ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 8.0 and later. */ public static NSObject overseStatusDidChange(NEVPNConnection object, final VoidBlock1<NEVPNConnection> block) { return NSNotificationCenter.getDefaultCenter().addObserver(StatusDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1<NSNotification>() { @Override public void invoke(NSNotification a) { block.invoke((NEVPNConnection)a.getObject()); } }); } }
/** * @since Available in iOS 9.0 and later. */ public boolean startVPNTunnel(NSDictionary<NSString, ?> options) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = startVPNTunnel(options, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 9.0 and later. */ public boolean startVPNTunnel(NSDictionary<NSString, ?> options) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); boolean result = startVPNTunnel(options, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**