You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902 #ROBOMERGE-BOT: (v613-10869866) [CL 10870584 by ryan durand in Main branch]
41 lines
1.4 KiB
C++
41 lines
1.4 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Misc/Guid.h"
|
|
#include "MessageEndpoint.h"
|
|
|
|
struct FWidgetSnapshotRequest;
|
|
struct FWidgetSnapshotResponse;
|
|
|
|
/**
|
|
* Implements the service for handling remote widget snapshots.
|
|
*/
|
|
class FWidgetSnapshotService
|
|
{
|
|
public:
|
|
DECLARE_DELEGATE_OneParam(FOnWidgetSnapshotResponse, const TArray<uint8>& /*InSnapshotData*/);
|
|
|
|
FWidgetSnapshotService();
|
|
|
|
/** Request a snapshot from the given instance. The given delegate will be called when the response comes in */
|
|
FGuid RequestSnapshot(const FGuid& InRemoteInstanceId, const FOnWidgetSnapshotResponse& OnResponse);
|
|
|
|
/** Abort a request using the GUID previously obtained via a call to RequestSnapshot */
|
|
void AbortSnapshotRequest(const FGuid& InSnapshotRequestId);
|
|
|
|
private:
|
|
/** Handles FWidgetSnapshotRequest messages */
|
|
void HandleWidgetSnapshotRequestMessage(const FWidgetSnapshotRequest& Message, const TSharedRef<IMessageContext, ESPMode::ThreadSafe>& Context);
|
|
|
|
/** Handles FWidgetSnapshotResponse messages */
|
|
void HandleWidgetSnapshotResponseMessage(const FWidgetSnapshotResponse& Message, const TSharedRef<IMessageContext, ESPMode::ThreadSafe>& Context);
|
|
|
|
/** Holds the message endpoint */
|
|
TSharedPtr<FMessageEndpoint, ESPMode::ThreadSafe> MessageEndpoint;
|
|
|
|
/** Handlers awaiting their resultant snapshot data */
|
|
TMap<FGuid, FOnWidgetSnapshotResponse> PendingSnapshotResponseHandlers;
|
|
};
|