Files
UnrealEngineUWP/Engine/Source/Developer/IoStoreUtilities/Public/PackageStoreWriter.h
carlmagnus nordin 9f028b8744 ZenCook: Remove unused fields "guid" and "disksize" from oplog
#preflight 63d8ede38505ea6b1f7e96b6
#rb per.larsson

[CL 23927486 by carlmagnus nordin in ue5-main branch]
2023-01-31 10:39:54 -05:00

76 lines
1.9 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "IO/PackageStore.h"
#include "Serialization/PackageWriter.h"
class IPackageStoreWriter : public ICookedPackageWriter
{
public:
/** Identify as a member of this interface from the ICookedPackageWriter api. */
virtual IPackageStoreWriter* AsPackageStoreWriter() override
{
return this;
}
struct FOplogCookInfo
{
struct FAttachment
{
const UTF8CHAR* Key;
FIoHash Hash;
};
FName PackageName;
TArray<FAttachment> Attachments;
bool bUpToDate = false;
};
/**
* Returns all cooked package store entries.
*/
virtual void GetEntries(TFunction<void(TArrayView<const FPackageStoreEntryResource>, TArrayView<const FOplogCookInfo>)>&&) = 0;
struct FEntryCreatedEventArgs
{
FName PlatformName;
const FPackageStoreEntryResource& Entry;
};
DECLARE_EVENT_OneParam(IPackageStoreWriter, FEntryCreatedEvent, const FEntryCreatedEventArgs&);
virtual FEntryCreatedEvent& OnEntryCreated() = 0;
/**
* Package commit event arguments
*/
struct FCommitEventArgs
{
FName PlatformName;
FName PackageName;
int32 EntryIndex = INDEX_NONE;
TArrayView<const FPackageStoreEntryResource> Entries;
TArrayView<const FOplogCookInfo> CookInfos;
TArray<FAdditionalFileInfo> AdditionalFiles;
};
/**
* Broadcasted after a package has been committed, i.e cooked.
*/
DECLARE_EVENT_OneParam(IPackageStoreWriter, FCommitEvent, const FCommitEventArgs&);
virtual FCommitEvent& OnCommit() = 0;
struct FMarkUpToDateEventArgs
{
FName PlatformName;
TArray<int32> PackageIndexes;
TArrayView<const FPackageStoreEntryResource> Entries;
TArrayView<const FOplogCookInfo> CookInfos;
TArray<FAdditionalFileInfo> AdditionalFiles;
};
/**
* Broadcasted after a set of packages have been found to be up to date.
*/
DECLARE_EVENT_OneParam(IPackageStoreWriter, FMarkUpToDateEvent, const FMarkUpToDateEventArgs&);
virtual FMarkUpToDateEvent& OnMarkUpToDate() = 0;
};