diff options
Diffstat (limited to 'src/zenserver/projectstore/projectstore.h')
| -rw-r--r-- | src/zenserver/projectstore/projectstore.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/zenserver/projectstore/projectstore.h b/src/zenserver/projectstore/projectstore.h index aa84d04ca..9c0f8790d 100644 --- a/src/zenserver/projectstore/projectstore.h +++ b/src/zenserver/projectstore/projectstore.h @@ -85,6 +85,13 @@ public: void Write(); void Update(const std::filesystem::path& MarkerPath); + struct ChunkInfo + { + Oid ChunkId; + uint64_t ChunkSize; + }; + + std::vector<ChunkInfo> GetAllChunksInfo(); void IterateFileMap(std::function<void(const Oid&, const std::string_view& ServerPath, const std::string_view& ClientPath)>&& Fn); void IterateOplog(std::function<void(CbObject)>&& Fn); void IterateOplogWithKey(std::function<void(int, const Oid&, CbObject)>&& Fn); @@ -287,12 +294,22 @@ public: const std::string_view OplogId, bool FilterClient, CbObject& OutPayload); + std::pair<HttpResponseCode, std::string> GetProjectChunks(const std::string_view ProjectId, + const std::string_view OplogId, + CbObject& OutPayload); std::pair<HttpResponseCode, std::string> GetChunkInfo(const std::string_view ProjectId, const std::string_view OplogId, const std::string_view ChunkId, CbObject& OutPayload); std::pair<HttpResponseCode, std::string> GetChunkRange(const std::string_view ProjectId, const std::string_view OplogId, + const Oid ChunkId, + uint64_t Offset, + uint64_t Size, + ZenContentType AcceptType, + IoBuffer& OutChunk); + std::pair<HttpResponseCode, std::string> GetChunkRange(const std::string_view ProjectId, + const std::string_view OplogId, const std::string_view ChunkId, uint64_t Offset, uint64_t Size, |