Files
UnrealEngineUWP/Engine/Source/Developer/IoStoreUtilities/Private/ZenStoreHttpClient.h
Per Larsson 6450577448 Iterative cooking support when using Zen loader/storage server
Zen: af7ff3f1c6

#rb CarlMagnus.Nordin, Stefan.Boberg
#jira none
#rnx

[CL 16755977 by Per Larsson in ue5-main branch]
2021-06-23 09:00:52 -04:00

60 lines
1.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "IO/IoDispatcher.h"
#include "Async/Future.h"
#include "Serialization/CompactBinaryPackage.h"
class FCbPackage;
class FCbObject;
namespace UE {
namespace Zen {
struct FRequestPool;
}
/**
* HTTP protocol implementation of Zen Store client interface
*/
class FZenStoreHttpClient
{
public:
FZenStoreHttpClient(const FStringView InHostName, uint16 InPort);
~FZenStoreHttpClient();
void Initialize(FStringView InProjectId,
FStringView InOplogId,
FStringView ServerRoot,
FStringView EngineRoot,
FStringView ProjectRoot,
bool IsCleanBuild);
void InitializeReadOnly(FStringView InProjectId, FStringView InOplogId);
void StartBuildPass();
TIoStatusOr<uint64> EndBuildPass(FCbPackage OpEntry);
TFuture<TIoStatusOr<uint64>> AppendOp(FCbPackage OpEntry);
TIoStatusOr<uint64> GetChunkSize(const FIoChunkId& Id);
TIoStatusOr<FIoBuffer> ReadChunk(const FIoChunkId& Id, uint64 Offset = 0, uint64 Size = ~0ull);
TFuture<TIoStatusOr<FCbObject>> GetOplog();
TFuture<TIoStatusOr<FCbObject>> GetFiles();
private:
FString HostName;
uint16 Port;
TUniquePtr<Zen::FRequestPool> RequestPool;
FString OplogPath;
FString OplogNewEntryPath;
FString OplogPrepNewEntryPath;
FString TempDirPath;
uint64 StandaloneThresholdBytes = 1 * 1024 * 1024;
bool bAllowRead = false;
bool bAllowEdit = false;
};
}