mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-09 06:42:19 -04:00
Add serialization for slice info
This commit is contained in:
parent
828251cc18
commit
3401e8b49d
1 changed files with 11 additions and 2 deletions
|
@ -399,11 +399,20 @@ struct FileChunksInfo : RsSerializable
|
||||||
CHUNK_STRATEGY_PROGRESSIVE
|
CHUNK_STRATEGY_PROGRESSIVE
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SliceInfo
|
struct SliceInfo : RsSerializable
|
||||||
{
|
{
|
||||||
uint32_t start;
|
uint32_t start;
|
||||||
uint32_t size;
|
uint32_t size;
|
||||||
RsPeerId peer_id;
|
RsPeerId peer_id;
|
||||||
|
|
||||||
|
/// @see RsSerializable
|
||||||
|
void serial_process(RsGenericSerializer::SerializeJob j,
|
||||||
|
RsGenericSerializer::SerializeContext& ctx) override
|
||||||
|
{
|
||||||
|
RS_SERIAL_PROCESS(start);
|
||||||
|
RS_SERIAL_PROCESS(size);
|
||||||
|
RS_SERIAL_PROCESS(peer_id);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
uint64_t file_size; /// real size of the file
|
uint64_t file_size; /// real size of the file
|
||||||
|
@ -432,7 +441,7 @@ struct FileChunksInfo : RsSerializable
|
||||||
RS_SERIAL_PROCESS(chunks);
|
RS_SERIAL_PROCESS(chunks);
|
||||||
RS_SERIAL_PROCESS(compressed_peer_availability_maps);
|
RS_SERIAL_PROCESS(compressed_peer_availability_maps);
|
||||||
RS_SERIAL_PROCESS(active_chunks);
|
RS_SERIAL_PROCESS(active_chunks);
|
||||||
//RS_SERIAL_PROCESS(pending_slices);
|
RS_SERIAL_PROCESS(pending_slices);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue