Zibra Effects
Real-time Simulated Visual Effects
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Properties | List of all members
ServerAuthManager Class Reference

Class responsible for managing licensing and allowing server communication. More...

Public Types

enum  Status {
  NotInitialized = 0 , OK , KeyValidationInProgress , NetworkError ,
  InvalidKey , NotRegistered , NoMaintance , Expired
}
 Status of license validation. More...
 

Public Member Functions

Status GetStatus (PluginManager.Effect effect)
 Returns current status of license validation for specified effect.
 
bool IsLicenseVerified (PluginManager.Effect effect)
 Checks whether license is verified for specified effect.
 
bool IsGenerationAvailable ()
 Checks whether generation is available.
 
string GetErrorMessage (Status status)
 Returns human readable string explaining error based on Status.
 
string GetErrorMessage (PluginManager.Effect effect)
 Returns human readable string explaining current error with activation of specified effect.
 
string GetGenerationErrorMessage ()
 Returns human readable string explaining current error with generation availability.
 
void RegisterKey (string key)
 Sets license key and starts key validation process.
 
void ValidateLicense (string[] keys)
 Sets list of license keys and starts key validation process.
 
void RemoveKey ()
 Removes current license key.
 

Static Public Member Functions

static bool CheckKeysFormat (string keys)
 Checks whether specified string is correctly formated list of keys.
 
static ServerAuthManager GetInstance ()
 Returns singleton of this class.
 

Properties

string[] PluginLicenseKeys = new string[0] [get]
 License key used for the plugin.
 
string GenerationLicenseKey = "" [get]
 License key used for the generation.
 
string GenerationURL = "" [get]
 URL address for generation API.
 
string ServerErrorMessage = "" [get]
 Human readable error message string returned from server.
 

Detailed Description

Class responsible for managing licensing and allowing server communication.

Member Enumeration Documentation

◆ Status

enum Status

Status of license validation.

Member Function Documentation

◆ GetStatus()

Status GetStatus ( PluginManager::Effect  effect)
inline

Returns current status of license validation for specified effect.

Never returns NotInitialized, since it initialized validation in this case.

◆ IsLicenseVerified()

bool IsLicenseVerified ( PluginManager::Effect  effect)
inline

Checks whether license is verified for specified effect.

Returns
True if license is valid, false otherwise.

◆ CheckKeysFormat()

static bool CheckKeysFormat ( string  keys)
inlinestatic

Checks whether specified string is correctly formated list of keys.

◆ IsGenerationAvailable()

bool IsGenerationAvailable ( )
inline

Checks whether generation is available.

Returns
True if license is valid and not expired, false otherwise.

◆ GetErrorMessage() [1/2]

string GetErrorMessage ( Status  status)
inline

Returns human readable string explaining error based on Status.

◆ GetErrorMessage() [2/2]

string GetErrorMessage ( PluginManager::Effect  effect)
inline

Returns human readable string explaining current error with activation of specified effect.

◆ GetGenerationErrorMessage()

string GetGenerationErrorMessage ( )
inline

Returns human readable string explaining current error with generation availability.

◆ GetInstance()

static ServerAuthManager GetInstance ( )
inlinestatic

Returns singleton of this class.

Creates and initializes instance if needed.

◆ RegisterKey()

void RegisterKey ( string  key)
inline

Sets license key and starts key validation process.

◆ ValidateLicense()

void ValidateLicense ( string[]  keys)
inline

Sets list of license keys and starts key validation process.

◆ RemoveKey()

void RemoveKey ( )
inline

Removes current license key.

Property Documentation

◆ PluginLicenseKeys

string [] PluginLicenseKeys = new string[0]
get

License key used for the plugin.

Not necessarily correct. Use IsLicenseVerified to check for that.

May be empty.

◆ GenerationLicenseKey

string GenerationLicenseKey = ""
get

License key used for the generation.

It's either validated key suitable for generation or an empty string.

◆ GenerationURL

string GenerationURL = ""
get

URL address for generation API.

Includes GenerationLicenseKey in the URL.

◆ ServerErrorMessage

string ServerErrorMessage = ""
get

Human readable error message string returned from server.


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