Class Configuration

Contents

Class Configuration#

Inheritance Relationships#

Base Type#

  • public std::enable_shared_from_this< Configuration >

Class Documentation#

class Configuration : public std::enable_shared_from_this<Configuration>#

Public Functions

Configuration(const utility::string_t &InstanceName)#
virtual ~Configuration()#
utility::string_t GetInstanceName() const#

Gets the instance name associated with this SDK/configuration.

Configuration &SetInstanceName(const utility::string_t &value)#

Sets the instance name associated with this SDK/configuration.

utility::string_t GetBaseUrl() const#

Returns the base URL to the services API.

Configuration &SetBaseUrl(const utility::string_t &value)#

Sets the base URL to the services API.

utility::string_t GetBaseServicePath(utility::string_t key) const#

Returns the base path for a given Service class name.

Parameters:

key – The name of the Service class to retrieve a base path for.

std::map<utility::string_t, utility::string_t> &GetBaseServicePaths()#

Returns the map of service names to their respective base paths.

Configuration &SetBaseServicePaths(std::map<utility::string_t, utility::string_t> value)#

Sets the map of service names to their respective base paths.

pplx::cancellation_token GetCancellationToken() const#

Returns the pplx cancellation token used when creating all parallel tasks.

pplx::cancellation_token_source GetCancellationTokenSource() const#

Returns the pplx cancellation token source used when creating all parallel tasks.

Configuration &SetCancellationTokenSource(pplx::cancellation_token_source cts)#

Sets the pplx cancellation token source used when creating all parallel tasks.

utility::string_t GetUserAgent() const#

Returns the user agent type used when making service API requests.

Configuration &SetUserAgent(const utility::string_t &value)#

Sets the user agent type to use when making service API requests.

std::map<utility::string_t, utility::string_t> &GetDefaultHeaders()#

Returns the default set of headers to apply to all service API requests.

utility::string_t GetApiKey(const utility::string_t &prefix) const#

Returns the API key with the associated prefix.

Parameters:

prefix – The name of the API key to retrieve.

Returns:

The value of the API key with the given prefix.

Configuration &SetApiKey(const utility::string_t &prefix, const utility::string_t &apiKey)#

Sets the API key for the specified prefix.

Parameters:
  • prefix – The prefix of the API key to set.

  • apiKey – The value of the API key to set.

void ClearApiKeys()#

Clears all API keys.

void ClearApiKey(const utility::string_t &prefix)#

Clears the API key associated with the given prefix.

Parameters:

prefix – The prefix of the API key to clear.

utility::string_t GetAlgorithm() const#

Returns the algorithm to sign the JWT token with when local authentication is used.

Configuration &SetAlgorithm(const utility::string_t &value)#

Sets the algorithm to sign the JWT token with when local authentication is used.

utility::string_t GetPrivateKey() const#

Returns the private key used to sign the JWT token when local authentication is used.

Configuration &SetPrivateKey(const utility::string_t &value)#

Sets the private key used to sign the JWT token when local authentication is used.

utility::string_t GetAudience() const#

Returns the audience setting used to sign the JWT token when local authentication is used.

Configuration &SetAudience(const utility::string_t &value)#

Sets the audience setting used to sign the JWT token when local authentication is used.

utility::string_t GetIssuer() const#

Returns the issuer setting used to sign the JWT token when local authentication is used.

Configuration &SetIssuer(const utility::string_t &value)#

Sets the issuer setting used to sign the JWT token when local authentication is used.

std::shared_ptr<models::User> GetLoggedInUser() const#

Returns the account data associated with the currently logged in user.

Configuration &SetLoggedInUser(std::shared_ptr<models::User> user)#

Sets the account data associated with the currently logged in user.

std::shared_ptr<logging::BaseLogger> GetLogger() const#

Returns the logger sink that the SDK uses when printing messages.

Configuration &SetLogger(std::shared_ptr<logging::BaseLogger> logger)#

Sets the logger sink that the SDK will use when printing messages.

logging::LogLevel GetLogLevel() const#

Returns the logging level used by the SDK when printing to stdout.

Configuration &SetLogLevel(logging::LogLevel level)#

Sets the logging level that the SDK will use to print to stdout.

uint32_t GetPollingFrequency() const#

[EntityWatchdog] Returns the number of milliseconds to wait in between polling for updates to entity objects.

Configuration &SetPollingFrequency(uint32_t millis)#

[EntityWatchdog] Sets the number of milliseconds to wait in between polling for updates to entity objects.

utility::string_t GetProxyUrl() const#

Returns the url of the proxy server to use when making HTTP requests.

Configuration &SetProxyUrl(const utility::string_t &value)#

Sets the url of the proxy server to use when making HTTP requests.

bool IsPushEnabled() const#

Returns true if push notifications are enabled, otherwise returns false.

Configuration &SetPushEnabled(bool value)#

Set to true to enable push notifications. When enabled, the SDK establishes a permanent WebSocket connection to the cluster and changes the behavior of the SDK to minimize polling for updates to objects as well as monitoring new data automatically. Default is true.

bool IsAgonesEnabled() const#

Returns true if Agones integration support is enabled, otherwise returns false.

Configuration &SetAgonesEnabled(bool value)#

Set to true to enable Agones integration. When enabled, server instance management will be coordinated with the Agones server orchestration system.

utility::string_t GetAgonesUrl() const#

Returns the base URL to the Agones orchestration system. Default is true.

Configuration &SetAgonesUrl(const utility::string_t &value)#

Sets the base URL to the Agones orchestration system. Default is .

utility::string_t GetSDKVersion() const#

The version of current SDK

Configuration &SetSDKVersion(const utility::string_t &value)#
utility::string_t GetEngineVersion() const#

The version of current Engine

Configuration &SetEngineVersion(const utility::string_t &value)#
utility::string_t GetExecutableVersion() const#

The version of current Executable

Configuration &SetExecutableVersion(const utility::string_t &value)#
utility::string_t GetDeviceHash() const#

The hash of the current device

Configuration &SetDeviceHash(const utility::string_t &value)#
utility::string_t GetDeviceID() const#

The ID of the current device

Configuration &SetDeviceID(const utility::string_t &value)#
std::vector<std::shared_ptr<AuthMethod>> GetAuthMethods() const#
std::shared_ptr<PasswordConfig> GetPasswordConfig() const#

The active configuration used to set user passwords.

std::shared_ptr<UsersRequiredProps> GetUserRequiredProps() const#

The active property requirements used to create/update User accounts.

std::shared_ptr<AuthMethod> GetAuthMethod(const utility::string_t &id) const#

Retrieves the AuthMethod object with the given unique name if found, otherwise nullptr.

Protected Functions

Configuration &SetAuthMethods(const std::vector<std::shared_ptr<AuthMethod>> &value)#
Configuration &SetPasswordConfig(std::shared_ptr<PasswordConfig> value)#
Configuration &SetUserRequiredProps(std::shared_ptr<UsersRequiredProps> value)#

Protected Attributes

utility::string_t m_InstanceName#
utility::string_t m_BaseUrl#
std::map<utility::string_t, utility::string_t> m_BaseServicePaths#
pplx::cancellation_token_source m_CancellationToken#
std::map<utility::string_t, utility::string_t> m_DefaultHeaders#
std::map<utility::string_t, utility::string_t> m_ApiKeys#
utility::string_t m_UserAgent#
bool m_LocalAuth#
utility::string_t m_Algorithm#
utility::string_t m_PrivateKey#
utility::string_t m_ExpiresIn#
utility::string_t m_Audience#
utility::string_t m_Issuer#
std::shared_ptr<models::User> m_LoggedInUser#
std::shared_ptr<logging::BaseLogger> m_Logger#
logging::LogLevel m_LogLevel#
uint32_t m_PollingFrequency#
utility::string_t m_proxyUrl#
bool m_pushEnabled#
bool m_agonesEnabled#
utility::string_t m_agonesUrl#
utility::string_t m_sdkVersion#
utility::string_t m_engineVersion#
utility::string_t m_executableVersion#
utility::string_t m_deviceHash#
utility::string_t m_deviceID#
std::vector<std::shared_ptr<AuthMethod>> m_authMethods#
std::shared_ptr<PasswordConfig> m_passwordConfig#
std::shared_ptr<UsersRequiredProps> m_userRequiredProps#