1// SWIG interface file for OpenVPN client
3// enable director feature for OpenVPNClientBase virtual method callbacks
4%module(directors="1") ovpncli
5%feature("director") OpenVPNClient;
7%include "std_string.i" // for std::string typemaps
12%include "swiginterface.i"
15// top-level C++ implementation file
20#ifndef OPENVPN_PLATFORM_WIN
21// simplify interface, not picked up automatically
22%apply int { openvpn_io::detail::socket_type };
23%apply int { asio::detail::socket_type };
26%apply size_t { openvpn::Error::Type };
29%interface(openvpn::ClientAPI::LogReceiver);
32// ignore these ClientAPI::OpenVPNClient bases
33%ignore openvpn::ExternalTun::Factory;
34%ignore openvpn::ExternalTransport::Factory;
36// modify exported C++ class names to incorporate their enclosing namespace
37%rename(ClientAPI_OpenVPNClient) OpenVPNClient;
38%rename(ClientAPI_OpenVPNClientHelper) OpenVPNClientHelper;
39%rename(ClientAPI_TunBuilderBase) TunBuilderBase;
40%rename(ClientAPI_ExternalPKIBase) ExternalPKIBase;
41%rename(ClientAPI_ServerEntry) ServerEntry;
42%rename(ClientAPI_EvalConfig) EvalConfig;
43%rename(ClientAPI_ProvideCreds) ProvideCreds;
44%rename(ClientAPI_SessionToken) SessionToken;
45%rename(ClientAPI_DynamicChallenge) DynamicChallenge;
46%rename(ClientAPI_KeyValue) KeyValue;
47%rename(ClientAPI_Config) Config;
48%rename(ClientAPI_Event) Event;
49%rename(ClientAPI_AppCustomControlMessageEvent) AppCustomControlMessageEvent;
50%rename(ClientAPI_ConnectionInfo) ConnectionInfo;
51%rename(ClientAPI_Status) Status;
52%rename(ClientAPI_LogInfo) LogInfo;
53%rename(ClientAPI_InterfaceStats) InterfaceStats;
54%rename(ClientAPI_TransportStats) TransportStats;
55%rename(ClientAPI_MergeConfig) MergeConfig;
56%rename(ClientAPI_ExternalPKIRequestBase) ExternalPKIRequestBase;
57%rename(ClientAPI_ExternalPKICertRequest) ExternalPKICertRequest;
58%rename(ClientAPI_ExternalPKISignRequest) ExternalPKISignRequest;
59%rename(ClientAPI_RemoteOverride) RemoteOverride;
63 %template(ClientAPI_ServerEntryVector) vector<openvpn::ClientAPI::ServerEntry>;
64 %template(ClientAPI_LLVector) vector<long long>;
65 %template(ClientAPI_StringVec) vector<string>;
67%template(DnsOptions_AddressList) std::vector<openvpn::DnsAddress>;
68%template(DnsOptions_DomainsList) std::vector<openvpn::DnsDomain>;
69%template(DnsOptions_ServersMap) std::map<int, openvpn::DnsServer>;
71// interface to be bridged between C++ and target language
72%include "openvpn/client/dns_options.hpp"
73%include "openvpn/pki/epkibase.hpp"
74%include "openvpn/tun/builder/base.hpp"
75%import "openvpn/tun/extern/fw.hpp" // ignored
76%import "openvpn/transport/client/extern/fw.hpp" // ignored