Space Plunder
Loading...
Searching...
No Matches
RequestGlobalStats.h
Go to the documentation of this file.
1// Copyright 2023 Artur 'NijoMeisteR' Dworaczek. All Rights Reserved.
2
3#pragma once
4#pragma warning(disable:4996)
5#pragma warning(disable:4265)
6#pragma warning(disable:4701)
7
8#include "CoreMinimal.h"
9#include "Kismet/BlueprintAsyncActionBase.h"
10#include "SteamRequests.h"
11#pragma push_macro("ARRAY_COUNT")
12#undef ARRAY_COUNT
13
14#if USING_CODE_ANALYSIS
15MSVC_PRAGMA(warning(push))
16MSVC_PRAGMA(warning(disable : ALL_CODE_ANALYSIS_WARNINGS))
17#endif
18
19#include "OnlineSubsystemSteam.h"
20#include <steam/steam_api.h>
21
22#if USING_CODE_ANALYSIS
23MSVC_PRAGMA(warning(pop))
24#endif
25
26
27#pragma pop_macro("ARRAY_COUNT")
28#include "RequestGlobalStats.generated.h"
29
31DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FResponseRequestGlobalStatsDelegate, int32, SteamErrorOutput);
32
34UCLASS()
35class STATSINTEGRATION_API URequestGlobalStats : public UBlueprintAsyncActionBase
36{
37 GENERATED_BODY()
38
39public:
40 UPROPERTY(BlueprintAssignable)
41 FResponseRequestGlobalStatsDelegate onSuccess;
42
43 UPROPERTY(BlueprintAssignable)
44 FResponseRequestGlobalStatsDelegate onFailure;
45
46 /*
47 Asynchronously downloads global stats from the server.
48
49 Ensure you execute 'Request Stats and Achievements' before making this call.
50
51 IMPORTANT: 60 days of history is the maximum you may fetch from the SteamAPI.
52 */
53 UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true"), Category = "Simple Steam Stats & Achievements")
54 static URequestGlobalStats* RequestGlobalStats(int32 HistoryInDays);
55
56private:
57 virtual void Activate() override;
58
59 int32 HistoryInDays = 0;
60
61 void OnGlobalStatsReceived(GlobalStatsReceived_t* pCallback, bool bIOFailure);
62 CCallResult<URequestGlobalStats, GlobalStatsReceived_t> m_callRequestGlobalStats;
63};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FResponseRequestGlobalStatsDelegate, int32, SteamErrorOutput)
Definition RequestGlobalStats.h:36