Struct FTryllLicence¶
#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¶
Version used when the plugin has no LICENSE.md.
Public Static Functions Documentation¶
function CurrentVersion¶
"sha1:<16 hex>" of the text (no BOM, LF line endings, no trailing whitespace), or EvaluationDraftVersion.
function DebugResetForTests¶
Back to the real store and the real file, with the in-memory store emptied.
function DebugSetLicenceFileForTests¶
A path that does not exist stands for a plugin without LICENSE.md. Empty restores the real file.
function DebugUseInMemoryStoreForTests¶
Test seams: in-memory store (never touch the real one) and a substitute licence file.
function GetInstallId¶
Random id made on first use and never derived from the machine.
function 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¶
function IsAccepted¶
True when the stored accepted version equals CurrentVersion().
function IsUsingInMemoryStoreForTests¶
function LicenceFilePath¶
<TryllClient plugin BaseDir>/LICENSE.md, else the repo's licence in a development checkout, or the test override.
function LoadLicenceText¶
The licence text with line endings as "\n". Empty when the file is missing.
function OnChanged¶
Fires after every SetAccepted. Game thread.
function SetAccepted¶
Accept stores CurrentVersion() and the UTC time; withdraw removes both. Broadcasts OnChanged.
function SetLastInstallEventVersion¶
The documentation for this class was generated from the following file C:/_tryll/_monorepo3/tryll/clients/unreal/Source/TryllClient/Public/TryllLicence.h