mirror of
https://github.com/usatiuk/backup.git
synced 2025-10-26 17:37:47 +01:00
proper cmake
This commit is contained in:
32
src/repo/includes/objects/Archive.h
Normal file
32
src/repo/includes/objects/Archive.h
Normal file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// Created by Stepan Usatiuk on 14.04.2023.
|
||||
//
|
||||
|
||||
#ifndef SEMBACKUP_ARCHIVE_H
|
||||
#define SEMBACKUP_ARCHIVE_H
|
||||
|
||||
#include <array>
|
||||
|
||||
#include "../Object.h"
|
||||
|
||||
/// Object representing a backup
|
||||
class Archive : public Object {
|
||||
public:
|
||||
Archive(Object::idType id, std::string name, unsigned long long mtime, std::vector<idType> files, bool full = false);
|
||||
|
||||
/// \copydoc Object::serialize
|
||||
Archive(std::vector<char>::const_iterator &in, const std::vector<char>::const_iterator &end);
|
||||
|
||||
void serialize(std::vector<char> &out) const override;
|
||||
|
||||
/// Returns the name of the archive
|
||||
std::string getKey() const override;
|
||||
|
||||
const std::string name; ///< Archive name
|
||||
const unsigned long long mtime; ///< Time of creation
|
||||
const std::vector<idType> files;///< List of ids of File objects in the Archive
|
||||
const bool isFull = false; ///< Whether this was a full archive
|
||||
};
|
||||
|
||||
|
||||
#endif//SEMBACKUP_ARCHIVE_H
|
||||
Reference in New Issue
Block a user