class ProjectLibrarySaveResourceMetaDataOperation

Project library operation that updates the meta-data of an existing resource.

Public

Constructors

ProjectLibrarySaveResourceMetaDataOperation

ProjectLibrarySaveResourceMetaDataOperation(const ProjectLibraryOperationContext &context, const UUID &resourceId, const SPtr<ProjectLibraryResourceMetaData> &metaData)

Constructs the operation.

context
Project library context the operation is being executed in.
resourceId
ID of the resource which meta-data to re-save. Resource must have been previously saved in the library.
metaData
New meta-data to apply to the resource.

Methods

PrepareOnMainThread

Result PrepareOnMainThread() override

Performs the first stage of the operation.

Verifies the input parameters are correct, creates library database entries (if possible) and returns success if operation will proceed to execute. Executed on the main thread.

Returns: Operation result and optional error message if failed.

RunOnWorkerThread

void RunOnWorkerThread() override

Performs the second stage of the operation.

Performs longer lasting tasks such as saving or loading a package, copying a file or generating preview icons. Executed on a worker thread.

FinalizeOnMainThread

void FinalizeOnMainThread() override

Performs the last stage of the operation.

This will be called after the worker thread completes. Will ensure the entries in the project library database match to packages written by the worker thread.

Private

Fields

mResourceId

UUID mResourceId

mMetaData

mPackagePath

Path mPackagePath

mRelativePath

Path mRelativePath

mIsPartOfSynchronizedPackage

bool mIsPartOfSynchronizedPackage