You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Containers/UnrealString.h"
|
|
#include "HAL/Platform.h"
|
|
#include "Misc/Optional.h"
|
|
|
|
struct FEditorAnalyticsSession;
|
|
class IAnalyticsProvider;
|
|
|
|
/**
|
|
* Sender of SessionSummary events from all editor sessions in-between runs.
|
|
* Separated from Writer to make it easier to run it out-of-process.
|
|
*/
|
|
class EDITORANALYTICSSESSION_API FEditorSessionSummarySender
|
|
{
|
|
public:
|
|
FEditorSessionSummarySender(IAnalyticsProvider& InAnalyticsProvider, const FString& InSenderName, const int32 InCurrentSessionProcessId);
|
|
~FEditorSessionSummarySender();
|
|
|
|
void Tick(float DeltaTime);
|
|
void Shutdown();
|
|
|
|
void SetCurrentSessionExitCode(const int32 InCurrentSessionProcessId, const int32 InExitCode);
|
|
bool FindCurrentSession(FEditorAnalyticsSession& OutSession) const;
|
|
|
|
private:
|
|
/** Send any stored Sessions. */
|
|
void SendStoredSessions(const bool bForceSendCurrentSession = false) const;
|
|
void SendSessionSummaryEvent(const FEditorAnalyticsSession& Session) const;
|
|
|
|
private:
|
|
float HeartbeatTimeElapsed;
|
|
IAnalyticsProvider& AnalyticsProvider;
|
|
FString Sender;
|
|
|
|
int32 CurrentSessionProcessId;
|
|
TOptional<int32> CurrentSessionExitCode;
|
|
};
|