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-OWNER: ryan.durand #ROBOMERGE-AUTHOR: ryan.durand #ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900 #ROBOMERGE-BOT: (v613-10869866) [CL 10870549 by ryan durand in Main branch]
53 lines
2.2 KiB
C++
53 lines
2.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "BackgroundHttpNotificationObject.h"
|
|
#include "Interfaces/IBackgroundHttpRequest.h"
|
|
|
|
DECLARE_LOG_CATEGORY_EXTERN(LogBackgroundHttpRequest, Log, All)
|
|
|
|
/**
|
|
* Contains implementation of some common functions that don't have to vary between implementation
|
|
*/
|
|
class BACKGROUNDHTTP_API FBackgroundHttpRequestImpl
|
|
: public IBackgroundHttpRequest
|
|
{
|
|
public:
|
|
FBackgroundHttpRequestImpl();
|
|
virtual ~FBackgroundHttpRequestImpl() {}
|
|
|
|
//This should be called from the platform level when a BG download finishes.
|
|
virtual void OnBackgroundDownloadComplete();
|
|
|
|
// IBackgroundHttpRequest
|
|
virtual bool ProcessRequest() override;
|
|
virtual void CancelRequest() override;
|
|
virtual void PauseRequest() override;
|
|
virtual void ResumeRequest() override;
|
|
virtual void SetURLAsList(const TArray<FString>& URLs, int NumRetriesToAttempt) override;
|
|
virtual const TArray<FString>& GetURLList() const override;
|
|
virtual void SetCompleteNotification(FBackgroundHttpNotificationObjectPtr DownloadCompleteNotificationObjectIn) override;
|
|
virtual void CompleteWithExistingResponseData(FBackgroundHttpResponsePtr BackgroundResponse) override;
|
|
virtual FBackgroundHttpRequestCompleteDelegate& OnProcessRequestComplete() override;
|
|
virtual FBackgroundHttpProgressUpdateDelegate& OnProgressUpdated() override;
|
|
virtual const FBackgroundHttpResponsePtr GetResponse() const override;
|
|
virtual const FString& GetRequestID() const override;
|
|
virtual void SetRequestID(const FString& NewRequestID) override;
|
|
virtual bool HandleDelayedProcess() override;
|
|
virtual EBackgroundHTTPPriority GetRequestPriority() const override;
|
|
virtual void SetRequestPriority(EBackgroundHTTPPriority NewPriority) override;
|
|
|
|
virtual void NotifyNotificationObjectOfComplete(bool bWasSuccess);
|
|
protected:
|
|
TSharedPtr<FBackgroundHttpNotificationObject, ESPMode::ThreadSafe> DownloadCompleteNotificationObject;
|
|
FBackgroundHttpResponsePtr Response;
|
|
TArray<FString> URLList;
|
|
FString RequestID;
|
|
int NumberOfTotalRetries;
|
|
EBackgroundHTTPPriority RequestPriority;
|
|
|
|
FBackgroundHttpRequestCompleteDelegate HttpRequestCompleteDelegate;
|
|
FBackgroundHttpProgressUpdateDelegate HttpProgressUpdateDelegate;
|
|
};
|