Files
UnrealEngineUWP/Engine/Source/Runtime/Online/HTTP/Private/Android/AndroidPlatformHttp.cpp
jack porter 946b30a59a Remove UE3/UE4 references
#jira UE-112108
#jira UE-111469
#jira UE-111456
#jira UE-111451
#jira UE-111331
#jira UE-111149
#jira UE-111136
#jira UE-110941
#jira UE-104701
#rb trivial
[FYI] Chris.Babcock
#preflight 606446947a99880001b3cbac

#ROBOMERGE-SOURCE: CL 15872931 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)

[CL 15872932 by jack porter in ue5-main branch]
2021-03-31 06:40:14 -04:00

50 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "Android/AndroidPlatformHttp.h"
#include "Curl/CurlHttp.h"
#include "Curl/CurlHttpManager.h"
void FAndroidPlatformHttp::Init()
{
FCurlHttpManager::InitCurl();
}
class FHttpManager * FAndroidPlatformHttp::CreatePlatformHttpManager()
{
return new FCurlHttpManager();
}
void FAndroidPlatformHttp::Shutdown()
{
FCurlHttpManager::ShutdownCurl();
}
IHttpRequest* FAndroidPlatformHttp::ConstructRequest()
{
return new FCurlHttpRequest();
}
TOptional<FString> FAndroidPlatformHttp::GetOperatingSystemProxyAddress()
{
FString ProxyAddress;
#if USE_ANDROID_JNI
extern int32 AndroidThunkCpp_GetMetaDataInt(const FString& Key);
extern FString AndroidThunkCpp_GetMetaDataString(const FString& Key);
FString ProxyHost = AndroidThunkCpp_GetMetaDataString(TEXT("unreal.http.proxy.proxyHost"));
int32 ProxyPort = AndroidThunkCpp_GetMetaDataInt(TEXT("unreal.http.proxy.proxyPort"));
if (ProxyPort != -1 && !ProxyHost.IsEmpty())
{
ProxyAddress = FString::Printf(TEXT("%s:%d"), *ProxyHost, ProxyPort);
}
#endif
return ProxyAddress;
}
bool FAndroidPlatformHttp::IsOperatingSystemProxyInformationSupported()
{
return true;
}