Remove llarp_config and llarp_main

pull/1314/head
Stephen Shelton 4 years ago
parent d85e48c9d0
commit daecd6eda5
No known key found for this signature in database
GPG Key ID: EE4BADACCE8B631C

@ -226,12 +226,4 @@ namespace llarp
} // namespace llarp
struct llarp_config
{
llarp::Config impl;
llarp_config() = default;
explicit llarp_config(const llarp_config* other);
};
#endif

@ -219,28 +219,6 @@ namespace llarp
#endif
} // namespace llarp
struct llarp_main
{
llarp_main(llarp_config* conf);
~llarp_main() = default;
std::shared_ptr<llarp::Context> ctx;
};
llarp_config::llarp_config(const llarp_config* other) : impl(other->impl)
{
}
namespace llarp
{
llarp_config*
Config::Copy() const
{
llarp_config* ptr = new llarp_config();
ptr->impl = *this;
return ptr;
}
} // namespace llarp
extern "C"
{
ssize_t
@ -275,16 +253,16 @@ extern "C"
bool
llarp_main_inject_vpn_by_name(
struct llarp_main* ptr,
llarp::Context* ctx,
const char* name,
struct llarp_vpn_io* io,
struct llarp_vpn_ifaddr_info info)
{
if (name == nullptr || io == nullptr)
return false;
if (ptr == nullptr || ptr->ctx == nullptr || ptr->ctx->router == nullptr)
if (ctx == nullptr || ctx->router == nullptr)
return false;
auto ep = ptr->ctx->router->hiddenServiceContext().GetEndpointByName(name);
auto ep = ctx->router->hiddenServiceContext().GetEndpointByName(name);
return ep && ep->InjectVPN(io, info);
}

Loading…
Cancel
Save