Skip to content

Struct FTryllLicence

ClassList > FTryllLicence

More...

  • #include <TryllLicence.h>

Public Static Attributes

Type Name
const TCHAR *const EvaluationDraftVersion

Public Static Functions

Type Name
FString CurrentVersion ()
void DebugResetForTests ()
void DebugSetLicenceFileForTests (const FString & PathOrEmpty)
void DebugUseInMemoryStoreForTests (bool bEnable)
FString GetInstallId ()
FString GetLastInstallEventVersion ()
bool HasLicenceFile ()
bool IsAccepted ()
bool IsUsingInMemoryStoreForTests ()
FString LicenceFilePath ()
FString LoadLicenceText ()
FSimpleMulticastDelegate & OnChanged ()
void SetAccepted (bool bAccepted)
void SetLastInstallEventVersion (const FString & Version)

Detailed Description

The person's acceptance of the Tryll Runtime Licence, plus the plugin's own install id.

The licence is LICENSE.md in the TryllClient plugin folder; an unstamped in-tree plugin without one reads docs/legal/LICENSE.md from the repo (FTryllDevCheckout). Its version is a hash of the text, so any change to the text asks again. Without the file the version is "evaluation-draft" and Accept still works.

Stored user-global with FPlatformMisc stored values (store "Tryll", section "Welcome"), so a choice follows the person across projects and engine versions. Game thread only.

Public Static Attributes Documentation

variable EvaluationDraftVersion

const TCHAR* const FTryllLicence::EvaluationDraftVersion;

Version used when the plugin has no LICENSE.md.


Public Static Functions Documentation

function CurrentVersion

static FString FTryllLicence::CurrentVersion () 

"sha1:<16 hex>" of the text (no BOM, LF line endings, no trailing whitespace), or EvaluationDraftVersion.


function DebugResetForTests

static void FTryllLicence::DebugResetForTests () 

Back to the real store and the real file, with the in-memory store emptied.


function DebugSetLicenceFileForTests

static void FTryllLicence::DebugSetLicenceFileForTests (
    const FString & PathOrEmpty
) 

A path that does not exist stands for a plugin without LICENSE.md. Empty restores the real file.


function DebugUseInMemoryStoreForTests

static void FTryllLicence::DebugUseInMemoryStoreForTests (
    bool bEnable
) 

Test seams: in-memory store (never touch the real one) and a substitute licence file.


function GetInstallId

static FString FTryllLicence::GetInstallId () 

Random id made on first use and never derived from the machine.


function GetLastInstallEventVersion

static FString FTryllLicence::GetLastInstallEventVersion () 

The plugin versions an install event went out for, ';'-joined (an older single version reads as a list of one), or empty. FTryllInstallEvent owns the format.


function HasLicenceFile

static bool FTryllLicence::HasLicenceFile () 

function IsAccepted

static bool FTryllLicence::IsAccepted () 

True when the stored accepted version equals CurrentVersion().


function IsUsingInMemoryStoreForTests

static bool FTryllLicence::IsUsingInMemoryStoreForTests () 

function LicenceFilePath

static FString FTryllLicence::LicenceFilePath () 

<TryllClient plugin BaseDir>/LICENSE.md, else the repo's licence in a development checkout, or the test override.


function LoadLicenceText

static FString FTryllLicence::LoadLicenceText () 

The licence text with line endings as "\n". Empty when the file is missing.


function OnChanged

static FSimpleMulticastDelegate & FTryllLicence::OnChanged () 

Fires after every SetAccepted. Game thread.


function SetAccepted

static void FTryllLicence::SetAccepted (
    bool bAccepted
) 

Accept stores CurrentVersion() and the UTC time; withdraw removes both. Broadcasts OnChanged.


function SetLastInstallEventVersion

static void FTryllLicence::SetLastInstallEventVersion (
    const FString & Version
) 


The documentation for this class was generated from the following file C:/_tryll/_monorepo3/tryll/clients/unreal/Source/TryllClient/Public/TryllLicence.h