Files
UnrealEngineUWP/Engine/Source/Runtime/Online/BackgroundHTTP/Public/BackgroundHttpRequestImpl.h
ryan durand 0f0464a30e Updating copyright for Engine Runtime.
#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]
2019-12-26 14:45:42 -05:00

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