mirror of
https://github.com/usatiuk/backup.git
synced 2025-10-27 01:37:49 +01:00
proper cmake
This commit is contained in:
33
src/repo/includes/objects/Chunk.h
Normal file
33
src/repo/includes/objects/Chunk.h
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// Created by Stepan Usatiuk on 14.04.2023.
|
||||
//
|
||||
|
||||
#ifndef SEMBACKUP_CHUNK_H
|
||||
#define SEMBACKUP_CHUNK_H
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
#include "../Object.h"
|
||||
|
||||
/// Object representing a part of a File
|
||||
class Chunk : public Object {
|
||||
public:
|
||||
Chunk(idType id, std::string, std::vector<char> data);
|
||||
|
||||
/// Deserialization constructor
|
||||
Chunk(std::vector<char>::const_iterator &in, const std::vector<char>::const_iterator &end);
|
||||
|
||||
/// \copydoc Object::serialize
|
||||
void serialize(std::vector<char> &out) const override;
|
||||
|
||||
/// Returns the MD5 of the chunk
|
||||
std::string getKey() const override;
|
||||
|
||||
const std::string md5; ///< MD5 hash of the chunk
|
||||
const std::vector<char> data; ///< Raw chunk data
|
||||
const unsigned long long length;///< Size of chunk in bytes
|
||||
};
|
||||
|
||||
|
||||
#endif//SEMBACKUP_CHUNK_H
|
||||
Reference in New Issue
Block a user