Overte C++ Documentation
DomainServerSettingsManager Class Reference

Manages the domain-wide settings. More...

#include <DomainServerSettingsManager.h>

Inherits QObject.

Public Member Functions

void setupConfigMap (const QString &userConfigFilename)
 Loads the configuration from the specified file. More...
 
QJsonObject settingsResponseObjectForType (const QString &typeValue, SettingsRequestAuthentication authentication=NotAuthenticated, DomainSettingsInclusion domainSettingsInclusion=IncludeDomainSettings, ContentSettingsInclusion contentSettingsInclusion=IncludeContentSettings, DefaultSettingsInclusion defaultSettingsInclusion=IncludeDefaultSettings, SettingsBackupFlag settingsBackupFlag=NotForBackup)
 Generates a JSON representation of settings. More...
 
Q_INVOKABLE bool restoreSettingsFromObject (QJsonObject settingsToRestore, SettingsType settingsType)
 thread safe method to restore settings from a JSON object
 

Detailed Description

Manages the domain-wide settings.

The domain server doesn't use the interface's QSettings based system, but this one. The domain holds all the settings and distributes it to the connected assignment clients.

Assignment clients request their settings by making a DomainSettingsRequest. The request is specific to the client's type.

The response is generated in settingsResponseObjectForType and filtered according to what the client is allowed to see.

To add a new setting, add it in resources/describe-settings.json

To make a setting be sent to assignment clients, set the assignment-types value to an array of the desired assignment clients. The type is defined numerically.

The canonical list of assignment types is in the Assignment::Type enum.

Member Function Documentation

◆ settingsResponseObjectForType()

QJsonObject DomainServerSettingsManager::settingsResponseObjectForType ( const QString &  typeValue,
SettingsRequestAuthentication  authentication = NotAuthenticated,
DomainSettingsInclusion  domainSettingsInclusion = IncludeDomainSettings,
ContentSettingsInclusion  contentSettingsInclusion = IncludeContentSettings,
DefaultSettingsInclusion  defaultSettingsInclusion = IncludeDefaultSettings,
SettingsBackupFlag  settingsBackupFlag = NotForBackup 
)

Generates a JSON representation of settings.

This is what answers an assignment client's request for domain settings.

Note
thread safe
Parameters
typeValueType of assignment client
authentication
domainSettingsInclusion
contentSettingsInclusion
defaultSettingsInclusion
settingsBackupFlag
Returns
QJsonObject

◆ setupConfigMap()

void DomainServerSettingsManager::setupConfigMap ( const QString &  userConfigFilename)

Loads the configuration from the specified file.

Performs version upgrades when we're loading an older version of the config.

Parameters
userConfigFilename

The documentation for this class was generated from the following files: