forked from zbackup/zbackup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
storage_info_file.hh
42 lines (28 loc) · 1.31 KB
/
storage_info_file.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (c) 2012-2014 Konstantin Isakov <[email protected]> and ZBackup contributors, see CONTRIBUTORS
// Part of ZBackup. Licensed under GNU GPLv2 or later + OpenSSL, see LICENSE
#ifndef STORAGE_INFO_FILE_HH_INCLUDED
#define STORAGE_INFO_FILE_HH_INCLUDED
#include <exception>
#include <string>
#include "encryption_key.hh"
#include "ex.hh"
#include "zbackup.pb.h"
namespace StorageInfoFile {
using std::string;
DEF_EX( Ex, "Storage info file exception", std::exception )
DEF_EX( exUnsupportedVersion, "Unsupported version of the storage info file format", Ex )
/// Saves the given StorageInfo data into the given file
void save( string const & fileName, StorageInfo const & );
/// Loads the given StorageInfo data from the given file
void load( string const & fileName, StorageInfo & );
}
namespace ExtendedStorageInfoFile {
using std::string;
DEF_EX( Ex, "Extended storage info file exception", std::exception )
DEF_EX( exUnsupportedVersion, "Unsupported version of the extended storage info file format", Ex )
/// Saves the given ExtendedStorageInfo data into the given file
void save( string const & fileName, EncryptionKey const &, ExtendedStorageInfo const & );
/// Loads the given ExtendedStorageInfo data from the given file
void load( string const & fileName, EncryptionKey const &, ExtendedStorageInfo & );
}
#endif