Files
UnrealEngineUWP/Engine/Source/Developer/EditorAnalyticsSession/Public/EditorSessionSummarySender.h
Stefan Boberg 1f813eb516 Copying //UE4/Dev-Core to Main (//UE4/Main)
#rb many

[CL 9405827 by Stefan Boberg in Main branch]
2019-10-03 16:26:48 -04:00

39 lines
1.1 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Containers/UnrealString.h"
#include "HAL/Platform.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);
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;
};