isWorkingOnPlatform function added

This commit is contained in:
pokamest 2021-12-04 16:13:34 +03:00
parent d28a2ebc57
commit 4d374581b5
2 changed files with 28 additions and 0 deletions

View file

@ -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
}