lokinet/llarp/vpn/platform.cpp
Jeff Becker df4ea34a56
nodedb refactor
* bump zmq static dep
* lokimq -> oxenmq
* llarp_nodedb -> llarp::NodeDB
* remove all crufty api parts of NodeDB
* make NodeDB rc selection api not suck
* make path builder api not suck
* propagate all above changes so that unit tests work and it all compiles
2021-02-02 09:35:40 -05:00

39 lines
700 B
C++

#ifdef _WIN32
#include <vpn/win32.hpp>
#endif
#ifdef __linux__
#ifdef ANDROID
#include <vpn/android.hpp>
#else
#include <vpn/linux.hpp>
#endif
#endif
#ifdef __APPLE__
#include <vpn/apple.hpp>
#endif
namespace llarp::vpn
{
std::shared_ptr<Platform>
MakeNativePlatform(llarp::Context* ctx)
{
(void)ctx;
std::shared_ptr<Platform> plat;
#ifdef _WIN32
plat = std::make_shared<vpn::Win32Platform>();
#endif
#ifdef __linux__
#ifdef ANDROID
plat = std::make_shared<vpn::AndroidPlatform>();
#else
plat = std::make_shared<vpn::LinuxPlatform>();
#endif
#endif
#ifdef __APPLE__
plat = std::make_shared<vpn::ApplePlatform>();
#endif
return plat;
}
} // namespace llarp::vpn