Workspace 6.21.5
Public Types | Public Member Functions | Static Public Attributes | List of all members
Server Class Reference

Represents a remotely accessible server. More...

#include <Authentication/Common/server.h>

Public Types

enum  Scope { User , System }
 

Public Member Functions

 Server ()
 
 Server (const Server &)
 
 Server (const Server::Scope scope, const QString &hostName, quint16 port, int cpuCount, bool enabled, const QString &authenticationProvider, const QString &authenticationProviderVersion, const QString &authenticationCredentials, bool useSecureConnection=false)
 
virtual ~Server ()=default
 
const QString & getAuthenticationCredentials () const
 
const QString & getAuthenticationProvider () const
 
const QString & getAuthenticationProviderVersion () const
 
int getConcurrencyCount () const
 
bool getEnabled () const
 
const QString & getHostName () const
 
quint16 getPort () const
 
Scope getScope () const
 
int getTimeout () const
 
bool getUseSecureConnection () const
 
bool operator!= (const Server &) const
 
Serveroperator= (const Server &)
 
bool operator== (const Server &) const
 
void setAuthenticationCredentials (const QString &credentials)
 
void setAuthenticationProvider (const QString &method)
 
void setAuthenticationProviderVersion (const QString &version)
 
void setConcurrencyCount (int cpuCount)
 
void setEnabled (bool)
 
void setHostName (const QString &host)
 
void setPort (const quint16 port)
 
void setScope (const Scope scope)
 
void setTimeout (int timeout)
 
void setUseSecureConnection (bool)
 

Static Public Attributes

static int defaultCpuCount = 2
 
static QString defaultHost = "127.0.0.1"
 
static quint16 defaultPort = 42150
 
static Scope defaultScope = Server::User
 
static int defaultTimeout = 3000
 

Detailed Description

Member Enumeration Documentation

◆ Scope

enum Scope
Enumerator
User 
System 

Constructor & Destructor Documentation

◆ Server() [1/3]

Server ( )

The default constructor.

◆ Server() [2/3]

Server ( const Server rhs)

Copy constructor.

Parameters
rhsthe server to copy.

◆ Server() [3/3]

Server ( const Server::Scope  s,
const QString &  h,
quint16  p,
int  c,
bool  enabled,
const QString &  authenticationProvider,
const QString &  authenticationProviderVersion,
const QString &  authenticationCredentials,
bool  useSecureConnection = false 
)

An initialising constructor.

Parameters
sthe server's scope
hthe server's host address
pthe server's port
cthe server's cpu count
enabledspecifies if the server is enabled
authenticationProviderthe authentication provider the server will use
authenticationProviderVersionthe version number of the authentication provider
authenticationCredentialsthe credentials associated with the server
useSecureConnectiona flag that indicates whether the server should communicate over a secure channel

◆ ~Server()

virtual ~Server ( )
virtualdefault

Member Function Documentation

◆ getAuthenticationCredentials()

const QString & getAuthenticationCredentials ( ) const
inline

◆ getAuthenticationProvider()

const QString & getAuthenticationProvider ( ) const
inline

◆ getAuthenticationProviderVersion()

const QString & getAuthenticationProviderVersion ( ) const
inline

◆ getConcurrencyCount()

int getConcurrencyCount ( ) const
inline

◆ getEnabled()

bool getEnabled ( ) const
Returns
Returns true if the server is enabled.

◆ getHostName()

const QString & getHostName ( ) const
inline

◆ getPort()

quint16 getPort ( ) const
inline

◆ getScope()

Scope getScope ( ) const
inline

◆ getTimeout()

int getTimeout ( ) const
inline

◆ getUseSecureConnection()

bool getUseSecureConnection ( ) const

Indicates if the server uses a secure connection.

Returns
Returns true if the server is communicated with over a secure socket.

◆ operator!=()

bool operator!= ( const Server rhs) const

The inequality operator.

Returns
Returns true if the servers are equivalent.

◆ operator=()

Server & operator= ( const Server rhs)

The assignment operator.

Parameters
rhsthe server to assign.

◆ operator==()

bool operator== ( const Server rhs) const

The equality operator.

Parameters
rhsthe server to compare an instance against.

◆ setAuthenticationCredentials()

void setAuthenticationCredentials ( const QString &  credentials)

Sets the authentication credentials.

Parameters
credentialsThe credentials to set.

◆ setAuthenticationProvider()

void setAuthenticationProvider ( const QString &  method)
inline

◆ setAuthenticationProviderVersion()

void setAuthenticationProviderVersion ( const QString &  version)
inline

◆ setConcurrencyCount()

void setConcurrencyCount ( int  cpuCount)
inline

◆ setEnabled()

void setEnabled ( bool  val)

Specifies that the server is enabled.

Parameters
valIndicates the server is enabled.

◆ setHostName()

void setHostName ( const QString &  host)

Sets the host address.

Parameters
hostThe host name to set.

◆ setPort()

void setPort ( const quint16  port)
inline

◆ setScope()

void setScope ( const Scope  scope)
inline

◆ setTimeout()

void setTimeout ( int  timeout)
inline

◆ setUseSecureConnection()

void setUseSecureConnection ( bool  val)

Specifies that the server use a secure connection for communication.

Parameters
valIndicates the server communicate over a secure socket.

Member Data Documentation

◆ defaultCpuCount

int defaultCpuCount = 2
static

◆ defaultHost

QString defaultHost = "127.0.0.1"
static

◆ defaultPort

quint16 defaultPort = 42150
static

◆ defaultScope

Server::Scope defaultScope = Server::User
static

◆ defaultTimeout

int defaultTimeout = 3000
static