// Objective-C API for talking to vnet/client/mobile Go package.
//   gobind -lang=objc vnet/client/mobile
//
// File is generated by gobind. Do not edit.

#ifndef __Cola_H__
#define __Cola_H__

@import Foundation;
#include "ref.h"
#include "Universe.objc.h"


@class ColaCola;
@class ColaDarwinNetwork;
@protocol ColaCloser;
@class ColaCloser;
@protocol ColaProtector;
@class ColaProtector;

@protocol ColaCloser <NSObject>
- (void)onClose;
@end

@protocol ColaProtector <NSObject>
- (void)control:(long)fd;
@end

@interface ColaCola : NSObject <goSeqRefInterface> {
}
@property(strong, readonly) _Nonnull id _ref;

- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (nullable instancetype)init:(id<ColaProtector> _Nullable)protector config:(NSString* _Nullable)config;
- (NSString* _Nonnull)cidr;
- (NSString* _Nonnull)clientIP;
- (void)createTun:(long)fd;
- (NSString* _Nonnull)gatewayIP;
- (NSString* _Nonnull)generateCIDRs:(NSString* _Nullable)flags reverse:(BOOL)reverse;
- (long)mtu;
- (long)maskLength;
- (NSString* _Nonnull)maskString;
- (void)memoryGC:(long)gcPercent gcSec:(long)gcSec;
- (long)mode;
- (void)reset;
- (long)smart;
- (void)start:(id<ColaCloser> _Nullable)closer;
- (void)stop;
@end

@interface ColaDarwinNetwork : NSObject <goSeqRefInterface, ColaProtector> {
}
@property(strong, readonly) _Nonnull id _ref;

- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (nonnull instancetype)init;
- (void)control:(long)fd;
@end

FOUNDATION_EXPORT ColaCola* _Nullable ColaNewCola(id<ColaProtector> _Nullable protector, NSString* _Nullable config);

@class ColaCloser;

@class ColaProtector;

@interface ColaCloser : NSObject <goSeqRefInterface, ColaCloser> {
}
@property(strong, readonly) _Nonnull id _ref;

- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)onClose;
@end

@interface ColaProtector : NSObject <goSeqRefInterface, ColaProtector> {
}
@property(strong, readonly) _Nonnull id _ref;

- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (void)control:(long)fd;
@end

#endif
