Audacity 3.2.0
|
Public Member Functions | |
ProjectBlocksLock (ProjectCloudExtension &extension, AudacityProject &project, std::function< void()> onBlocksLocked) | |
~ProjectBlocksLock () override | |
void | VisitBlocks (TrackList &tracks) |
void | CollectHashes () |
void | UpdateProjectHashesInCache () |
bool | GetHash (int64_t blockId, std::string &hash) const override |
void | UpdateHash (int64_t blockId, const std::string &hash) override |
void | FillMissingBlocks (const std::vector< UploadUrls > &missingBlockUrls) |
Public Attributes | |
ProjectCloudExtension & | Extension |
SampleBlockIDSet | BlockIds |
std::vector< LockedBlock > | Blocks |
std::vector< BlockUploadTask > | MissingBlocks |
std::unordered_map< int64_t, size_t > | BlockIdToIndex |
std::unordered_map< std::string, size_t > | BlockHashToIndex |
std::unique_ptr< BlockHasher > | Hasher |
std::future< void > | UpdateCacheFuture |
std::vector< std::pair< int64_t, std::string > > | NewHashes |
std::function< void()> | OnBlocksLocked |
Additional Inherited Members | |
Private Member Functions inherited from audacity::cloud::audiocom::sync::BlockHashCache | |
virtual | ~BlockHashCache ()=default |
virtual bool | GetHash (int64_t blockId, std::string &hash) const =0 |
virtual void | UpdateHash (int64_t blockId, const std::string &hash)=0 |
Definition at line 49 of file LocalProjectSnapshot.cpp.
|
inlineexplicit |
Definition at line 68 of file LocalProjectSnapshot.cpp.
References BlockIds, Blocks, CollectHashes(), Extension, audacity::cloud::audiocom::sync::CloudProjectsDatabase::Get(), TrackList::Get(), audacity::cloud::audiocom::sync::ProjectCloudExtension::GetCloudProjectId(), Hasher, audacity::cloud::audiocom::sync::ProjectCloudExtension::IsCloudProject(), project, audacity::cloud::audiocom::sync::CloudProjectsDatabase::UpdateProjectBlockList(), and VisitBlocks().
|
inlineoverride |
Definition at line 87 of file LocalProjectSnapshot.cpp.
|
inline |
Definition at line 112 of file LocalProjectSnapshot.cpp.
References BlockHashToIndex, BlockIdToIndex, Blocks, Hasher, id, OnBlocksLocked, crypto::sha256(), and UpdateProjectHashesInCache().
Referenced by ProjectBlocksLock().
|
inline |
Definition at line 181 of file LocalProjectSnapshot.cpp.
References BlockHashToIndex, Blocks, MissingBlocks, and ToUpper().
|
inlineoverridevirtual |
Implements audacity::cloud::audiocom::sync::BlockHashCache.
Definition at line 160 of file LocalProjectSnapshot.cpp.
References Extension, audacity::cloud::audiocom::sync::CloudProjectsDatabase::Get(), audacity::cloud::audiocom::sync::CloudProjectsDatabase::GetBlockHash(), audacity::cloud::audiocom::sync::ProjectCloudExtension::GetCloudProjectId(), and audacity::cloud::audiocom::sync::ProjectCloudExtension::IsCloudProject().
|
inlineoverridevirtual |
Implements audacity::cloud::audiocom::sync::BlockHashCache.
Definition at line 176 of file LocalProjectSnapshot.cpp.
References NewHashes.
|
inline |
Definition at line 146 of file LocalProjectSnapshot.cpp.
References Extension, audacity::cloud::audiocom::sync::CloudProjectsDatabase::Get(), audacity::cloud::audiocom::sync::ProjectCloudExtension::GetCloudProjectId(), audacity::cloud::audiocom::sync::ProjectCloudExtension::IsCloudProject(), NewHashes, audacity::cloud::audiocom::sync::CloudProjectsDatabase::UpdateBlockHashes(), and UpdateCacheFuture.
Referenced by CollectHashes().
|
inline |
Definition at line 91 of file LocalProjectSnapshot.cpp.
References BlockIds, BlockIdToIndex, Blocks, id, tracks, and WaveTrackUtilities::VisitBlocks().
Referenced by ProjectBlocksLock().
std::unordered_map<std::string, size_t> audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::BlockHashToIndex |
Definition at line 59 of file LocalProjectSnapshot.cpp.
Referenced by CollectHashes(), and FillMissingBlocks().
SampleBlockIDSet audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::BlockIds |
Definition at line 53 of file LocalProjectSnapshot.cpp.
Referenced by ProjectBlocksLock(), and VisitBlocks().
std::unordered_map<int64_t, size_t> audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::BlockIdToIndex |
Definition at line 58 of file LocalProjectSnapshot.cpp.
Referenced by CollectHashes(), and VisitBlocks().
std::vector<LockedBlock> audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::Blocks |
Definition at line 55 of file LocalProjectSnapshot.cpp.
Referenced by CollectHashes(), FillMissingBlocks(), ProjectBlocksLock(), and VisitBlocks().
ProjectCloudExtension& audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::Extension |
Definition at line 51 of file LocalProjectSnapshot.cpp.
Referenced by GetHash(), ProjectBlocksLock(), and UpdateProjectHashesInCache().
std::unique_ptr<BlockHasher> audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::Hasher |
Definition at line 61 of file LocalProjectSnapshot.cpp.
Referenced by CollectHashes(), and ProjectBlocksLock().
std::vector<BlockUploadTask> audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::MissingBlocks |
Definition at line 56 of file LocalProjectSnapshot.cpp.
Referenced by FillMissingBlocks().
std::vector<std::pair<int64_t, std::string> > audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::NewHashes |
Definition at line 64 of file LocalProjectSnapshot.cpp.
Referenced by UpdateHash(), and UpdateProjectHashesInCache().
std::function<void()> audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::OnBlocksLocked |
Definition at line 66 of file LocalProjectSnapshot.cpp.
Referenced by CollectHashes().
std::future<void> audacity::cloud::audiocom::sync::LocalProjectSnapshot::ProjectBlocksLock::UpdateCacheFuture |
Definition at line 63 of file LocalProjectSnapshot.cpp.
Referenced by UpdateProjectHashesInCache().