mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Code refactor, support multiple gateways and non-SAML authentication (#9)
* Code refactor * Update README.md
This commit is contained in:
38
GPClient/gpgateway.cpp
Normal file
38
GPClient/gpgateway.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
#include "gpgateway.h"
|
||||
|
||||
GPGateway::GPGateway()
|
||||
{
|
||||
}
|
||||
|
||||
QString GPGateway::name() const
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
|
||||
QString GPGateway::address() const
|
||||
{
|
||||
return _address;
|
||||
}
|
||||
|
||||
void GPGateway::setName(const QString &name)
|
||||
{
|
||||
_name = name;
|
||||
}
|
||||
|
||||
void GPGateway::setAddress(const QString &address)
|
||||
{
|
||||
_address = address;
|
||||
}
|
||||
|
||||
void GPGateway::setPriorityRules(const QMap<QString, int> &priorityRules)
|
||||
{
|
||||
_priorityRules = priorityRules;
|
||||
}
|
||||
|
||||
int GPGateway::priorityOf(QString ruleName)
|
||||
{
|
||||
if (_priorityRules.contains(ruleName)) {
|
||||
return _priorityRules.value(ruleName);
|
||||
}
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user