47 lines
923 B
C++
47 lines
923 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
#include "GenericPlatform/GenericPlatformHttp.h"
|
|
|
|
/**
|
|
* Platform specific Http implementations
|
|
*/
|
|
class HTTP_API FApplePlatformHttp : public FGenericPlatformHttp
|
|
{
|
|
public:
|
|
|
|
/**
|
|
* Platform initialization step
|
|
*/
|
|
static void Init();
|
|
|
|
/**
|
|
* Creates a platform-specific HTTP manager.
|
|
*
|
|
* @return NULL if default implementation is to be used
|
|
*/
|
|
static FHttpManager* CreatePlatformHttpManager();
|
|
|
|
/**
|
|
* Platform shutdown step
|
|
*/
|
|
static void Shutdown();
|
|
|
|
/**
|
|
* Creates a new Http request instance for the current platform
|
|
*
|
|
* @return request object
|
|
*/
|
|
static IHttpRequest* ConstructRequest();
|
|
|
|
private:
|
|
/** Session used to create Apple based requests */
|
|
static inline NSURLSession* Session = nil;
|
|
|
|
static void InitWithNSUrlSession();
|
|
static void ShutdownWithNSUrlSession();
|
|
};
|
|
|
|
|
|
typedef FApplePlatformHttp FPlatformHttp;
|