Files
UnrealEngineUWP/Engine/Source/Runtime/Online/HTTP/Private/Android/AndroidPlatformHttp.cpp
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

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("ue4.http.proxy.proxyHost"));
int32 ProxyPort = AndroidThunkCpp_GetMetaDataInt(TEXT("ue4.http.proxy.proxyPort"));
if (ProxyPort != -1 && !ProxyHost.IsEmpty())
{
ProxyAddress = FString::Printf(TEXT("%s:%d"), *ProxyHost, ProxyPort);
}
#endif
return ProxyAddress;
}
bool FAndroidPlatformHttp::IsOperatingSystemProxyInformationSupported()
{
return true;
}