// Objective-C API for talking to github.com/DNSCrypt/dnscrypt-proxy/dnscrypt-proxy/ios Go package.
//   gobind -lang=objc github.com/DNSCrypt/dnscrypt-proxy/dnscrypt-proxy/ios
//
// File is generated by gobind. Do not edit.

#ifndef __Dnscryptproxy_H__
#define __Dnscryptproxy_H__

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


@class DnscryptproxyApp;
@class DnscryptproxyConfig;
@protocol DnscryptproxyCloakCallback;
@class DnscryptproxyCloakCallback;

@protocol DnscryptproxyCloakCallback <NSObject>
- (void)proxyReady;
@end

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

- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (nonnull instancetype)init;
- (void)closeIdleConnections;
- (void)logCritical:(NSString* _Nullable)s;
- (void)logDebug:(NSString* _Nullable)s;
- (void)logError:(NSString* _Nullable)s;
- (void)logFatal:(NSString* _Nullable)s;
- (void)logInfo:(NSString* _Nullable)s;
- (void)logNotice:(NSString* _Nullable)s;
- (void)logWarn:(NSString* _Nullable)s;
- (long)refreshServersInfo;
- (void)run:(id<DnscryptproxyCloakCallback> _Nullable)cloakCallback;
- (BOOL)stop:(NSError* _Nullable* _Nullable)error;
@end

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

- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
- (nullable instancetype)init;
- (NSString* _Nonnull)listServers:(NSError* _Nullable* _Nullable)error;
- (BOOL)loadJson:(NSString* _Nullable)cfg error:(NSError* _Nullable* _Nullable)error;
- (BOOL)loadToml:(NSString* _Nullable)cfg error:(NSError* _Nullable* _Nullable)error;
- (NSString* _Nonnull)toJson:(NSError* _Nullable* _Nullable)error;
- (NSString* _Nonnull)toToml:(NSError* _Nullable* _Nullable)error;
@end

FOUNDATION_EXPORT NSString* _Nonnull const DnscryptproxyAppVersion;

FOUNDATION_EXPORT DnscryptproxyConfig* _Nullable DnscryptproxyDefaultConfig(void);

FOUNDATION_EXPORT BOOL DnscryptproxyFillIpBlacklistTrees(NSString* _Nullable filepath, NSError* _Nullable* _Nullable error);

FOUNDATION_EXPORT BOOL DnscryptproxyFillPatternlistTrees(NSString* _Nullable filepath, NSError* _Nullable* _Nullable error);

FOUNDATION_EXPORT DnscryptproxyApp* _Nullable DnscryptproxyMain(NSString* _Nullable configFile);

FOUNDATION_EXPORT DnscryptproxyConfig* _Nullable DnscryptproxyNewConfig(void);

FOUNDATION_EXPORT BOOL DnscryptproxyPrefetchSourceURLCloak(long timeout_int, BOOL useIPv4, BOOL useIPv6, NSString* _Nullable fallbackResolver, BOOL ignoreSystemDNS, NSString* _Nullable url, NSString* _Nullable cacheFile, NSString* _Nullable minisignKey, NSError* _Nullable* _Nullable error);

FOUNDATION_EXPORT void DnscryptproxyRefreshServersInfoCloak(DnscryptproxyApp* _Nullable app);

@class DnscryptproxyCloakCallback;

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

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

#endif
