Files
UnrealEngineUWP/Engine/Source/Runtime/Online/BackgroundHTTP/Private/IOS/ApplePlatformBackgroundHttp.cpp
Marc Audy 7379fa99c5 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14229157
[CL 14233282 by Marc Audy in ue5-main branch]
2020-09-01 14:07:48 -04:00

36 lines
1.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "IOS/ApplePlatformBackgroundHttp.h"
#include "IOS/ApplePlatformBackgroundHttpManager.h"
#include "IOS/ApplePlatformBackgroundHttpRequest.h"
#include "IOS/ApplePlatformBackgroundHttpResponse.h"
#include "IOS/IOSBackgroundURLSessionHandler.h"
#include "Misc/Paths.h"
void FApplePlatformBackgroundHttp::Initialize()
{
const FString DefaultIdentifier = TEXT("com.epicgames.backgroundhttp");
ensureAlwaysMsgf(FBackgroundURLSessionHandler::InitBackgroundSession(DefaultIdentifier), TEXT("Failure to create a background download session with identifier %s"), *DefaultIdentifier);
}
void FApplePlatformBackgroundHttp::Shutdown()
{
FBackgroundURLSessionHandler::ShutdownBackgroundSession();
}
FBackgroundHttpManagerPtr FApplePlatformBackgroundHttp::CreatePlatformBackgroundHttpManager()
{
return MakeShared<FApplePlatformBackgroundHttpManager, ESPMode::ThreadSafe>();
}
FBackgroundHttpRequestPtr FApplePlatformBackgroundHttp::ConstructBackgroundRequest()
{
return MakeShared<FApplePlatformBackgroundHttpRequest, ESPMode::ThreadSafe>();
}
FBackgroundHttpResponsePtr FApplePlatformBackgroundHttp::ConstructBackgroundResponse(int32 ResponseCode, const FString& TempFilePath)
{
return MakeShared<FApplePlatformBackgroundHttpResponse, ESPMode::ThreadSafe>(ResponseCode, TempFilePath);
}