Workspace 6.21.5
Public Member Functions | Protected Member Functions | List of all members
ClientSettings Class Reference

Provides access to client side authentication settings.

#include <Authentication/Common/clientsettings.h>

Public Member Functions

 ClientSettings (const QString &userDirectory, const QString &systemDirectory, const QString &basename)
 
virtual ~ClientSettings ()
 
ServersgetServers ()
 
bool isWritable (const Server &)
 
bool isWritable (const Server::Scope)
 
bool load ()
 
bool save ()
 
void setServers (const Servers &)
 

Protected Member Functions

QString getSystemFileSpec () const
 
QString getUserFileSpec () const
 
bool loadServersFromFile (QFile &, QSystemSemaphore &)
 
bool loadSystemDefinedServers ()
 
bool loadUserDefinedServers ()
 
bool saveServersToFile (Servers &servers, QFile &, QSystemSemaphore &)
 
bool saveSystemDefinedServers ()
 
bool saveUserDefinedServers ()
 

Constructor & Destructor Documentation

◆ ClientSettings()

ClientSettings ( const QString &  userDirectory,
const QString &  systemDirectory,
const QString &  basename 
)

Constructor.

◆ ~ClientSettings()

~ClientSettings ( )
virtual

Destructor.

Member Function Documentation

◆ getServers()

Servers & getServers ( )

Returns a reference to the servers stored in the client settings area.

Returns
A collection of authentication servers.

◆ getSystemFileSpec()

QString getSystemFileSpec ( ) const
protected

Returns the name specification of the system settings area.

Returns
System settings area name specification.

◆ getUserFileSpec()

QString getUserFileSpec ( ) const
protected

Returns the name specification of the user settings area.

Returns
User settings area name specification.

◆ isWritable() [1/2]

bool isWritable ( const Server server)

Indicates if the settings area associated with the server is writable or not.

Returns
Returns true if the settings area associated with the server is writable.

◆ isWritable() [2/2]

bool isWritable ( const Server::Scope  scope)

Indicates if the settings area for the provided scope is writable or not.

Returns
Returns true if the settings area for the provided scope is writable.

◆ load()

bool load ( )

Loads authentication client settings.

◆ loadServersFromFile()

bool loadServersFromFile ( QFile &  file,
QSystemSemaphore &  fileLock 
)
protected

Utility function that loads servers from a settings area.

Returns
Returns true if the servers where loaded.

◆ loadSystemDefinedServers()

bool loadSystemDefinedServers ( )
protected

Loads servers from the system settings area.

Returns
Returns true is the servers where loaded.

◆ loadUserDefinedServers()

bool loadUserDefinedServers ( )
protected

Loads servers from the user settings area.

Returns
Returns true is the servers where loaded.

◆ save()

bool save ( )

Saves the client settings.

Returns
Returns true if the settings where saved correctly.

◆ saveServersToFile()

bool saveServersToFile ( Servers servers,
QFile &  file,
QSystemSemaphore &  fileLock 
)
protected

Saves servers to the settings area.

◆ saveSystemDefinedServers()

bool saveSystemDefinedServers ( )
protected

Saves system wide servers to the system settings area.

Returns
Returns true if the servers where saved correctly.

◆ saveUserDefinedServers()

bool saveUserDefinedServers ( )
protected

Saves user defined servers to the user settings area.

Returns
Returns true if the servers where saved correctly.

◆ setServers()

void setServers ( const Servers )