89 std::optional<DBProjectData>
91 std::optional<DBProjectData>
104 std::optional<std::string>
105 GetBlockHash(std::string_view projectId, int64_t blockId)
const;
108 std::string_view projectId,
109 const std::vector<std::pair<int64_t, std::string>>& hashes);
123 std::string_view projectId, std::string_view snapshotId);
124 std::vector<PendingSnapshotData>
129 std::string_view projectId, std::string_view snapshotId);
131 std::string_view projectId, std::string_view snapshotId)
const;
134 const std::vector<PendingProjectBlockData>& blockData);
136 std::string_view projectId, int64_t blockId);
138 std::string_view projectId, std::string_view snapshotId);
140 std::string_view projectId, std::string_view snapshotId);
143 std::optional<DBProjectData>
146 std::optional<DBProjectData>
std::unordered_set< SampleBlockID > SampleBlockIDSet
std::optional< DBProjectData > DoGetProjectData(const sqlite::Row &result) const
void UpdateBlockHashes(std::string_view projectId, const std::vector< std::pair< int64_t, std::string > > &hashes)
void DeleteProject(std::string_view projectId)
std::optional< std::string > GetBlockHash(std::string_view projectId, int64_t blockId) const
bool UpdateProjectData(const DBProjectData &projectData)
void AddPendingSnapshot(const PendingSnapshotData &snapshotData)
static CloudProjectsDatabase & Get()
CloudProjectsDatabase()=default
void UpdateProjectBlockList(std::string_view projectId, const SampleBlockIDSet &blockSet)
bool MarkProjectAsSynced(std::string_view projectId, std::string_view snapshotId)
std::mutex mConnectionMutex
void SetProjectUserSlug(std::string_view projectId, std::string_view slug)
~CloudProjectsDatabase()=default
std::vector< PendingProjectBlockData > GetPendingProjectBlocks(std::string_view projectId, std::string_view snapshotId)
std::optional< DBProjectData > GetProjectData(std::string_view projectId) const
std::shared_ptr< sqlite::SafeConnection > mConnection
void SetFirstSyncDialogShown(std::string_view projectId, bool shown=true)
void RemovePendingProjectBlock(std::string_view projectId, int64_t blockId)
bool IsFirstSyncDialogShown(std::string_view projectId) const
void AddPendingProjectBlocks(const std::vector< PendingProjectBlockData > &blockData)
void AddPendingProjectBlob(const PendingProjectBlobData &blobData)
void RemovePendingSnapshot(std::string_view projectId, std::string_view snapshotId)
bool IsProjectBlockLocked(std::string_view projectId, int64_t blockId) const
std::vector< PendingSnapshotData > GetPendingSnapshots(std::string_view projectId) const
std::optional< DBProjectData > GetProjectDataForPath(const std::string &projectPath) const
void RemovePendingProjectBlob(std::string_view projectId, std::string_view snapshotId)
std::vector< DBProjectData > GetCloudProjects() const
void RemovePendingProjectBlocks(std::string_view projectId, std::string_view snapshotId)
std::string GetProjectUserSlug(std::string_view projectId)
std::optional< PendingProjectBlobData > GetPendingProjectBlob(std::string_view projectId, std::string_view snapshotId) const
sqlite::SafeConnection::Lock GetConnection()
A class representing a row in a result set.
A class representing a result of a run operation.
enum audacity::cloud::audiocom::sync::DBProjectData::SyncStatusType SyncStatus
bool FirstSyncDialogShown
std::vector< uint8_t > BlobData