Files
UnrealEngineUWP/Engine/Source/Developer/EditorAnalyticsSession/Public/EditorSessionSummarySender.h
Marc Audy 2080159f77 Fix missing includes
#rb
#rnx

[CL 11301105 by Marc Audy in Main branch]
2020-02-08 13:01:12 -05:00

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;
};