diff --git a/client/containers/containers_defs.cpp b/client/containers/containers_defs.cpp index d1efda53..f6f3415c 100644 --- a/client/containers/containers_defs.cpp +++ b/client/containers/containers_defs.cpp @@ -136,3 +136,29 @@ Protocol ContainerProps::defaultProtocol(DockerContainer c) } } +bool ContainerProps::isWorkingOnPlatform(DockerContainer c) +{ +#ifdef Q_OS_WINDOWS + return true; +#elif defined (Q_OS_MAC) + +#elif defined (Q_OS_IOS) + switch (c) { + case DockerContainer::WireGuard: return true; + case DockerContainer::OpenVpn: return true; + default: return false; + } +#elif defined (Q_OS_ANDROID) + switch (c) { + case DockerContainer::WireGuard: return true; + case DockerContainer::OpenVpn: return true; + default: return false; + } + +#elif defined (Q_OS_LINUX) + +#else +return false; +#endif +} + diff --git a/client/containers/containers_defs.h b/client/containers/containers_defs.h index 25f2dfc7..eced3c32 100644 --- a/client/containers/containers_defs.h +++ b/client/containers/containers_defs.h @@ -53,6 +53,8 @@ public: // binding between Docker container and main protocol of given container // it may be changed fot future containers :) Q_INVOKABLE static Protocol defaultProtocol(DockerContainer c); + + Q_INVOKABLE static bool isWorkingOnPlatform(DockerContainer c); };