LootLocker Unreal SDK 10.7.0
Game backend SDK for Unreal Engine
Loading...
Searching...
No Matches
LootLockerMiscellaneousRequestHandler.h
Go to the documentation of this file.
1// Copyright (c) 2021 LootLocker
2
3#pragma once
4
5
6#include "CoreMinimal.h"
7#include "UObject/NoExportTypes.h"
10#include "JsonObjectConverter.h"
11#include "LootLockerMiscellaneousRequestHandler.generated.h"
12
13//==================================================
14// Data Definitions
15//==================================================
16
19USTRUCT(BlueprintType)
21{
22 GENERATED_BODY()
24 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
25 FString Title_id = "";
27 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
28 FString Environment_id = "";
30 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
31 int32 Game_id = 0;
33 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
34 FString Name = "";
35};
36
37//==================================================
38// Request Definitions
39//==================================================
42USTRUCT(BlueprintType)
44{
45 GENERATED_BODY()
46 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
47 FString api_key = "";
48};
49
50//==================================================
51// Response Definitions
52//==================================================
55USTRUCT(BlueprintType)
57{
58 GENERATED_BODY()
59 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
60 FString date = "";
61};
62
65USTRUCT(BlueprintType)
67{
68 GENERATED_BODY()
70 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
72};
73
76UENUM(BlueprintType)
78{
80 NotInitialized UMETA(DisplayName = "Not Initialized"),
82 NotSignedIn UMETA(DisplayName = "Not Signed In"),
86 SavedButInactive UMETA(DisplayName = "Saved But Inactive"),
88 SignedInAndConnected UMETA(DisplayName = "Signed In And Connected"),
90 SessionExpired UMETA(DisplayName = "Session Expired"),
92 Banned UMETA(DisplayName = "Banned"),
94 NoConnection UMETA(DisplayName = "No Connection"),
96 ServerError UMETA(DisplayName = "Server Error"),
97};
98
101USTRUCT(BlueprintType)
103{
104 GENERATED_BODY()
106 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
109 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
110 FString ServerTime = "";
112 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
114};
115
116//==================================================
117// Delegate Definitions
118//==================================================
121
133
134//==================================================
135// API Class Definition
136//==================================================
138UCLASS()
139class LOOTLOCKERSDK_API ULootLockerMiscellaneousRequestHandler : public UObject
140{
141 GENERATED_BODY()
142public:
144
145 static FString GetServerTime(const FLootLockerPlayerData& PlayerData, const FTimeResponseDelegate& OnCompletedRequest);
146 static FString GetLastActivePlatform(const FLootLockerPlayerData& PlayerData);
147 static FString GetGameInfo(const FGameInfoResponseDelegate& OnCompletedRequest);
148 static FString CheckConnectionStatus(const FLootLockerPlayerData& PlayerData, const FLootLockerConnectionStateDelegate& OnCompletedRequest);
149};
ELootLockerConnectionState
The state of a player's connection and session with the LootLocker backend.
Definition LootLockerMiscellaneousRequestHandler.h:78
@ NotSignedIn
No session token exists in local state for the specified player.
Definition LootLockerMiscellaneousRequestHandler.h:82
@ SessionExpired
A session token exists but the server returned 401 or 403 and the player is not banned.
Definition LootLockerMiscellaneousRequestHandler.h:90
@ NoConnection
The server could not be reached (no network, timeout, or status code 0).
Definition LootLockerMiscellaneousRequestHandler.h:94
@ ServerError
The server returned a 5xx error or an unexpected non-success status code.
Definition LootLockerMiscellaneousRequestHandler.h:96
@ NotInitialized
The SDK has not been configured (game API key is not set).
Definition LootLockerMiscellaneousRequestHandler.h:80
@ Banned
A session token exists but the player is currently banned.
Definition LootLockerMiscellaneousRequestHandler.h:92
@ SignedInAndConnected
The session token is valid and the server is reachable (ping returned 200).
Definition LootLockerMiscellaneousRequestHandler.h:88
@ SavedButInactive
The player has saved credentials on disk but is not currently active in the multi-player session.
Definition LootLockerMiscellaneousRequestHandler.h:86
static FString GetLastActivePlatform(const FLootLockerPlayerData &PlayerData)
static FString CheckConnectionStatus(const FLootLockerPlayerData &PlayerData, const FLootLockerConnectionStateDelegate &OnCompletedRequest)
ULootLockerMiscellaneousRequestHandler()
Definition LootLockerMiscellaneousRequestHandler.h:143
static FString GetServerTime(const FLootLockerPlayerData &PlayerData, const FTimeResponseDelegate &OnCompletedRequest)
static FString GetGameInfo(const FGameInfoResponseDelegate &OnCompletedRequest)
void(* FTimeResponseDelegate)(FLootLockerTimeResponse)
C++ response delegate for fetching server time.
Definition LootLockerMiscellaneousRequestHandler.h:124
void(* FLootLockerConnectionStateDelegate)(FLootLockerConnectionStateResponse)
C++ response delegate for CheckConnectionStatus.
Definition LootLockerMiscellaneousRequestHandler.h:132
void(* FGameInfoResponseDelegate)(FLootLockerGameInfoResponse)
C++ response delegate for fetching game info.
Definition LootLockerMiscellaneousRequestHandler.h:128
Details about a player's active ban.
Definition LootLockerErrorData.h:11
Definition LootLockerMiscellaneousRequestHandler.h:103
ELootLockerConnectionState State
The determined connection and session state for the player.
Definition LootLockerMiscellaneousRequestHandler.h:107
FLootLockerBanInfo BanDetails
Details about the active ban. Populated only when State is Banned.
Definition LootLockerMiscellaneousRequestHandler.h:113
FString ServerTime
Server timestamp returned by the ping. Populated only when State is SignedInAndConnected.
Definition LootLockerMiscellaneousRequestHandler.h:110
Definition LootLockerMiscellaneousRequestHandler.h:44
FString api_key
Definition LootLockerMiscellaneousRequestHandler.h:47
Definition LootLockerMiscellaneousRequestHandler.h:67
FLootLockerGameInfo Info
Information about the game.
Definition LootLockerMiscellaneousRequestHandler.h:71
Definition LootLockerMiscellaneousRequestHandler.h:21
FString Name
The name of the game as configured in LootLocker.
Definition LootLockerMiscellaneousRequestHandler.h:34
int32 Game_id
The id of the game (uniquely identifies the game in LootLocker).
Definition LootLockerMiscellaneousRequestHandler.h:31
FString Environment_id
The environment ID of the game (identifies which environment instance of the title this game refers t...
Definition LootLockerMiscellaneousRequestHandler.h:28
FString Title_id
The title ID of the game (uniquely identifies the game in LootLocker).
Definition LootLockerMiscellaneousRequestHandler.h:25
Definition LootLockerPlayerData.h:12
Base response struct — every SDK callback receives a struct that derives from this.
Definition LootLockerResponse.h:19
Definition LootLockerMiscellaneousRequestHandler.h:57
FString date
Definition LootLockerMiscellaneousRequestHandler.h:60