2014-12-11 10:50:15 +03:00
|
|
|
// Copyright (c) 2012-2014 Konstantin Isakov <ikm@zbackup.org> and ZBackup contributors, see CONTRIBUTORS
|
2014-10-10 13:50:55 +04:00
|
|
|
// Part of ZBackup. Licensed under GNU GPLv2 or later + OpenSSL, see LICENSE
|
2013-07-18 21:33:25 +04:00
|
|
|
|
2015-01-25 19:44:15 +03:00
|
|
|
#ifndef BACKUP_FILE_HH_INCLUDED
|
|
|
|
#define BACKUP_FILE_HH_INCLUDED
|
2013-07-18 21:33:25 +04:00
|
|
|
|
|
|
|
#include <exception>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "encryption_key.hh"
|
|
|
|
#include "ex.hh"
|
|
|
|
#include "zbackup.pb.h"
|
|
|
|
|
|
|
|
namespace BackupFile {
|
|
|
|
|
|
|
|
using std::string;
|
|
|
|
|
|
|
|
DEF_EX( Ex, "Backup file exception", std::exception )
|
|
|
|
DEF_EX( exUnsupportedVersion, "Unsupported version of the backup file format", Ex )
|
|
|
|
|
|
|
|
/// Saves the given BackupInfo data into the given file
|
|
|
|
void save( string const & fileName, EncryptionKey const &, BackupInfo const & );
|
|
|
|
|
|
|
|
/// Loads the given BackupInfo data from the given file
|
|
|
|
void load( string const & fileName, EncryptionKey const &, BackupInfo & );
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|